fhir-data-utils-ts 0.6.19 → 0.6.21

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.
@@ -0,0 +1,179 @@
1
+ // Copyright 2026 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
2
+ /** Official LOINC Document Ontology Subject matter domain coding system. */
3
+ export const LoincSubjectMatterDomainSystem = 'http://loinc.org';
4
+ /**
5
+ * Deduplicated LOINC Subject matter domain catalogue supplied from the LOINC
6
+ * Knowledge Base export. These codes classify human-health document subject
7
+ * domains. They are not veterinary service types.
8
+ */
9
+ export const LoincSubjectMatterDomain = Object.freeze([
10
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP263512-8", display: "Addiction medicine" }),
11
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172912-0", display: "Addiction psychiatry" }),
12
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172915-3", display: "Aerospace medicine" }),
13
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345051-9", display: "Allergy" }),
14
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172918-7", display: "Anesthesiology" }),
15
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172981-5", display: "Pain medicine" }),
16
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248728-0", display: "Sleep medicine" }),
17
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172919-5", display: "Audiology" }),
18
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP439903-8", display: "Child life" }),
19
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172923-7", display: "Chiropractic medicine" }),
20
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172933-6", display: "Critical care medicine" }),
21
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172934-4", display: "Dentistry" }),
22
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172935-1", display: "Dermatology" }),
23
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172987-2", display: "Pediatric dermatology" }),
24
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172940-1", display: "Emergency medicine" }),
25
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172957-5", display: "Medical toxicology" }),
26
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173027-6", display: "Sports medicine" }),
27
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP183499-5", display: "Trauma" }),
28
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP265794-0", display: "Polytrauma" }),
29
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173035-9", display: "Undersea and hyperbaric medicine" }),
30
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172942-7", display: "Ethics" }),
31
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172943-5", display: "Family medicine" }),
32
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172913-8", display: "Adolescent medicine" }),
33
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172947-6", display: "Geriatric medicine" }),
34
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172894-0", display: "Forensic medicine" }),
35
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172946-8", display: "General medicine" }),
36
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP433455-5", display: "Hospitalist" }),
37
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP431539-8", display: "Hospice care" }),
38
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345043-6", display: "Immunology" }),
39
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP342846-5", display: "Integrative medicine" }),
40
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172911-2", display: "Acupuncture" }),
41
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172952-6", display: "Internal medicine" }),
42
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172921-1", display: "Cardiovascular disease" }),
43
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172927-8", display: "Clinical cardiac electrophysiology" }),
44
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP269425-7", display: "Heart failure" }),
45
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172953-4", display: "Interventional cardiology" }),
46
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP269424-0", display: "Transplant cardiology" }),
47
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172941-9", display: "Endocrinology" }),
48
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172938-5", display: "Diabetology" }),
49
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172945-0", display: "Gastroenterology" }),
50
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172950-0", display: "Hepatology" }),
51
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP175685-9", display: "Hematology" }),
52
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP417851-5", display: "Bone Marrow Transplant" }),
53
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172951-8", display: "Infectious disease" }),
54
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP183500-0", display: "HIV" }),
55
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP175686-7", display: "Medical Oncology" }),
56
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172962-5", display: "Nephrology" }),
57
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP263511-0", display: "Dialysis" }),
58
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP418387-9", display: "Therapeutic apheresis" }),
59
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173015-1", display: "Pulmonary disease" }),
60
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173023-5", display: "Rheumatology" }),
61
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP417852-3", display: "Solid organ transplant" }),
62
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP439901-2", display: "Vascular Access" }),
63
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172956-7", display: "Medical genetics" }),
64
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172926-0", display: "Clinical biochemical genetics" }),
65
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172929-4", display: "Clinical genetics" }),
66
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP268361-5", display: "Pharmacogenomics" }),
67
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172958-3", display: "Mental health" }),
68
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345044-4", display: "Eating disorders" }),
69
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173011-0", display: "Psychiatry" }),
70
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172922-9", display: "Child and adolescent psychiatry" }),
71
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173012-8", display: "Psychology" }),
72
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248501-1", display: "Child and adolescent psychology" }),
73
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248729-8", display: "Neuropsychology" }),
74
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172960-9", display: "Multi-specialty program" }),
75
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345048-5", display: "Aerodigestive medicine" }),
76
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP263714-0", display: "Brain injury" }),
77
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP420041-8", display: "Breastfeeding" }),
78
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345049-3", display: "Cleft and Craniofacial" }),
79
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP417672-5", display: "Medical Aid in Dying" }),
80
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172897-3", display: "Multidisciplinary" }),
81
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172963-3", display: "Neurological surgery" }),
82
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP345042-8", display: "Spinal surgery" }),
83
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172964-1", display: "Neurology" }),
84
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172931-0", display: "Clinical neurophysiology" }),
85
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248726-4", display: "Epilepsy" }),
86
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172898-1", display: "Neurology w special qualifications in child neuro" }),
87
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173038-3", display: "Vascular neurology" }),
88
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172968-2", display: "Nuclear medicine" }),
89
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172899-9", display: "Nutrition and dietetics" }),
90
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP269243-4", display: "Obesity medicine" }),
91
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172971-6", display: "Obstetrics and gynecology" }),
92
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP221284-5", display: "Gynecology" }),
93
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP202989-2", display: "Gynecologic oncology" }),
94
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172955-9", display: "Maternal and fetal medicine" }),
95
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP221283-7", display: "Obstetrics" }),
96
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173020-1", display: "Reproductive endocrinology and infertility" }),
97
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172973-2", display: "Occupational therapy" }),
98
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172901-3", display: "Oncology" }),
99
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172991-4", display: "Pediatric hematology-oncology" }),
100
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173016-9", display: "Radiation oncology" }),
101
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP207940-0", display: "Surgical oncology" }),
102
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172974-0", display: "Ophthalmology" }),
103
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172975-7", display: "Optometry" }),
104
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172902-1", display: "Oral and maxillofacial surgery" }),
105
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP434806-8", display: "Orthopaedic surgery" }),
106
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173029-2", display: "Surgery of the hand" }),
107
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP434870-4", display: "Orthopaedic" }),
108
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172979-9", display: "Orthotics prosthetics" }),
109
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP434767-2", display: "Osteopathic medicine" }),
110
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172980-7", display: "Otolaryngology" }),
111
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172994-8", display: "Pediatric otolaryngology" }),
112
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172982-3", display: "Palliative care" }),
113
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172983-1", display: "Pastoral care" }),
114
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172984-9", display: "Pathology" }),
115
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP208907-8", display: "Anatomic pathology" }),
116
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP208906-0", display: "Clinical pathology" }),
117
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172920-3", display: "Blood banking and transfusion medicine" }),
118
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP208902-9", display: "Chemical pathology" }),
119
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP208903-7", display: "Pathology – Medical microbiology" }),
120
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173002-9", display: "Pediatrics" }),
121
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172937-7", display: "Developmental-behavioral pediatrics" }),
122
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172961-7", display: "Neonatal perinatal medicine" }),
123
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP192135-4", display: "Birth defects" }),
124
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172985-6", display: "Pediatric cardiology" }),
125
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172986-4", display: "Pediatric critical care medicine" }),
126
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172989-8", display: "Pediatric endocrinology" }),
127
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172990-6", display: "Pediatric gastroenterology" }),
128
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173000-3", display: "Pediatric transplant hepatology" }),
129
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172992-2", display: "Pediatric infectious diseases" }),
130
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172993-0", display: "Pediatric nephrology" }),
131
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172995-5", display: "Pediatric pulmonology" }),
132
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172997-1", display: "Pediatric rehabilitation medicine" }),
133
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172998-9", display: "Pediatric rheumatology" }),
134
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172999-7", display: "Pediatric surgery" }),
135
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173003-7", display: "Pharmacology" }),
136
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP220238-2", display: "Clinical pharmacology" }),
137
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP447710-7", display: "Clinical pharmacy" }),
138
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173004-5", display: "Physical medicine and rehabilitation" }),
139
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172954-2", display: "Kinesiotherapy" }),
140
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173026-8", display: "Spinal cord injury medicine" }),
141
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173040-9", display: "Vocational rehabilitation" }),
142
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173005-2", display: "Physical therapy" }),
143
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173006-0", display: "Plastic surgery" }),
144
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP268363-1", display: "Burn management" }),
145
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173008-6", display: "Podiatry" }),
146
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP433456-3", display: "Chiropody" }),
147
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173009-4", display: "Preventive medicine" }),
148
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172972-4", display: "Occupational medicine" }),
149
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173010-2", display: "Primary care" }),
150
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP448682-7", display: "Preventive care" }),
151
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173014-4", display: "Public health" }),
152
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP204156-6", display: "Community health care" }),
153
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP267441-6", display: "Environmental health" }),
154
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173018-5", display: "Radiology" }),
155
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172896-5", display: "Interventional radiology" }),
156
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP448142-2", display: "Social Care" }),
157
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173019-3", display: "Recreational therapy" }),
158
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173021-9", display: "Research" }),
159
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173022-7", display: "Respiratory therapy" }),
160
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173025-0", display: "Speech-language pathology" }),
161
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173028-4", display: "Surgery" }),
162
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248500-3", display: "Bariatric surgery" }),
163
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP172932-8", display: "Colon and rectal surgery" }),
164
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173030-0", display: "Surgical critical care" }),
165
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173031-8", display: "Thoracic and cardiac surgery" }),
166
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP207300-7", display: "Cardiac surgery" }),
167
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173033-4", display: "Transplant surgery" }),
168
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP434807-6", display: "Trauma Surgery" }),
169
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173039-1", display: "Vascular surgery" }),
170
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP269976-9", display: "Thromboembolism" }),
171
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173034-2", display: "Tumor board" }),
172
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173036-7", display: "Urology" }),
173
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP173001-1", display: "Pediatric urology" }),
174
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP248732-2", display: "Womens health" }),
175
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP185997-6", display: "Wound care management" }),
176
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP412351-1", display: "Wound, Ostomy, and Continence Care" }),
177
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP448293-3", display: "Rapid response" }),
178
+ Object.freeze({ system: LoincSubjectMatterDomainSystem, code: "LP450620-2", display: "Hemodynamic" }),
179
+ ]);
@@ -8,7 +8,7 @@ export type FhirSearchParameter = Readonly<{
8
8
  system?: string;
9
9
  unit?: string;
10
10
  }>;
11
- /** Parses one typed FHIR query value without the lossy integer coercion of the retired UHC helper. */
11
+ /** Parses one typed FHIR query value without lossy integer coercion. */
12
12
  export declare function parseFhirSearchParameter(input: Readonly<{
13
13
  name: string;
14
14
  type: FhirSearchParameterType;
@@ -1,5 +1,5 @@
1
1
  const PREFIX = /^(eq|ne|gt|lt|ge|le|sa|eb|ap)/;
2
- /** Parses one typed FHIR query value without the lossy integer coercion of the retired UHC helper. */
2
+ /** Parses one typed FHIR query value without lossy integer coercion. */
3
3
  export function parseFhirSearchParameter(input) {
4
4
  const name = required(input.name, 'fhir_search_name_required');
5
5
  const raw = required(input.value, 'fhir_search_value_required');
@@ -1,4 +1,4 @@
1
- /** Type-only DICOMDIR tree contract recovered from the retired UHC package. */
1
+ /** Type-only DICOMDIR tree contract. */
2
2
  export interface DicomDirectoryNode {
3
3
  id: string;
4
4
  uid: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Resource-specific search models recovered from the original UHC package.
2
+ * Resource-specific FHIR search models.
3
3
  * Runtime parsing and serialization use `fhir-search-parameters`; these are
4
4
  * compile-time compatibility surfaces, not a second query implementation.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Resource-specific search models recovered from the original UHC package.
2
+ * Resource-specific FHIR search models.
3
3
  * Runtime parsing and serialization use `fhir-search-parameters`; these are
4
4
  * compile-time compatibility surfaces, not a second query implementation.
5
5
  */
@@ -1,7 +1,7 @@
1
1
  # Care, emergency and population-alert FHIR contracts
2
2
 
3
- This package owns only the product-neutral FHIR representation used by the
4
- three SOSChain journeys that are first proven in VetChain and PetChain.
3
+ This package owns only the product-neutral FHIR representation used by three
4
+ care and emergency journeys.
5
5
  Authorization, controller discovery, encryption, transport, storage and UI
6
6
  policy remain in their owning product or service layers.
7
7
 
@@ -24,19 +24,14 @@ The layer split is:
24
24
  fhir-data-utils-ts
25
25
  canonical claims + R4/R5/R6 import/export
26
26
  ↓
27
- sos-data-utils-ts
28
- product-neutral multichannel field schemas
29
- ↓
30
- sos-sdk-core-ts / sos-sdk-node-ts
31
- shared orchestration and runtime adapters
32
- ↓
33
- vet-* / uhc-*
34
- product forms, portal editors and telephone/chat dialogue
27
+ downstream libraries
28
+ multichannel schemas, mutable editors, orchestration and product policy
35
29
  ```
36
30
 
37
- When Vet or UHC adds a visual, chat or telephone editor for one of these
38
- fields, it must consume the canonical claim key from this package. It must not
39
- maintain a second literal, converter or incompatible getter/setter model.
31
+ When a downstream application adds a visual, chat or telephone editor for one
32
+ of these fields, it must consume the canonical claim key from this package. It
33
+ must not maintain a second literal, converter or incompatible getter/setter
34
+ model.
40
35
 
41
36
  The mutable GDC Bundle API remains documented separately in
42
37
  [`gdc-common-utils-ts`](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/main/docs/101-CLINICAL-ENTRY-GETTERS-SETTERS.md)
@@ -1,9 +1,9 @@
1
1
  # Communication Bundle contract
2
2
 
3
3
  Every cross-participant clinical or administrative exchange uses the same
4
- two-level FHIR envelope. This is the portable contract for Vet, UHC and
5
- SOSChain channels; HTTP, DIDComm, encryption and recipient resolution remain
6
- in their owning SDK or service.
4
+ two-level FHIR envelope. This is the portable contract for downstream
5
+ channels; HTTP, DIDComm, encryption and recipient resolution remain in their
6
+ owning library or service.
7
7
 
8
8
  ```text
9
9
  outer Bundle (type=batch)
@@ -45,10 +45,9 @@ The validator fails closed when the outer resource is not a batch Bundle, an out
45
45
  batch entry lacks its request, the Communication has anything other than one
46
46
  FHIR Bundle attachment, or the inner Bundle violates its declared type.
47
47
 
48
- `sos-sdk-core` owns the high-level Bundle and Communication editor/reader used
49
- by SOS, Vet and UHC. `sos-data-utils` owns its cross-sector input contracts and
50
- fixtures. The historical `gdc-*` editors remain compatibility surfaces until
51
- their consumers migrate; this package neither imports nor wraps them.
48
+ Downstream libraries own high-level Bundle and Communication editors/readers,
49
+ cross-sector input contracts, fixtures, transport and product policy. This
50
+ package neither imports nor wraps those consumer surfaces.
52
51
 
53
52
  At the GW persistence boundary, the validated native resources are projected
54
53
  to independent `resource.meta.claims` rows. Direct flat-claim CRUD is an
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fhir-data-utils-ts",
3
- "version": "0.6.19",
3
+ "version": "0.6.21",
4
4
  "description": "FHIR-version-neutral flat-claim and SearchParameter data utilities",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,181 +0,0 @@
1
- # UHC FHIR utilities migration
2
-
3
- `uhc-fhir-utils-typescript` is an archaeological source, not a dependency of
4
- this package. Its useful behavior must be recovered behind neutral, typed and
5
- version-explicit contracts. Its product branding, obsolete security choices
6
- and transport assumptions must not be copied.
7
-
8
- The wider historical lineage began with early helpers in
9
- `uhc-helpers-typescript`, was then split and improved across
10
- `uhc-common-models-typescript`, `uhc-common-utils-typescript`,
11
- `data-utils-typescript` and the crypto utilities, and later contributed to
12
- `gdc-common-utils-ts`. For SHC and DGC, the later split packages are the
13
- preferred behavioural and type evidence; the early helper remains UI-flow
14
- evidence only.
15
-
16
- ## Migration rules
17
-
18
- 1. Add the smallest failing contract test here before porting behavior.
19
- 2. Use official FHIR R4/R5/R6 structures at import/export boundaries and flat
20
- claims as the version-neutral representation between those boundaries.
21
- 3. Copy no raw claim, terminology, identifier or profile literal into a
22
- consumer. Define it once in its owning neutral or sector data package.
23
- 4. Preserve historical inputs with explicit read adapters. New writers emit
24
- only the current canonical representation.
25
- 5. Do not change `gdc-*` while those repositories are frozen. They are
26
- read-only compatibility evidence until every consumer uses this package.
27
-
28
- ## Reuse, rewrite or retire
29
-
30
- | Old area | Decision | Current destination or gate |
31
- | --- | --- | --- |
32
- | `Bundle` and `Composition` traversal | Rewrite from tests | Neutral graph and explicit R4/R5/R6 adapters; preserve author, attester and section boundaries |
33
- | `gdc-common-utils-ts` Communication attached-Bundle editor/reader | Preserve as read-only migration evidence | Neutral validation/projection tools live here; the replacement high-level editor/reader belongs to `sos-sdk-core`, with shared input contracts in `sos-data-utils` |
34
- | `CodeableConcept`, `Identifier`, `Reference`, `Quantity` | Rewrite and reuse behavior | Small typed value modules with round-trip tests |
35
- | `Observation` and resource parameter models | Rewrite | Canonical claim catalogs plus version-specific projection adapters |
36
- | `Parameters` conversion | Rewrite | A typed FHIR Parameters module; never a transport-specific envelope |
37
- | Anonymization field inventory | Test input only | A separately reviewed policy contract; old field lists do not become policy automatically |
38
- | ATC, LOINC, SNOMED and EMA JSON | Validate before reuse | Terminology service fixtures, never authoritative embedded catalogs |
39
- | DICOM parsing | Extract later | Separate imaging package; do not add `dicom-parser` to the neutral core |
40
- | ImagingStudy metadata | Rewrite | Neutral flat claims and R4 projection for subject, encounter, modality, procedure and protected endpoint references; DICOM bytes remain outside |
41
- | SHA-1 attachment hashing | Retire | No compatibility writer; historical read/verification belongs in a versioned adapter |
42
- | `MessageHeader` transport conventions | Retire | Transport is outside the FHIR data contract |
43
- | UHC-branded templates and defaults | Retire or move downstream | Product policy belongs in UHC packages, not here |
44
- | Babel/Yarn/Jest build plumbing and broad `any` models | Retire | Node 24, TypeScript strict mode and `node:test` |
45
-
46
- ## Completed source inventory
47
-
48
- | Source | Migrated here | Deliberately remains outside |
49
- | --- | --- | --- |
50
- | `gdc-common-utils-ts` interoperable claims | All product-neutral claim catalogs, specs and claim helpers, including Consent and the complete SOS Task surface | Schema.org/Gaia-X mapping and runtime policy |
51
- | `gdc-common-utils-ts` converters | Every product-neutral R4/R5 converter present there; Observation component writing was corrected to use a resource graph | Network, persistence and authorization orchestration |
52
- | `uhc-fhir-utils-typescript` models | ATC/FHIR/LOINC/SNOMED model types, all resource search parameter enums and template interfaces, strict replacement FHIR primitives | Embedded terminology JSON is not authoritative data |
53
- | `uhc-fhir-utils-typescript` helpers | Coding/token, Identifier, Reference, Quantity, telecom, RelatedPerson search projection and non-mutating Bundle traversal/classification/reference lookup | Message transport, SHA-1 writers, COVID-era product presets and mutation-heavy manager facades |
54
- | Later UHC data/common packages | SHC and EU DGC QR prefix classification plus repository-safe examples | Signature verification, issuer trust, credential import and authorization remain separate future contracts |
55
- | `uhc-fhir-utils-typescript` imaging | DICOMDIR structural types only | Byte parsing and pixel extraction require a separately versioned imaging package |
56
- | `sos-data-utils-ts` | Cross-sector terminology contract and fixtures, Immunization graph and reminder planning | SOS authorization, repository and emergency policy |
57
- | `vet-data-utils-ts` | Product-neutral FHIR R5 Group and ResearchStudy contracts/search projections | Animal identity, veterinary sections, species, insurance, payment and other Vet policy |
58
- | Provider catalogs | R4 HealthcareService claims/converter, geocoded Location claims, one-department professional Group normalization and reviewed C80-to-LOINC candidate mappings | Schema.org images/logo storage, marketplace sector policy, endpoint authorization and communication routing |
59
- | UHC/Vet SDKs | No transport client was copied | SMART clients, Oracle clients, BFF calls and product workflows remain SDK responsibilities |
60
-
61
- The frozen `gdc-*` implementation remains compatibility evidence. New Vet,
62
- UHC and SOS code uses the replacement high-level API in `sos-sdk-core`, which
63
- composes the neutral tools exported here. Neither shared replacement package
64
- imports `gdc-*`. DIDComm wrapping, post-quantum encryption, endpoint selection
65
- and delivery retries remain in the SDK/service layer.
66
-
67
- The migration surface is executable rather than documentary only:
68
-
69
- - every migrated claim family has a named catalog and shared list helpers;
70
- - every migrated product-neutral converter participates in the converter
71
- round-trip matrix, with rich optional-field fixtures for complex resources;
72
- - Encounter retains its originating Appointment and ImagingStudy retains
73
- searchable metadata without embedding DICOM object bytes;
74
- - FHIR primitives, typed searches, Bundle traversal and fallback conversion
75
- have strict success and rejection tests;
76
- - Communication exchange is authored and read only as outer batch Bundle to
77
- Communication to inner document/batch/collection Bundle, with files modeled
78
- as inner DocumentReference resources;
79
- - Immunization graphs and reminders live once under `src/builders/`; the former
80
- root modules are deprecated re-export shims;
81
- - Group and ResearchStudy expose named claim constants, preserve member/party
82
- correlation as separate rows and reject authorization-shaped data;
83
- - Organization departments remain distinct from offered HealthcareServices;
84
- every independently schedulable service keeps its own stable identity and
85
- Location references, while professional Group ownership remains explicit;
86
- - `buildServiceScheduleFlatGraph(...)` and the R5 Schedule/Slot adapters keep
87
- per-service planning horizons and slot intervals shared between Vet and UHC;
88
- - schedulable child Locations preserve `partOf`, while Schedule actors can
89
- combine the service with Location, Device and PractitionerRole capacity;
90
- and
91
- - `npm run check` enforces minimum line, function and branch coverage across
92
- converters, builders and core FHIR modules.
93
-
94
- This inventory is a boundary decision, not permission to leave another copy in
95
- new code. Consumers must move to this package bottom-up after its immutable
96
- release. Existing packages may retain compatibility re-exports only during
97
- that promotion.
98
-
99
- ## Observation and component contract
100
-
101
- FHIR blood pressure is one native `Observation` with systolic and diastolic
102
- entries in `Observation.component[]`. Canonical flat storage is instead a
103
- resource graph: the primary Observation owns `Observation.has-member`, and
104
- each referenced reduced Observation owns its identifier, subject, category,
105
- date, component code, numeric value and unit. Reduced entries deliberately
106
- carry no `Observation.status`, so normal top-level listings ignore them while
107
- component-level indexes can query their ordinary Observation claims.
108
-
109
- The R4/R5 export adapter resolves the primary entry's members and reconstructs
110
- one native `Observation.component[]`; it does not export three independent
111
- native Observations. Component entries do not use `is-contained`,
112
- `contained-parent-reference` or `contained-reference-list`.
113
-
114
- Diagnostic laboratory authoring is owned here by
115
- `buildDiagnosticReportFlatGraph(...)`: `DiagnosticReport.code` identifies the
116
- report/panel, independent Observation entries carry atomic results, and
117
- independent DocumentReference entries carry PDF/image evidence. Sector roles,
118
- confirmation, ledger eligibility, consent and research policy remain outside
119
- this package.
120
-
121
- Aligned JSON arrays and the older comma-separated `Observation.component-*`
122
- claims are accepted only by the migration reader. No current writer emits
123
- either representation.
124
-
125
- The historical `Observation.bp-systolic-number` and
126
- `Observation.bp-diastolic-number` fields are accepted only when reading data
127
- that has no component graph or historical component claims. New writers and
128
- generic component indexes never emit them. This prevents a new custom claim
129
- family for every assessment scale.
130
-
131
- ## Consumer promotion sequence
132
-
133
- 1. Release this package, pin the immutable version in the lowest downstream
134
- package, and run that consumer's complete local matrix.
135
- 2. Remove the corresponding frozen dependency only after no consumer imports
136
- that family from it.
137
- 3. Migrate imaging/DICOM byte parsing and terminology payloads as separate changes because
138
- they have different dependencies, security rules and release gates.
139
-
140
- ## Ownership map for new work
141
-
142
- | Change | Owning surface |
143
- | --- | --- |
144
- | Add or rename a flat storage key | `src/claims/<resource>-claims.ts` |
145
- | Convert a native R4/R5 resource | `src/converters/convert-<resource>.ts` |
146
- | Author several correlated resources | `src/builders/` |
147
- | Preserve an obsolete input | Explicit read-only compatibility adapter |
148
- | Add transport, SMART or persistence behavior | Owning SDK/service, never this package |
149
- | Add sector terminology or policy | SOS, Vet or UHC data package |
150
- | Configure an R5 SubscriptionTopic/Subscription | Native builder and official search catalog in `subscription-r5`; registration remains in the owning service |
151
- | Persist or deliver a subscription event | GW/BFF transport and storage, never this package |
152
-
153
- Converters and builders import catalog symbols. Tests may spell native FHIR
154
- wire fields, but do not duplicate flat-claim paths except when proving that a
155
- malformed or invented path is rejected.
156
-
157
- ## Schema-driven editor boundary
158
-
159
- `clinicalArtifactFhirR4ToFlat(...)` and
160
- `clinicalArtifactEditorClaimsFromFhirR4(...)` are import/read adapters. They
161
- turn a native FHIR R4 clinical resource into canonical flat claims and never
162
- own a portal form, authorization or transport decision.
163
-
164
- The cross-channel JSON Schema and the `BundleEditor`/`BundleReader` round trip
165
- belong to `sos-data-utils-ts`. A shared React component consumes both layers:
166
- FHIR conversion for native imports, then the SOS JSON Schema to select and
167
- validate editable values and create the claims-first changes Bundle. Portals
168
- must not add resource-specific claim mappers between those shared layers.
169
-
170
- ## Subscription notification boundary
171
-
172
- FHIR R5 `SubscriptionTopic` and `Subscription` are native configuration
173
- resources, not flat clinical persistence. This package owns their strict typed
174
- builders, the official R5 resource-specific SearchParameter catalogs and the
175
- parser for `Bundle[type=subscription-notification]`. It also owns the minimal
176
- claims-first terminal Task `Communication` shape so producers and receivers do
177
- not duplicate claim paths.
178
-
179
- HTTP delivery, authentication, durable outbox/inbox storage and browser or
180
- email/push fan-out remain in GW, DataConv and the product BFFs. The neutral
181
- package contains no HTTP client and no gateway policy.