2baf29b3ae
Deliver encrypted health zone, observation API, baseline maturity pipeline, page-data bindings, and H5/WeChat channel integration for health P0. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
840 B
JavaScript
24 lines
840 B
JavaScript
export const HEALTH_PHASES = Object.freeze({
|
|
P0: 'p0_entry_and_capture',
|
|
P1: 'p1_baseline_and_events',
|
|
P2: 'p2_devices_and_notifications',
|
|
P3: 'p3_medical_depth',
|
|
P4: 'p4_authorized_sharing',
|
|
});
|
|
|
|
export const HEALTH_CONNECTORS = Object.freeze({
|
|
apple_health: { phase: HEALTH_PHASES.P2, available: false, reason: 'connector_not_implemented' },
|
|
ble_device: { phase: HEALTH_PHASES.P2, available: false, reason: 'connector_not_implemented' },
|
|
manual: { phase: HEALTH_PHASES.P0, available: true },
|
|
photo: { phase: HEALTH_PHASES.P0, available: true },
|
|
wechat: { phase: HEALTH_PHASES.P0, available: true },
|
|
});
|
|
|
|
export function listHealthConnectors() {
|
|
return Object.entries(HEALTH_CONNECTORS).map(([id, meta]) => ({ id, ...meta }));
|
|
}
|
|
|
|
export function resolveHealthConnector(id) {
|
|
return HEALTH_CONNECTORS[id] ?? null;
|
|
}
|