Function: extractAvatarGradientIndex()¶
extractAvatarGradientIndex(
fhirPatient):number|undefined
Defined in: src/lib/fhir-patient.ts:38
Extract avatar gradient index from FHIR Patient extension.
Looks for the urn:quillmedical:avatar-gradient extension with a
valueInteger field containing the gradient index (0-29).
Parameters¶
fhirPatient¶
FhirPatient
FHIR R4 Patient resource
Returns¶
number | undefined
Gradient index (0-29) if found, undefined otherwise
Example¶
const gradientIndex = extractAvatarGradientIndex(fhirPatient);
if (gradientIndex !== undefined) {
console.log(gradientIndex); // 5
}