fhir-data-utils-ts 0.6.6 → 0.6.7
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
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
and Observation. Every field reuses its owning flat-claim catalog, records
|
|
9
9
|
the terminology-enabled source-text claims and remains neutral between human
|
|
10
10
|
and veterinary subjects.
|
|
11
|
+
Bind every schema to its canonical section in the shared IPS all-sections
|
|
12
|
+
document so portals can update the Composition without duplicating LOINC
|
|
13
|
+
section codes.
|
|
11
14
|
|
|
12
15
|
- Recover neutral SHC and EU DGC QR prefix classification from the later UHC
|
|
13
16
|
data-utility lineage, with exported repository-safe `*.data.ts` examples.
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
/** Repository-safe synthetic IPS document used by portal demos and visual tests. */
|
|
2
|
+
/** Primary IPS section placement for the minimum shared clinical authoring forms. */
|
|
3
|
+
export declare const FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE: Readonly<{
|
|
4
|
+
readonly Condition: "11450-4";
|
|
5
|
+
readonly AllergyIntolerance: "48765-2";
|
|
6
|
+
readonly MedicationStatement: "10160-0";
|
|
7
|
+
readonly Immunization: "11369-6";
|
|
8
|
+
readonly Procedure: "47519-4";
|
|
9
|
+
readonly Observation: "8716-3";
|
|
10
|
+
}>;
|
|
2
11
|
/**
|
|
3
12
|
* Complete synthetic IPS screen fixture.
|
|
4
13
|
*
|
|
@@ -20,6 +20,15 @@ const sectionDefinitions = Object.freeze([
|
|
|
20
20
|
['10162-6', 'Pregnancy history', 'Observation', 'Not pregnant'],
|
|
21
21
|
['18776-5', 'Plan of care', 'CarePlan', 'Emergency follow-up plan'],
|
|
22
22
|
]);
|
|
23
|
+
/** Primary IPS section placement for the minimum shared clinical authoring forms. */
|
|
24
|
+
export const FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE = Object.freeze({
|
|
25
|
+
Condition: sectionDefinitions[0][0],
|
|
26
|
+
AllergyIntolerance: sectionDefinitions[1][0],
|
|
27
|
+
MedicationStatement: sectionDefinitions[2][0],
|
|
28
|
+
Immunization: sectionDefinitions[3][0],
|
|
29
|
+
Procedure: sectionDefinitions[5][0],
|
|
30
|
+
Observation: sectionDefinitions[7][0],
|
|
31
|
+
});
|
|
23
32
|
function concept(text, code) {
|
|
24
33
|
return { text, coding: [{ system: SNOMED_SYSTEM, code, display: text }] };
|
|
25
34
|
}
|
|
@@ -9,6 +9,7 @@ export declare const FhirIpsClinicalArtifactTypes: Readonly<{
|
|
|
9
9
|
export type FhirIpsClinicalArtifactType = typeof FhirIpsClinicalArtifactTypes[keyof typeof FhirIpsClinicalArtifactTypes];
|
|
10
10
|
export type FhirIpsClinicalArtifactSchema = Readonly<{
|
|
11
11
|
resourceType: FhirIpsClinicalArtifactType;
|
|
12
|
+
sectionCode: string;
|
|
12
13
|
requiredClaims: readonly string[];
|
|
13
14
|
optionalClaims: readonly string[];
|
|
14
15
|
/** Source-text claims for which a user may explicitly confirm a terminology candidate. */
|
|
@@ -5,6 +5,7 @@ import { ImmunizationClaim } from '../claims/immunization-claims.js';
|
|
|
5
5
|
import { MedicationStatementClaim } from '../claims/medication-statement-claims.js';
|
|
6
6
|
import { ProcedureClaim } from '../claims/procedure-claims.js';
|
|
7
7
|
import { ObservationClaim } from '../observation-claims.js';
|
|
8
|
+
import { FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE } from './ips-all-sections.data.js';
|
|
8
9
|
export const FhirIpsClinicalArtifactTypes = Object.freeze({
|
|
9
10
|
AllergyIntolerance: 'AllergyIntolerance',
|
|
10
11
|
MedicationStatement: 'MedicationStatement',
|
|
@@ -24,36 +25,42 @@ export const FhirIpsClinicalArtifactTypes = Object.freeze({
|
|
|
24
25
|
export const FHIR_IPS_CLINICAL_ARTIFACT_SCHEMAS = Object.freeze({
|
|
25
26
|
[FhirIpsClinicalArtifactTypes.AllergyIntolerance]: Object.freeze({
|
|
26
27
|
resourceType: FhirIpsClinicalArtifactTypes.AllergyIntolerance,
|
|
28
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.AllergyIntolerance,
|
|
27
29
|
requiredClaims: Object.freeze([AllergyIntoleranceClaim.CodeText, AllergyIntoleranceClaim.ClinicalStatus]),
|
|
28
30
|
optionalClaims: Object.freeze([AllergyIntoleranceClaim.Code, AllergyIntoleranceClaim.CodeDisplay, AllergyIntoleranceClaim.Category, AllergyIntoleranceClaim.VerificationStatus, AllergyIntoleranceClaim.Criticality, AllergyIntoleranceClaim.OnsetDateTime, AllergyIntoleranceClaim.Recorder]),
|
|
29
31
|
terminologyTextClaims: Object.freeze([AllergyIntoleranceClaim.CodeText]),
|
|
30
32
|
}),
|
|
31
33
|
[FhirIpsClinicalArtifactTypes.MedicationStatement]: Object.freeze({
|
|
32
34
|
resourceType: FhirIpsClinicalArtifactTypes.MedicationStatement,
|
|
35
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.MedicationStatement,
|
|
33
36
|
requiredClaims: Object.freeze([MedicationStatementClaim.CodeText, MedicationStatementClaim.Status]),
|
|
34
37
|
optionalClaims: Object.freeze([MedicationStatementClaim.Code, MedicationStatementClaim.CodeDisplay, MedicationStatementClaim.Category, MedicationStatementClaim.Effective, MedicationStatementClaim.DosageInstruction, MedicationStatementClaim.DosageRoute, MedicationStatementClaim.TimingFrequency, MedicationStatementClaim.TimingPeriod, MedicationStatementClaim.TimingPeriodUnit, MedicationStatementClaim.Note]),
|
|
35
38
|
terminologyTextClaims: Object.freeze([MedicationStatementClaim.CodeText]),
|
|
36
39
|
}),
|
|
37
40
|
[FhirIpsClinicalArtifactTypes.Immunization]: Object.freeze({
|
|
38
41
|
resourceType: FhirIpsClinicalArtifactTypes.Immunization,
|
|
42
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.Immunization,
|
|
39
43
|
requiredClaims: Object.freeze([ImmunizationClaim.VaccineCodeText, ImmunizationClaim.Status]),
|
|
40
44
|
optionalClaims: Object.freeze([ImmunizationClaim.VaccineCode, ImmunizationClaim.VaccineCodeDisplay, ImmunizationClaim.Date, ImmunizationClaim.LotNumber, ImmunizationClaim.DoseSequence, ImmunizationClaim.Manufacturer, ImmunizationClaim.Performer, ImmunizationClaim.Location, ImmunizationClaim.Route, ImmunizationClaim.RouteDisplay, ImmunizationClaim.Site, ImmunizationClaim.SiteDisplay, ImmunizationClaim.Series, ImmunizationClaim.TargetDisease, ImmunizationClaim.TargetDiseaseText, ImmunizationClaim.TargetDiseaseDisplay, ImmunizationClaim.ReactionDate, ImmunizationClaim.Note]),
|
|
41
45
|
terminologyTextClaims: Object.freeze([ImmunizationClaim.VaccineCodeText, ImmunizationClaim.TargetDiseaseText]),
|
|
42
46
|
}),
|
|
43
47
|
[FhirIpsClinicalArtifactTypes.Condition]: Object.freeze({
|
|
44
48
|
resourceType: FhirIpsClinicalArtifactTypes.Condition,
|
|
49
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.Condition,
|
|
45
50
|
requiredClaims: Object.freeze([ConditionClaim.CodeText, ConditionClaim.ClinicalStatus]),
|
|
46
51
|
optionalClaims: Object.freeze([ConditionClaim.Code, ConditionClaim.CodeDisplay, ConditionClaim.Category, ConditionClaim.VerificationStatus, ConditionClaim.Severity, ConditionClaim.OnsetDateTime, ConditionClaim.RecordedDate, ConditionClaim.Asserter, ConditionClaim.Recorder]),
|
|
47
52
|
terminologyTextClaims: Object.freeze([ConditionClaim.CodeText]),
|
|
48
53
|
}),
|
|
49
54
|
[FhirIpsClinicalArtifactTypes.Procedure]: Object.freeze({
|
|
50
55
|
resourceType: FhirIpsClinicalArtifactTypes.Procedure,
|
|
56
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.Procedure,
|
|
51
57
|
requiredClaims: Object.freeze([ProcedureClaim.CodeText, ProcedureClaim.Status]),
|
|
52
58
|
optionalClaims: Object.freeze([ProcedureClaim.Code, ProcedureClaim.CodeDisplay, ProcedureClaim.Date, ProcedureClaim.Performer, ProcedureClaim.Location, ProcedureClaim.BodySite, ProcedureClaim.ReasonCode, ProcedureClaim.ReasonReference, ProcedureClaim.Note]),
|
|
53
59
|
terminologyTextClaims: Object.freeze([ProcedureClaim.CodeText]),
|
|
54
60
|
}),
|
|
55
61
|
[FhirIpsClinicalArtifactTypes.Observation]: Object.freeze({
|
|
56
62
|
resourceType: FhirIpsClinicalArtifactTypes.Observation,
|
|
63
|
+
sectionCode: FHIR_IPS_PRIMARY_AUTHORING_SECTION_CODE_BY_RESOURCE_TYPE.Observation,
|
|
57
64
|
requiredClaims: Object.freeze([ObservationClaim.Category, ObservationClaim.CodeText, ObservationClaim.Status]),
|
|
58
65
|
optionalClaims: Object.freeze([ObservationClaim.Code, ObservationClaim.CodeDisplay, ObservationClaim.Date, ObservationClaim.EffectiveDateTime, ObservationClaim.Performer, ObservationClaim.Method, ObservationClaim.Specimen, ObservationClaim.Device, ObservationClaim.ValueQuantityNumber, ObservationClaim.ValueQuantityUnit, ObservationClaim.ValueString, ObservationClaim.ValueConcept, ObservationClaim.ReferenceRangeLowNumber, ObservationClaim.ReferenceRangeHighNumber, ObservationClaim.ReferenceRangeUnit, ObservationClaim.ReferenceRangeText, ObservationClaim.Note]),
|
|
59
66
|
terminologyTextClaims: Object.freeze([ObservationClaim.CodeText]),
|