@fuego-systems/core 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,8 @@ export declare const EGES_EQUIPO_SYSTEM = "https://www.cdrossi.com/eges/equipo";
9
9
  export declare const EGES_TURNO_SYSTEM = "https://www.cdrossi.com/eges/turno";
10
10
  export declare const EGES_PRACTICA_SYSTEM = "https://www.cdrossi.com/eges/practica";
11
11
  export declare const EGES_PRESTACION_SYSTEM = "https://www.cdrossi.com/eges/prestacion";
12
+ export declare const EGES_OBRA_SOCIAL_SYSTEM = "https://www.cdrossi.com/eges/obra-social";
13
+ export declare const EGES_OBRA_SOCIAL_PLAN_SYSTEM = "https://www.cdrossi.com/eges/obra-social-plan";
12
14
  export declare const EGES_CONDICION_RESPUESTA_SYSTEM = "https://www.cdrossi.com/eges/condicion-respuesta";
13
15
  export declare const RENAPER_BASE = "https://www.argentina.gob.ar/interior/renaper";
14
16
  export declare const MATRICULA_NACIONAL_SYSTEM = "https://www.argentina.gob.ar/interior/renaper/matricula-nacional";
@@ -27,6 +29,7 @@ export declare const MIGRATE_DEVICE_TASK_CODE = "eges-migrate-device";
27
29
  export declare const MIGRATE_SITE_TASK_CODE = "eges-migrate-site";
28
30
  export declare const MIGRATE_SERVICE_TASK_CODE = "eges-migrate-service";
29
31
  export declare const MIGRATE_APPOINTMENT_TASK_CODE = "eges-migrate-appointment";
32
+ export declare const MIGRATE_INSURER_TASK_CODE = "eges-migrate-insurer";
30
33
  export declare const REVIEW_APPOINTMENT_TASK_CODE = "review-appointment";
31
34
  export declare const SYNCHRONIZE_APPOINTMENT_TASK_CODE = "synchronize-appointment";
32
35
  /**
@@ -75,6 +78,21 @@ export declare const EMAIL_TASK_OUTPUT_SUBJECT = "subject";
75
78
  export declare const EMAIL_TASK_OUTPUT_HTML = "html";
76
79
  /** Task.output code for the rendered email plain-text body. Companion to `subject`/`html`. */
77
80
  export declare const EMAIL_TASK_OUTPUT_TEXT = "text";
81
+ /**
82
+ * Task.code for the user-invitation email. Rossi Admin invites a user
83
+ * (`sendEmail:false` so Medplum sends nothing) and enqueues this Task; the
84
+ * `send-user-invite-email` bot resolves the one-time set-password link from the
85
+ * user's `UserSecurityRequest` and sends a branded invitation email.
86
+ */
87
+ export declare const SEND_USER_INVITE_EMAIL_TASK_CODE = "send-user-invite-email";
88
+ /**
89
+ * Task.input code carrying `ProjectMembership/{id}` for the invited member. The
90
+ * bot resolves the recipient email, display name, and the `User` (for the
91
+ * one-time `UserSecurityRequest`) from that membership server-side — it never
92
+ * trusts a caller-supplied recipient, so a crafted Task cannot redirect an
93
+ * invite secret to another address.
94
+ */
95
+ export declare const INVITE_TASK_INPUT_MEMBERSHIP_REF = "invite-membership-ref";
78
96
  export declare const HL7_IMPORT_TASK_SYSTEM = "http://example.org/CodeSystem/hl7-import-tasks";
79
97
  export declare const HL7_IMPORT_APPOINTMENT_TASK_CODE = "import-orm-o01-appointment";
80
98
  export declare const HL7_IMPORT_TASK_INPUT_SYSTEM = "http://example.org/CodeSystem/hl7-import-task-inputs";
@@ -158,6 +176,15 @@ export declare const HS_SEARCH_ALIASES_EXTENSION_URL = "https://www.cdrossi.com/
158
176
  * }
159
177
  */
160
178
  export declare const HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = "https://www.cdrossi.com/fhir/StructureDefinition/hs-search-protocol-aliases";
179
+ /** Extension URL marking a Practitioner as a technician/operator (patient-facing surfaces must hide the name). */
180
+ export declare const PRACTITIONER_IS_TECHNICIAN_EXTENSION_URL = "https://www.cdrossi.com/fhir/StructureDefinition/is-technician";
181
+ /**
182
+ * Identifier system to dedupe Communication resources auditing sent confirmation
183
+ * emails. The paired Provenance carries no identifier of its own (FHIR R4
184
+ * Provenance has no `identifier` element); it is deduped by its `target`
185
+ * reference to this Communication.
186
+ */
187
+ export declare const COMMUNICATION_EMAIL_KEY_SYSTEM = "https://www.cdrossi.com/fhir/communication-email-key";
161
188
  /** Identifier system for insurance company (payer) Organization resources */
162
189
  export declare const INSURER_IDENTIFIER_SYSTEM = "https://www.cdrossi.com/fhir/CodeSystem/insurers";
163
190
  /** HL7 organization-type code system */
@@ -168,6 +195,37 @@ export declare const ORG_TYPE_PAY_CODE = "pay";
168
195
  export declare const ORG_TYPE_PROV_CODE = "prov";
169
196
  /** Identifier system for InsurancePlan resources (specific plan products) */
170
197
  export declare const INSURANCE_PLAN_IDENTIFIER_SYSTEM = "https://www.cdrossi.com/fhir/CodeSystem/insurance-plans";
198
+ /**
199
+ * Canonical `url` of the singleton ConceptMap that holds the parametrized
200
+ * práctica → práctica mapping rules (patient insurance / age / sex). The
201
+ * resolver fetches it by this url; there is at most one per project.
202
+ */
203
+ export declare const PRACTICA_MAPPING_CONCEPT_MAP_URL = "https://www.cdrossi.com/fhir/ConceptMap/practica-mapping";
204
+ /**
205
+ * Tag applied to the práctica mapping ConceptMap for discovery via
206
+ * `ConceptMap?_tag=<BILLING_CODES_TAG_SYSTEM>|<PRACTICA_MAPPING_TAG_CODE>`
207
+ * (same tag system as the billing CodeSystems).
208
+ */
209
+ export declare const PRACTICA_MAPPING_TAG_CODE = "practica-mapping";
210
+ /**
211
+ * Complex extension on each ConceptMap `element.target[]` carrying the
212
+ * conditions under which the mapping applies. Sub-extensions (all optional,
213
+ * ANDed together):
214
+ * - `insurance`: valueReference → InsurancePlan (plan tier) or Organization
215
+ * type `pay` (obra social tier)
216
+ * - `ageRange`: valueRange — patient age in whole years, bounds inclusive
217
+ * - `sex`: valueCode — FHIR administrative gender
218
+ */
219
+ export declare const PRACTICA_MAPPING_CONDITION_EXTENSION_URL = "https://www.cdrossi.com/fhir/StructureDefinition/practica-mapping-condition";
220
+ /**
221
+ * Extension on the `$resolve-protocol` response Bundle's **meta** carrying
222
+ * the JSON-serialized `EffectivePracticaSet` (valueString) when the caller
223
+ * sent patient context. The operation's registered output type is `Bundle`,
224
+ * so the effective set rides on the Bundle rather than a separate Parameters
225
+ * response — and since Bundle is not a DomainResource (no top-level
226
+ * `extension` element), it lives on `Bundle.meta.extension`.
227
+ */
228
+ export declare const EFFECTIVE_PRACTICA_SET_EXTENSION_URL = "https://www.cdrossi.com/fhir/StructureDefinition/effective-practica-set";
171
229
  /**
172
230
  * Tag system applied to every billing-codes CodeSystem resource,
173
231
  * enabling dynamic discovery via `CodeSystem?_tag=<system>|<code>`.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,iCAAiC,CAAA;AACvD,eAAO,MAAM,gBAAgB,iCAAiC,CAAA;AAE9D,eAAO,MAAM,oBAAoB,0CAAiC,CAAA;AAClE,eAAO,MAAM,qBAAqB,4CAAmC,CAAA;AACrE,eAAO,MAAM,oBAAoB,0CAAiC,CAAA;AAClE,eAAO,MAAM,kBAAkB,wCAA+B,CAAA;AAC9D,eAAO,MAAM,6BAA6B,mDAA0C,CAAA;AACpF,eAAO,MAAM,kBAAkB,wCAA+B,CAAA;AAC9D,eAAO,MAAM,iBAAiB,uCAA8B,CAAA;AAC5D,eAAO,MAAM,oBAAoB,0CAAiC,CAAA;AAClE,eAAO,MAAM,sBAAsB,4CAAmC,CAAA;AACtE,eAAO,MAAM,+BAA+B,qDAA4C,CAAA;AACxF,eAAO,MAAM,YAAY,kDAAkD,CAAA;AAC3E,eAAO,MAAM,yBAAyB,qEAAuC,CAAA;AAC7E,eAAO,MAAM,2BAA2B,uEAAyC,CAAA;AAEjF,eAAO,MAAM,mCAAmC,sEAAsE,CAAA;AACtH,eAAO,MAAM,mCAAmC,uDAAuC,CAAA;AACvF,eAAO,MAAM,mBAAmB,8CAA8B,CAAA;AAE9D,eAAO,MAAM,wBAAwB,8DAA8C,CAAA;AACnF,eAAO,MAAM,gCAAgC,cAAc,CAAA;AAG3D,eAAO,MAAM,mBAAmB,uCAAuB,CAAA;AACvD,eAAO,MAAM,yBAAyB,6CAA6B,CAAA;AACnE,eAAO,M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;AAIrH,kHAAkH;AAClH,eAAO,MAAM,wCAAwC,mEAAmD,CAAA;AAIxG;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,yDAAyC,CAAA;AAIpF,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,qDAAqC,CAAA;AAE3E,wCAAwC;AACxC,eAAO,MAAM,eAAe,4DAA4D,CAAA;AAExF,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,QAAQ,CAAA;AAEtC,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,SAAS,CAAA;AAIxC,6EAA6E;AAC7E,eAAO,MAAM,gCAAgC,4DAA4C,CAAA;AAIzF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,6DAA6C,CAAA;AAE1F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,qBAAqB,CAAA;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,wCAAwC,gFAAgE,CAAA;AAErH;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,4EAA4D,CAAA;AAI7G;;;GAGG;AACH,eAAO,MAAM,wBAAwB,sCAAsB,CAAA;AAE3D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,6EAA6D,CAAA;AAErG;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,yDAAyC,CAAA;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,6DAA6D,CAAA;AACpG,eAAO,MAAM,wBAAwB,SAAS,CAAA"}
package/dist/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HS_ACTION_SYSTEM = exports.SERVICE_REQUEST_GROUP_SYSTEM = exports.HL7_IMPORT_TASK_OUTPUT_SYSTEM = exports.HL7_IMPORT_TASK_INPUT_SYSTEM = exports.HL7_IMPORT_APPOINTMENT_TASK_CODE = exports.HL7_IMPORT_TASK_SYSTEM = exports.EMAIL_TASK_OUTPUT_TEXT = exports.EMAIL_TASK_OUTPUT_HTML = exports.EMAIL_TASK_OUTPUT_SUBJECT = exports.EMAIL_TASK_OUTPUT_APPOINTMENT_COUNT = exports.EMAIL_TASK_OUTPUT_RECIPIENT = exports.EMAIL_TASK_INPUT_TIMEZONE = exports.EMAIL_TASK_INPUT_PATIENT_REF = exports.EMAIL_TASK_INPUT_RECIPIENT_EMAIL = exports.EMAIL_TASK_INPUT_SESSION_GROUP_ID = exports.SEND_APPOINTMENT_CONFIRMATION_EMAIL_TASK_CODE = exports.TASK_BUSINESS_STATUS_REVIEWED_TOKEN = exports.TASK_BUSINESS_STATUS_REVIEWED_CODE = exports.TASK_BUSINESS_STATUS_SYSTEM = exports.SYNCHRONIZE_APPOINTMENT_TASK_CODE = exports.REVIEW_APPOINTMENT_TASK_CODE = exports.MIGRATE_APPOINTMENT_TASK_CODE = exports.MIGRATE_SERVICE_TASK_CODE = exports.MIGRATE_SITE_TASK_CODE = exports.MIGRATE_DEVICE_TASK_CODE = exports.MIGRATE_PATIENT_TASK_CODE = exports.MIGRATE_PRACTITIONER_TASK_CODE = exports.MIGRATE_TASK_OUTPUT_SYSTEM = exports.MIGRATE_TASK_INPUT_SYSTEM = exports.MIGRATE_TASK_SYSTEM = exports.PRACTITIONER_ROLE_REFERRING_CODE = exports.PRACTITIONER_ROLE_SYSTEM = exports.SERVICE_TYPE_SYSTEM = exports.REQUIRES_PRACTITIONER_EXTENSION_URL = exports.SCHEDULING_PARAMETERS_EXTENSION_URL = exports.MATRICULA_PROVINCIAL_SYSTEM = exports.MATRICULA_NACIONAL_SYSTEM = exports.RENAPER_BASE = exports.EGES_CONDICION_RESPUESTA_SYSTEM = exports.EGES_PRESTACION_SYSTEM = exports.EGES_PRACTICA_SYSTEM = exports.EGES_TURNO_SYSTEM = exports.EGES_EQUIPO_SYSTEM = exports.EGES_MEDICO_ASOCIACION_SYSTEM = exports.EGES_MEDICO_SYSTEM = exports.EGES_SUCURSAL_SYSTEM = exports.EGES_DOCUMENTO_SYSTEM = exports.EGES_PACIENTE_SYSTEM = exports.EGES_SYSTEM_BASE = exports.FHIR_BASE = void 0;
4
- exports.BILLING_CID_CONTEXT_CODE = exports.BILLING_CID_CONTEXT_SYSTEM = exports.BILLING_CID_PD_IDENTIFIER_SYSTEM = exports.BILLING_CODES_ORG_EXTENSION = exports.BILLING_CODES_TAG_CODE = exports.BILLING_CODES_TAG_SYSTEM = exports.INSURANCE_PLAN_IDENTIFIER_SYSTEM = exports.ORG_TYPE_PROV_CODE = exports.ORG_TYPE_PAY_CODE = exports.ORG_TYPE_SYSTEM = exports.INSURER_IDENTIFIER_SYSTEM = exports.HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = exports.HS_SEARCH_ALIASES_EXTENSION_URL = exports.PD_HEALTHCARE_SERVICE_EXTENSION_URL = exports.HS_BILLING_EXTENSION_URL = exports.HS_PROTOCOL_EXTENSION_URL = exports.SPECIALITY_SYSTEM = exports.SERVICE_CATEGORY_SYSTEM = exports.SERVICE_CODES_SYSTEM = exports.PD_TYPE_PROTOCOL_GROUP = exports.PD_TYPE_SYSTEM = exports.ORDER_METADATA_EXTENSION_URL = exports.MEDICAL_ORDER_DOCUMENT_CODE = exports.MEDICAL_ORDER_DOCUMENT_SYSTEM = exports.HS_ADDON_SYSTEM = void 0;
3
+ exports.HL7_IMPORT_TASK_SYSTEM = exports.INVITE_TASK_INPUT_MEMBERSHIP_REF = exports.SEND_USER_INVITE_EMAIL_TASK_CODE = exports.EMAIL_TASK_OUTPUT_TEXT = exports.EMAIL_TASK_OUTPUT_HTML = exports.EMAIL_TASK_OUTPUT_SUBJECT = exports.EMAIL_TASK_OUTPUT_APPOINTMENT_COUNT = exports.EMAIL_TASK_OUTPUT_RECIPIENT = exports.EMAIL_TASK_INPUT_TIMEZONE = exports.EMAIL_TASK_INPUT_PATIENT_REF = exports.EMAIL_TASK_INPUT_RECIPIENT_EMAIL = exports.EMAIL_TASK_INPUT_SESSION_GROUP_ID = exports.SEND_APPOINTMENT_CONFIRMATION_EMAIL_TASK_CODE = exports.TASK_BUSINESS_STATUS_REVIEWED_TOKEN = exports.TASK_BUSINESS_STATUS_REVIEWED_CODE = exports.TASK_BUSINESS_STATUS_SYSTEM = exports.SYNCHRONIZE_APPOINTMENT_TASK_CODE = exports.REVIEW_APPOINTMENT_TASK_CODE = exports.MIGRATE_INSURER_TASK_CODE = exports.MIGRATE_APPOINTMENT_TASK_CODE = exports.MIGRATE_SERVICE_TASK_CODE = exports.MIGRATE_SITE_TASK_CODE = exports.MIGRATE_DEVICE_TASK_CODE = exports.MIGRATE_PATIENT_TASK_CODE = exports.MIGRATE_PRACTITIONER_TASK_CODE = exports.MIGRATE_TASK_OUTPUT_SYSTEM = exports.MIGRATE_TASK_INPUT_SYSTEM = exports.MIGRATE_TASK_SYSTEM = exports.PRACTITIONER_ROLE_REFERRING_CODE = exports.PRACTITIONER_ROLE_SYSTEM = exports.SERVICE_TYPE_SYSTEM = exports.REQUIRES_PRACTITIONER_EXTENSION_URL = exports.SCHEDULING_PARAMETERS_EXTENSION_URL = exports.MATRICULA_PROVINCIAL_SYSTEM = exports.MATRICULA_NACIONAL_SYSTEM = exports.RENAPER_BASE = exports.EGES_CONDICION_RESPUESTA_SYSTEM = exports.EGES_OBRA_SOCIAL_PLAN_SYSTEM = exports.EGES_OBRA_SOCIAL_SYSTEM = exports.EGES_PRESTACION_SYSTEM = exports.EGES_PRACTICA_SYSTEM = exports.EGES_TURNO_SYSTEM = exports.EGES_EQUIPO_SYSTEM = exports.EGES_MEDICO_ASOCIACION_SYSTEM = exports.EGES_MEDICO_SYSTEM = exports.EGES_SUCURSAL_SYSTEM = exports.EGES_DOCUMENTO_SYSTEM = exports.EGES_PACIENTE_SYSTEM = exports.EGES_SYSTEM_BASE = exports.FHIR_BASE = void 0;
4
+ exports.BILLING_CID_CONTEXT_CODE = exports.BILLING_CID_CONTEXT_SYSTEM = exports.BILLING_CID_PD_IDENTIFIER_SYSTEM = exports.BILLING_CODES_ORG_EXTENSION = exports.BILLING_CODES_TAG_CODE = exports.BILLING_CODES_TAG_SYSTEM = exports.EFFECTIVE_PRACTICA_SET_EXTENSION_URL = exports.PRACTICA_MAPPING_CONDITION_EXTENSION_URL = exports.PRACTICA_MAPPING_TAG_CODE = exports.PRACTICA_MAPPING_CONCEPT_MAP_URL = exports.INSURANCE_PLAN_IDENTIFIER_SYSTEM = exports.ORG_TYPE_PROV_CODE = exports.ORG_TYPE_PAY_CODE = exports.ORG_TYPE_SYSTEM = exports.INSURER_IDENTIFIER_SYSTEM = exports.COMMUNICATION_EMAIL_KEY_SYSTEM = exports.PRACTITIONER_IS_TECHNICIAN_EXTENSION_URL = exports.HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = exports.HS_SEARCH_ALIASES_EXTENSION_URL = exports.PD_HEALTHCARE_SERVICE_EXTENSION_URL = exports.HS_BILLING_EXTENSION_URL = exports.HS_PROTOCOL_EXTENSION_URL = exports.SPECIALITY_SYSTEM = exports.SERVICE_CATEGORY_SYSTEM = exports.SERVICE_CODES_SYSTEM = exports.PD_TYPE_PROTOCOL_GROUP = exports.PD_TYPE_SYSTEM = exports.ORDER_METADATA_EXTENSION_URL = exports.MEDICAL_ORDER_DOCUMENT_CODE = exports.MEDICAL_ORDER_DOCUMENT_SYSTEM = exports.HS_ADDON_SYSTEM = exports.HS_ACTION_SYSTEM = exports.SERVICE_REQUEST_GROUP_SYSTEM = exports.HL7_IMPORT_TASK_OUTPUT_SYSTEM = exports.HL7_IMPORT_TASK_INPUT_SYSTEM = exports.HL7_IMPORT_APPOINTMENT_TASK_CODE = void 0;
5
5
  exports.FHIR_BASE = 'https://www.cdrossi.com/fhir';
6
6
  exports.EGES_SYSTEM_BASE = 'https://www.cdrossi.com/eges';
7
7
  exports.EGES_PACIENTE_SYSTEM = `${exports.EGES_SYSTEM_BASE}/paciente`;
@@ -13,6 +13,8 @@ exports.EGES_EQUIPO_SYSTEM = `${exports.EGES_SYSTEM_BASE}/equipo`;
13
13
  exports.EGES_TURNO_SYSTEM = `${exports.EGES_SYSTEM_BASE}/turno`;
14
14
  exports.EGES_PRACTICA_SYSTEM = `${exports.EGES_SYSTEM_BASE}/practica`;
15
15
  exports.EGES_PRESTACION_SYSTEM = `${exports.EGES_SYSTEM_BASE}/prestacion`;
16
+ exports.EGES_OBRA_SOCIAL_SYSTEM = `${exports.EGES_SYSTEM_BASE}/obra-social`;
17
+ exports.EGES_OBRA_SOCIAL_PLAN_SYSTEM = `${exports.EGES_SYSTEM_BASE}/obra-social-plan`;
16
18
  exports.EGES_CONDICION_RESPUESTA_SYSTEM = `${exports.EGES_SYSTEM_BASE}/condicion-respuesta`;
17
19
  exports.RENAPER_BASE = 'https://www.argentina.gob.ar/interior/renaper';
18
20
  exports.MATRICULA_NACIONAL_SYSTEM = `${exports.RENAPER_BASE}/matricula-nacional`;
@@ -32,6 +34,7 @@ exports.MIGRATE_DEVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-device`;
32
34
  exports.MIGRATE_SITE_TASK_CODE = `${MIGRATE_TASK_BASE}-site`;
33
35
  exports.MIGRATE_SERVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-service`;
34
36
  exports.MIGRATE_APPOINTMENT_TASK_CODE = `${MIGRATE_TASK_BASE}-appointment`;
37
+ exports.MIGRATE_INSURER_TASK_CODE = `${MIGRATE_TASK_BASE}-insurer`;
35
38
  exports.REVIEW_APPOINTMENT_TASK_CODE = 'review-appointment';
36
39
  exports.SYNCHRONIZE_APPOINTMENT_TASK_CODE = 'synchronize-appointment';
37
40
  /**
@@ -80,6 +83,21 @@ exports.EMAIL_TASK_OUTPUT_SUBJECT = 'subject';
80
83
  exports.EMAIL_TASK_OUTPUT_HTML = 'html';
81
84
  /** Task.output code for the rendered email plain-text body. Companion to `subject`/`html`. */
82
85
  exports.EMAIL_TASK_OUTPUT_TEXT = 'text';
86
+ /**
87
+ * Task.code for the user-invitation email. Rossi Admin invites a user
88
+ * (`sendEmail:false` so Medplum sends nothing) and enqueues this Task; the
89
+ * `send-user-invite-email` bot resolves the one-time set-password link from the
90
+ * user's `UserSecurityRequest` and sends a branded invitation email.
91
+ */
92
+ exports.SEND_USER_INVITE_EMAIL_TASK_CODE = 'send-user-invite-email';
93
+ /**
94
+ * Task.input code carrying `ProjectMembership/{id}` for the invited member. The
95
+ * bot resolves the recipient email, display name, and the `User` (for the
96
+ * one-time `UserSecurityRequest`) from that membership server-side — it never
97
+ * trusts a caller-supplied recipient, so a crafted Task cannot redirect an
98
+ * invite secret to another address.
99
+ */
100
+ exports.INVITE_TASK_INPUT_MEMBERSHIP_REF = 'invite-membership-ref';
83
101
  exports.HL7_IMPORT_TASK_SYSTEM = 'http://example.org/CodeSystem/hl7-import-tasks';
84
102
  exports.HL7_IMPORT_APPOINTMENT_TASK_CODE = 'import-orm-o01-appointment';
85
103
  exports.HL7_IMPORT_TASK_INPUT_SYSTEM = 'http://example.org/CodeSystem/hl7-import-task-inputs';
@@ -167,6 +185,17 @@ exports.HS_SEARCH_ALIASES_EXTENSION_URL = `${exports.FHIR_BASE}/StructureDefinit
167
185
  * }
168
186
  */
169
187
  exports.HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = `${exports.FHIR_BASE}/StructureDefinition/hs-search-protocol-aliases`;
188
+ // ─── Practitioner ────────────────────────────────────────────────────────────
189
+ /** Extension URL marking a Practitioner as a technician/operator (patient-facing surfaces must hide the name). */
190
+ exports.PRACTITIONER_IS_TECHNICIAN_EXTENSION_URL = `${exports.FHIR_BASE}/StructureDefinition/is-technician`;
191
+ // ─── Email audit trail ───────────────────────────────────────────────────────
192
+ /**
193
+ * Identifier system to dedupe Communication resources auditing sent confirmation
194
+ * emails. The paired Provenance carries no identifier of its own (FHIR R4
195
+ * Provenance has no `identifier` element); it is deduped by its `target`
196
+ * reference to this Communication.
197
+ */
198
+ exports.COMMUNICATION_EMAIL_KEY_SYSTEM = `${exports.FHIR_BASE}/communication-email-key`;
170
199
  // ─── Organization (payer / insurance company) ─────────────────────────────────
171
200
  /** Identifier system for insurance company (payer) Organization resources */
172
201
  exports.INSURER_IDENTIFIER_SYSTEM = `${exports.FHIR_BASE}/CodeSystem/insurers`;
@@ -179,6 +208,38 @@ exports.ORG_TYPE_PROV_CODE = 'prov';
179
208
  // ─── InsurancePlan ────────────────────────────────────────────────────────────
180
209
  /** Identifier system for InsurancePlan resources (specific plan products) */
181
210
  exports.INSURANCE_PLAN_IDENTIFIER_SYSTEM = `${exports.FHIR_BASE}/CodeSystem/insurance-plans`;
211
+ // ─── Práctica mapping registry (#202) ────────────────────────────────────────
212
+ /**
213
+ * Canonical `url` of the singleton ConceptMap that holds the parametrized
214
+ * práctica → práctica mapping rules (patient insurance / age / sex). The
215
+ * resolver fetches it by this url; there is at most one per project.
216
+ */
217
+ exports.PRACTICA_MAPPING_CONCEPT_MAP_URL = `${exports.FHIR_BASE}/ConceptMap/practica-mapping`;
218
+ /**
219
+ * Tag applied to the práctica mapping ConceptMap for discovery via
220
+ * `ConceptMap?_tag=<BILLING_CODES_TAG_SYSTEM>|<PRACTICA_MAPPING_TAG_CODE>`
221
+ * (same tag system as the billing CodeSystems).
222
+ */
223
+ exports.PRACTICA_MAPPING_TAG_CODE = 'practica-mapping';
224
+ /**
225
+ * Complex extension on each ConceptMap `element.target[]` carrying the
226
+ * conditions under which the mapping applies. Sub-extensions (all optional,
227
+ * ANDed together):
228
+ * - `insurance`: valueReference → InsurancePlan (plan tier) or Organization
229
+ * type `pay` (obra social tier)
230
+ * - `ageRange`: valueRange — patient age in whole years, bounds inclusive
231
+ * - `sex`: valueCode — FHIR administrative gender
232
+ */
233
+ exports.PRACTICA_MAPPING_CONDITION_EXTENSION_URL = `${exports.FHIR_BASE}/StructureDefinition/practica-mapping-condition`;
234
+ /**
235
+ * Extension on the `$resolve-protocol` response Bundle's **meta** carrying
236
+ * the JSON-serialized `EffectivePracticaSet` (valueString) when the caller
237
+ * sent patient context. The operation's registered output type is `Bundle`,
238
+ * so the effective set rides on the Bundle rather than a separate Parameters
239
+ * response — and since Bundle is not a DomainResource (no top-level
240
+ * `extension` element), it lives on `Bundle.meta.extension`.
241
+ */
242
+ exports.EFFECTIVE_PRACTICA_SET_EXTENSION_URL = `${exports.FHIR_BASE}/StructureDefinition/effective-practica-set`;
182
243
  // ─── Billing CodeSystem discovery tag ────────────────────────────────────────
183
244
  /**
184
245
  * Tag system applied to every billing-codes CodeSystem resource,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;AAAa,QAAA,SAAS,GAAG,8BAA8B,CAAA;AAC1C,QAAA,gBAAgB,GAAG,8BAA8B,CAAA;AAEjD,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,qBAAqB,GAAG,GAAG,wBAAgB,aAAa,CAAA;AACxD,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,kBAAkB,GAAG,GAAG,wBAAgB,SAAS,CAAA;AACjD,QAAA,6BAA6B,GAAG,GAAG,wBAAgB,oBAAoB,CAAA;AACvE,QAAA,kBAAkB,GAAG,GAAG,wBAAgB,SAAS,CAAA;AACjD,QAAA,iBAAiB,GAAG,GAAG,wBAAgB,QAAQ,CAAA;AAC/C,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,sBAAsB,GAAG,GAAG,wBAAgB,aAAa,CAAA;AACzD,QAAA,+BAA+B,GAAG,GAAG,wBAAgB,sBAAsB,CAAA;AAC3E,QAAA,YAAY,GAAG,+CAA+C,CAAA;AAC9D,QAAA,yBAAyB,GAAG,GAAG,oBAAY,qBAAqB,CAAA;AAChE,QAAA,2BAA2B,GAAG,GAAG,oBAAY,uBAAuB,CAAA;AAEpE,QAAA,mCAAmC,GAAG,mEAAmE,CAAA;AACzG,QAAA,mCAAmC,GAAG,GAAG,iBAAS,wBAAwB,CAAA;AAC1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wBAAwB,CAAA;AAErE,wGAAwG;AAC3F,QAAA,yBAAyB,GAAG,GAAG,iBAAS,kCAAkC,CAAA;AAEvF,mGAAmG;AACtF,QAAA,wBAAwB,GAAG,GAAG,iBAAS,iCAAiC,CAAA;AAErF,gIAAgI;AACnH,QAAA,mCAAmC,GAAG,GAAG,iBAAS,4CAA4C,CAAA;AAE3G;;;;;;;;;;GAUG;AACU,QAAA,+BAA+B,GAAG,GAAG,iBAAS,wCAAwC,CAAA;AAEnG;;;;;;;;;;;GAWG;AACU,QAAA,wCAAwC,GAAG,GAAG,iBAAS,iDAAiD,CAAA;AAErH,iFAAiF;AAEjF,6EAA6E;AAChE,QAAA,yBAAyB,GAAG,GAAG,iBAAS,sBAAsB,CAAA;AAE3E,wCAAwC;AAC3B,QAAA,eAAe,GAAG,yDAAyD,CAAA;AAExF,iDAAiD;AACpC,QAAA,iBAAiB,GAAG,KAAK,CAAA;AAEtC,uEAAuE;AAC1D,QAAA,kBAAkB,GAAG,MAAM,CAAA;AAExC,iFAAiF;AAEjF,6EAA6E;AAChE,QAAA,gCAAgC,GAAG,GAAG,iBAAS,6BAA6B,CAAA;AAEzF,gFAAgF;AAEhF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,GAAG,iBAAS,OAAO,CAAA;AAE3D;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,eAAe,CAAA;AAErD;;;;;;;;GAQG;AACU,QAAA,2BAA2B,GAAG,GAAG,iBAAS,8CAA8C,CAAA;AAErG;;;;;GAKG;AACU,QAAA,gCAAgC,GAAG,GAAG,iBAAS,0BAA0B,CAAA;AAEtF;;;;;GAKG;AACU,QAAA,0BAA0B,GAAG,0DAA0D,CAAA;AACvF,QAAA,wBAAwB,GAAG,MAAM,CAAA","sourcesContent":["export const FHIR_BASE = 'https://www.cdrossi.com/fhir'\nexport const EGES_SYSTEM_BASE = 'https://www.cdrossi.com/eges'\n\nexport const EGES_PACIENTE_SYSTEM = `${EGES_SYSTEM_BASE}/paciente`\nexport const EGES_DOCUMENTO_SYSTEM = `${EGES_SYSTEM_BASE}/documentos`\nexport const EGES_SUCURSAL_SYSTEM = `${EGES_SYSTEM_BASE}/sucursal`\nexport const EGES_MEDICO_SYSTEM = `${EGES_SYSTEM_BASE}/medico`\nexport const EGES_MEDICO_ASOCIACION_SYSTEM = `${EGES_SYSTEM_BASE}/medico-asociacion`\nexport const EGES_EQUIPO_SYSTEM = `${EGES_SYSTEM_BASE}/equipo`\nexport const EGES_TURNO_SYSTEM = `${EGES_SYSTEM_BASE}/turno`\nexport const EGES_PRACTICA_SYSTEM = `${EGES_SYSTEM_BASE}/practica`\nexport const EGES_PRESTACION_SYSTEM = `${EGES_SYSTEM_BASE}/prestacion`\nexport const EGES_CONDICION_RESPUESTA_SYSTEM = `${EGES_SYSTEM_BASE}/condicion-respuesta`\nexport const RENAPER_BASE = 'https://www.argentina.gob.ar/interior/renaper'\nexport const MATRICULA_NACIONAL_SYSTEM = `${RENAPER_BASE}/matricula-nacional`\nexport const MATRICULA_PROVINCIAL_SYSTEM = `${RENAPER_BASE}/matricula-provincial`\n\nexport const SCHEDULING_PARAMETERS_EXTENSION_URL = 'http://medplum.com/fhir/StructureDefinition/scheduling-parameters'\nexport const REQUIRES_PRACTITIONER_EXTENSION_URL = `${FHIR_BASE}/requires-practitioner`\nexport const SERVICE_TYPE_SYSTEM = `${FHIR_BASE}/service-type`\n\nexport const PRACTITIONER_ROLE_SYSTEM = `${FHIR_BASE}/CodeSystem/practitioner-role`\nexport const PRACTITIONER_ROLE_REFERRING_CODE = 'referring'\n\nconst MIGRATE_TASK_BASE = 'eges-migrate'\nexport const MIGRATE_TASK_SYSTEM = `${FHIR_BASE}/tasks`\nexport const MIGRATE_TASK_INPUT_SYSTEM = `${FHIR_BASE}/task-inputs`\nexport const MIGRATE_TASK_OUTPUT_SYSTEM = `${FHIR_BASE}/task-outputs`\nexport const MIGRATE_PRACTITIONER_TASK_CODE = `${MIGRATE_TASK_BASE}-practitioner`\nexport const MIGRATE_PATIENT_TASK_CODE = `${MIGRATE_TASK_BASE}-patient`\nexport const MIGRATE_DEVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-device`\nexport const MIGRATE_SITE_TASK_CODE = `${MIGRATE_TASK_BASE}-site`\nexport const MIGRATE_SERVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-service`\nexport const MIGRATE_APPOINTMENT_TASK_CODE = `${MIGRATE_TASK_BASE}-appointment`\nexport const REVIEW_APPOINTMENT_TASK_CODE = 'review-appointment'\nexport const SYNCHRONIZE_APPOINTMENT_TASK_CODE = 'synchronize-appointment'\n\n/**\n * Coding system for `Task.businessStatus` values used by the Rossi admin\n * review workflow. Distinct from `Task.status` (FHIR lifecycle), which is\n * driven by the booking pipeline. `businessStatus` captures staff-side\n * review state that is independent of whether the appointment has been\n * confirmed in EGES.\n */\nexport const TASK_BUSINESS_STATUS_SYSTEM = `${FHIR_BASE}/CodeSystem/task-business-status`\n\n/**\n * `Task.businessStatus.coding[].code` value set by the reception role when\n * marking a review as seen/checked, without confirming the underlying\n * appointment.\n */\nexport const TASK_BUSINESS_STATUS_REVIEWED_CODE = 'reviewed'\n\n/** `system|code` search token for `Task?business-status` filters on the reviewed state. */\nexport const TASK_BUSINESS_STATUS_REVIEWED_TOKEN =\n `${TASK_BUSINESS_STATUS_SYSTEM}|${TASK_BUSINESS_STATUS_REVIEWED_CODE}`\n\n/**\n * Task.code value identifying a \"send appointment confirmation email\" job. The\n * code is fully self-describing (not an `eges-migrate-*` migration code) — these\n * Tasks are produced by the appointments-portal $create flow rather than the\n * EGES migration pipeline.\n */\nexport const SEND_APPOINTMENT_CONFIRMATION_EMAIL_TASK_CODE = 'send-appointment-confirmation-email'\n\n/** Task.input code for the booking-session UUID (mirrors `ServiceRequest.requisition.value`). */\nexport const EMAIL_TASK_INPUT_SESSION_GROUP_ID = 'session-group-id'\n\n/** Task.input code for the recipient email address resolved from `Patient.telecom`. */\nexport const EMAIL_TASK_INPUT_RECIPIENT_EMAIL = 'recipient-email'\n\n/** Task.input code carrying `Patient/{id}` for the recipient's patient record. */\nexport const EMAIL_TASK_INPUT_PATIENT_REF = 'patient-ref'\n\n/** Task.input code for the optional IANA timezone used to format appointment times in the email. */\nexport const EMAIL_TASK_INPUT_TIMEZONE = 'timezone'\n\n/** Task.output code for the recipient email address that was actually used. */\nexport const EMAIL_TASK_OUTPUT_RECIPIENT = 'recipient'\n\n/** Task.output code for the count of appointments included in the email body. */\nexport const EMAIL_TASK_OUTPUT_APPOINTMENT_COUNT = 'appointment-count'\n\n/**\n * Task.output code for the rendered email subject line. Captured on the Task\n * in both success and failure paths so the rendered message can be inspected\n * locally (no SMTP/SES configured) and audited in prod (no need to hunt\n * through SES logs).\n */\nexport const EMAIL_TASK_OUTPUT_SUBJECT = 'subject'\n\n/** Task.output code for the rendered email HTML body. Companion to `subject`/`text`. */\nexport const EMAIL_TASK_OUTPUT_HTML = 'html'\n\n/** Task.output code for the rendered email plain-text body. Companion to `subject`/`html`. */\nexport const EMAIL_TASK_OUTPUT_TEXT = 'text'\n\nexport const HL7_IMPORT_TASK_SYSTEM = 'http://example.org/CodeSystem/hl7-import-tasks'\nexport const HL7_IMPORT_APPOINTMENT_TASK_CODE = 'import-orm-o01-appointment'\nexport const HL7_IMPORT_TASK_INPUT_SYSTEM = 'http://example.org/CodeSystem/hl7-import-task-inputs'\nexport const HL7_IMPORT_TASK_OUTPUT_SYSTEM = 'http://example.org/CodeSystem/hl7-import-task-outputs'\n\n// ─── ServiceRequest ──────────────────────────────────────────────────────────\n\n/**\n * Identifier system used as `ServiceRequest.requisition.system` to correlate\n * multiple ServiceRequests (one per Appointment) authored in the same\n * appointments-portal wizard session. Maps to FHIR R4 `requisition` — \"A\n * shared identifier common to all service requests that were authorized more\n * or less simultaneously by a single author, representing the composite or\n * group identifier.\"\n */\nexport const SERVICE_REQUEST_GROUP_SYSTEM = `${FHIR_BASE}/service-request-group`\n\n/**\n * Coding system for HealthcareService action (variant) selections recorded\n * on `ServiceRequest.orderDetail[]`. The `code` is the PlanDefinition action\n * id from the contained protocol on the HealthcareService, and `display` is\n * the human-readable action label (e.g. \"Frente y perfil\").\n */\nexport const HS_ACTION_SYSTEM = `${FHIR_BASE}/CodeSystem/hs-action`\n\n/**\n * Coding system for HealthcareService addon selections recorded on\n * `ServiceRequest.orderDetail[]`. Same id/label shape as HS_ACTION_SYSTEM —\n * the distinct URI lets readers filter action vs. addons without ordering\n * assumptions on orderDetail.\n */\nexport const HS_ADDON_SYSTEM = `${FHIR_BASE}/CodeSystem/hs-addon`\n\n// ─── Medical order documents (portal requisitions) ──────────────────────────\n\n/**\n * Coding system used on `DocumentReference.type` for portal-uploaded medical\n * orders. Doubles as an identifier system so we can dedupe a `(session, order)`\n * pair across the sibling `Appointment/$create` calls the portal issues in\n * parallel for a multi-study booking.\n */\nexport const MEDICAL_ORDER_DOCUMENT_SYSTEM = `${FHIR_BASE}/CodeSystem/medical-order-document`\n\n/** `DocumentReference.type.coding[0].code` value paired with MEDICAL_ORDER_DOCUMENT_SYSTEM. */\nexport const MEDICAL_ORDER_DOCUMENT_CODE = 'medical-order'\n\n/**\n * Complex extension attached to DocumentReference. Sub-extensions carry the\n * structured OCR metadata (doctor, diagnosis, insurer, plan, patient data, …)\n * the appointments-portal parses from each scanned medical order.\n */\nexport const ORDER_METADATA_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/order-metadata`\n\n// ─── PlanDefinition type ─────────────────────────────────────────────────────\n\n/** Coding system for custom PlanDefinition types */\nexport const PD_TYPE_SYSTEM = `${FHIR_BASE}/CodeSystem/plan-definition-type`\n\n/** Type code that marks a PlanDefinition as a protocol-group (wrapping multiple concrete PDs) */\nexport const PD_TYPE_PROTOCOL_GROUP = 'protocol-group'\n\n// ─── HealthcareService model ──────────────────────────────────────────────────\n\n/** Identifier system for service codes on HealthcareService (mirrors the ServiceCodes CodeSystem URL) */\nexport const SERVICE_CODES_SYSTEM = `${FHIR_BASE}/CodeSystem/service-codes`\n\n/** Coding system for service categories on HealthcareService.category */\nexport const SERVICE_CATEGORY_SYSTEM = `${FHIR_BASE}/CodeSystem/service-category`\n\n/** Coding system for specialities on HealthcareService.specialty */\nexport const SPECIALITY_SYSTEM = `${FHIR_BASE}/CodeSystem/speciality`\n\n/** Extension URL for the mandatory PlanDefinition (clinical protocol) reference on HealthcareService */\nexport const HS_PROTOCOL_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-protocol`\n\n/** Extension URL for the optional ChargeItemDefinition (billing) reference on HealthcareService */\nexport const HS_BILLING_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-billing`\n\n/** Extension URL for the back-reference to the HealthcareService (study) for which this PlanDefinition is the protocol group */\nexport const PD_HEALTHCARE_SERVICE_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/pd-healthcare-service`\n\n/**\n * Extension URL for additional search aliases on HealthcareService.\n *\n * Stored as multiple same-URL extensions, each with a `valueString`.\n * These are indexed at weight 1.2 by the search indexer.\n * Using an extension instead of HealthcareService.alias[] because the local\n * FHIR profile does not permit the standard alias field.\n *\n * @example\n * { url: HS_SEARCH_ALIASES_EXTENSION_URL, valueString: \"placa de tórax\" }\n */\nexport const HS_SEARCH_ALIASES_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-search-aliases`\n\n/**\n * @example\n * {\n * url: HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL,\n * extension: [\n * { url: \"alias\", valueString: \"placa de tórax\" },\n * { url: \"protocol\", valueString: \"9a9056df-0e54-4c2a-a3ce-eb58405f1ec9\" },\n * { url: \"addon\", valueString: \"a7101b76-6f1a-4562-8689-edaee07d6b95\" },\n * { url: \"addon\", valueString: \"97b7c2ce-6f1a-4562-8689-f21a8673e009\" }\n * ]\n * }\n */\nexport const HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-search-protocol-aliases`\n\n// ─── Organization (payer / insurance company) ─────────────────────────────────\n\n/** Identifier system for insurance company (payer) Organization resources */\nexport const INSURER_IDENTIFIER_SYSTEM = `${FHIR_BASE}/CodeSystem/insurers`\n\n/** HL7 organization-type code system */\nexport const ORG_TYPE_SYSTEM = 'http://terminology.hl7.org/CodeSystem/organization-type'\n\n/** organization-type code for payer/insurance */\nexport const ORG_TYPE_PAY_CODE = 'pay'\n\n/** organization-type code for healthcare provider (the main clinic) */\nexport const ORG_TYPE_PROV_CODE = 'prov'\n\n// ─── InsurancePlan ────────────────────────────────────────────────────────────\n\n/** Identifier system for InsurancePlan resources (specific plan products) */\nexport const INSURANCE_PLAN_IDENTIFIER_SYSTEM = `${FHIR_BASE}/CodeSystem/insurance-plans`\n\n// ─── Billing CodeSystem discovery tag ────────────────────────────────────────\n\n/**\n * Tag system applied to every billing-codes CodeSystem resource,\n * enabling dynamic discovery via `CodeSystem?_tag=<system>|<code>`.\n */\nexport const BILLING_CODES_TAG_SYSTEM = `${FHIR_BASE}/tags`\n\n/**\n * Tag code that marks a CodeSystem as a billing codes system.\n * Every billing CodeSystem must carry:\n * meta.tag = [{ system: BILLING_CODES_TAG_SYSTEM, code: BILLING_CODES_TAG_CODE }]\n */\nexport const BILLING_CODES_TAG_CODE = 'billing-codes'\n\n/**\n * Extension URL stored on a billing CodeSystem to record which billing\n * Organization (obra social) owns / uses this billing code system.\n *\n * Value type: Reference (Organization)\n *\n * Example:\n * extension: [{ url: BILLING_CODES_ORG_EXTENSION, valueReference: { reference: 'Organization/123' } }]\n */\nexport const BILLING_CODES_ORG_EXTENSION = `${FHIR_BASE}/extensions/billing-code-system-organization`\n\n/**\n * Identifier system used to tag every billing ChargeItemDefinition with the ID\n * of the PlanDefinition it belongs to, enabling reliable search via\n * `ChargeItemDefinition?identifier=<system>|<planDefinitionId>`.\n * (The FHIR R4 `instance` search parameter is not supported by Medplum.)\n */\nexport const BILLING_CID_PD_IDENTIFIER_SYSTEM = `${FHIR_BASE}/billing/plan-definition`\n\n/**\n * Usage-context type system used to scope a ChargeItemDefinition to a specific InsurancePlan.\n * useContext.code.system = BILLING_CID_CONTEXT_SYSTEM\n * useContext.code.code = BILLING_CID_CONTEXT_CODE\n * useContext.valueReference → InsurancePlan\n */\nexport const BILLING_CID_CONTEXT_SYSTEM = 'http://terminology.hl7.org/CodeSystem/usage-context-type'\nexport const BILLING_CID_CONTEXT_CODE = 'user'\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;AAAa,QAAA,SAAS,GAAG,8BAA8B,CAAA;AAC1C,QAAA,gBAAgB,GAAG,8BAA8B,CAAA;AAEjD,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,qBAAqB,GAAG,GAAG,wBAAgB,aAAa,CAAA;AACxD,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,kBAAkB,GAAG,GAAG,wBAAgB,SAAS,CAAA;AACjD,QAAA,6BAA6B,GAAG,GAAG,wBAAgB,oBAAoB,CAAA;AACvE,QAAA,kBAAkB,GAAG,GAAG,wBAAgB,SAAS,CAAA;AACjD,QAAA,iBAAiB,GAAG,GAAG,wBAAgB,QAAQ,CAAA;AAC/C,QAAA,oBAAoB,GAAG,GAAG,wBAAgB,WAAW,CAAA;AACrD,QAAA,sBAAsB,GAAG,GAAG,wBAAgB,aAAa,CAAA;AACzD,QAAA,uBAAuB,GAAG,GAAG,wBAAgB,cAAc,CAAA;AAC3D,QAAA,4BAA4B,GAAG,GAAG,wBAAgB,mBAAmB,CAAA;AACrE,QAAA,+BAA+B,GAAG,GAAG,wBAAgB,sBAAsB,CAAA;AAC3E,QAAA,YAAY,GAAG,+CAA+C,CAAA;AAC9D,QAAA,yBAAyB,GAAG,GAAG,oBAAY,qBAAqB,CAAA;AAChE,QAAA,2BAA2B,GAAG,GAAG,oBAAY,uBAAuB,CAAA;AAEpE,QAAA,mCAAmC,GAAG,mEAAmE,CAAA;AACzG,QAAA,mCAAmC,GAAG,GAAG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;;;GAQG;AACU,QAAA,wCAAwC,GAAG,GAAG,iBAAS,iDAAiD,CAAA;AAErH;;;;;;;GAOG;AACU,QAAA,oCAAoC,GAAG,GAAG,iBAAS,6CAA6C,CAAA;AAE7G,gFAAgF;AAEhF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,GAAG,iBAAS,OAAO,CAAA;AAE3D;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,eAAe,CAAA;AAErD;;;;;;;;GAQG;AACU,QAAA,2BAA2B,GAAG,GAAG,iBAAS,8CAA8C,CAAA;AAErG;;;;;GAKG;AACU,QAAA,gCAAgC,GAAG,GAAG,iBAAS,0BAA0B,CAAA;AAEtF;;;;;GAKG;AACU,QAAA,0BAA0B,GAAG,0DAA0D,CAAA;AACvF,QAAA,wBAAwB,GAAG,MAAM,CAAA","sourcesContent":["export const FHIR_BASE = 'https://www.cdrossi.com/fhir'\nexport const EGES_SYSTEM_BASE = 'https://www.cdrossi.com/eges'\n\nexport const EGES_PACIENTE_SYSTEM = `${EGES_SYSTEM_BASE}/paciente`\nexport const EGES_DOCUMENTO_SYSTEM = `${EGES_SYSTEM_BASE}/documentos`\nexport const EGES_SUCURSAL_SYSTEM = `${EGES_SYSTEM_BASE}/sucursal`\nexport const EGES_MEDICO_SYSTEM = `${EGES_SYSTEM_BASE}/medico`\nexport const EGES_MEDICO_ASOCIACION_SYSTEM = `${EGES_SYSTEM_BASE}/medico-asociacion`\nexport const EGES_EQUIPO_SYSTEM = `${EGES_SYSTEM_BASE}/equipo`\nexport const EGES_TURNO_SYSTEM = `${EGES_SYSTEM_BASE}/turno`\nexport const EGES_PRACTICA_SYSTEM = `${EGES_SYSTEM_BASE}/practica`\nexport const EGES_PRESTACION_SYSTEM = `${EGES_SYSTEM_BASE}/prestacion`\nexport const EGES_OBRA_SOCIAL_SYSTEM = `${EGES_SYSTEM_BASE}/obra-social`\nexport const EGES_OBRA_SOCIAL_PLAN_SYSTEM = `${EGES_SYSTEM_BASE}/obra-social-plan`\nexport const EGES_CONDICION_RESPUESTA_SYSTEM = `${EGES_SYSTEM_BASE}/condicion-respuesta`\nexport const RENAPER_BASE = 'https://www.argentina.gob.ar/interior/renaper'\nexport const MATRICULA_NACIONAL_SYSTEM = `${RENAPER_BASE}/matricula-nacional`\nexport const MATRICULA_PROVINCIAL_SYSTEM = `${RENAPER_BASE}/matricula-provincial`\n\nexport const SCHEDULING_PARAMETERS_EXTENSION_URL = 'http://medplum.com/fhir/StructureDefinition/scheduling-parameters'\nexport const REQUIRES_PRACTITIONER_EXTENSION_URL = `${FHIR_BASE}/requires-practitioner`\nexport const SERVICE_TYPE_SYSTEM = `${FHIR_BASE}/service-type`\n\nexport const PRACTITIONER_ROLE_SYSTEM = `${FHIR_BASE}/CodeSystem/practitioner-role`\nexport const PRACTITIONER_ROLE_REFERRING_CODE = 'referring'\n\nconst MIGRATE_TASK_BASE = 'eges-migrate'\nexport const MIGRATE_TASK_SYSTEM = `${FHIR_BASE}/tasks`\nexport const MIGRATE_TASK_INPUT_SYSTEM = `${FHIR_BASE}/task-inputs`\nexport const MIGRATE_TASK_OUTPUT_SYSTEM = `${FHIR_BASE}/task-outputs`\nexport const MIGRATE_PRACTITIONER_TASK_CODE = `${MIGRATE_TASK_BASE}-practitioner`\nexport const MIGRATE_PATIENT_TASK_CODE = `${MIGRATE_TASK_BASE}-patient`\nexport const MIGRATE_DEVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-device`\nexport const MIGRATE_SITE_TASK_CODE = `${MIGRATE_TASK_BASE}-site`\nexport const MIGRATE_SERVICE_TASK_CODE = `${MIGRATE_TASK_BASE}-service`\nexport const MIGRATE_APPOINTMENT_TASK_CODE = `${MIGRATE_TASK_BASE}-appointment`\nexport const MIGRATE_INSURER_TASK_CODE = `${MIGRATE_TASK_BASE}-insurer`\nexport const REVIEW_APPOINTMENT_TASK_CODE = 'review-appointment'\nexport const SYNCHRONIZE_APPOINTMENT_TASK_CODE = 'synchronize-appointment'\n\n/**\n * Coding system for `Task.businessStatus` values used by the Rossi admin\n * review workflow. Distinct from `Task.status` (FHIR lifecycle), which is\n * driven by the booking pipeline. `businessStatus` captures staff-side\n * review state that is independent of whether the appointment has been\n * confirmed in EGES.\n */\nexport const TASK_BUSINESS_STATUS_SYSTEM = `${FHIR_BASE}/CodeSystem/task-business-status`\n\n/**\n * `Task.businessStatus.coding[].code` value set by the reception role when\n * marking a review as seen/checked, without confirming the underlying\n * appointment.\n */\nexport const TASK_BUSINESS_STATUS_REVIEWED_CODE = 'reviewed'\n\n/** `system|code` search token for `Task?business-status` filters on the reviewed state. */\nexport const TASK_BUSINESS_STATUS_REVIEWED_TOKEN =\n `${TASK_BUSINESS_STATUS_SYSTEM}|${TASK_BUSINESS_STATUS_REVIEWED_CODE}`\n\n/**\n * Task.code value identifying a \"send appointment confirmation email\" job. The\n * code is fully self-describing (not an `eges-migrate-*` migration code) — these\n * Tasks are produced by the appointments-portal $create flow rather than the\n * EGES migration pipeline.\n */\nexport const SEND_APPOINTMENT_CONFIRMATION_EMAIL_TASK_CODE = 'send-appointment-confirmation-email'\n\n/** Task.input code for the booking-session UUID (mirrors `ServiceRequest.requisition.value`). */\nexport const EMAIL_TASK_INPUT_SESSION_GROUP_ID = 'session-group-id'\n\n/** Task.input code for the recipient email address resolved from `Patient.telecom`. */\nexport const EMAIL_TASK_INPUT_RECIPIENT_EMAIL = 'recipient-email'\n\n/** Task.input code carrying `Patient/{id}` for the recipient's patient record. */\nexport const EMAIL_TASK_INPUT_PATIENT_REF = 'patient-ref'\n\n/** Task.input code for the optional IANA timezone used to format appointment times in the email. */\nexport const EMAIL_TASK_INPUT_TIMEZONE = 'timezone'\n\n/** Task.output code for the recipient email address that was actually used. */\nexport const EMAIL_TASK_OUTPUT_RECIPIENT = 'recipient'\n\n/** Task.output code for the count of appointments included in the email body. */\nexport const EMAIL_TASK_OUTPUT_APPOINTMENT_COUNT = 'appointment-count'\n\n/**\n * Task.output code for the rendered email subject line. Captured on the Task\n * in both success and failure paths so the rendered message can be inspected\n * locally (no SMTP/SES configured) and audited in prod (no need to hunt\n * through SES logs).\n */\nexport const EMAIL_TASK_OUTPUT_SUBJECT = 'subject'\n\n/** Task.output code for the rendered email HTML body. Companion to `subject`/`text`. */\nexport const EMAIL_TASK_OUTPUT_HTML = 'html'\n\n/** Task.output code for the rendered email plain-text body. Companion to `subject`/`html`. */\nexport const EMAIL_TASK_OUTPUT_TEXT = 'text'\n\n/**\n * Task.code for the user-invitation email. Rossi Admin invites a user\n * (`sendEmail:false` so Medplum sends nothing) and enqueues this Task; the\n * `send-user-invite-email` bot resolves the one-time set-password link from the\n * user's `UserSecurityRequest` and sends a branded invitation email.\n */\nexport const SEND_USER_INVITE_EMAIL_TASK_CODE = 'send-user-invite-email'\n\n/**\n * Task.input code carrying `ProjectMembership/{id}` for the invited member. The\n * bot resolves the recipient email, display name, and the `User` (for the\n * one-time `UserSecurityRequest`) from that membership server-side — it never\n * trusts a caller-supplied recipient, so a crafted Task cannot redirect an\n * invite secret to another address.\n */\nexport const INVITE_TASK_INPUT_MEMBERSHIP_REF = 'invite-membership-ref'\n\nexport const HL7_IMPORT_TASK_SYSTEM = 'http://example.org/CodeSystem/hl7-import-tasks'\nexport const HL7_IMPORT_APPOINTMENT_TASK_CODE = 'import-orm-o01-appointment'\nexport const HL7_IMPORT_TASK_INPUT_SYSTEM = 'http://example.org/CodeSystem/hl7-import-task-inputs'\nexport const HL7_IMPORT_TASK_OUTPUT_SYSTEM = 'http://example.org/CodeSystem/hl7-import-task-outputs'\n\n// ─── ServiceRequest ──────────────────────────────────────────────────────────\n\n/**\n * Identifier system used as `ServiceRequest.requisition.system` to correlate\n * multiple ServiceRequests (one per Appointment) authored in the same\n * appointments-portal wizard session. Maps to FHIR R4 `requisition` — \"A\n * shared identifier common to all service requests that were authorized more\n * or less simultaneously by a single author, representing the composite or\n * group identifier.\"\n */\nexport const SERVICE_REQUEST_GROUP_SYSTEM = `${FHIR_BASE}/service-request-group`\n\n/**\n * Coding system for HealthcareService action (variant) selections recorded\n * on `ServiceRequest.orderDetail[]`. The `code` is the PlanDefinition action\n * id from the contained protocol on the HealthcareService, and `display` is\n * the human-readable action label (e.g. \"Frente y perfil\").\n */\nexport const HS_ACTION_SYSTEM = `${FHIR_BASE}/CodeSystem/hs-action`\n\n/**\n * Coding system for HealthcareService addon selections recorded on\n * `ServiceRequest.orderDetail[]`. Same id/label shape as HS_ACTION_SYSTEM —\n * the distinct URI lets readers filter action vs. addons without ordering\n * assumptions on orderDetail.\n */\nexport const HS_ADDON_SYSTEM = `${FHIR_BASE}/CodeSystem/hs-addon`\n\n// ─── Medical order documents (portal requisitions) ──────────────────────────\n\n/**\n * Coding system used on `DocumentReference.type` for portal-uploaded medical\n * orders. Doubles as an identifier system so we can dedupe a `(session, order)`\n * pair across the sibling `Appointment/$create` calls the portal issues in\n * parallel for a multi-study booking.\n */\nexport const MEDICAL_ORDER_DOCUMENT_SYSTEM = `${FHIR_BASE}/CodeSystem/medical-order-document`\n\n/** `DocumentReference.type.coding[0].code` value paired with MEDICAL_ORDER_DOCUMENT_SYSTEM. */\nexport const MEDICAL_ORDER_DOCUMENT_CODE = 'medical-order'\n\n/**\n * Complex extension attached to DocumentReference. Sub-extensions carry the\n * structured OCR metadata (doctor, diagnosis, insurer, plan, patient data, …)\n * the appointments-portal parses from each scanned medical order.\n */\nexport const ORDER_METADATA_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/order-metadata`\n\n// ─── PlanDefinition type ─────────────────────────────────────────────────────\n\n/** Coding system for custom PlanDefinition types */\nexport const PD_TYPE_SYSTEM = `${FHIR_BASE}/CodeSystem/plan-definition-type`\n\n/** Type code that marks a PlanDefinition as a protocol-group (wrapping multiple concrete PDs) */\nexport const PD_TYPE_PROTOCOL_GROUP = 'protocol-group'\n\n// ─── HealthcareService model ──────────────────────────────────────────────────\n\n/** Identifier system for service codes on HealthcareService (mirrors the ServiceCodes CodeSystem URL) */\nexport const SERVICE_CODES_SYSTEM = `${FHIR_BASE}/CodeSystem/service-codes`\n\n/** Coding system for service categories on HealthcareService.category */\nexport const SERVICE_CATEGORY_SYSTEM = `${FHIR_BASE}/CodeSystem/service-category`\n\n/** Coding system for specialities on HealthcareService.specialty */\nexport const SPECIALITY_SYSTEM = `${FHIR_BASE}/CodeSystem/speciality`\n\n/** Extension URL for the mandatory PlanDefinition (clinical protocol) reference on HealthcareService */\nexport const HS_PROTOCOL_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-protocol`\n\n/** Extension URL for the optional ChargeItemDefinition (billing) reference on HealthcareService */\nexport const HS_BILLING_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-billing`\n\n/** Extension URL for the back-reference to the HealthcareService (study) for which this PlanDefinition is the protocol group */\nexport const PD_HEALTHCARE_SERVICE_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/pd-healthcare-service`\n\n/**\n * Extension URL for additional search aliases on HealthcareService.\n *\n * Stored as multiple same-URL extensions, each with a `valueString`.\n * These are indexed at weight 1.2 by the search indexer.\n * Using an extension instead of HealthcareService.alias[] because the local\n * FHIR profile does not permit the standard alias field.\n *\n * @example\n * { url: HS_SEARCH_ALIASES_EXTENSION_URL, valueString: \"placa de tórax\" }\n */\nexport const HS_SEARCH_ALIASES_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-search-aliases`\n\n/**\n * @example\n * {\n * url: HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL,\n * extension: [\n * { url: \"alias\", valueString: \"placa de tórax\" },\n * { url: \"protocol\", valueString: \"9a9056df-0e54-4c2a-a3ce-eb58405f1ec9\" },\n * { url: \"addon\", valueString: \"a7101b76-6f1a-4562-8689-edaee07d6b95\" },\n * { url: \"addon\", valueString: \"97b7c2ce-6f1a-4562-8689-f21a8673e009\" }\n * ]\n * }\n */\nexport const HS_SEARCH_PROTOCOL_ALIASES_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/hs-search-protocol-aliases`\n\n// ─── Practitioner ────────────────────────────────────────────────────────────\n\n/** Extension URL marking a Practitioner as a technician/operator (patient-facing surfaces must hide the name). */\nexport const PRACTITIONER_IS_TECHNICIAN_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/is-technician`\n\n// ─── Email audit trail ───────────────────────────────────────────────────────\n\n/**\n * Identifier system to dedupe Communication resources auditing sent confirmation\n * emails. The paired Provenance carries no identifier of its own (FHIR R4\n * Provenance has no `identifier` element); it is deduped by its `target`\n * reference to this Communication.\n */\nexport const COMMUNICATION_EMAIL_KEY_SYSTEM = `${FHIR_BASE}/communication-email-key`\n\n// ─── Organization (payer / insurance company) ─────────────────────────────────\n\n/** Identifier system for insurance company (payer) Organization resources */\nexport const INSURER_IDENTIFIER_SYSTEM = `${FHIR_BASE}/CodeSystem/insurers`\n\n/** HL7 organization-type code system */\nexport const ORG_TYPE_SYSTEM = 'http://terminology.hl7.org/CodeSystem/organization-type'\n\n/** organization-type code for payer/insurance */\nexport const ORG_TYPE_PAY_CODE = 'pay'\n\n/** organization-type code for healthcare provider (the main clinic) */\nexport const ORG_TYPE_PROV_CODE = 'prov'\n\n// ─── InsurancePlan ────────────────────────────────────────────────────────────\n\n/** Identifier system for InsurancePlan resources (specific plan products) */\nexport const INSURANCE_PLAN_IDENTIFIER_SYSTEM = `${FHIR_BASE}/CodeSystem/insurance-plans`\n\n// ─── Práctica mapping registry (#202) ────────────────────────────────────────\n\n/**\n * Canonical `url` of the singleton ConceptMap that holds the parametrized\n * práctica → práctica mapping rules (patient insurance / age / sex). The\n * resolver fetches it by this url; there is at most one per project.\n */\nexport const PRACTICA_MAPPING_CONCEPT_MAP_URL = `${FHIR_BASE}/ConceptMap/practica-mapping`\n\n/**\n * Tag applied to the práctica mapping ConceptMap for discovery via\n * `ConceptMap?_tag=<BILLING_CODES_TAG_SYSTEM>|<PRACTICA_MAPPING_TAG_CODE>`\n * (same tag system as the billing CodeSystems).\n */\nexport const PRACTICA_MAPPING_TAG_CODE = 'practica-mapping'\n\n/**\n * Complex extension on each ConceptMap `element.target[]` carrying the\n * conditions under which the mapping applies. Sub-extensions (all optional,\n * ANDed together):\n * - `insurance`: valueReference → InsurancePlan (plan tier) or Organization\n * type `pay` (obra social tier)\n * - `ageRange`: valueRange — patient age in whole years, bounds inclusive\n * - `sex`: valueCode — FHIR administrative gender\n */\nexport const PRACTICA_MAPPING_CONDITION_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/practica-mapping-condition`\n\n/**\n * Extension on the `$resolve-protocol` response Bundle's **meta** carrying\n * the JSON-serialized `EffectivePracticaSet` (valueString) when the caller\n * sent patient context. The operation's registered output type is `Bundle`,\n * so the effective set rides on the Bundle rather than a separate Parameters\n * response — and since Bundle is not a DomainResource (no top-level\n * `extension` element), it lives on `Bundle.meta.extension`.\n */\nexport const EFFECTIVE_PRACTICA_SET_EXTENSION_URL = `${FHIR_BASE}/StructureDefinition/effective-practica-set`\n\n// ─── Billing CodeSystem discovery tag ────────────────────────────────────────\n\n/**\n * Tag system applied to every billing-codes CodeSystem resource,\n * enabling dynamic discovery via `CodeSystem?_tag=<system>|<code>`.\n */\nexport const BILLING_CODES_TAG_SYSTEM = `${FHIR_BASE}/tags`\n\n/**\n * Tag code that marks a CodeSystem as a billing codes system.\n * Every billing CodeSystem must carry:\n * meta.tag = [{ system: BILLING_CODES_TAG_SYSTEM, code: BILLING_CODES_TAG_CODE }]\n */\nexport const BILLING_CODES_TAG_CODE = 'billing-codes'\n\n/**\n * Extension URL stored on a billing CodeSystem to record which billing\n * Organization (obra social) owns / uses this billing code system.\n *\n * Value type: Reference (Organization)\n *\n * Example:\n * extension: [{ url: BILLING_CODES_ORG_EXTENSION, valueReference: { reference: 'Organization/123' } }]\n */\nexport const BILLING_CODES_ORG_EXTENSION = `${FHIR_BASE}/extensions/billing-code-system-organization`\n\n/**\n * Identifier system used to tag every billing ChargeItemDefinition with the ID\n * of the PlanDefinition it belongs to, enabling reliable search via\n * `ChargeItemDefinition?identifier=<system>|<planDefinitionId>`.\n * (The FHIR R4 `instance` search parameter is not supported by Medplum.)\n */\nexport const BILLING_CID_PD_IDENTIFIER_SYSTEM = `${FHIR_BASE}/billing/plan-definition`\n\n/**\n * Usage-context type system used to scope a ChargeItemDefinition to a specific InsurancePlan.\n * useContext.code.system = BILLING_CID_CONTEXT_SYSTEM\n * useContext.code.code = BILLING_CID_CONTEXT_CODE\n * useContext.valueReference → InsurancePlan\n */\nexport const BILLING_CID_CONTEXT_SYSTEM = 'http://terminology.hl7.org/CodeSystem/usage-context-type'\nexport const BILLING_CID_CONTEXT_CODE = 'user'\n"]}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from './scheduling/appointment';
3
3
  export type * from './scheduling/extension';
4
4
  export * from './constants';
5
5
  export * from './plan-definition-group';
6
+ export * from './practica-mapping';
7
+ export * from './practica-resolution';
6
8
  export * from './fhir';
7
9
  export type * from './db/types';
8
10
  export * from './search/normalizer';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,mBAAmB,wBAAwB,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,QAAQ,CAAA;AACtB,mBAAmB,YAAY,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,mBAAmB,wBAAwB,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,QAAQ,CAAA;AACtB,mBAAmB,YAAY,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
package/dist/index.js CHANGED
@@ -18,6 +18,8 @@ __exportStar(require("./scheduling/slot"), exports);
18
18
  __exportStar(require("./scheduling/appointment"), exports);
19
19
  __exportStar(require("./constants"), exports);
20
20
  __exportStar(require("./plan-definition-group"), exports);
21
+ __exportStar(require("./practica-mapping"), exports);
22
+ __exportStar(require("./practica-resolution"), exports);
21
23
  __exportStar(require("./fhir"), exports);
22
24
  __exportStar(require("./search/normalizer"), exports);
23
25
  __exportStar(require("./search/alias-builder"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,2DAAwC;AAExC,8CAA2B;AAC3B,0DAAuC;AACvC,yCAAsB;AAEtB,sDAAmC;AACnC,yDAAsC","sourcesContent":["export * from './scheduling/slot'\nexport * from './scheduling/appointment'\nexport type * from './scheduling/extension'\nexport * from './constants'\nexport * from './plan-definition-group'\nexport * from './fhir'\nexport type * from './db/types'\nexport * from './search/normalizer'\nexport * from './search/alias-builder'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,2DAAwC;AAExC,8CAA2B;AAC3B,0DAAuC;AACvC,qDAAkC;AAClC,wDAAqC;AACrC,yCAAsB;AAEtB,sDAAmC;AACnC,yDAAsC","sourcesContent":["export * from './scheduling/slot'\nexport * from './scheduling/appointment'\nexport type * from './scheduling/extension'\nexport * from './constants'\nexport * from './plan-definition-group'\nexport * from './practica-mapping'\nexport * from './practica-resolution'\nexport * from './fhir'\nexport type * from './db/types'\nexport * from './search/normalizer'\nexport * from './search/alias-builder'\n"]}
@@ -1,4 +1,35 @@
1
- import type { Duration, PlanDefinition } from '@medplum/fhirtypes';
1
+ import type { Duration, PlanDefinition, PlanDefinitionAction } from '@medplum/fhirtypes';
2
+ /**
3
+ * `action.id` of the per-variant group that overrides the order-set PD's
4
+ * default mandatory add-ons (the tipo-3 `getMandatoryAddonIds` path). It lives
5
+ * as a direct child of a protocol-group variant action, kept structurally
6
+ * separate from the variant's own add-on sub-actions (the tipo-2
7
+ * `resolveProtocolSelection` path) so the two never conflate. Its group node
8
+ * carries no `definitionCanonical`, so `resolveProtocolSelection`,
9
+ * `getProtocolActions` and friends skip it and never descend into it.
10
+ */
11
+ export declare const MANDATORY_ADDON_OVERRIDE_ACTION_ID = "mandatory-addons";
12
+ /**
13
+ * How a variant alters one order-set default mandatory add-on:
14
+ * - `'add'` forces the add-on mandatory for this variant even if the order-set
15
+ * PD marks it optional (or does not list it as mandatory).
16
+ * - `'remove'` drops an add-on that the order-set PD marks mandatory by default.
17
+ */
18
+ export type MandatoryAddonOverrideAction = 'add' | 'remove';
19
+ /**
20
+ * A single per-variant override of the order-set's default mandatory add-on set
21
+ * (the tipo-3 path). Referenced by the add-on's `ActivityDefinition` canonical
22
+ * (`${EGES_PRACTICA_SYSTEM}/{pra_id}`) — the same canonical the order-set PD
23
+ * uses — so add/remove resolve by exact canonical match against the defaults.
24
+ */
25
+ export interface MandatoryAddonOverride {
26
+ /** Add-on `ActivityDefinition` canonical, e.g. `${EGES_PRACTICA_SYSTEM}/{pra_id}`. */
27
+ readonly ref: string;
28
+ /** Whether the variant adds or removes this add-on relative to the PD default. */
29
+ readonly action: MandatoryAddonOverrideAction;
30
+ /** Optional human label, for the admin editor. */
31
+ readonly display?: string;
32
+ }
2
33
  /** Information about a single action inside a protocol-group PD. */
3
34
  export interface ProtocolActionInfo {
4
35
  readonly actionId: string;
@@ -10,6 +41,13 @@ export interface ProtocolActionInfo {
10
41
  readonly protocolRef: string;
11
42
  readonly protocolDisplay: string;
12
43
  readonly protocolCode: string;
44
+ /**
45
+ * EGES pra_id of the referenced práctica, when stamped on the action's
46
+ * `code[]` (an `EGES_PRACTICA_SYSTEM` coding alongside the service-type
47
+ * coding). Persisted by {@link buildProtocolGroup} so admin UIs can show
48
+ * the id without re-reading each order-set PD.
49
+ */
50
+ readonly praId?: string;
13
51
  readonly duration?: Duration;
14
52
  /**
15
53
  * Whether this action is pre-selected in a **configured** protocol-group.
@@ -26,6 +64,12 @@ export interface ProtocolActionInfo {
26
64
  readonly mandatory?: boolean;
27
65
  /** Optional sub-actions (addons) with `any` selection behavior. */
28
66
  readonly addons: readonly ProtocolActionInfo[];
67
+ /**
68
+ * Per-variant overrides of the order-set's default mandatory add-on set
69
+ * (tipo-3 path). Empty when the variant inherits the PD defaults unchanged.
70
+ * Only meaningful on top-level variant entries.
71
+ */
72
+ readonly mandatoryAddonOverrides: readonly MandatoryAddonOverride[];
29
73
  }
30
74
  /** Entry used to build a protocol-group PD action. */
31
75
  export interface ProtocolGroupActionEntry {
@@ -36,6 +80,8 @@ export interface ProtocolGroupActionEntry {
36
80
  readonly ref: string;
37
81
  readonly display: string;
38
82
  readonly code: string;
83
+ /** EGES pra_id of the referenced práctica, stamped on the action's `code[]`. */
84
+ readonly praId?: string;
39
85
  readonly duration?: Duration;
40
86
  /**
41
87
  * Only meaningful on addon entries. When `true`, the addon is always
@@ -44,6 +90,12 @@ export interface ProtocolGroupActionEntry {
44
90
  readonly mandatory?: boolean;
45
91
  /** Optional sub-action entries (addons). */
46
92
  readonly addons?: readonly ProtocolGroupActionEntry[];
93
+ /**
94
+ * Per-variant overrides of the order-set's default mandatory add-on set
95
+ * (tipo-3 path). Only meaningful on top-level variant entries; ignored on
96
+ * addon entries.
97
+ */
98
+ readonly mandatoryAddonOverrides?: readonly MandatoryAddonOverride[];
47
99
  }
48
100
  /** @deprecated Use {@link ProtocolActionInfo} instead. */
49
101
  export type ProtocolVariantInfo = ProtocolActionInfo;
@@ -169,4 +221,24 @@ export declare function resolveProtocolSelection(pd: PlanDefinition, selection:
169
221
  * @returns the selection encoded in the PD, or the default selection
170
222
  */
171
223
  export declare function readProtocolSelection(pd: PlanDefinition): ProtocolSelection;
224
+ /**
225
+ * Reads the per-variant mandatory-addon overrides out of a variant action's
226
+ * `mandatory-addons` group. Returns `[]` when the variant declares none.
227
+ *
228
+ * @param variantAction - a protocol-group top-level variant action
229
+ * @returns the variant's mandatory-addon overrides (empty when none)
230
+ */
231
+ export declare function readMandatoryAddonOverrides(variantAction: PlanDefinitionAction): MandatoryAddonOverride[];
232
+ /**
233
+ * Resolves the effective mandatory add-on canonicals for a selected variant:
234
+ * the order-set PD defaults, plus the variant's `'add'` overrides, minus its
235
+ * `'remove'` overrides. Order-set defaults and overrides are matched by exact
236
+ * canonical string. Deduplicated; input order of the defaults is preserved,
237
+ * with any added canonicals appended.
238
+ *
239
+ * @param defaultRefs - canonicals of the order-set PD's default mandatory add-ons
240
+ * @param variantAction - the selected protocol-group variant action, or undefined
241
+ * @returns the resolved set of mandatory add-on canonicals
242
+ */
243
+ export declare function resolveVariantMandatoryAddons(defaultRefs: readonly string[], variantAction: PlanDefinitionAction | undefined): string[];
172
244
  //# sourceMappingURL=plan-definition-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-definition-group.d.ts","sourceRoot":"","sources":["../src/plan-definition-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAwB,MAAM,oBAAoB,CAAA;AAKxF,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAC5B;;;;OAIG;IACH,Q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