fhir-data-utils-ts 0.6.11 → 0.6.13
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 +10 -0
- package/README.md +14 -0
- package/dist/claims/communication-request-claims.d.ts +12 -0
- package/dist/claims/communication-request-claims.js +32 -0
- package/dist/clinical-artifact-editor.d.ts +6 -0
- package/dist/clinical-artifact-editor.js +15 -1
- package/dist/converters/convert-communication-request.d.ts +4 -0
- package/dist/converters/convert-communication-request.js +142 -5
- package/dist/data/communication-request-form-schema.data.d.ts +108 -0
- package/dist/data/communication-request-form-schema.data.js +91 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Add a reusable, data-only `CommunicationRequest` form schema backed by
|
|
6
|
+
canonical flat claims, including exact Patient, RelatedPerson or Group
|
|
7
|
+
recipients, information providers, Encounter context and referenced or
|
|
8
|
+
attached payloads. Projection adapters are deliberately limited to the
|
|
9
|
+
published FHIR R4 and R5 specifications; no R6 API is exposed.
|
|
10
|
+
|
|
11
|
+
- Canonicalize native FHIR relative subject references at the shared clinical
|
|
12
|
+
editor boundary before claims-first operations, while preserving governed
|
|
13
|
+
URN and `did:web` identifiers unchanged.
|
|
14
|
+
|
|
5
15
|
- Add the shared clinical-artifact editor boundary for native FHIR R4 imports:
|
|
6
16
|
hydrate only schema-owned fields, materialize supported IPS resources from
|
|
7
17
|
editor plus host-owned claims, and prove FHIR-to-form-to-FHIR semantic
|
package/README.md
CHANGED
|
@@ -216,6 +216,20 @@ CommunicationRequest against a frozen Group snapshot. See
|
|
|
216
216
|
[the contract guide](docs/CARE_EMERGENCY_ALERT_CONTRACTS.md). Product policy,
|
|
217
217
|
access, encryption and delivery do not belong in these builders.
|
|
218
218
|
|
|
219
|
+
## Communication request authoring
|
|
220
|
+
|
|
221
|
+
`FHIR_COMMUNICATION_REQUEST_FORM_SCHEMA` and its typed adapters are exported
|
|
222
|
+
from `fhir-data-utils-ts/data`. They let Personal and Professional portals use
|
|
223
|
+
the same fields while keeping UI labels, widgets and authorization outside this
|
|
224
|
+
package. Recipients remain exact FHIR references, so a request can target the
|
|
225
|
+
patient and only the authorized `RelatedPerson` records selected for that
|
|
226
|
+
message. `requester` records who prepared the request and
|
|
227
|
+
`informationProviders` records the professionals expected to supply or review
|
|
228
|
+
its content; neither field grants permission by itself.
|
|
229
|
+
|
|
230
|
+
The package exposes separate `CommunicationRequest` projections for published
|
|
231
|
+
FHIR R4 and FHIR R5. It intentionally exposes no R6 or combined R5/R6 adapter.
|
|
232
|
+
|
|
219
233
|
## Clinical documents and Encounter journeys
|
|
220
234
|
|
|
221
235
|
A FHIR document always starts with `Composition`; `Encounter` is its optional
|
|
@@ -3,19 +3,31 @@ import type { ClaimSpec } from './claim-types.js';
|
|
|
3
3
|
export declare const CommunicationRequestClaim: Readonly<{
|
|
4
4
|
readonly Identifier: "CommunicationRequest.identifier";
|
|
5
5
|
readonly BasedOn: "CommunicationRequest.based-on";
|
|
6
|
+
readonly Replaces: "CommunicationRequest.replaces";
|
|
7
|
+
readonly GroupIdentifier: "CommunicationRequest.group-identifier";
|
|
6
8
|
readonly Status: "CommunicationRequest.status";
|
|
9
|
+
readonly StatusReason: "CommunicationRequest.status-reason";
|
|
10
|
+
readonly Intent: "CommunicationRequest.intent";
|
|
7
11
|
readonly Priority: "CommunicationRequest.priority";
|
|
8
12
|
readonly Category: "CommunicationRequest.category";
|
|
13
|
+
readonly DoNotPerform: "CommunicationRequest.do-not-perform";
|
|
14
|
+
readonly Medium: "CommunicationRequest.medium";
|
|
9
15
|
readonly Subject: "CommunicationRequest.subject";
|
|
10
16
|
readonly About: "CommunicationRequest.about";
|
|
11
17
|
readonly Encounter: "CommunicationRequest.encounter";
|
|
12
18
|
readonly Requester: "CommunicationRequest.requester";
|
|
13
19
|
readonly Recipient: "CommunicationRequest.recipient";
|
|
20
|
+
readonly InformationProvider: "CommunicationRequest.information-provider";
|
|
14
21
|
readonly AuthoredOn: "CommunicationRequest.authored-on";
|
|
15
22
|
readonly Occurrence: "CommunicationRequest.occurrence";
|
|
16
23
|
readonly ReasonCode: "CommunicationRequest.reason-code";
|
|
17
24
|
readonly ReasonReference: "CommunicationRequest.reason-reference";
|
|
18
25
|
readonly PayloadContent: "CommunicationRequest.payload-content";
|
|
26
|
+
readonly PayloadReference: "CommunicationRequest.payload-reference";
|
|
27
|
+
readonly PayloadAttachmentContentType: "CommunicationRequest.payload-attachment-content-type";
|
|
28
|
+
readonly PayloadAttachmentData: "CommunicationRequest.payload-attachment-data";
|
|
29
|
+
readonly PayloadAttachmentTitle: "CommunicationRequest.payload-attachment-title";
|
|
30
|
+
readonly Note: "CommunicationRequest.note";
|
|
19
31
|
}>;
|
|
20
32
|
export type CommunicationRequestClaimKey = typeof CommunicationRequestClaim[keyof typeof CommunicationRequestClaim];
|
|
21
33
|
export declare const CommunicationRequestClaimSpecs: readonly ClaimSpec[];
|
|
@@ -2,26 +2,58 @@
|
|
|
2
2
|
export const CommunicationRequestClaim = Object.freeze({
|
|
3
3
|
Identifier: 'CommunicationRequest.identifier',
|
|
4
4
|
BasedOn: 'CommunicationRequest.based-on',
|
|
5
|
+
Replaces: 'CommunicationRequest.replaces',
|
|
6
|
+
GroupIdentifier: 'CommunicationRequest.group-identifier',
|
|
5
7
|
Status: 'CommunicationRequest.status',
|
|
8
|
+
StatusReason: 'CommunicationRequest.status-reason',
|
|
9
|
+
Intent: 'CommunicationRequest.intent',
|
|
6
10
|
Priority: 'CommunicationRequest.priority',
|
|
7
11
|
Category: 'CommunicationRequest.category',
|
|
12
|
+
DoNotPerform: 'CommunicationRequest.do-not-perform',
|
|
13
|
+
Medium: 'CommunicationRequest.medium',
|
|
8
14
|
Subject: 'CommunicationRequest.subject',
|
|
9
15
|
About: 'CommunicationRequest.about',
|
|
10
16
|
Encounter: 'CommunicationRequest.encounter',
|
|
11
17
|
Requester: 'CommunicationRequest.requester',
|
|
12
18
|
Recipient: 'CommunicationRequest.recipient',
|
|
19
|
+
InformationProvider: 'CommunicationRequest.information-provider',
|
|
13
20
|
AuthoredOn: 'CommunicationRequest.authored-on',
|
|
14
21
|
Occurrence: 'CommunicationRequest.occurrence',
|
|
15
22
|
ReasonCode: 'CommunicationRequest.reason-code',
|
|
16
23
|
ReasonReference: 'CommunicationRequest.reason-reference',
|
|
17
24
|
PayloadContent: 'CommunicationRequest.payload-content',
|
|
25
|
+
PayloadReference: 'CommunicationRequest.payload-reference',
|
|
26
|
+
PayloadAttachmentContentType: 'CommunicationRequest.payload-attachment-content-type',
|
|
27
|
+
PayloadAttachmentData: 'CommunicationRequest.payload-attachment-data',
|
|
28
|
+
PayloadAttachmentTitle: 'CommunicationRequest.payload-attachment-title',
|
|
29
|
+
Note: 'CommunicationRequest.note',
|
|
18
30
|
});
|
|
19
31
|
export const CommunicationRequestClaimSpecs = Object.freeze([
|
|
20
32
|
{ key: CommunicationRequestClaim.Identifier, meaning: 'Business identifier.', example: 'urn:uuid:campaign-1' },
|
|
33
|
+
{ key: CommunicationRequestClaim.BasedOn, meaning: 'Requests fulfilled in whole or in part.', example: 'ServiceRequest/request-1' },
|
|
34
|
+
{ key: CommunicationRequestClaim.Replaces, meaning: 'Earlier requests superseded by this request.', example: 'CommunicationRequest/request-0' },
|
|
35
|
+
{ key: CommunicationRequestClaim.GroupIdentifier, meaning: 'Shared identifier for one request group.', example: 'urn:uuid:request-group-1' },
|
|
21
36
|
{ key: CommunicationRequestClaim.Status, meaning: 'Request lifecycle status.', example: 'active' },
|
|
37
|
+
{ key: CommunicationRequestClaim.StatusReason, meaning: 'Coded explanation for the lifecycle status.', example: 'http://terminology.hl7.org/CodeSystem/request-status-reason|paused' },
|
|
38
|
+
{ key: CommunicationRequestClaim.Intent, meaning: 'Published R5 request intent.', example: 'proposal' },
|
|
22
39
|
{ key: CommunicationRequestClaim.Priority, meaning: 'Delivery priority.', example: 'routine' },
|
|
23
40
|
{ key: CommunicationRequestClaim.Category, meaning: 'Communication category token.', example: 'http://terminology.hl7.org/CodeSystem/communication-category|notification' },
|
|
41
|
+
{ key: CommunicationRequestClaim.DoNotPerform, meaning: 'Whether the requested communication must not occur.', example: 'false' },
|
|
42
|
+
{ key: CommunicationRequestClaim.Medium, meaning: 'Requested communication medium token.', example: 'http://terminology.hl7.org/CodeSystem/v3-ParticipationMode|WRITTEN' },
|
|
24
43
|
{ key: CommunicationRequestClaim.Subject, meaning: 'Subject or evaluated Group reference.', example: 'Group/snapshot-1' },
|
|
44
|
+
{ key: CommunicationRequestClaim.About, meaning: 'Resources that the communication request concerns.', example: 'DiagnosticReport/report-1' },
|
|
45
|
+
{ key: CommunicationRequestClaim.Encounter, meaning: 'Encounter context for the request.', example: 'Encounter/emergency-1' },
|
|
25
46
|
{ key: CommunicationRequestClaim.Requester, meaning: 'Requesting organization or service.', example: 'Organization/blood-bank-1' },
|
|
47
|
+
{ key: CommunicationRequestClaim.Recipient, meaning: 'Exact intended recipient references.', example: 'Patient/patient-1,RelatedPerson/family-1' },
|
|
48
|
+
{ key: CommunicationRequestClaim.InformationProvider, meaning: 'Actors expected to provide or review message information.', example: 'PractitionerRole/doctor-1' },
|
|
26
49
|
{ key: CommunicationRequestClaim.AuthoredOn, meaning: 'Request authoring time.', example: '2026-09-26T11:00:00Z' },
|
|
50
|
+
{ key: CommunicationRequestClaim.Occurrence, meaning: 'Requested delivery time.', example: '2026-09-26T11:30:00Z' },
|
|
51
|
+
{ key: CommunicationRequestClaim.ReasonCode, meaning: 'Coded reasons for the request.', example: 'http://snomed.info/sct|246205007' },
|
|
52
|
+
{ key: CommunicationRequestClaim.ReasonReference, meaning: 'Resource references supporting the request reason.', example: 'Condition/condition-1' },
|
|
53
|
+
{ key: CommunicationRequestClaim.PayloadContent, meaning: 'R4 string payload compatibility value.', example: 'Family update ready for review.' },
|
|
54
|
+
{ key: CommunicationRequestClaim.PayloadReference, meaning: 'Referenced message content.', example: 'DocumentReference/update-1' },
|
|
55
|
+
{ key: CommunicationRequestClaim.PayloadAttachmentContentType, meaning: 'Attachment media type.', example: 'application/pdf' },
|
|
56
|
+
{ key: CommunicationRequestClaim.PayloadAttachmentData, meaning: 'Base64-encoded attachment data.', example: 'JVBERi0xLjQ=' },
|
|
57
|
+
{ key: CommunicationRequestClaim.PayloadAttachmentTitle, meaning: 'Human-readable attachment title.', example: 'Clinical update' },
|
|
58
|
+
{ key: CommunicationRequestClaim.Note, meaning: 'Request note.', example: 'Call before sending.' },
|
|
27
59
|
]);
|
|
@@ -2,6 +2,12 @@ import { type FhirIpsClinicalArtifactSchema, type FhirIpsClinicalArtifactType }
|
|
|
2
2
|
export type ClinicalArtifactFhirR4Resource = Readonly<Record<string, unknown> & {
|
|
3
3
|
resourceType: FhirIpsClinicalArtifactType;
|
|
4
4
|
}>;
|
|
5
|
+
/**
|
|
6
|
+
* Converts a native FHIR relative subject reference into the canonical actor
|
|
7
|
+
* reference accepted by claims-first persistence. Existing governed URNs and
|
|
8
|
+
* did:web identifiers pass through unchanged.
|
|
9
|
+
*/
|
|
10
|
+
export declare function canonicalClinicalSubjectReference(subjectReference: string): string;
|
|
5
11
|
/** Host-owned subject claims added only at the trusted materialization boundary. */
|
|
6
12
|
export declare function clinicalArtifactSubjectClaims(resourceType: FhirIpsClinicalArtifactType, subjectReference: string): Readonly<Record<string, string>>;
|
|
7
13
|
/**
|
|
@@ -7,6 +7,20 @@ import { ImmunizationClaim } from './claims/immunization-claims.js';
|
|
|
7
7
|
import { MedicationStatementClaim } from './claims/medication-statement-claims.js';
|
|
8
8
|
import { ProcedureClaim } from './claims/procedure-claims.js';
|
|
9
9
|
import { ObservationClaim } from './observation-claims.js';
|
|
10
|
+
/**
|
|
11
|
+
* Converts a native FHIR relative subject reference into the canonical actor
|
|
12
|
+
* reference accepted by claims-first persistence. Existing governed URNs and
|
|
13
|
+
* did:web identifiers pass through unchanged.
|
|
14
|
+
*/
|
|
15
|
+
export function canonicalClinicalSubjectReference(subjectReference) {
|
|
16
|
+
const normalized = subjectReference.trim();
|
|
17
|
+
if (/^(?:urn:[^\s]+|did:web:[^\s]+)$/.test(normalized))
|
|
18
|
+
return normalized;
|
|
19
|
+
const relativeReference = /^[A-Z][A-Za-z]+\/([^/\s]+)$/.exec(normalized);
|
|
20
|
+
if (!relativeReference)
|
|
21
|
+
throw new TypeError('clinical_artifact_subject_reference_invalid');
|
|
22
|
+
return `urn:uuid:${relativeReference[1]}`;
|
|
23
|
+
}
|
|
10
24
|
/** Host-owned subject claims added only at the trusted materialization boundary. */
|
|
11
25
|
export function clinicalArtifactSubjectClaims(resourceType, subjectReference) {
|
|
12
26
|
const claim = {
|
|
@@ -17,7 +31,7 @@ export function clinicalArtifactSubjectClaims(resourceType, subjectReference) {
|
|
|
17
31
|
[FhirIpsClinicalArtifactTypes.Procedure]: ProcedureClaim.Subject,
|
|
18
32
|
[FhirIpsClinicalArtifactTypes.Observation]: ObservationClaim.Subject,
|
|
19
33
|
}[resourceType];
|
|
20
|
-
return Object.freeze({ [claim]: subjectReference });
|
|
34
|
+
return Object.freeze({ [claim]: canonicalClinicalSubjectReference(subjectReference) });
|
|
21
35
|
}
|
|
22
36
|
/**
|
|
23
37
|
* Hydrates one schema-driven editor from a native FHIR R4 resource.
|
|
@@ -3,3 +3,7 @@ import type { FhirResource, FlatClaims } from './convert-shared.js';
|
|
|
3
3
|
export declare function communicationRequestFlatToFhirR4(claims: FlatClaims): FhirResource;
|
|
4
4
|
/** Reads a FHIR R4 CommunicationRequest into canonical flat claims. */
|
|
5
5
|
export declare function communicationRequestFhirR4ToFlat(resource: FhirResource): FlatClaims;
|
|
6
|
+
/** Projects canonical claims to the published FHIR R5 shape. */
|
|
7
|
+
export declare function communicationRequestFlatToFhirR5(claims: FlatClaims): FhirResource;
|
|
8
|
+
/** Reads a published FHIR R5 CommunicationRequest into canonical flat claims. */
|
|
9
|
+
export declare function communicationRequestFhirR5ToFlat(resource: FhirResource): FlatClaims;
|
|
@@ -4,37 +4,174 @@ import { codingFromValue, codingListFromCsv, codingListToCsv, codingToValue, ref
|
|
|
4
4
|
export function communicationRequestFlatToFhirR4(claims) {
|
|
5
5
|
return {
|
|
6
6
|
resourceType: 'CommunicationRequest', identifier: claims[CommunicationRequestClaim.Identifier] ? [{ value: claims[CommunicationRequestClaim.Identifier] }] : undefined,
|
|
7
|
-
basedOn: referenceCsv(claims[CommunicationRequestClaim.BasedOn]),
|
|
7
|
+
basedOn: referenceCsv(claims[CommunicationRequestClaim.BasedOn]),
|
|
8
|
+
replaces: referenceCsv(claims[CommunicationRequestClaim.Replaces]),
|
|
9
|
+
groupIdentifier: claims[CommunicationRequestClaim.GroupIdentifier] ? { value: claims[CommunicationRequestClaim.GroupIdentifier] } : undefined,
|
|
10
|
+
status: claims[CommunicationRequestClaim.Status],
|
|
11
|
+
statusReason: codeableConcept(claims[CommunicationRequestClaim.StatusReason]),
|
|
12
|
+
priority: claims[CommunicationRequestClaim.Priority],
|
|
8
13
|
category: claims[CommunicationRequestClaim.Category] ? [{ coding: codingFromValue(claims[CommunicationRequestClaim.Category]) }] : undefined,
|
|
14
|
+
doNotPerform: optionalBoolean(claims[CommunicationRequestClaim.DoNotPerform]),
|
|
15
|
+
medium: claims[CommunicationRequestClaim.Medium] ? [{ coding: codingFromValue(claims[CommunicationRequestClaim.Medium]) }] : undefined,
|
|
9
16
|
subject: claims[CommunicationRequestClaim.Subject] ? { reference: claims[CommunicationRequestClaim.Subject] } : undefined,
|
|
10
17
|
about: referenceCsv(claims[CommunicationRequestClaim.About]), encounter: claims[CommunicationRequestClaim.Encounter] ? { reference: claims[CommunicationRequestClaim.Encounter] } : undefined,
|
|
11
18
|
requester: claims[CommunicationRequestClaim.Requester] ? { reference: claims[CommunicationRequestClaim.Requester] } : undefined,
|
|
19
|
+
sender: firstReference(claims[CommunicationRequestClaim.InformationProvider]),
|
|
12
20
|
recipient: referenceCsv(claims[CommunicationRequestClaim.Recipient]), authoredOn: claims[CommunicationRequestClaim.AuthoredOn],
|
|
13
21
|
occurrenceDateTime: claims[CommunicationRequestClaim.Occurrence],
|
|
14
22
|
reasonCode: claims[CommunicationRequestClaim.ReasonCode] ? [{ coding: codingListFromCsv(claims[CommunicationRequestClaim.ReasonCode]) }] : undefined,
|
|
15
23
|
reasonReference: referenceCsv(claims[CommunicationRequestClaim.ReasonReference]),
|
|
16
|
-
payload: claims
|
|
24
|
+
payload: payloadR4(claims),
|
|
25
|
+
note: annotation(claims[CommunicationRequestClaim.Note]),
|
|
17
26
|
};
|
|
18
27
|
}
|
|
19
28
|
/** Reads a FHIR R4 CommunicationRequest into canonical flat claims. */
|
|
20
29
|
export function communicationRequestFhirR4ToFlat(resource) {
|
|
21
|
-
return {
|
|
30
|
+
return compact({
|
|
22
31
|
[CommunicationRequestClaim.Identifier]: resource.identifier?.[0]?.value,
|
|
23
32
|
[CommunicationRequestClaim.BasedOn]: referenceListToCsv(resource.basedOn),
|
|
24
|
-
[CommunicationRequestClaim.
|
|
33
|
+
[CommunicationRequestClaim.Replaces]: referenceListToCsv(resource.replaces),
|
|
34
|
+
[CommunicationRequestClaim.GroupIdentifier]: resource.groupIdentifier?.value,
|
|
35
|
+
[CommunicationRequestClaim.Status]: resource.status,
|
|
36
|
+
[CommunicationRequestClaim.StatusReason]: codeableConceptToValue(resource.statusReason),
|
|
37
|
+
[CommunicationRequestClaim.Priority]: resource.priority,
|
|
25
38
|
[CommunicationRequestClaim.Category]: codingToValue(resource.category?.[0]?.coding?.[0]),
|
|
39
|
+
[CommunicationRequestClaim.DoNotPerform]: typeof resource.doNotPerform === 'boolean' ? String(resource.doNotPerform) : undefined,
|
|
40
|
+
[CommunicationRequestClaim.Medium]: codingToValue(resource.medium?.[0]?.coding?.[0]),
|
|
26
41
|
[CommunicationRequestClaim.Subject]: referenceToValue(resource.subject),
|
|
27
42
|
[CommunicationRequestClaim.About]: referenceListToCsv(resource.about),
|
|
28
43
|
[CommunicationRequestClaim.Encounter]: referenceToValue(resource.encounter),
|
|
29
44
|
[CommunicationRequestClaim.Requester]: referenceToValue(resource.requester),
|
|
45
|
+
[CommunicationRequestClaim.InformationProvider]: referenceToValue(resource.sender),
|
|
30
46
|
[CommunicationRequestClaim.Recipient]: referenceListToCsv(resource.recipient),
|
|
31
47
|
[CommunicationRequestClaim.AuthoredOn]: resource.authoredOn, [CommunicationRequestClaim.Occurrence]: resource.occurrenceDateTime,
|
|
32
48
|
[CommunicationRequestClaim.ReasonCode]: codingListToCsv(resource.reasonCode?.flatMap(value => value.coding ?? [])),
|
|
33
49
|
[CommunicationRequestClaim.ReasonReference]: referenceListToCsv(resource.reasonReference),
|
|
34
|
-
|
|
50
|
+
...payloadToFlat(resource),
|
|
51
|
+
[CommunicationRequestClaim.Note]: annotationText(resource.note),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** Projects canonical claims to the published FHIR R5 shape. */
|
|
55
|
+
export function communicationRequestFlatToFhirR5(claims) {
|
|
56
|
+
return communicationRequestFlatToFhirR5Resource(claims);
|
|
57
|
+
}
|
|
58
|
+
/** Reads a published FHIR R5 CommunicationRequest into canonical flat claims. */
|
|
59
|
+
export function communicationRequestFhirR5ToFlat(resource) {
|
|
60
|
+
return communicationRequestFhirR5ResourceToFlat(resource);
|
|
61
|
+
}
|
|
62
|
+
function communicationRequestFlatToFhirR5Resource(claims) {
|
|
63
|
+
const intent = claims[CommunicationRequestClaim.Intent];
|
|
64
|
+
if (!intent)
|
|
65
|
+
throw new TypeError('communication_request_intent_required');
|
|
66
|
+
return {
|
|
67
|
+
resourceType: 'CommunicationRequest',
|
|
68
|
+
identifier: claims[CommunicationRequestClaim.Identifier] ? [{ value: claims[CommunicationRequestClaim.Identifier] }] : undefined,
|
|
69
|
+
basedOn: referenceCsv(claims[CommunicationRequestClaim.BasedOn]),
|
|
70
|
+
replaces: referenceCsv(claims[CommunicationRequestClaim.Replaces]),
|
|
71
|
+
groupIdentifier: claims[CommunicationRequestClaim.GroupIdentifier] ? { value: claims[CommunicationRequestClaim.GroupIdentifier] } : undefined,
|
|
72
|
+
status: claims[CommunicationRequestClaim.Status],
|
|
73
|
+
statusReason: codeableConcept(claims[CommunicationRequestClaim.StatusReason]),
|
|
74
|
+
intent,
|
|
75
|
+
priority: claims[CommunicationRequestClaim.Priority],
|
|
76
|
+
category: claims[CommunicationRequestClaim.Category] ? [{ coding: codingFromValue(claims[CommunicationRequestClaim.Category]) }] : undefined,
|
|
77
|
+
doNotPerform: optionalBoolean(claims[CommunicationRequestClaim.DoNotPerform]),
|
|
78
|
+
medium: claims[CommunicationRequestClaim.Medium] ? [{ coding: codingFromValue(claims[CommunicationRequestClaim.Medium]) }] : undefined,
|
|
79
|
+
subject: claims[CommunicationRequestClaim.Subject] ? { reference: claims[CommunicationRequestClaim.Subject] } : undefined,
|
|
80
|
+
about: referenceCsv(claims[CommunicationRequestClaim.About]),
|
|
81
|
+
encounter: claims[CommunicationRequestClaim.Encounter] ? { reference: claims[CommunicationRequestClaim.Encounter] } : undefined,
|
|
82
|
+
requester: claims[CommunicationRequestClaim.Requester] ? { reference: claims[CommunicationRequestClaim.Requester] } : undefined,
|
|
83
|
+
recipient: referenceCsv(claims[CommunicationRequestClaim.Recipient]),
|
|
84
|
+
informationProvider: referenceCsv(claims[CommunicationRequestClaim.InformationProvider]),
|
|
85
|
+
authoredOn: claims[CommunicationRequestClaim.AuthoredOn], occurrenceDateTime: claims[CommunicationRequestClaim.Occurrence],
|
|
86
|
+
reason: reasonsR5(claims), payload: payloadR5(claims), note: annotation(claims[CommunicationRequestClaim.Note]),
|
|
35
87
|
};
|
|
36
88
|
}
|
|
89
|
+
function communicationRequestFhirR5ResourceToFlat(resource) {
|
|
90
|
+
const reasons = resource.reason;
|
|
91
|
+
return compact({
|
|
92
|
+
[CommunicationRequestClaim.Identifier]: resource.identifier?.[0]?.value,
|
|
93
|
+
[CommunicationRequestClaim.BasedOn]: referenceListToCsv(resource.basedOn),
|
|
94
|
+
[CommunicationRequestClaim.Replaces]: referenceListToCsv(resource.replaces),
|
|
95
|
+
[CommunicationRequestClaim.GroupIdentifier]: resource.groupIdentifier?.value,
|
|
96
|
+
[CommunicationRequestClaim.Status]: resource.status,
|
|
97
|
+
[CommunicationRequestClaim.StatusReason]: codeableConceptToValue(resource.statusReason),
|
|
98
|
+
[CommunicationRequestClaim.Intent]: resource.intent,
|
|
99
|
+
[CommunicationRequestClaim.Priority]: resource.priority,
|
|
100
|
+
[CommunicationRequestClaim.Category]: codingToValue(resource.category?.[0]?.coding?.[0]),
|
|
101
|
+
[CommunicationRequestClaim.DoNotPerform]: typeof resource.doNotPerform === 'boolean' ? String(resource.doNotPerform) : undefined,
|
|
102
|
+
[CommunicationRequestClaim.Medium]: codingToValue(resource.medium?.[0]?.coding?.[0]),
|
|
103
|
+
[CommunicationRequestClaim.Subject]: referenceToValue(resource.subject),
|
|
104
|
+
[CommunicationRequestClaim.About]: referenceListToCsv(resource.about),
|
|
105
|
+
[CommunicationRequestClaim.Encounter]: referenceToValue(resource.encounter),
|
|
106
|
+
[CommunicationRequestClaim.Requester]: referenceToValue(resource.requester),
|
|
107
|
+
[CommunicationRequestClaim.Recipient]: referenceListToCsv(resource.recipient),
|
|
108
|
+
[CommunicationRequestClaim.InformationProvider]: referenceListToCsv(resource.informationProvider),
|
|
109
|
+
[CommunicationRequestClaim.AuthoredOn]: resource.authoredOn,
|
|
110
|
+
[CommunicationRequestClaim.Occurrence]: resource.occurrenceDateTime,
|
|
111
|
+
[CommunicationRequestClaim.ReasonCode]: codingListToCsv(reasons?.flatMap(value => value.concept?.coding ?? [])),
|
|
112
|
+
[CommunicationRequestClaim.ReasonReference]: reasons?.map(value => value.reference?.reference).filter((value) => Boolean(value)).join(',') || undefined,
|
|
113
|
+
...payloadToFlat(resource), [CommunicationRequestClaim.Note]: annotationText(resource.note),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
37
116
|
function referenceCsv(value) {
|
|
38
117
|
const references = value?.split(',').map(reference => reference.trim()).filter(Boolean) ?? [];
|
|
39
118
|
return references.length ? references.map(reference => ({ reference })) : undefined;
|
|
40
119
|
}
|
|
120
|
+
function firstReference(value) { return referenceCsv(value)?.[0]; }
|
|
121
|
+
function codeableConcept(value) {
|
|
122
|
+
const coding = codingFromValue(value);
|
|
123
|
+
return coding ? { coding } : undefined;
|
|
124
|
+
}
|
|
125
|
+
function codeableConceptToValue(value) {
|
|
126
|
+
return codingToValue(value?.coding?.[0]);
|
|
127
|
+
}
|
|
128
|
+
function optionalBoolean(value) {
|
|
129
|
+
if (value === undefined)
|
|
130
|
+
return undefined;
|
|
131
|
+
if (value !== 'true' && value !== 'false')
|
|
132
|
+
throw new TypeError('communication_request_boolean_invalid');
|
|
133
|
+
return value === 'true';
|
|
134
|
+
}
|
|
135
|
+
function annotation(value) { return value ? [{ text: value }] : undefined; }
|
|
136
|
+
function annotationText(value) { return value?.[0]?.text; }
|
|
137
|
+
function payloadR4(claims) {
|
|
138
|
+
if (claims[CommunicationRequestClaim.PayloadReference])
|
|
139
|
+
return [{ contentReference: { reference: claims[CommunicationRequestClaim.PayloadReference] } }];
|
|
140
|
+
if (claims[CommunicationRequestClaim.PayloadAttachmentData])
|
|
141
|
+
return [{ contentAttachment: attachment(claims) }];
|
|
142
|
+
return claims[CommunicationRequestClaim.PayloadContent] ? [{ contentString: claims[CommunicationRequestClaim.PayloadContent] }] : undefined;
|
|
143
|
+
}
|
|
144
|
+
function payloadR5(claims) {
|
|
145
|
+
if (claims[CommunicationRequestClaim.PayloadReference])
|
|
146
|
+
return [{ contentReference: { reference: claims[CommunicationRequestClaim.PayloadReference] } }];
|
|
147
|
+
if (claims[CommunicationRequestClaim.PayloadAttachmentData])
|
|
148
|
+
return [{ contentAttachment: attachment(claims) }];
|
|
149
|
+
if (claims[CommunicationRequestClaim.PayloadContent])
|
|
150
|
+
throw new TypeError('communication_request_string_payload_not_supported_in_r5');
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
function attachment(claims) {
|
|
154
|
+
const contentType = claims[CommunicationRequestClaim.PayloadAttachmentContentType];
|
|
155
|
+
if (!contentType)
|
|
156
|
+
throw new TypeError('communication_request_attachment_content_type_required');
|
|
157
|
+
return { contentType, data: claims[CommunicationRequestClaim.PayloadAttachmentData], title: claims[CommunicationRequestClaim.PayloadAttachmentTitle] };
|
|
158
|
+
}
|
|
159
|
+
function payloadToFlat(resource) {
|
|
160
|
+
const payload = resource.payload?.[0];
|
|
161
|
+
return compact({
|
|
162
|
+
[CommunicationRequestClaim.PayloadContent]: payload?.contentString,
|
|
163
|
+
[CommunicationRequestClaim.PayloadReference]: payload?.contentReference?.reference,
|
|
164
|
+
[CommunicationRequestClaim.PayloadAttachmentContentType]: payload?.contentAttachment?.contentType,
|
|
165
|
+
[CommunicationRequestClaim.PayloadAttachmentData]: payload?.contentAttachment?.data,
|
|
166
|
+
[CommunicationRequestClaim.PayloadAttachmentTitle]: payload?.contentAttachment?.title,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function reasonsR5(claims) {
|
|
170
|
+
const result = [];
|
|
171
|
+
for (const coding of codingListFromCsv(claims[CommunicationRequestClaim.ReasonCode]) ?? [])
|
|
172
|
+
result.push({ concept: { coding: [coding] } });
|
|
173
|
+
for (const item of referenceCsv(claims[CommunicationRequestClaim.ReasonReference]) ?? [])
|
|
174
|
+
result.push({ reference: item });
|
|
175
|
+
return result.length ? result : undefined;
|
|
176
|
+
}
|
|
177
|
+
function compact(value) { return Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined)); }
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { FlatClaims } from '../converters/convert-shared.js';
|
|
2
|
+
export declare const CommunicationRequestStatuses: readonly ["draft", "active", "on-hold", "revoked", "completed", "entered-in-error", "unknown"];
|
|
3
|
+
export declare const CommunicationRequestIntents: readonly ["proposal", "plan", "directive", "order", "original-order", "reflex-order", "filler-order", "instance-order", "option"];
|
|
4
|
+
export declare const CommunicationRequestPriorities: readonly ["routine", "urgent", "asap", "stat"];
|
|
5
|
+
export type CommunicationRequestFormData = Readonly<{
|
|
6
|
+
identifier?: string;
|
|
7
|
+
status: typeof CommunicationRequestStatuses[number];
|
|
8
|
+
intent: typeof CommunicationRequestIntents[number];
|
|
9
|
+
priority?: typeof CommunicationRequestPriorities[number];
|
|
10
|
+
subject: string;
|
|
11
|
+
encounter?: string;
|
|
12
|
+
requester: string;
|
|
13
|
+
recipients: readonly string[];
|
|
14
|
+
informationProviders?: readonly string[];
|
|
15
|
+
authoredOn?: string;
|
|
16
|
+
occurrence?: string;
|
|
17
|
+
payloadReference?: string;
|
|
18
|
+
payloadAttachmentContentType?: string;
|
|
19
|
+
payloadAttachmentData?: string;
|
|
20
|
+
payloadAttachmentTitle?: string;
|
|
21
|
+
note?: string;
|
|
22
|
+
}>;
|
|
23
|
+
/** Data-only JSON Schema. Portals own localized labels, widgets and authorization. */
|
|
24
|
+
export declare const FHIR_COMMUNICATION_REQUEST_FORM_SCHEMA: Readonly<{
|
|
25
|
+
$schema: "https://json-schema.org/draft/2020-12/schema";
|
|
26
|
+
$id: "https://globaldatacare.com/schemas/fhir/communication-request-form.json";
|
|
27
|
+
title: "CommunicationRequest";
|
|
28
|
+
type: "object";
|
|
29
|
+
additionalProperties: false;
|
|
30
|
+
required: readonly string[];
|
|
31
|
+
properties: Readonly<{
|
|
32
|
+
identifier: Readonly<{
|
|
33
|
+
type: "string";
|
|
34
|
+
minLength: 1;
|
|
35
|
+
}>;
|
|
36
|
+
status: Readonly<{
|
|
37
|
+
type: "string";
|
|
38
|
+
enum: readonly ["draft", "active", "on-hold", "revoked", "completed", "entered-in-error", "unknown"];
|
|
39
|
+
}>;
|
|
40
|
+
intent: Readonly<{
|
|
41
|
+
type: "string";
|
|
42
|
+
enum: readonly ["proposal", "plan", "directive", "order", "original-order", "reflex-order", "filler-order", "instance-order", "option"];
|
|
43
|
+
}>;
|
|
44
|
+
priority: Readonly<{
|
|
45
|
+
type: "string";
|
|
46
|
+
enum: readonly ["routine", "urgent", "asap", "stat"];
|
|
47
|
+
}>;
|
|
48
|
+
subject: Readonly<{
|
|
49
|
+
type: "string";
|
|
50
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
51
|
+
}>;
|
|
52
|
+
encounter: Readonly<{
|
|
53
|
+
type: "string";
|
|
54
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
55
|
+
}>;
|
|
56
|
+
requester: Readonly<{
|
|
57
|
+
type: "string";
|
|
58
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
59
|
+
}>;
|
|
60
|
+
recipients: Readonly<{
|
|
61
|
+
type: "array";
|
|
62
|
+
minItems: 1;
|
|
63
|
+
uniqueItems: true;
|
|
64
|
+
items: Readonly<{
|
|
65
|
+
type: "string";
|
|
66
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
67
|
+
}>;
|
|
68
|
+
}>;
|
|
69
|
+
informationProviders: Readonly<{
|
|
70
|
+
type: "array";
|
|
71
|
+
uniqueItems: true;
|
|
72
|
+
items: Readonly<{
|
|
73
|
+
type: "string";
|
|
74
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
75
|
+
}>;
|
|
76
|
+
}>;
|
|
77
|
+
authoredOn: Readonly<{
|
|
78
|
+
type: "string";
|
|
79
|
+
format: "date-time";
|
|
80
|
+
}>;
|
|
81
|
+
occurrence: Readonly<{
|
|
82
|
+
type: "string";
|
|
83
|
+
format: "date-time";
|
|
84
|
+
}>;
|
|
85
|
+
payloadReference: Readonly<{
|
|
86
|
+
type: "string";
|
|
87
|
+
pattern: "^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$";
|
|
88
|
+
}>;
|
|
89
|
+
payloadAttachmentContentType: Readonly<{
|
|
90
|
+
type: "string";
|
|
91
|
+
minLength: 1;
|
|
92
|
+
}>;
|
|
93
|
+
payloadAttachmentData: Readonly<{
|
|
94
|
+
type: "string";
|
|
95
|
+
minLength: 1;
|
|
96
|
+
contentEncoding: "base64";
|
|
97
|
+
}>;
|
|
98
|
+
payloadAttachmentTitle: Readonly<{
|
|
99
|
+
type: "string";
|
|
100
|
+
minLength: 1;
|
|
101
|
+
}>;
|
|
102
|
+
note: Readonly<{
|
|
103
|
+
type: "string";
|
|
104
|
+
}>;
|
|
105
|
+
}>;
|
|
106
|
+
}>;
|
|
107
|
+
export declare function communicationRequestFormDataToFlatClaims(input: CommunicationRequestFormData): FlatClaims;
|
|
108
|
+
export declare function communicationRequestFlatClaimsToFormData(claims: FlatClaims): CommunicationRequestFormData;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright 2026 Connecting Solution & Applications Ltd under the Apache License, Version 2.0.
|
|
2
|
+
import { CommunicationRequestClaim } from '../claims/communication-request-claims.js';
|
|
3
|
+
export const CommunicationRequestStatuses = Object.freeze([
|
|
4
|
+
'draft', 'active', 'on-hold', 'revoked', 'completed', 'entered-in-error', 'unknown',
|
|
5
|
+
]);
|
|
6
|
+
export const CommunicationRequestIntents = Object.freeze([
|
|
7
|
+
'proposal', 'plan', 'directive', 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order', 'option',
|
|
8
|
+
]);
|
|
9
|
+
export const CommunicationRequestPriorities = Object.freeze(['routine', 'urgent', 'asap', 'stat']);
|
|
10
|
+
/** Data-only JSON Schema. Portals own localized labels, widgets and authorization. */
|
|
11
|
+
export const FHIR_COMMUNICATION_REQUEST_FORM_SCHEMA = Object.freeze({
|
|
12
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
13
|
+
$id: 'https://globaldatacare.com/schemas/fhir/communication-request-form.json',
|
|
14
|
+
title: 'CommunicationRequest',
|
|
15
|
+
type: 'object',
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
required: Object.freeze(['status', 'intent', 'subject', 'requester', 'recipients']),
|
|
18
|
+
properties: Object.freeze({
|
|
19
|
+
identifier: Object.freeze({ type: 'string', minLength: 1 }),
|
|
20
|
+
status: Object.freeze({ type: 'string', enum: CommunicationRequestStatuses }),
|
|
21
|
+
intent: Object.freeze({ type: 'string', enum: CommunicationRequestIntents }),
|
|
22
|
+
priority: Object.freeze({ type: 'string', enum: CommunicationRequestPriorities }),
|
|
23
|
+
subject: referenceSchema(), encounter: referenceSchema(), requester: referenceSchema(),
|
|
24
|
+
recipients: Object.freeze({ type: 'array', minItems: 1, uniqueItems: true, items: referenceSchema() }),
|
|
25
|
+
informationProviders: Object.freeze({ type: 'array', uniqueItems: true, items: referenceSchema() }),
|
|
26
|
+
authoredOn: dateTimeSchema(), occurrence: dateTimeSchema(), payloadReference: referenceSchema(),
|
|
27
|
+
payloadAttachmentContentType: Object.freeze({ type: 'string', minLength: 1 }),
|
|
28
|
+
payloadAttachmentData: Object.freeze({ type: 'string', minLength: 1, contentEncoding: 'base64' }),
|
|
29
|
+
payloadAttachmentTitle: Object.freeze({ type: 'string', minLength: 1 }),
|
|
30
|
+
note: Object.freeze({ type: 'string' }),
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
export function communicationRequestFormDataToFlatClaims(input) {
|
|
34
|
+
requiredEnum(input.status, CommunicationRequestStatuses, 'communication_request_status_invalid');
|
|
35
|
+
requiredEnum(input.intent, CommunicationRequestIntents, 'communication_request_intent_invalid');
|
|
36
|
+
if (input.priority)
|
|
37
|
+
requiredEnum(input.priority, CommunicationRequestPriorities, 'communication_request_priority_invalid');
|
|
38
|
+
const recipients = references(input.recipients, 'communication_request_recipient_required');
|
|
39
|
+
const providers = input.informationProviders?.length
|
|
40
|
+
? references(input.informationProviders, 'communication_request_information_provider_invalid') : undefined;
|
|
41
|
+
if (input.payloadAttachmentData && !input.payloadAttachmentContentType) {
|
|
42
|
+
throw new TypeError('communication_request_attachment_content_type_required');
|
|
43
|
+
}
|
|
44
|
+
return compact({
|
|
45
|
+
[CommunicationRequestClaim.Identifier]: optional(input.identifier),
|
|
46
|
+
[CommunicationRequestClaim.Status]: input.status,
|
|
47
|
+
[CommunicationRequestClaim.Intent]: input.intent,
|
|
48
|
+
[CommunicationRequestClaim.Priority]: optional(input.priority),
|
|
49
|
+
[CommunicationRequestClaim.Subject]: reference(input.subject, 'communication_request_subject_invalid'),
|
|
50
|
+
[CommunicationRequestClaim.Encounter]: input.encounter ? reference(input.encounter, 'communication_request_encounter_invalid') : undefined,
|
|
51
|
+
[CommunicationRequestClaim.Requester]: reference(input.requester, 'communication_request_requester_invalid'),
|
|
52
|
+
[CommunicationRequestClaim.Recipient]: recipients.join(','),
|
|
53
|
+
[CommunicationRequestClaim.InformationProvider]: providers?.join(','),
|
|
54
|
+
[CommunicationRequestClaim.AuthoredOn]: dateTime(input.authoredOn),
|
|
55
|
+
[CommunicationRequestClaim.Occurrence]: dateTime(input.occurrence),
|
|
56
|
+
[CommunicationRequestClaim.PayloadReference]: input.payloadReference ? reference(input.payloadReference, 'communication_request_payload_reference_invalid') : undefined,
|
|
57
|
+
[CommunicationRequestClaim.PayloadAttachmentContentType]: optional(input.payloadAttachmentContentType),
|
|
58
|
+
[CommunicationRequestClaim.PayloadAttachmentData]: optional(input.payloadAttachmentData),
|
|
59
|
+
[CommunicationRequestClaim.PayloadAttachmentTitle]: optional(input.payloadAttachmentTitle),
|
|
60
|
+
[CommunicationRequestClaim.Note]: optional(input.note),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export function communicationRequestFlatClaimsToFormData(claims) {
|
|
64
|
+
return compact({
|
|
65
|
+
identifier: claims[CommunicationRequestClaim.Identifier], status: claims[CommunicationRequestClaim.Status],
|
|
66
|
+
intent: claims[CommunicationRequestClaim.Intent], priority: claims[CommunicationRequestClaim.Priority],
|
|
67
|
+
subject: claims[CommunicationRequestClaim.Subject], encounter: claims[CommunicationRequestClaim.Encounter],
|
|
68
|
+
requester: claims[CommunicationRequestClaim.Requester], recipients: split(claims[CommunicationRequestClaim.Recipient]),
|
|
69
|
+
informationProviders: splitOptional(claims[CommunicationRequestClaim.InformationProvider]),
|
|
70
|
+
authoredOn: claims[CommunicationRequestClaim.AuthoredOn], occurrence: claims[CommunicationRequestClaim.Occurrence],
|
|
71
|
+
payloadReference: claims[CommunicationRequestClaim.PayloadReference],
|
|
72
|
+
payloadAttachmentContentType: claims[CommunicationRequestClaim.PayloadAttachmentContentType],
|
|
73
|
+
payloadAttachmentData: claims[CommunicationRequestClaim.PayloadAttachmentData],
|
|
74
|
+
payloadAttachmentTitle: claims[CommunicationRequestClaim.PayloadAttachmentTitle], note: claims[CommunicationRequestClaim.Note],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function referenceSchema() { return Object.freeze({ type: 'string', pattern: '^[A-Za-z][A-Za-z0-9]+/[A-Za-z0-9.-]{1,64}$' }); }
|
|
78
|
+
function dateTimeSchema() { return Object.freeze({ type: 'string', format: 'date-time' }); }
|
|
79
|
+
function optional(value) { const text = String(value ?? '').trim(); return text || undefined; }
|
|
80
|
+
function dateTime(value) { const text = optional(value); if (text && Number.isNaN(Date.parse(text)))
|
|
81
|
+
throw new TypeError('communication_request_datetime_invalid'); return text; }
|
|
82
|
+
function reference(value, error) { const text = optional(value); if (!text || !/^[A-Za-z][A-Za-z0-9]+\/[A-Za-z0-9.-]{1,64}$/u.test(text))
|
|
83
|
+
throw new TypeError(error); return text; }
|
|
84
|
+
function references(values, error) { if (!Array.isArray(values) || !values.length)
|
|
85
|
+
throw new TypeError(error); const result = [...new Set(values.map(value => reference(value, error)))]; if (result.length !== values.length)
|
|
86
|
+
throw new TypeError(error); return result; }
|
|
87
|
+
function split(value) { return Object.freeze(String(value || '').split(',').map(item => item.trim()).filter(Boolean)); }
|
|
88
|
+
function splitOptional(value) { const values = split(value); return values.length ? values : undefined; }
|
|
89
|
+
function requiredEnum(value, allowed, error) { if (!allowed.includes(value))
|
|
90
|
+
throw new TypeError(error); }
|
|
91
|
+
function compact(value) { return Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined)); }
|
package/dist/data/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export * from './ips-all-sections.data.js';
|
|
|
5
5
|
export * from './health-credential-qr.data.js';
|
|
6
6
|
export * from './ips-clinical-artifact-schemas.data.js';
|
|
7
7
|
export * from './clinical-document-encounter-journey.data.js';
|
|
8
|
+
export * from './communication-request-form-schema.data.js';
|
package/dist/data/index.js
CHANGED
|
@@ -5,3 +5,4 @@ export * from './ips-all-sections.data.js';
|
|
|
5
5
|
export * from './health-credential-qr.data.js';
|
|
6
6
|
export * from './ips-clinical-artifact-schemas.data.js';
|
|
7
7
|
export * from './clinical-document-encounter-journey.data.js';
|
|
8
|
+
export * from './communication-request-form-schema.data.js';
|