gdc-common-utils-ts 2.9.26 → 2.9.27
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.
|
@@ -576,8 +576,19 @@ function resolveDate(resourceType, claims, resource) {
|
|
|
576
576
|
AllergyIntoleranceClaimsFhirApi.OnsetDateTime,
|
|
577
577
|
]) || resolveFhirDate(resourceType, resource);
|
|
578
578
|
}
|
|
579
|
+
const resourceDate = readCanonicalClaimValue(claims, `${resourceType}.date`);
|
|
580
|
+
if (resourceDate)
|
|
581
|
+
return resourceDate;
|
|
582
|
+
if (resourceType === ResourceTypesFhirR4.Observation) {
|
|
583
|
+
const effectiveDateTime = readCanonicalClaimValue(claims, ObservationClaim.EffectiveDateTime);
|
|
584
|
+
if (effectiveDateTime)
|
|
585
|
+
return effectiveDateTime;
|
|
586
|
+
}
|
|
587
|
+
const nativeDate = resolveFhirDate(resourceType, resource);
|
|
588
|
+
if (nativeDate)
|
|
589
|
+
return nativeDate;
|
|
579
590
|
const genericDate = findBySuffix(claims, '.date');
|
|
580
|
-
return genericDate ||
|
|
591
|
+
return genericDate || undefined;
|
|
581
592
|
}
|
|
582
593
|
function resolvePeriodStart(resourceType, claims, resource) {
|
|
583
594
|
if (resourceType === ResourceTypesFhirR4.Consent) {
|