@medplum/core 0.9.23 → 0.9.24
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/dist/cjs/index.js +12 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/esm/index.js +12 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +1 -1
- package/dist/esm/index.min.js.map +1 -1
- package/dist/types/utils.d.ts +8 -0
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -611,6 +611,17 @@ function findObservationInterval(definition, patient, value, category) {
|
|
|
611
611
|
(category === undefined || interval.category === category);
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Tries to find an observation reference range for the given patient and condition names.
|
|
616
|
+
* @param definition The observation definition.
|
|
617
|
+
* @param patient The patient.
|
|
618
|
+
* @param names The condition names.
|
|
619
|
+
* @returns The observation interval if found; otherwise undefined.
|
|
620
|
+
*/
|
|
621
|
+
function findObservationReferenceRange(definition, patient, names) {
|
|
622
|
+
var _a;
|
|
623
|
+
return (_a = definition.qualifiedInterval) === null || _a === void 0 ? void 0 : _a.find((interval) => observationIntervalMatchesPatient(interval, patient) && names.includes(interval.condition));
|
|
624
|
+
}
|
|
614
625
|
/**
|
|
615
626
|
* Returns true if the patient matches the observation interval.
|
|
616
627
|
* @param interval The observation interval.
|
|
@@ -10749,5 +10760,5 @@ function simplifyExpression(input) {
|
|
|
10749
10760
|
return result;
|
|
10750
10761
|
}
|
|
10751
10762
|
|
|
10752
|
-
export { AndAtom, ArithemticOperatorAtom, AsAtom, COMPONENT_SEPARATOR, ConcatAtom, ContainsAtom, DEFAULT_SEARCH_COUNT, DotAtom, EmptySetAtom, EqualsAtom, EquivalentAtom, FIELD_SEPARATOR, FhirPathAtom, FunctionAtom, Hl7Field, Hl7Message, Hl7Segment, InAtom, IndexerAtom, IsAtom, LRUCache, LiteralAtom, MedplumClient, NotEqualsAtom, NotEquivalentAtom, OperationOutcomeError, Operator, OrAtom, PropertyType, ReadablePromise, SEGMENT_SEPARATOR, SearchParameterType, SymbolAtom, UnaryOperatorAtom, UnionAtom, XorAtom, accessDenied, allOk, arrayBufferToBase64, arrayBufferToHex, assertOk, badRequest, booleanToTypedValue, buildTypeName, calculateAge, calculateAgeString, capitalize, createReference, createSchema, createTypeSchema, created, deepEquals$1 as deepEquals, evalFhirPath, evalFhirPathTyped, fhirPathArrayEquals, fhirPathArrayEquivalent, fhirPathEquals, fhirPathEquivalent, fhirPathIs, fhirPathNot, findObservationInterval, formatAddress, formatFamilyName, formatGivenName, formatHumanName, formatSearchQuery, getCodeBySystem, getDateProperty, getDisplayString, getExpressionForResourceType, getExtensionValue, getIdentifier, getImageSrc, getPropertyDisplayName, getQuestionnaireAnswers, getReferenceString, getSearchParameterDetails, getStatus, getTypedPropertyValue, globalSchema, gone, indexSearchParameter, indexStructureDefinition, indexStructureDefinitionBundle, isGone, isLowerCase, isNotFound, isObject$1 as isObject, isOk, isPeriod, isProfileResource, isQuantity, isQuantityEquivalent, isStringArray, isUUID, matchesRange, notFound, notModified, parseFhirPath, parseJWTPayload, parseSearchDefinition, preciseEquals, preciseGreaterThan, preciseGreaterThanOrEquals, preciseLessThan, preciseLessThanOrEquals, removeDuplicates, resolveId, setCodeBySystem, stringify, toJsBoolean, toTypedValue, tokenize };
|
|
10763
|
+
export { AndAtom, ArithemticOperatorAtom, AsAtom, COMPONENT_SEPARATOR, ConcatAtom, ContainsAtom, DEFAULT_SEARCH_COUNT, DotAtom, EmptySetAtom, EqualsAtom, EquivalentAtom, FIELD_SEPARATOR, FhirPathAtom, FunctionAtom, Hl7Field, Hl7Message, Hl7Segment, InAtom, IndexerAtom, IsAtom, LRUCache, LiteralAtom, MedplumClient, NotEqualsAtom, NotEquivalentAtom, OperationOutcomeError, Operator, OrAtom, PropertyType, ReadablePromise, SEGMENT_SEPARATOR, SearchParameterType, SymbolAtom, UnaryOperatorAtom, UnionAtom, XorAtom, accessDenied, allOk, arrayBufferToBase64, arrayBufferToHex, assertOk, badRequest, booleanToTypedValue, buildTypeName, calculateAge, calculateAgeString, capitalize, createReference, createSchema, createTypeSchema, created, deepEquals$1 as deepEquals, evalFhirPath, evalFhirPathTyped, fhirPathArrayEquals, fhirPathArrayEquivalent, fhirPathEquals, fhirPathEquivalent, fhirPathIs, fhirPathNot, findObservationInterval, findObservationReferenceRange, formatAddress, formatFamilyName, formatGivenName, formatHumanName, formatSearchQuery, getCodeBySystem, getDateProperty, getDisplayString, getExpressionForResourceType, getExtensionValue, getIdentifier, getImageSrc, getPropertyDisplayName, getQuestionnaireAnswers, getReferenceString, getSearchParameterDetails, getStatus, getTypedPropertyValue, globalSchema, gone, indexSearchParameter, indexStructureDefinition, indexStructureDefinitionBundle, isGone, isLowerCase, isNotFound, isObject$1 as isObject, isOk, isPeriod, isProfileResource, isQuantity, isQuantityEquivalent, isStringArray, isUUID, matchesRange, notFound, notModified, parseFhirPath, parseJWTPayload, parseSearchDefinition, preciseEquals, preciseGreaterThan, preciseGreaterThanOrEquals, preciseLessThan, preciseLessThanOrEquals, removeDuplicates, resolveId, setCodeBySystem, stringify, toJsBoolean, toTypedValue, tokenize };
|
|
10753
10764
|
//# sourceMappingURL=index.js.map
|