@medplum/core
Classes
Interfaces
- MedplumClientOptions
- FetchLike
- CreatePdfFunction
- BaseLoginRequest
- EmailPasswordLoginRequest
- NewUserRequest
- NewProjectRequest
- NewPatientRequest
- GoogleCredentialResponse
- GoogleLoginRequest
- LoginAuthenticationResponse
- LoginProfileResponse
- LoginScopeResponse
- LoginState
- TokenResponse
- BotEvent
- PatchOperation
- MailAddress
- MailAttachment
- MailOptions
- AddressFormatOptions
- HumanNameFormatOptions
- SearchRequest
- Filter
- SortRule
- SearchParameterDetails
- TypedValue
- IndexedStructureDefinition
- TypeSchema
Enumerations
Variables
MEDPLUM_VERSION
• Const
MEDPLUM_VERSION: undefined
| string
= process.env.MEDPLUM_VERSION
Defined in
packages/core/src/client.ts:37
allOk
• Const
allOk: OperationOutcome
Defined in
packages/core/src/outcomes.ts:12
created
• Const
created: OperationOutcome
Defined in
packages/core/src/outcomes.ts:26
notModified
• Const
notModified: OperationOutcome
Defined in
packages/core/src/outcomes.ts:40
notFound
• Const
notFound: OperationOutcome
Defined in
packages/core/src/outcomes.ts:54
unauthorized
• Const
unauthorized: OperationOutcome
Defined in
packages/core/src/outcomes.ts:68
forbidden
• Const
forbidden: OperationOutcome
Defined in
packages/core/src/outcomes.ts:82
gone
• Const
gone: OperationOutcome
Defined in
packages/core/src/outcomes.ts:96
tooManyRequests
• Const
tooManyRequests: OperationOutcome
Defined in
packages/core/src/outcomes.ts:110
DEFAULT_SEARCH_COUNT
• Const
DEFAULT_SEARCH_COUNT: 20
Defined in
packages/core/src/search.ts:3
globalSchema
• Const
globalSchema: IndexedStructureDefinition
Global schema singleton.
Defined in
packages/core/src/types.ts:366
Functions
formatAddress
▸ formatAddress(address
, options?
): string
Formats a FHIR Address as a string.
Parameters
Name | Type | Description |
---|---|---|
address | Address | The address to format. |
options? | AddressFormatOptions | Optional address format options. |
Returns
string
The formatted address string.
Defined in
packages/core/src/format.ts:35
formatHumanName
▸ formatHumanName(name
, options?
): string
Formats a FHIR HumanName as a string.
Parameters
Name | Type | Description |
---|---|---|
name | HumanName | The name to format. |
options? | HumanNameFormatOptions | Optional name format options. |
Returns
string
The formatted name string.
Defined in
packages/core/src/format.ts:69
formatGivenName
▸ formatGivenName(name
): string
Formats the given name portion of a FHIR HumanName element.
Parameters
Name | Type | Description |
---|---|---|
name | HumanName | The name to format. |
Returns
string
The formatted given name string.
Defined in
packages/core/src/format.ts:100
formatFamilyName
▸ formatFamilyName(name
): string
Formats the family name portion of a FHIR HumanName element.
Parameters
Name | Type | Description |
---|---|---|
name | HumanName | The name to format. |
Returns
string
The formatted family name string.
Defined in
packages/core/src/format.ts:113
isValidDate
▸ isValidDate(date
): boolean
Returns true if the given date object is a valid date. Dates can be invalid if created by parsing an invalid string.
Parameters
Name | Type | Description |
---|---|---|
date | Date | A date object. |
Returns
boolean
Returns true if the date is a valid date.
Defined in
packages/core/src/format.ts:123
formatDate
▸ formatDate(date
, locales?
, options?
): string
Formats a FHIR date string as a human readable string. Handles missing values and invalid dates.
Parameters
Name | Type | Description |
---|---|---|
date | undefined | string | The date to format. |
locales? | LocalesArgument | Optional locales. |
options? | DateTimeFormatOptions | Optional date format options. |
Returns
string
The formatted date string.
Defined in
packages/core/src/format.ts:135
formatTime
▸ formatTime(time
, locales?
, options?
): string
Formats a FHIR time string as a human readable string. Handles missing values and invalid dates.
Parameters
Name | Type | Description |
---|---|---|
time | undefined | string | The date to format. |
locales? | LocalesArgument | Optional locales. |
options? | DateTimeFormatOptions | Optional time format options. |
Returns
string
The formatted time string.
Defined in
packages/core/src/format.ts:159
formatDateTime
▸ formatDateTime(dateTime
, locales?
, options?
): string
Formats a FHIR dateTime string as a human readable string. Handles missing values and invalid dates.
Parameters
Name | Type | Description |
---|---|---|
dateTime | undefined | string | The dateTime to format. |
locales? | LocalesArgument | Optional locales. |
options? | DateTimeFormatOptions | Optional dateTime format options. |
Returns
string
The formatted dateTime string.
Defined in
packages/core/src/format.ts:182
formatPeriod
▸ formatPeriod(period
, locales?
, options?
): string
Formats a FHIR Period as a human readable string.
Parameters
Name | Type | Description |
---|---|---|
period | undefined | Period | The period to format. |
locales? | LocalesArgument | Optional locales. |
options? | DateTimeFormatOptions | Optional period format options. |
Returns
string
The formatted period string.
Defined in
packages/core/src/format.ts:204
formatTiming
▸ formatTiming(timing
): string
Formats a FHIR Timing as a human readable string.
Parameters
Name | Type | Description |
---|---|---|
timing | undefined | Timing | The timing to format. |
Returns
string
The formatted timing string.
Defined in
packages/core/src/format.ts:250
formatRange
▸ formatRange(range
, precision?
, exclusive?
): string
Returns a human-readable string for a FHIR Range datatype, taking into account comparators and one-sided ranges
Parameters
Name | Type | Default value | Description |
---|---|---|---|
range | undefined | Range | undefined | A FHIR Range element |
precision? | number | undefined | - |
exclusive | boolean | false | If true, one-sided ranges will be rendered with the '>' or '<' bounds rather than '>=' or '<=' |
Returns
string
A human-readable string representation of the Range
Defined in
packages/core/src/format.ts:300
formatQuantity
▸ formatQuantity(quantity
, precision?
): string
Returns a human-readable string for a FHIR Quantity datatype, taking into account units and comparators
Parameters
Name | Type | Description |
---|---|---|
quantity | undefined | Quantity | A FHIR Quantity element |
precision? | number | - |
Returns
string
A human-readable string representation of the Quantity
Defined in
packages/core/src/format.ts:338
formatMoney
▸ formatMoney(money
): string
Parameters
Name | Type |
---|---|
money | undefined | Money |
Returns
string
Defined in
packages/core/src/format.ts:368
formatCodeableConcept
▸ formatCodeableConcept(codeableConcept
): string
Formats a CodeableConcept element as a string.
Parameters
Name | Type | Description |
---|---|---|
codeableConcept | undefined | CodeableConcept | A FHIR CodeableConcept element |
Returns
string
The codeable concept as a string.
Defined in
packages/core/src/format.ts:385
formatCoding
▸ formatCoding(coding
): string
Formats a Coding element as a string.
Parameters
Name | Type | Description |
---|---|---|
coding | undefined | Coding | A FHIR Coding element |
Returns
string
The coding as a string.
Defined in
packages/core/src/format.ts:403
formatObservationValue
▸ formatObservationValue(obs
): string
Formats a FHIR Observation resource value as a string.
Parameters
Name | Type | Description |
---|---|---|
obs | undefined | Observation | ObservationComponent | A FHIR Observation resource. |
Returns
string
A human-readable string representation of the Observation.
Defined in
packages/core/src/format.ts:412
parseJWTPayload
▸ parseJWTPayload(token
): Record
<string
, number
| string
>
Parses the JWT payload.
Parameters
Name | Type | Description |
---|---|---|
token | string | JWT token |
Returns
Record
<string
, number
| string
>
Defined in
packages/core/src/jwt.ts:31
matchesSearchRequest
▸ matchesSearchRequest(resource
, searchRequest
): boolean
Determines if the resource matches the search request.
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The resource that was created or updated. |
searchRequest | SearchRequest | The subscription criteria as a search request. |
Returns
boolean
True if the resource satisfies the search request.
Defined in
packages/core/src/match.ts:13
badRequest
▸ badRequest(details
, expression?
): OperationOutcome
Parameters
Name | Type |
---|---|
details | string |
expression? | string |
Returns
OperationOutcome
Defined in
packages/core/src/outcomes.ts:124
isOk
▸ isOk(outcome
): boolean
Parameters
Name | Type |
---|---|
outcome | OperationOutcome |
Returns
boolean
Defined in
packages/core/src/outcomes.ts:140
isNotFound
▸ isNotFound(outcome
): boolean
Parameters
Name | Type |
---|---|
outcome | OperationOutcome |
Returns
boolean
Defined in
packages/core/src/outcomes.ts:144
isGone
▸ isGone(outcome
): boolean
Parameters
Name | Type |
---|---|
outcome | OperationOutcome |
Returns
boolean
Defined in
packages/core/src/outcomes.ts:148
getStatus
▸ getStatus(outcome
): number
Parameters
Name | Type |
---|---|
outcome | OperationOutcome |
Returns
number
Defined in
packages/core/src/outcomes.ts:152
assertOk
▸ assertOk<T
>(outcome
, resource
): asserts resource is T
Asserts that the operation completed successfully and that the resource is defined.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
outcome | OperationOutcome | The operation outcome. |
resource | undefined | T | The resource that may or may not have been returned. |
Returns
asserts resource is T
Defined in
packages/core/src/outcomes.ts:179
normalizeErrorString
▸ normalizeErrorString(error
): string
Normalizes an error object into a displayable error string.
Parameters
Name | Type | Description |
---|---|---|
error | unknown | The error value which could be a string, Error, OperationOutcome, or other unknown type. |
Returns
string
A display string for the error.
Defined in
packages/core/src/outcomes.ts:199
parseSearchDefinition
▸ parseSearchDefinition(url
): SearchRequest
Parses a URL into a SearchRequest.
See the FHIR search spec: http://hl7.org/fhir/r4/search.html
Parameters
Name | Type | Description |
---|---|---|
url | string | The URL to parse. |
Returns
Parsed search definition.
Defined in
packages/core/src/search.ts:99
formatSearchQuery
▸ formatSearchQuery(definition
): string
Formats a search definition object into a query string. Note: The return value does not include the resource type.
Parameters
Name | Type | Description |
---|---|---|
definition | SearchRequest | The search definition. |
Returns
string
Formatted URL.
Defined in
packages/core/src/search.ts:205
getSearchParameterDetails
▸ getSearchParameterDetails(resourceType
, searchParam
): SearchParameterDetails
Returns the type details of a SearchParameter.
The SearchParameter resource has a "type" parameter, but that is missing some critical information.
For example: 1) The "date" type includes "date", "datetime", and "period". 2) The "token" type includes enums and booleans. 3) Arrays/multiple values are not reflected at all.
Parameters
Name | Type | Description |
---|---|---|
resourceType | string | The root resource type. |
searchParam | SearchParameter | The search parameter. |
Returns
The search parameter type details.
Defined in
packages/core/src/searchparams.ts:37
getExpressionForResourceType
▸ getExpressionForResourceType(resourceType
, expression
): string
| undefined
Parameters
Name | Type |
---|---|
resourceType | string |
expression | string |
Returns
string
| undefined
Defined in
packages/core/src/searchparams.ts:146
createSchema
▸ createSchema(): IndexedStructureDefinition
Creates a new empty IndexedStructureDefinition.
Deprecated
Use globalSchema
Returns
The empty IndexedStructureDefinition.
Defined in
packages/core/src/types.ts:138
indexStructureDefinitionBundle
▸ indexStructureDefinitionBundle(bundle
): void
Indexes a bundle of StructureDefinitions for faster lookup.
See
IndexedStructureDefinition for more details on indexed StructureDefinitions.
Parameters
Name | Type | Description |
---|---|---|
bundle | Bundle <Resource > | A FHIR bundle StructureDefinition resources. |
Returns
void
Defined in
packages/core/src/types.ts:161
indexStructureDefinition
▸ indexStructureDefinition(structureDefinition
): void
Indexes a StructureDefinition for fast lookup.
See
IndexedStructureDefinition for more details on indexed StructureDefinitions.
Parameters
Name | Type | Description |
---|---|---|
structureDefinition | StructureDefinition | The original StructureDefinition. |
Returns
void
Defined in
packages/core/src/types.ts:175
indexSearchParameterBundle
▸ indexSearchParameterBundle(bundle
): void
Indexes a bundle of SearchParameter resources for faster lookup.
See
IndexedStructureDefinition for more details on indexed StructureDefinitions.
Parameters
Name | Type | Description |
---|---|---|
bundle | Bundle <SearchParameter > | A FHIR bundle SearchParameter resources. |
Returns
void
Defined in
packages/core/src/types.ts:236
indexSearchParameter
▸ indexSearchParameter(searchParam
): void
Indexes a SearchParameter resource for fast lookup. Indexes by SearchParameter.code, which is the query string parameter name.
See
IndexedStructureDefinition for more details on indexed StructureDefinitions.
Parameters
Name | Type | Description |
---|---|---|
searchParam | SearchParameter | The SearchParameter resource. |
Returns
void
Defined in
packages/core/src/types.ts:251
getElementDefinitionTypeName
▸ getElementDefinitionTypeName(elementDefinition
): string
Returns the type name for an ElementDefinition.
Parameters
Name | Type | Description |
---|---|---|
elementDefinition | ElementDefinition | The element definition. |
Returns
string
The Medplum type name.
Defined in
packages/core/src/types.ts:294
buildTypeName
▸ buildTypeName(components
): string
Parameters
Name | Type |
---|---|
components | string [] |
Returns
string
Defined in
packages/core/src/types.ts:301
getPropertyDisplayName
▸ getPropertyDisplayName(path
): string
Parameters
Name | Type |
---|---|
path | string |
Returns
string
Defined in
packages/core/src/types.ts:308
getElementDefinition
▸ getElementDefinition(typeName
, propertyName
): ElementDefinition
| undefined
Returns an element definition by type and property name. Handles content references.
Parameters
Name | Type | Description |
---|---|---|
typeName | string | The type name. |
propertyName | string | The property name. |
Returns
ElementDefinition
| undefined
The element definition if found.
Defined in
packages/core/src/types.ts:340
createReference
▸ createReference<T
>(resource
): Reference
<T
>
Creates a reference resource.
Type parameters
Name | Type |
---|---|
T | extends Resource |
Parameters
Name | Type | Description |
---|---|---|
resource | T | The FHIR reesource. |
Returns
Reference
<T
>
A reference resource.
Defined in
packages/core/src/utils.ts:31
getReferenceString
▸ getReferenceString(resource
): string
Returns a reference string for a resource.
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The FHIR resource. |
Returns
string
A reference string of the form resourceType/id.
Defined in
packages/core/src/utils.ts:42
resolveId
▸ resolveId(reference
): string
| undefined
Returns the ID portion of a reference.
Parameters
Name | Type | Description |
---|---|---|
reference | undefined | Reference <Resource > | A FHIR reference. |
Returns
string
| undefined
The ID portion of a reference.
Defined in
packages/core/src/utils.ts:51
isProfileResource
▸ isProfileResource(resource
): resource is ProfileResource
Returns true if the resource is a "ProfileResource".
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The FHIR resource. |
Returns
resource is ProfileResource
True if the resource is a "ProfileResource".
Defined in
packages/core/src/utils.ts:60
getDisplayString
▸ getDisplayString(resource
): string
Returns a display string for the resource.
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The input resource. |
Returns
string
Human friendly display string.
Defined in
packages/core/src/utils.ts:73
getImageSrc
▸ getImageSrc(resource
): string
| undefined
Returns an image URL for the resource, if one is available.
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The input resource. |
Returns
string
| undefined
The image URL for the resource or undefined.
Defined in
packages/core/src/utils.ts:133
getDateProperty
▸ getDateProperty(date
): Date
| undefined
Returns a Date property as a Date. When working with JSON objects, Dates are often serialized as ISO-8601 strings. When that happens, we need to safely convert to a proper Date object.
Parameters
Name | Type | Description |
---|---|---|
date | undefined | string | The date property value, which could be a string or a Date object. |
Returns
Date
| undefined
A Date object.
Defined in
packages/core/src/utils.ts:171
calculateAge
▸ calculateAge(birthDateStr
, endDateStr?
): Object
Calculates the age in years from the birth date.
Parameters
Name | Type | Description |
---|---|---|
birthDateStr | string | The birth date or start date in ISO-8601 format YYYY-MM-DD. |
endDateStr? | string | Optional end date in ISO-8601 format YYYY-MM-DD. Default value is today. |
Returns
Object
The age in years, months, and days.
Name | Type |
---|---|
years | number |
months | number |
days | number |
Defined in
packages/core/src/utils.ts:181
calculateAgeString
▸ calculateAgeString(birthDateStr
, endDateStr?
): string
| undefined
Calculates the age string for display using the age appropriate units. If the age is greater than or equal to 2 years, then the age is displayed in years. If the age is greater than or equal to 1 month, then the age is displayed in months. Otherwise, the age is displayed in days.
Parameters
Name | Type | Description |
---|---|---|
birthDateStr | string | The birth date or start date in ISO-8601 format YYYY-MM-DD. |
endDateStr? | string | Optional end date in ISO-8601 format YYYY-MM-DD. Default value is today. |
Returns
string
| undefined
The age string.
Defined in
packages/core/src/utils.ts:223
getQuestionnaireAnswers
▸ getQuestionnaireAnswers(response
): Record
<string
, QuestionnaireResponseItemAnswer
>
Returns all questionnaire answers as a map by link ID.
Parameters
Name | Type | Description |
---|---|---|
response | QuestionnaireResponse | The questionnaire response resource. |
Returns
Record
<string
, QuestionnaireResponseItemAnswer
>
Questionnaire answers mapped by link ID.
Defined in
packages/core/src/utils.ts:239
getIdentifier
▸ getIdentifier(resource
, system
): string
| undefined
Returns the resource identifier for the given system.
If multiple identifiers exist with the same system, the first one is returned.
If the system is not found, then returns undefined.
Parameters
Name | Type | Description |
---|---|---|
resource | Resource | The resource to check. |
system | string | The identifier system. |
Returns
string
| undefined
The identifier value if found; otherwise undefined.
Defined in
packages/core/src/utils.ts:277
getExtensionValue
▸ getExtensionValue(resource
, ...urls
): string
| undefined
Returns an extension value by extension URLs.
Parameters
Name | Type | Description |
---|---|---|
resource | any | The base resource. |
...urls | string [] | Array of extension URLs. Each entry represents a nested extension. |
Returns
string
| undefined
The extension value if found; undefined otherwise.
Defined in
packages/core/src/utils.ts:297
getExtension
▸ getExtension(resource
, ...urls
): Extension
| undefined
Returns an extension by extension URLs.
Parameters
Name | Type | Description |
---|---|---|
resource | any | The base resource. |
...urls | string [] | Array of extension URLs. Each entry represents a nested extension. |
Returns
Extension
| undefined
The extension object if found; undefined otherwise.
Defined in
packages/core/src/utils.ts:315
stringify
▸ stringify(value
, pretty?
): string
FHIR JSON stringify. Removes properties with empty string values. Removes objects with zero properties. See: https://www.hl7.org/fhir/json.html
Parameters
Name | Type | Description |
---|---|---|
value | any | The input value. |
pretty? | boolean | Optional flag to pretty-print the JSON. |
Returns
string
The resulting JSON string.
Defined in
packages/core/src/utils.ts:336
isEmpty
▸ isEmpty(v
): boolean
Returns true if the value is empty (null, undefined, empty string, or empty object).
Parameters
Name | Type | Description |
---|---|---|
v | any | Any value. |
Returns
boolean
True if the value is an empty string or an empty object.
Defined in
packages/core/src/utils.ts:365
deepEquals
▸ deepEquals(object1
, object2
, path?
): boolean
Resource equality. Ignores meta.versionId and meta.lastUpdated.
Parameters
Name | Type | Description |
---|---|---|
object1 | unknown | The first object. |
object2 | unknown | The second object. |
path? | string | - |
Returns
boolean
True if the objects are equal.
Defined in
packages/core/src/utils.ts:380
deepClone
▸ deepClone<T
>(input
): T
Creates a deep clone of the input value.
Limitations:
- Only supports JSON primitives and arrays.
- Does not support Functions, lambdas, etc.
- Does not support circular references.
See: https://web.dev/structured-clone/ See: https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
input | T | The input to clone. |
Returns
T
A deep clone of the input.
Defined in
packages/core/src/utils.ts:454
isUUID
▸ isUUID(input
): boolean
Returns true if the input string is a UUID.
Parameters
Name | Type | Description |
---|---|---|
input | string | The input string. |
Returns
boolean
True if the input string matches the UUID format.
Defined in
packages/core/src/utils.ts:463
isObject
▸ isObject(obj
): obj is Record<string, unknown>
Returns true if the input is an object.
Parameters
Name | Type |
---|---|
obj | unknown |
Returns
obj is Record<string, unknown>
True if the input is a non-null non-undefined object.
Defined in
packages/core/src/utils.ts:472
isStringArray
▸ isStringArray(arr
): arr is string[]
Returns true if the input array is an array of strings.
Parameters
Name | Type | Description |
---|---|---|
arr | any [] | Input array. |
Returns
arr is string[]
True if the input array is an array of strings.
Defined in
packages/core/src/utils.ts:481
arrayBufferToHex
▸ arrayBufferToHex(arrayBuffer
): string
Converts an ArrayBuffer to hex string. See: https://stackoverflow.com/a/55200387
Parameters
Name | Type | Description |
---|---|---|
arrayBuffer | ArrayBuffer | The input array buffer. |
Returns
string
The resulting hex string.
Defined in
packages/core/src/utils.ts:498
arrayBufferToBase64
▸ arrayBufferToBase64(arrayBuffer
): string
Converts an ArrayBuffer to a base-64 encoded string.
Parameters
Name | Type | Description |
---|---|---|
arrayBuffer | ArrayBuffer | The input array buffer. |
Returns
string
The base-64 encoded string.
Defined in
packages/core/src/utils.ts:512
capitalize
▸ capitalize(word
): string
Parameters
Name | Type |
---|---|
word | string |
Returns
string
Defined in
packages/core/src/utils.ts:521
isLowerCase
▸ isLowerCase(c
): boolean
Parameters
Name | Type |
---|---|
c | string |
Returns
boolean
Defined in
packages/core/src/utils.ts:525
getCodeBySystem
▸ getCodeBySystem(concept
, system
): string
| undefined
Tries to find a code string for a given system within a given codeable concept.
Parameters
Name | Type | Description |
---|---|---|
concept | CodeableConcept | The codeable concept. |
system | string | The system string. |
Returns
string
| undefined
The code if found; otherwise undefined.
Defined in
packages/core/src/utils.ts:535
setCodeBySystem
▸ setCodeBySystem(concept
, system
, code
): void
Sets a code for a given system within a given codeable concept.
Parameters
Name | Type | Description |
---|---|---|
concept | CodeableConcept | The codeable concept. |
system | string | The system string. |
code | string | The code value. |
Returns
void
Defined in
packages/core/src/utils.ts:545
findObservationInterval
▸ findObservationInterval(definition
, patient
, value
, category?
): ObservationDefinitionQualifiedInterval
| undefined
Tries to find an observation interval for the given patient and value.
Parameters
Name | Type | Description |
---|---|---|
definition | ObservationDefinition | The observation definition. |
patient | Patient | The patient. |
value | number | The observation value. |
category? | "reference" | "critical" | "absolute" | - |
Returns
ObservationDefinitionQualifiedInterval
| undefined
The observation interval if found; otherwise undefined.
Defined in
packages/core/src/utils.ts:564
findObservationReferenceRange
▸ findObservationReferenceRange(definition
, patient
, names
): ObservationDefinitionQualifiedInterval
| undefined
Tries to find an observation reference range for the given patient and condition names.
Parameters
Name | Type | Description |
---|---|---|
definition | ObservationDefinition | The observation definition. |
patient | Patient | The patient. |
names | string [] | The condition names. |
Returns
ObservationDefinitionQualifiedInterval
| undefined
The observation interval if found; otherwise undefined.
Defined in
packages/core/src/utils.ts:585
matchesRange
▸ matchesRange(value
, range
, precision?
): boolean
Returns true if the value is in the range accounting for precision.
Parameters
Name | Type | Description |
---|---|---|
value | number | The numeric value. |
range | Range | The numeric range. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the value is within the range.
Defined in
packages/core/src/utils.ts:650
preciseRound
▸ preciseRound(a
, precision
): number
Returns the input number rounded to the specified number of digits.
Parameters
Name | Type | Description |
---|---|---|
a | number | The input number. |
precision | number | The precision in number of digits. |
Returns
number
The number rounded to the specified number of digits.
Defined in
packages/core/src/utils.ts:663
preciseEquals
▸ preciseEquals(a
, b
, precision?
): boolean
Returns true if the two numbers are equal to the given precision.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the two numbers are equal to the given precision.
Defined in
packages/core/src/utils.ts:674
preciseLessThan
▸ preciseLessThan(a
, b
, precision?
): boolean
Returns true if the first number is less than the second number to the given precision.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the first number is less than the second number to the given precision.
Defined in
packages/core/src/utils.ts:685
preciseGreaterThan
▸ preciseGreaterThan(a
, b
, precision?
): boolean
Returns true if the first number is greater than the second number to the given precision.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the first number is greater than the second number to the given precision.
Defined in
packages/core/src/utils.ts:696
preciseLessThanOrEquals
▸ preciseLessThanOrEquals(a
, b
, precision?
): boolean
Returns true if the first number is less than or equal to the second number to the given precision.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the first number is less than or equal to the second number to the given precision.
Defined in
packages/core/src/utils.ts:707
preciseGreaterThanOrEquals
▸ preciseGreaterThanOrEquals(a
, b
, precision?
): boolean
Returns true if the first number is greater than or equal to the second number to the given precision.
Parameters
Name | Type | Description |
---|---|---|
a | number | The first number. |
b | number | The second number. |
precision? | number | Optional precision in number of digits. |
Returns
boolean
True if the first number is greater than or equal to the second number to the given precision.
Defined in
packages/core/src/utils.ts:718
Type Aliases
ProfileResource
Ƭ ProfileResource: Patient
| Practitioner
| RelatedPerson
Defined in
packages/core/src/utils.ts:24