fhir-data-utils-ts 0.6.18 → 0.6.19
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Add the official `HealthcareService.appointmentRequired` flat claim and
|
|
6
|
+
R4/R5 materialization round trip. Availability remains authoritative in the
|
|
7
|
+
associated Schedule and Slot resources and is not duplicated on the service.
|
|
8
|
+
|
|
5
9
|
## 0.6.18 - 2026-10-08
|
|
6
10
|
|
|
7
11
|
- Add the canonical Immunization series-dose claim, its FHIR R4 round trip,
|
|
@@ -8,6 +8,7 @@ import type { ClaimSpec } from './claim-types.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const HealthcareServiceClaim: Readonly<{
|
|
10
10
|
readonly Active: "HealthcareService.active";
|
|
11
|
+
readonly AppointmentRequired: "HealthcareService.appointment-required";
|
|
11
12
|
readonly Characteristic: "HealthcareService.characteristic";
|
|
12
13
|
readonly CoverageArea: "HealthcareService.coverage-area";
|
|
13
14
|
readonly Endpoint: "HealthcareService.endpoint";
|
|
@@ -9,6 +9,7 @@ import { defineFlatSearchParameter } from '../search-parameters.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export const HealthcareServiceClaim = Object.freeze({
|
|
11
11
|
Active: 'HealthcareService.active',
|
|
12
|
+
AppointmentRequired: 'HealthcareService.appointment-required',
|
|
12
13
|
Characteristic: 'HealthcareService.characteristic',
|
|
13
14
|
CoverageArea: 'HealthcareService.coverage-area',
|
|
14
15
|
Endpoint: 'HealthcareService.endpoint',
|
|
@@ -39,6 +40,7 @@ export const HealthcareServiceR4SearchParameterCatalog = Object.freeze([
|
|
|
39
40
|
]);
|
|
40
41
|
export const HealthcareServiceClaimSpecs = Object.freeze([
|
|
41
42
|
{ key: HealthcareServiceClaim.Active, meaning: 'Whether the service is active.', example: 'true' },
|
|
43
|
+
{ key: HealthcareServiceClaim.AppointmentRequired, meaning: 'Whether an appointment is required before receiving the service.', example: 'true' },
|
|
42
44
|
{ key: HealthcareServiceClaim.Characteristic, meaning: 'Repeatable service characteristic tokens as CSV.', example: 'https://example.org/CodeSystem/service-characteristic|24-hours' },
|
|
43
45
|
{ key: HealthcareServiceClaim.CoverageArea, meaning: 'Repeatable intended coverage Location references as CSV.', example: 'Location/british-columbia' },
|
|
44
46
|
{ key: HealthcareServiceClaim.Endpoint, meaning: 'Repeatable technical Endpoint references as CSV.', example: 'Endpoint/emergency-group-inbox' },
|
|
@@ -23,6 +23,9 @@ export function healthcareServiceFlatToFhirR4(claims) {
|
|
|
23
23
|
active: claims[HealthcareServiceClaim.Active] === undefined
|
|
24
24
|
? undefined
|
|
25
25
|
: claims[HealthcareServiceClaim.Active] === 'true',
|
|
26
|
+
appointmentRequired: claims[HealthcareServiceClaim.AppointmentRequired] === undefined
|
|
27
|
+
? undefined
|
|
28
|
+
: claims[HealthcareServiceClaim.AppointmentRequired] === 'true',
|
|
26
29
|
providedBy: claims[HealthcareServiceClaim.Organization]
|
|
27
30
|
? { reference: claims[HealthcareServiceClaim.Organization] }
|
|
28
31
|
: undefined,
|
|
@@ -42,6 +45,9 @@ export function healthcareServiceFlatToFhirR4(claims) {
|
|
|
42
45
|
export function healthcareServiceFhirR4ToFlat(resource) {
|
|
43
46
|
return {
|
|
44
47
|
[HealthcareServiceClaim.Active]: resource.active === undefined ? undefined : String(resource.active),
|
|
48
|
+
[HealthcareServiceClaim.AppointmentRequired]: resource.appointmentRequired === undefined
|
|
49
|
+
? undefined
|
|
50
|
+
: String(resource.appointmentRequired),
|
|
45
51
|
[HealthcareServiceClaim.Characteristic]: conceptsToCsv(resource.characteristic),
|
|
46
52
|
[HealthcareServiceClaim.CoverageArea]: referenceListToCsv(resource.coverageArea),
|
|
47
53
|
[HealthcareServiceClaim.Endpoint]: referenceListToCsv(resource.endpoint),
|
|
@@ -18,6 +18,12 @@ donation independently. Each service can own different Location references and
|
|
|
18
18
|
be the actor of a different Schedule; Slot duration and availability follow
|
|
19
19
|
that Schedule rather than the department.
|
|
20
20
|
|
|
21
|
+
`HealthcareService.appointmentRequired` states whether a person or animal must
|
|
22
|
+
have an appointment before receiving the service. It does not describe when
|
|
23
|
+
the service is available. Operational availability remains authoritative in
|
|
24
|
+
the service's `Schedule` and its `Slot` resources; clients must not copy those
|
|
25
|
+
intervals into a second service-level availability model.
|
|
26
|
+
|
|
21
27
|
`buildServiceScheduleFlatGraph(...)` implements that boundary. It emits one
|
|
22
28
|
independent claims-first `Schedule` plus independent `Slot` rows. A 15-minute
|
|
23
29
|
blood-donation interval and a one-hour plasma-donation interval are represented
|
|
@@ -143,6 +149,9 @@ Repeatable coding identities remain complete `system|code` tokens; labels are
|
|
|
143
149
|
resolved by the terminology service and are not trusted storage identity.
|
|
144
150
|
`HealthcareService.comment` and R5 `Organization.description` are governed
|
|
145
151
|
materialization claims, but are not falsely advertised as R4 SearchParameters.
|
|
152
|
+
The same applies to `HealthcareService.appointmentRequired`: it is an official
|
|
153
|
+
R4/R5 element and a governed materialization claim, not a resource-specific R4
|
|
154
|
+
SearchParameter.
|
|
146
155
|
|
|
147
156
|
`materializeClaimsFirstResourceToFhirR5(...)` accepts only minimal resource
|
|
148
157
|
identity plus `resource.meta.claims`. It rejects nested native FHIR fields and
|