gdc-common-utils-ts 2.8.1 → 2.8.2
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.
|
@@ -2,6 +2,7 @@ import { ResourceTypesFhirR4 } from '../constants/fhir-resource-types.js';
|
|
|
2
2
|
import { Format } from '../constants/Schemas.js';
|
|
3
3
|
import { IndividualClinicalSections, IndividualLogicalSections, } from '../constants/individual-sections.js';
|
|
4
4
|
import { HealthcareDocumentTypes } from '../constants/healthcare.js';
|
|
5
|
+
import { LOINC_SYSTEM_URL } from '../models/clinical-sections.js';
|
|
5
6
|
import { ObservationCategoryCodes, VitalSignsCodes, VitalSignsUnits, } from '../constants/vital-signs.js';
|
|
6
7
|
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims.js';
|
|
7
8
|
import { CompositionClaim } from '../models/interoperable-claims/composition-claims.js';
|
|
@@ -316,10 +317,13 @@ export class IndividualBundleVault {
|
|
|
316
317
|
.find((entry) => entry?.resource?.resourceType === ResourceTypesFhirR4.Composition);
|
|
317
318
|
const sections = Array.isArray(compositionEntry?.resource?.section) ? compositionEntry.resource.section : [];
|
|
318
319
|
for (const section of sections) {
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
const sectionSystem = asTrimmedString(section?.code?.coding?.[0]?.system);
|
|
321
|
+
const sectionValue = asTrimmedString(section?.code?.coding?.[0]?.code);
|
|
322
|
+
const sectionCode = sectionSystem && sectionValue
|
|
323
|
+
? sectionSystem === LOINC_SYSTEM_URL
|
|
324
|
+
? `LOINC|${sectionValue}`
|
|
325
|
+
: `${sectionSystem}|${sectionValue}`
|
|
326
|
+
: sectionValue;
|
|
323
327
|
if (!sectionCode)
|
|
324
328
|
continue;
|
|
325
329
|
const refs = Array.isArray(section?.entry) ? section.entry : [];
|