This page is part of the Using CQL with FHIR Implementation Guide (v1.0.0-ballot: STU1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. . For a full list of available versions, see the Directory of published versions
Active as of 2022-11-16 |
application/elm+xml
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:qdm43="urn:healthit-gov:qdm:v4_3" xmlns:qdm53="urn:healthit-gov:qdm:v5_3" xmlns:a="urn:hl7-org:cql-annotations:r1">
<annotation translatorVersion="2.9.0-SNAPSHOT" translatorOptions="EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion" xsi:type="a:CqlToElmInfo"/>
<annotation xsi:type="a:Annotation">
<a:s r="524">
<a:s>library FHIRCommon version '4.1.000'</a:s>
</a:s>
</annotation>
<identifier id="FHIRCommon" system="http://ecqi.healthit.gov/ecqms" version="4.1.000"/>
<schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
<usings>
<def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
<def localId="1" locator="3:1-3:26" localIdentifier="FHIR" uri="http://hl7.org/fhir" version="4.0.1">
<annotation xsi:type="a:Annotation">
<a:s r="1">
<a:s>using </a:s>
<a:s>
<a:s>FHIR</a:s>
</a:s>
<a:s> version '4.0.1'</a:s>
</a:s>
</annotation>
</def>
</usings>
<includes>
<def localId="2" locator="5:1-5:37" localIdentifier="FHIRHelpers" path="http://ecqi.healthit.gov/ecqms/FHIRHelpers" version="4.1.000">
<annotation xsi:type="a:Annotation">
<a:s r="2">
<a:s>include </a:s>
<a:s>
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s> version '4.1.000'</a:s>
</a:s>
</annotation>
</def>
</includes>
<codeSystems>
<def localId="3" locator="8:1-8:38" name="LOINC" id="http://loinc.org" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="3">
<a:s>codesystem "LOINC": 'http://loinc.org'</a:s>
</a:s>
</annotation>
</def>
<def localId="4" locator="9:1-9:47" name="SNOMEDCT" id="http://snomed.info/sct" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="4">
<a:s>codesystem "SNOMEDCT": 'http://snomed.info/sct'</a:s>
</a:s>
</annotation>
</def>
<def localId="5" locator="10:1-10:74" name="RoleCode" id="http://terminology.hl7.org/CodeSystem/v3-RoleCode" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="5">
<a:s>codesystem "RoleCode": 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'</a:s>
</a:s>
</annotation>
</def>
<def localId="6" locator="11:1-11:83" name="Diagnosis Role" id="http://terminology.hl7.org/CodeSystem/diagnosis-role" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="6">
<a:s>codesystem "Diagnosis Role": 'http://terminology.hl7.org/CodeSystem/diagnosis-role'</a:s>
</a:s>
</annotation>
</def>
<def localId="7" locator="12:1-12:82" name="RequestIntent" id="http://terminology.hl7.org/CodeSystem/request-intent" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="7">
<a:s>codesystem "RequestIntent": 'http://terminology.hl7.org/CodeSystem/request-intent'</a:s>
</a:s>
</annotation>
</def>
<def localId="8" locator="13:1-13:106" name="MedicationRequestCategory" id="http://terminology.hl7.org/CodeSystem/medicationrequest-category" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="8">
<a:s>codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'</a:s>
</a:s>
</annotation>
</def>
<def localId="9" locator="14:1-14:101" name="ConditionClinicalStatusCodes" id="http://terminology.hl7.org/CodeSystem/condition-clinical" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="9">
<a:s>codesystem "ConditionClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-clinical'</a:s>
</a:s>
</annotation>
</def>
<def localId="10" locator="15:1-15:107" name="ConditionVerificationStatusCodes" id="http://terminology.hl7.org/CodeSystem/condition-ver-status" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="10">
<a:s>codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status'</a:s>
</a:s>
</annotation>
</def>
<def localId="11" locator="16:1-16:119" name="AllergyIntoleranceClinicalStatusCodes" id="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="11">
<a:s>codesystem "AllergyIntoleranceClinicalStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical'</a:s>
</a:s>
</annotation>
</def>
<def localId="12" locator="17:1-17:127" name="AllergyIntoleranceVerificationStatusCodes" id="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="12">
<a:s>codesystem "AllergyIntoleranceVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification'</a:s>
</a:s>
</annotation>
</def>
</codeSystems>
<codes>
<def localId="14" locator="23:1-23:61" name="Birthdate" id="21112-8" display="Birth date" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="14">
<a:s>//Currently unresolveable in VSAC:
//valueset "Active Condition": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition'
//valueset "Inactive Condition": 'http://fhir.org/guides/cqf/common/ValueSet/inactive-condition'
code "Birthdate": '21112-8' from </a:s>
<a:s r="13">
<a:s>"LOINC"</a:s>
</a:s>
<a:s> display 'Birth date'</a:s>
</a:s>
</annotation>
<codeSystem localId="13" locator="23:34-23:40" name="LOINC"/>
</def>
<def localId="16" locator="24:1-24:55" name="Dead" id="419099009" display="Dead" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="16">
<a:s>code "Dead": '419099009' from </a:s>
<a:s r="15">
<a:s>"SNOMEDCT"</a:s>
</a:s>
<a:s> display 'Dead'</a:s>
</a:s>
</annotation>
<codeSystem localId="15" locator="24:31-24:40" name="SNOMEDCT"/>
</def>
<def localId="18" locator="25:1-25:56" name="ER" id="ER" display="Emergency room" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="18">
<a:s>code "ER": 'ER' from </a:s>
<a:s r="17">
<a:s>"RoleCode"</a:s>
</a:s>
<a:s> display 'Emergency room'</a:s>
</a:s>
</annotation>
<codeSystem localId="17" locator="25:22-25:31" name="RoleCode"/>
</def>
<def localId="20" locator="26:1-26:63" name="ICU" id="ICU" display="Intensive care unit" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="20">
<a:s>code "ICU": 'ICU' from </a:s>
<a:s r="19">
<a:s>"RoleCode"</a:s>
</a:s>
<a:s> display 'Intensive care unit'</a:s>
</a:s>
</annotation>
<codeSystem localId="19" locator="26:24-26:33" name="RoleCode"/>
</def>
<def localId="22" locator="27:1-27:65" name="Billing" id="billing" display="Billing" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="22">
<a:s>code "Billing": 'billing' from </a:s>
<a:s r="21">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'Billing'</a:s>
</a:s>
</annotation>
<codeSystem localId="21" locator="27:32-27:47" name="Diagnosis Role"/>
</def>
<def localId="24" locator="30:1-30:59" name="active" id="active" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="24">
<a:s>// Condition Clinical Status Codes - Consider value sets for these
code "active": 'active' from </a:s>
<a:s r="23">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="23" locator="30:30-30:59" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="26" locator="31:1-31:67" name="recurrence" id="recurrence" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="26">
<a:s>code "recurrence": 'recurrence' from </a:s>
<a:s r="25">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="25" locator="31:38-31:67" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="28" locator="32:1-32:61" name="relapse" id="relapse" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="28">
<a:s>code "relapse": 'relapse' from </a:s>
<a:s r="27">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="27" locator="32:32-32:61" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="30" locator="33:1-33:63" name="inactive" id="inactive" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="30">
<a:s>code "inactive": 'inactive' from </a:s>
<a:s r="29">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="29" locator="33:34-33:63" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="32" locator="34:1-34:65" name="remission" id="remission" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="32">
<a:s>code "remission": 'remission' from </a:s>
<a:s r="31">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="31" locator="34:36-34:65" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="34" locator="35:1-35:63" name="resolved" id="resolved" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="34">
<a:s>code "resolved": 'resolved' from </a:s>
<a:s r="33">
<a:s>"ConditionClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="33" locator="35:34-35:63" name="ConditionClinicalStatusCodes"/>
</def>
<def localId="36" locator="38:1-38:71" name="unconfirmed" id="unconfirmed" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="36">
<a:s>// Condition Verification Status Codes - Consider value sets for these
code "unconfirmed": 'unconfirmed' from </a:s>
<a:s r="35">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="35" locator="38:40-38:71" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="38" locator="39:1-39:71" name="provisional" id="provisional" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="38">
<a:s>code "provisional": 'provisional' from </a:s>
<a:s r="37">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="37" locator="39:40-39:71" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="40" locator="40:1-40:73" name="differential" id="differential" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="40">
<a:s>code "differential": 'differential' from </a:s>
<a:s r="39">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="39" locator="40:42-40:73" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="42" locator="41:1-41:67" name="confirmed" id="confirmed" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="42">
<a:s>code "confirmed": 'confirmed' from </a:s>
<a:s r="41">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="41" locator="41:36-41:67" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="44" locator="42:1-42:63" name="refuted" id="refuted" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="44">
<a:s>code "refuted": 'refuted' from </a:s>
<a:s r="43">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="43" locator="42:32-42:63" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="46" locator="43:1-43:81" name="entered-in-error" id="entered-in-error" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="46">
<a:s>code "entered-in-error": 'entered-in-error' from </a:s>
<a:s r="45">
<a:s>ConditionVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="45" locator="43:50-43:81" name="ConditionVerificationStatusCodes"/>
</def>
<def localId="48" locator="45:1-45:76" name="allergy-active" id="active" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="48">
<a:s>code "allergy-active": 'active' from </a:s>
<a:s r="47">
<a:s>"AllergyIntoleranceClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="47" locator="45:38-45:76" name="AllergyIntoleranceClinicalStatusCodes"/>
</def>
<def localId="50" locator="46:1-46:80" name="allergy-inactive" id="inactive" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="50">
<a:s>code "allergy-inactive": 'inactive' from </a:s>
<a:s r="49">
<a:s>"AllergyIntoleranceClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="49" locator="46:42-46:80" name="AllergyIntoleranceClinicalStatusCodes"/>
</def>
<def localId="52" locator="47:1-47:80" name="allergy-resolved" id="resolved" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="52">
<a:s>code "allergy-resolved": 'resolved' from </a:s>
<a:s r="51">
<a:s>"AllergyIntoleranceClinicalStatusCodes"</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="51" locator="47:42-47:80" name="AllergyIntoleranceClinicalStatusCodes"/>
</def>
<def localId="54" locator="50:1-50:88" name="allergy-unconfirmed" id="unconfirmed" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="54">
<a:s>// Allergy/Intolerance Verification Status Codes - Consider value sets for these
code "allergy-unconfirmed": 'unconfirmed' from </a:s>
<a:s r="53">
<a:s>AllergyIntoleranceVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="53" locator="50:48-50:88" name="AllergyIntoleranceVerificationStatusCodes"/>
</def>
<def localId="56" locator="51:1-51:84" name="allergy-confirmed" id="confirmed" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="56">
<a:s>code "allergy-confirmed": 'confirmed' from </a:s>
<a:s r="55">
<a:s>AllergyIntoleranceVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="55" locator="51:44-51:84" name="AllergyIntoleranceVerificationStatusCodes"/>
</def>
<def localId="58" locator="52:1-52:80" name="allergy-refuted" id="refuted" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="58">
<a:s>code "allergy-refuted": 'refuted' from </a:s>
<a:s r="57">
<a:s>AllergyIntoleranceVerificationStatusCodes</a:s>
</a:s>
</a:s>
</annotation>
<codeSystem localId="57" locator="52:40-52:80" name="AllergyIntoleranceVerificationStatusCodes"/>
</def>
<def localId="60" locator="55:1-55:82" name="Community" id="community" display="Community" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="60">
<a:s>// MedicationRequest Category Codes
code "Community": 'community' from </a:s>
<a:s r="59">
<a:s>"MedicationRequestCategory"</a:s>
</a:s>
<a:s> display 'Community'</a:s>
</a:s>
</annotation>
<codeSystem localId="59" locator="55:36-55:62" name="MedicationRequestCategory"/>
</def>
<def localId="62" locator="56:1-56:82" name="Discharge" id="discharge" display="Discharge" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="62">
<a:s>code "Discharge": 'discharge' from </a:s>
<a:s r="61">
<a:s>"MedicationRequestCategory"</a:s>
</a:s>
<a:s> display 'Discharge'</a:s>
</a:s>
</annotation>
<codeSystem localId="61" locator="56:36-56:62" name="MedicationRequestCategory"/>
</def>
<def localId="64" locator="59:1-59:67" name="AD" id="AD" display="Admission diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="64">
<a:s>// Diagnosis Role Codes
code "AD": 'AD' from </a:s>
<a:s r="63">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'Admission diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="63" locator="59:22-59:37" name="Diagnosis Role"/>
</def>
<def localId="66" locator="60:1-60:67" name="DD" id="DD" display="Discharge diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="66">
<a:s>code "DD": 'DD' from </a:s>
<a:s r="65">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'Discharge diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="65" locator="60:22-60:37" name="Diagnosis Role"/>
</def>
<def localId="68" locator="61:1-61:63" name="CC" id="CC" display="Chief complaint" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="68">
<a:s>code "CC": 'CC' from </a:s>
<a:s r="67">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'Chief complaint'</a:s>
</a:s>
</annotation>
<codeSystem localId="67" locator="61:22-61:37" name="Diagnosis Role"/>
</def>
<def localId="70" locator="62:1-62:69" name="CM" id="CM" display="Comorbidity diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="70">
<a:s>code "CM": 'CM' from </a:s>
<a:s r="69">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'Comorbidity diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="69" locator="62:22-62:37" name="Diagnosis Role"/>
</def>
<def localId="72" locator="63:1-63:72" name="pre-op" id="pre-op" display="pre-op diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="72">
<a:s>code "pre-op": 'pre-op' from </a:s>
<a:s r="71">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'pre-op diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="71" locator="63:30-63:45" name="Diagnosis Role"/>
</def>
<def localId="74" locator="64:1-64:75" name="post-op" id="post-op" display="post-op diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="74">
<a:s>code "post-op": 'post-op' from </a:s>
<a:s r="73">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'post-op diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="73" locator="64:32-64:47" name="Diagnosis Role"/>
</def>
<def localId="76" locator="65:1-65:75" name="billing" id="billing" display="billing diagnosis" accessLevel="Public">
<annotation xsi:type="a:Annotation">
<a:s r="76">
<a:s>code "billing": 'billing' from </a:s>
<a:s r="75">
<a:s>"Diagnosis Role"</a:s>
</a:s>
<a:s> display 'billing diagnosis'</a:s>
</a:s>
</annotation>
<codeSystem localId="75" locator="65:32-65:47" name="Diagnosis Role"/>
</def>
</codes>
<contexts>
<def locator="67:1-67:15" name="Patient"/>
</contexts>
<statements>
<def locator="67:1-67:15" name="Patient" context="Patient">
<expression xsi:type="SingletonFrom">
<operand locator="67:1-67:15" dataType="fhir:Patient" templateId="http://hl7.org/fhir/StructureDefinition/Patient" xsi:type="Retrieve"/>
</expression>
</def>
<def localId="211" locator="77:1-97:4" name="ToInterval" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Normalizes a value that is a choice of timing-valued types to an equivalent interval"/>
<a:t name="comment" value="Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource. NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String."/>
<a:s r="211">
<a:s>/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource. NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define function ToInterval(choice </a:s>
<a:s r="84">
<a:s>Choice<</a:s>
<a:s r="77">
<a:s>FHIR.dateTime</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="78">
<a:s>FHIR.Period</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="79">
<a:s>FHIR.Timing</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="80">
<a:s>FHIR.instant</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="81">
<a:s>FHIR.string</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="82">
<a:s>FHIR.Age</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="83">
<a:s>FHIR.Range</a:s>
</a:s>
<a:s>></a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="210">
<a:s r="210">
<a:s>case
</a:s>
<a:s r="99">
<a:s>when </a:s>
<a:s r="87">
<a:s r="85">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="86">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="98">
<a:s>Interval[</a:s>
<a:s r="92">
<a:s r="88">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="92">
<a:s>ToDateTime(</a:s>
<a:s r="91">
<a:s r="89">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="90">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="97">
<a:s r="93">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="97">
<a:s>ToDateTime(</a:s>
<a:s r="96">
<a:s r="94">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="95">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>]</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="108">
<a:s>when </a:s>
<a:s r="102">
<a:s r="100">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="101">
<a:s>FHIR.Period</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="107">
<a:s r="103">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="107">
<a:s>ToInterval(</a:s>
<a:s r="106">
<a:s r="104">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="105">
<a:s>FHIR.Period</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="123">
<a:s>when </a:s>
<a:s r="111">
<a:s r="109">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="110">
<a:s>FHIR.instant</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="122">
<a:s>Interval[</a:s>
<a:s r="116">
<a:s r="112">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="116">
<a:s>ToDateTime(</a:s>
<a:s r="115">
<a:s r="113">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="114">
<a:s>FHIR.instant</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="121">
<a:s r="117">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="121">
<a:s>ToDateTime(</a:s>
<a:s r="120">
<a:s r="118">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="119">
<a:s>FHIR.instant</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>]</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="150">
<a:s>when </a:s>
<a:s r="126">
<a:s r="124">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="125">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="149">
<a:s>Interval[</a:s>
<a:s r="136">
<a:s r="130">
<a:s r="127">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="130">
<a:s>ToDate(</a:s>
<a:s r="129">
<a:s r="128">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="129">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="135">
<a:s r="131">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="135">
<a:s>ToQuantity(</a:s>
<a:s r="134">
<a:s r="132">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="133">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>,
</a:s>
<a:s r="148">
<a:s r="146">
<a:s r="140">
<a:s r="137">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="140">
<a:s>ToDate(</a:s>
<a:s r="139">
<a:s r="138">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="139">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="145">
<a:s r="141">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="145">
<a:s>ToQuantity(</a:s>
<a:s r="144">
<a:s r="142">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="143">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="147">
<a:s>1 year</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="179">
<a:s>when </a:s>
<a:s r="153">
<a:s r="151">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="152">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="178">
<a:s>Interval[</a:s>
<a:s r="164">
<a:s r="157">
<a:s r="154">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="157">
<a:s>ToDate(</a:s>
<a:s r="156">
<a:s r="155">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="156">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="163">
<a:s r="158">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="163">
<a:s>ToQuantity(</a:s>
<a:s r="162">
<a:s r="161">
<a:s>(</a:s>
<a:s r="161">
<a:s r="159">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="160">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="162">
<a:s>low</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>,
</a:s>
<a:s r="177">
<a:s r="175">
<a:s r="168">
<a:s r="165">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="168">
<a:s>ToDate(</a:s>
<a:s r="167">
<a:s r="166">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="167">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="174">
<a:s r="169">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="174">
<a:s>ToQuantity(</a:s>
<a:s r="173">
<a:s r="172">
<a:s>(</a:s>
<a:s r="172">
<a:s r="170">
<a:s>choice</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="171">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="173">
<a:s>high</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="176">
<a:s>1 year</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="192">
<a:s>when </a:s>
<a:s r="182">
<a:s r="180">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="181">
<a:s>FHIR.Timing</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="191">
<a:s>Message(</a:s>
<a:s r="186">
<a:s r="183">null as </a:s>
<a:s r="185">
<a:s>Interval<</a:s>
<a:s r="184">
<a:s>DateTime</a:s>
</a:s>
<a:s>></a:s>
</a:s>
</a:s>
<a:s r="187">, true, </a:s>
<a:s r="188">
<a:s>'1'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="189">
<a:s>'Error'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="190">
<a:s>'Cannot compute a single interval from a Timing type'</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="205">
<a:s>when </a:s>
<a:s r="195">
<a:s r="193">
<a:s>choice</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="194">
<a:s>FHIR.string</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="204">
<a:s>Message(</a:s>
<a:s r="199">
<a:s r="196">null as </a:s>
<a:s r="198">
<a:s>Interval<</a:s>
<a:s r="197">
<a:s>DateTime</a:s>
</a:s>
<a:s>></a:s>
</a:s>
</a:s>
<a:s r="200">, true, </a:s>
<a:s r="201">
<a:s>'1'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="202">
<a:s>'Error'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="203">
<a:s>'Cannot compute an interval from a String value'</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>
else
</a:s>
<a:s r="209">
<a:s r="206">null as </a:s>
<a:s r="208">
<a:s>Interval<</a:s>
<a:s r="207">
<a:s>DateTime</a:s>
</a:s>
<a:s>></a:s>
</a:s>
</a:s>
<a:s>
end</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="210" locator="78:3-97:4" xsi:type="Case">
<caseItem localId="99" locator="79:4-80:111">
<when localId="87" locator="79:9-79:31" xsi:type="Is">
<operand localId="85" locator="79:9-79:14" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="86" locator="79:19-79:31" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</when>
<then localId="98" locator="80:6-80:111" lowClosed="true" highClosed="true" xsi:type="Interval">
<low localId="92" locator="80:15-80:61" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="91" locator="80:38-80:60" strict="false" xsi:type="As">
<operand localId="89" locator="80:38-80:43" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="90" locator="80:48-80:60" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</operand>
</low>
<high localId="97" locator="80:64-80:110" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="96" locator="80:87-80:109" strict="false" xsi:type="As">
<operand localId="94" locator="80:87-80:92" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="95" locator="80:97-80:109" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</operand>
</high>
</then>
</caseItem>
<caseItem localId="108" locator="81:3-82:49">
<when localId="102" locator="81:8-81:28" xsi:type="Is">
<operand localId="100" locator="81:8-81:13" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="101" locator="81:18-81:28" name="fhir:Period" xsi:type="NamedTypeSpecifier"/>
</when>
<then localId="107" locator="82:5-82:49" name="ToInterval" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="106" locator="82:28-82:48" strict="false" xsi:type="As">
<operand localId="104" locator="82:28-82:33" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="105" locator="82:38-82:48" name="fhir:Period" xsi:type="NamedTypeSpecifier"/>
</operand>
</then>
</caseItem>
<caseItem localId="123" locator="83:3-84:107">
<when localId="111" locator="83:8-83:29" xsi:type="Is">
<operand localId="109" locator="83:8-83:13" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="110" locator="83:18-83:29" name="fhir:instant" xsi:type="NamedTypeSpecifier"/>
</when>
<then localId="122" locator="84:4-84:107" lowClosed="true" highClosed="true" xsi:type="Interval">
<low localId="116" locator="84:13-84:58" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="115" locator="84:36-84:57" strict="false" xsi:type="As">
<operand localId="113" locator="84:36-84:41" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="114" locator="84:46-84:57" name="fhir:instant" xsi:type="NamedTypeSpecifier"/>
</operand>
</low>
<high localId="121" locator="84:61-84:106" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="120" locator="84:84-84:105" strict="false" xsi:type="As">
<operand localId="118" locator="84:84-84:89" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="119" locator="84:94-84:105" name="fhir:instant" xsi:type="NamedTypeSpecifier"/>
</operand>
</high>
</then>
</caseItem>
<caseItem localId="150" locator="85:3-87:97">
<when localId="126" locator="85:8-85:25" xsi:type="Is">
<operand localId="124" locator="85:8-85:13" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="125" locator="85:18-85:25" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</when>
<then xsi:type="Interval">
<low xsi:type="ToDateTime">
<operand path="low" xsi:type="Property">
<source localId="149" locator="86:5-87:97" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="136" locator="86:14-86:95" xsi:type="Add">
<operand localId="130" locator="86:14-86:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="129" locator="86:33-86:49" path="birthDate" xsi:type="Property">
<source localId="128" locator="86:33-86:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="135" locator="86:54-86:95" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="134" locator="86:77-86:94" strict="false" xsi:type="As">
<operand localId="132" locator="86:77-86:82" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="133" locator="86:87-86:94" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="148" locator="87:6-87:96" xsi:type="Add">
<operand localId="146" locator="87:6-87:87" xsi:type="Add">
<operand localId="140" locator="87:6-87:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="139" locator="87:25-87:41" path="birthDate" xsi:type="Property">
<source localId="138" locator="87:25-87:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="145" locator="87:46-87:87" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="144" locator="87:69-87:86" strict="false" xsi:type="As">
<operand localId="142" locator="87:69-87:74" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="143" locator="87:79-87:86" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="147" locator="87:91-87:96" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</low>
<lowClosedExpression path="lowClosed" xsi:type="Property">
<source localId="149" locator="86:5-87:97" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="136" locator="86:14-86:95" xsi:type="Add">
<operand localId="130" locator="86:14-86:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="129" locator="86:33-86:49" path="birthDate" xsi:type="Property">
<source localId="128" locator="86:33-86:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="135" locator="86:54-86:95" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="134" locator="86:77-86:94" strict="false" xsi:type="As">
<operand localId="132" locator="86:77-86:82" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="133" locator="86:87-86:94" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="148" locator="87:6-87:96" xsi:type="Add">
<operand localId="146" locator="87:6-87:87" xsi:type="Add">
<operand localId="140" locator="87:6-87:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="139" locator="87:25-87:41" path="birthDate" xsi:type="Property">
<source localId="138" locator="87:25-87:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="145" locator="87:46-87:87" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="144" locator="87:69-87:86" strict="false" xsi:type="As">
<operand localId="142" locator="87:69-87:74" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="143" locator="87:79-87:86" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="147" locator="87:91-87:96" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</lowClosedExpression>
<high xsi:type="ToDateTime">
<operand path="high" xsi:type="Property">
<source localId="149" locator="86:5-87:97" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="136" locator="86:14-86:95" xsi:type="Add">
<operand localId="130" locator="86:14-86:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="129" locator="86:33-86:49" path="birthDate" xsi:type="Property">
<source localId="128" locator="86:33-86:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="135" locator="86:54-86:95" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="134" locator="86:77-86:94" strict="false" xsi:type="As">
<operand localId="132" locator="86:77-86:82" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="133" locator="86:87-86:94" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="148" locator="87:6-87:96" xsi:type="Add">
<operand localId="146" locator="87:6-87:87" xsi:type="Add">
<operand localId="140" locator="87:6-87:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="139" locator="87:25-87:41" path="birthDate" xsi:type="Property">
<source localId="138" locator="87:25-87:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="145" locator="87:46-87:87" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="144" locator="87:69-87:86" strict="false" xsi:type="As">
<operand localId="142" locator="87:69-87:74" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="143" locator="87:79-87:86" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="147" locator="87:91-87:96" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</high>
<highClosedExpression path="highClosed" xsi:type="Property">
<source localId="149" locator="86:5-87:97" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="136" locator="86:14-86:95" xsi:type="Add">
<operand localId="130" locator="86:14-86:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="129" locator="86:33-86:49" path="birthDate" xsi:type="Property">
<source localId="128" locator="86:33-86:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="135" locator="86:54-86:95" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="134" locator="86:77-86:94" strict="false" xsi:type="As">
<operand localId="132" locator="86:77-86:82" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="133" locator="86:87-86:94" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="148" locator="87:6-87:96" xsi:type="Add">
<operand localId="146" locator="87:6-87:87" xsi:type="Add">
<operand localId="140" locator="87:6-87:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="139" locator="87:25-87:41" path="birthDate" xsi:type="Property">
<source localId="138" locator="87:25-87:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="145" locator="87:46-87:87" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="144" locator="87:69-87:86" strict="false" xsi:type="As">
<operand localId="142" locator="87:69-87:74" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="143" locator="87:79-87:86" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="147" locator="87:91-87:96" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</highClosedExpression>
</then>
</caseItem>
<caseItem localId="179" locator="88:3-90:106">
<when localId="153" locator="88:8-88:27" xsi:type="Is">
<operand localId="151" locator="88:8-88:13" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="152" locator="88:18-88:27" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</when>
<then xsi:type="Interval">
<low xsi:type="ToDateTime">
<operand path="low" xsi:type="Property">
<source localId="178" locator="89:5-90:106" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="164" locator="89:14-89:103" xsi:type="Add">
<operand localId="157" locator="89:14-89:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="156" locator="89:33-89:49" path="birthDate" xsi:type="Property">
<source localId="155" locator="89:33-89:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="163" locator="89:54-89:103" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="162" locator="89:77-89:102" path="low" xsi:type="Property">
<source localId="161" locator="89:77-89:98" strict="false" xsi:type="As">
<operand localId="159" locator="89:78-89:83" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="160" locator="89:88-89:97" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="177" locator="90:6-90:105" xsi:type="Add">
<operand localId="175" locator="90:6-90:96" xsi:type="Add">
<operand localId="168" locator="90:6-90:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="167" locator="90:25-90:41" path="birthDate" xsi:type="Property">
<source localId="166" locator="90:25-90:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="174" locator="90:46-90:96" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="173" locator="90:69-90:95" path="high" xsi:type="Property">
<source localId="172" locator="90:69-90:90" strict="false" xsi:type="As">
<operand localId="170" locator="90:70-90:75" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="171" locator="90:80-90:89" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="176" locator="90:100-90:105" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</low>
<lowClosedExpression path="lowClosed" xsi:type="Property">
<source localId="178" locator="89:5-90:106" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="164" locator="89:14-89:103" xsi:type="Add">
<operand localId="157" locator="89:14-89:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="156" locator="89:33-89:49" path="birthDate" xsi:type="Property">
<source localId="155" locator="89:33-89:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="163" locator="89:54-89:103" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="162" locator="89:77-89:102" path="low" xsi:type="Property">
<source localId="161" locator="89:77-89:98" strict="false" xsi:type="As">
<operand localId="159" locator="89:78-89:83" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="160" locator="89:88-89:97" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="177" locator="90:6-90:105" xsi:type="Add">
<operand localId="175" locator="90:6-90:96" xsi:type="Add">
<operand localId="168" locator="90:6-90:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="167" locator="90:25-90:41" path="birthDate" xsi:type="Property">
<source localId="166" locator="90:25-90:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="174" locator="90:46-90:96" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="173" locator="90:69-90:95" path="high" xsi:type="Property">
<source localId="172" locator="90:69-90:90" strict="false" xsi:type="As">
<operand localId="170" locator="90:70-90:75" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="171" locator="90:80-90:89" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="176" locator="90:100-90:105" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</lowClosedExpression>
<high xsi:type="ToDateTime">
<operand path="high" xsi:type="Property">
<source localId="178" locator="89:5-90:106" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="164" locator="89:14-89:103" xsi:type="Add">
<operand localId="157" locator="89:14-89:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="156" locator="89:33-89:49" path="birthDate" xsi:type="Property">
<source localId="155" locator="89:33-89:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="163" locator="89:54-89:103" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="162" locator="89:77-89:102" path="low" xsi:type="Property">
<source localId="161" locator="89:77-89:98" strict="false" xsi:type="As">
<operand localId="159" locator="89:78-89:83" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="160" locator="89:88-89:97" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="177" locator="90:6-90:105" xsi:type="Add">
<operand localId="175" locator="90:6-90:96" xsi:type="Add">
<operand localId="168" locator="90:6-90:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="167" locator="90:25-90:41" path="birthDate" xsi:type="Property">
<source localId="166" locator="90:25-90:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="174" locator="90:46-90:96" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="173" locator="90:69-90:95" path="high" xsi:type="Property">
<source localId="172" locator="90:69-90:90" strict="false" xsi:type="As">
<operand localId="170" locator="90:70-90:75" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="171" locator="90:80-90:89" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="176" locator="90:100-90:105" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</high>
<highClosedExpression path="highClosed" xsi:type="Property">
<source localId="178" locator="89:5-90:106" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="164" locator="89:14-89:103" xsi:type="Add">
<operand localId="157" locator="89:14-89:50" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="156" locator="89:33-89:49" path="birthDate" xsi:type="Property">
<source localId="155" locator="89:33-89:39" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="163" locator="89:54-89:103" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="162" locator="89:77-89:102" path="low" xsi:type="Property">
<source localId="161" locator="89:77-89:98" strict="false" xsi:type="As">
<operand localId="159" locator="89:78-89:83" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="160" locator="89:88-89:97" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="177" locator="90:6-90:105" xsi:type="Add">
<operand localId="175" locator="90:6-90:96" xsi:type="Add">
<operand localId="168" locator="90:6-90:42" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="167" locator="90:25-90:41" path="birthDate" xsi:type="Property">
<source localId="166" locator="90:25-90:31" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="174" locator="90:46-90:96" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="173" locator="90:69-90:95" path="high" xsi:type="Property">
<source localId="172" locator="90:69-90:90" strict="false" xsi:type="As">
<operand localId="170" locator="90:70-90:75" name="choice" xsi:type="OperandRef"/>
<asTypeSpecifier localId="171" locator="90:80-90:89" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="176" locator="90:100-90:105" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</highClosedExpression>
</then>
</caseItem>
<caseItem localId="192" locator="91:3-92:114">
<when localId="182" locator="91:8-91:28" xsi:type="Is">
<operand localId="180" locator="91:8-91:13" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="181" locator="91:18-91:28" name="fhir:Timing" xsi:type="NamedTypeSpecifier"/>
</when>
<then localId="191" locator="92:5-92:114" xsi:type="Message">
<source localId="186" locator="92:13-92:38" strict="false" xsi:type="As">
<operand localId="183" locator="92:13-92:16" xsi:type="Null"/>
<asTypeSpecifier localId="185" locator="92:21-92:38" xsi:type="IntervalTypeSpecifier">
<pointType localId="184" locator="92:30-92:37" name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</asTypeSpecifier>
</source>
<condition localId="187" locator="92:41-92:44" valueType="t:Boolean" value="true" xsi:type="Literal"/>
<code localId="188" locator="92:47-92:49" valueType="t:String" value="1" xsi:type="Literal"/>
<severity localId="189" locator="92:52-92:58" valueType="t:String" value="Error" xsi:type="Literal"/>
<message localId="190" locator="92:61-92:113" valueType="t:String" value="Cannot compute a single interval from a Timing type" xsi:type="Literal"/>
</then>
</caseItem>
<caseItem localId="205" locator="93:5-94:111">
<when localId="195" locator="93:10-93:30" xsi:type="Is">
<operand localId="193" locator="93:10-93:15" name="choice" xsi:type="OperandRef"/>
<isTypeSpecifier localId="194" locator="93:20-93:30" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
</when>
<then localId="204" locator="94:7-94:111" xsi:type="Message">
<source localId="199" locator="94:15-94:40" strict="false" xsi:type="As">
<operand localId="196" locator="94:15-94:18" xsi:type="Null"/>
<asTypeSpecifier localId="198" locator="94:23-94:40" xsi:type="IntervalTypeSpecifier">
<pointType localId="197" locator="94:32-94:39" name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</asTypeSpecifier>
</source>
<condition localId="200" locator="94:43-94:46" valueType="t:Boolean" value="true" xsi:type="Literal"/>
<code localId="201" locator="94:49-94:51" valueType="t:String" value="1" xsi:type="Literal"/>
<severity localId="202" locator="94:54-94:60" valueType="t:String" value="Error" xsi:type="Literal"/>
<message localId="203" locator="94:63-94:110" valueType="t:String" value="Cannot compute an interval from a String value" xsi:type="Literal"/>
</then>
</caseItem>
<else localId="209" locator="96:4-96:29" strict="false" xsi:type="As">
<operand localId="206" locator="96:4-96:7" xsi:type="Null"/>
<asTypeSpecifier localId="208" locator="96:12-96:29" xsi:type="IntervalTypeSpecifier">
<pointType localId="207" locator="96:21-96:28" name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</asTypeSpecifier>
</else>
</expression>
<operand name="choice">
<operandTypeSpecifier localId="84" locator="77:35-77:130" xsi:type="ChoiceTypeSpecifier">
<choice localId="77" locator="77:42-77:54" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
<choice localId="78" locator="77:57-77:67" name="fhir:Period" xsi:type="NamedTypeSpecifier"/>
<choice localId="79" locator="77:70-77:80" name="fhir:Timing" xsi:type="NamedTypeSpecifier"/>
<choice localId="80" locator="77:83-77:94" name="fhir:instant" xsi:type="NamedTypeSpecifier"/>
<choice localId="81" locator="77:97-77:107" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
<choice localId="82" locator="77:110-77:117" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
<choice localId="83" locator="77:120-77:129" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</operandTypeSpecifier>
</operand>
</def>
<def localId="331" locator="104:1-119:10" name="ToAbatementInterval" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns an interval representing the normalized Abatement of a given Condition resource."/>
<a:t name="comment" value="NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value."/>
<a:s r="331">
<a:s>/*
@description: Returns an interval representing the normalized Abatement of a given Condition resource.
@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define function ToAbatementInterval(condition </a:s>
<a:s r="212">
<a:s>Condition</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="330">
<a:s r="330">
<a:s>if </a:s>
<a:s r="216">
<a:s r="214">
<a:s r="213">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="214">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="215">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="229">
<a:s>Interval[</a:s>
<a:s r="222">
<a:s r="217">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="222">
<a:s>ToDateTime(</a:s>
<a:s r="221">
<a:s r="219">
<a:s r="218">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="219">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="220">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="228">
<a:s r="223">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="228">
<a:s>ToDateTime(</a:s>
<a:s r="227">
<a:s r="225">
<a:s r="224">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="225">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="226">
<a:s>FHIR.dateTime</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>]</a:s>
</a:s>
<a:s>
else </a:s>
<a:s r="329">
<a:s>if </a:s>
<a:s r="233">
<a:s r="231">
<a:s r="230">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="231">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="232">
<a:s>FHIR.Period</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="239">
<a:s r="234">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="239">
<a:s>ToInterval(</a:s>
<a:s r="238">
<a:s r="236">
<a:s r="235">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="236">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="237">
<a:s>FHIR.Period</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>
else </a:s>
<a:s r="328">
<a:s>if </a:s>
<a:s r="243">
<a:s r="241">
<a:s r="240">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="241">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="242">
<a:s>FHIR.string</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="252">
<a:s>Message(</a:s>
<a:s r="247">
<a:s r="244">null as </a:s>
<a:s r="246">
<a:s>Interval<</a:s>
<a:s r="245">
<a:s>DateTime</a:s>
</a:s>
<a:s>></a:s>
</a:s>
</a:s>
<a:s r="248">, true, </a:s>
<a:s r="249">
<a:s>'1'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="250">
<a:s>'Error'</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="251">
<a:s>'Cannot compute an interval from a String value'</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>
else </a:s>
<a:s r="327">
<a:s>if </a:s>
<a:s r="256">
<a:s r="254">
<a:s r="253">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="254">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="255">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="281">
<a:s>Interval[</a:s>
<a:s r="267">
<a:s r="260">
<a:s r="257">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="260">
<a:s>ToDate(</a:s>
<a:s r="259">
<a:s r="258">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="259">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="266">
<a:s r="261">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="266">
<a:s>ToQuantity(</a:s>
<a:s r="265">
<a:s r="263">
<a:s r="262">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="263">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="264">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>,
</a:s>
<a:s r="280">
<a:s r="278">
<a:s r="271">
<a:s r="268">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="271">
<a:s>ToDate(</a:s>
<a:s r="270">
<a:s r="269">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="270">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="277">
<a:s r="272">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="277">
<a:s>ToQuantity(</a:s>
<a:s r="276">
<a:s r="274">
<a:s r="273">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="274">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="275">
<a:s>FHIR.Age</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="279">
<a:s>1 year</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>
else </a:s>
<a:s r="326">
<a:s>if </a:s>
<a:s r="285">
<a:s r="283">
<a:s r="282">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="283">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="284">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="312">
<a:s>Interval[</a:s>
<a:s r="297">
<a:s r="289">
<a:s r="286">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="289">
<a:s>ToDate(</a:s>
<a:s r="288">
<a:s r="287">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="288">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="296">
<a:s r="290">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="296">
<a:s>ToQuantity(</a:s>
<a:s r="295">
<a:s r="294">
<a:s>(</a:s>
<a:s r="294">
<a:s r="292">
<a:s r="291">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="292">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="293">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="295">
<a:s>low</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>,
</a:s>
<a:s r="311">
<a:s r="309">
<a:s r="301">
<a:s r="298">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="301">
<a:s>ToDate(</a:s>
<a:s r="300">
<a:s r="299">
<a:s>Patient</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="300">
<a:s>birthDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="308">
<a:s r="302">
<a:s>FHIRHelpers</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="308">
<a:s>ToQuantity(</a:s>
<a:s r="307">
<a:s r="306">
<a:s>(</a:s>
<a:s r="306">
<a:s r="304">
<a:s r="303">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="304">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> as </a:s>
<a:s r="305">
<a:s>FHIR.Range</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="307">
<a:s>high</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="310">
<a:s>1 year</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s>
else </a:s>
<a:s r="325">
<a:s>if </a:s>
<a:s r="316">
<a:s r="314">
<a:s r="313">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="314">
<a:s>abatement</a:s>
</a:s>
</a:s>
<a:s> is </a:s>
<a:s r="315">
<a:s>FHIR.boolean</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="323">
<a:s>Interval[</a:s>
<a:s r="320">
<a:s>end of </a:s>
<a:s r="319">
<a:s>ToInterval(</a:s>
<a:s r="318">
<a:s r="317">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="318">
<a:s>onset</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="322">
<a:s r="321">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="322">
<a:s>recordedDate</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
<a:s r="324">
else null</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="330" locator="105:2-119:10" xsi:type="If">
<condition localId="216" locator="105:5-105:40" xsi:type="Is">
<operand localId="214" locator="105:5-105:23" path="abatement" xsi:type="Property">
<source localId="213" locator="105:5-105:13" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="215" locator="105:28-105:40" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</condition>
<then localId="229" locator="106:4-106:135" lowClosed="true" highClosed="true" xsi:type="Interval">
<low localId="222" locator="106:13-106:72" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="221" locator="106:36-106:71" strict="false" xsi:type="As">
<operand localId="219" locator="106:36-106:54" path="abatement" xsi:type="Property">
<source localId="218" locator="106:36-106:44" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="220" locator="106:59-106:71" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</operand>
</low>
<high localId="228" locator="106:75-106:134" name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="227" locator="106:98-106:133" strict="false" xsi:type="As">
<operand localId="225" locator="106:98-106:116" path="abatement" xsi:type="Property">
<source localId="224" locator="106:98-106:106" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="226" locator="106:121-106:133" name="fhir:dateTime" xsi:type="NamedTypeSpecifier"/>
</operand>
</high>
</then>
<else localId="329" locator="107:7-119:10" xsi:type="If">
<condition localId="233" locator="107:10-107:43" xsi:type="Is">
<operand localId="231" locator="107:10-107:28" path="abatement" xsi:type="Property">
<source localId="230" locator="107:10-107:18" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="232" locator="107:33-107:43" name="fhir:Period" xsi:type="NamedTypeSpecifier"/>
</condition>
<then localId="239" locator="108:4-108:61" name="ToInterval" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="238" locator="108:27-108:60" strict="false" xsi:type="As">
<operand localId="236" locator="108:27-108:45" path="abatement" xsi:type="Property">
<source localId="235" locator="108:27-108:35" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="237" locator="108:50-108:60" name="fhir:Period" xsi:type="NamedTypeSpecifier"/>
</operand>
</then>
<else localId="328" locator="109:7-119:10" xsi:type="If">
<condition localId="243" locator="109:10-109:43" xsi:type="Is">
<operand localId="241" locator="109:10-109:28" path="abatement" xsi:type="Property">
<source localId="240" locator="109:10-109:18" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="242" locator="109:33-109:43" name="fhir:string" xsi:type="NamedTypeSpecifier"/>
</condition>
<then localId="252" locator="110:5-110:109" xsi:type="Message">
<source localId="247" locator="110:13-110:38" strict="false" xsi:type="As">
<operand localId="244" locator="110:13-110:16" xsi:type="Null"/>
<asTypeSpecifier localId="246" locator="110:21-110:38" xsi:type="IntervalTypeSpecifier">
<pointType localId="245" locator="110:30-110:37" name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</asTypeSpecifier>
</source>
<condition localId="248" locator="110:41-110:44" valueType="t:Boolean" value="true" xsi:type="Literal"/>
<code localId="249" locator="110:47-110:49" valueType="t:String" value="1" xsi:type="Literal"/>
<severity localId="250" locator="110:52-110:58" valueType="t:String" value="Error" xsi:type="Literal"/>
<message localId="251" locator="110:61-110:108" valueType="t:String" value="Cannot compute an interval from a String value" xsi:type="Literal"/>
</then>
<else localId="327" locator="111:7-119:10" xsi:type="If">
<condition localId="256" locator="111:10-111:40" xsi:type="Is">
<operand localId="254" locator="111:10-111:28" path="abatement" xsi:type="Property">
<source localId="253" locator="111:10-111:18" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="255" locator="111:33-111:40" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</condition>
<then xsi:type="Interval">
<low xsi:type="ToDateTime">
<operand path="low" xsi:type="Property">
<source localId="281" locator="112:3-113:108" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="267" locator="112:12-112:106" xsi:type="Add">
<operand localId="260" locator="112:12-112:48" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="259" locator="112:31-112:47" path="birthDate" xsi:type="Property">
<source localId="258" locator="112:31-112:37" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="266" locator="112:52-112:106" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="265" locator="112:75-112:105" strict="false" xsi:type="As">
<operand localId="263" locator="112:75-112:93" path="abatement" xsi:type="Property">
<source localId="262" locator="112:75-112:83" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="264" locator="112:98-112:105" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="280" locator="113:4-113:107" xsi:type="Add">
<operand localId="278" locator="113:4-113:98" xsi:type="Add">
<operand localId="271" locator="113:4-113:40" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="270" locator="113:23-113:39" path="birthDate" xsi:type="Property">
<source localId="269" locator="113:23-113:29" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="277" locator="113:44-113:98" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="276" locator="113:67-113:97" strict="false" xsi:type="As">
<operand localId="274" locator="113:67-113:85" path="abatement" xsi:type="Property">
<source localId="273" locator="113:67-113:75" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="275" locator="113:90-113:97" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="279" locator="113:102-113:107" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</low>
<lowClosedExpression path="lowClosed" xsi:type="Property">
<source localId="281" locator="112:3-113:108" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="267" locator="112:12-112:106" xsi:type="Add">
<operand localId="260" locator="112:12-112:48" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="259" locator="112:31-112:47" path="birthDate" xsi:type="Property">
<source localId="258" locator="112:31-112:37" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="266" locator="112:52-112:106" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="265" locator="112:75-112:105" strict="false" xsi:type="As">
<operand localId="263" locator="112:75-112:93" path="abatement" xsi:type="Property">
<source localId="262" locator="112:75-112:83" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="264" locator="112:98-112:105" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="280" locator="113:4-113:107" xsi:type="Add">
<operand localId="278" locator="113:4-113:98" xsi:type="Add">
<operand localId="271" locator="113:4-113:40" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="270" locator="113:23-113:39" path="birthDate" xsi:type="Property">
<source localId="269" locator="113:23-113:29" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="277" locator="113:44-113:98" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="276" locator="113:67-113:97" strict="false" xsi:type="As">
<operand localId="274" locator="113:67-113:85" path="abatement" xsi:type="Property">
<source localId="273" locator="113:67-113:75" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="275" locator="113:90-113:97" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="279" locator="113:102-113:107" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</lowClosedExpression>
<high xsi:type="ToDateTime">
<operand path="high" xsi:type="Property">
<source localId="281" locator="112:3-113:108" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="267" locator="112:12-112:106" xsi:type="Add">
<operand localId="260" locator="112:12-112:48" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="259" locator="112:31-112:47" path="birthDate" xsi:type="Property">
<source localId="258" locator="112:31-112:37" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="266" locator="112:52-112:106" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="265" locator="112:75-112:105" strict="false" xsi:type="As">
<operand localId="263" locator="112:75-112:93" path="abatement" xsi:type="Property">
<source localId="262" locator="112:75-112:83" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="264" locator="112:98-112:105" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="280" locator="113:4-113:107" xsi:type="Add">
<operand localId="278" locator="113:4-113:98" xsi:type="Add">
<operand localId="271" locator="113:4-113:40" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="270" locator="113:23-113:39" path="birthDate" xsi:type="Property">
<source localId="269" locator="113:23-113:29" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="277" locator="113:44-113:98" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="276" locator="113:67-113:97" strict="false" xsi:type="As">
<operand localId="274" locator="113:67-113:85" path="abatement" xsi:type="Property">
<source localId="273" locator="113:67-113:75" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="275" locator="113:90-113:97" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="279" locator="113:102-113:107" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</high>
<highClosedExpression path="highClosed" xsi:type="Property">
<source localId="281" locator="112:3-113:108" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="267" locator="112:12-112:106" xsi:type="Add">
<operand localId="260" locator="112:12-112:48" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="259" locator="112:31-112:47" path="birthDate" xsi:type="Property">
<source localId="258" locator="112:31-112:37" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="266" locator="112:52-112:106" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="265" locator="112:75-112:105" strict="false" xsi:type="As">
<operand localId="263" locator="112:75-112:93" path="abatement" xsi:type="Property">
<source localId="262" locator="112:75-112:83" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="264" locator="112:98-112:105" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</low>
<high localId="280" locator="113:4-113:107" xsi:type="Add">
<operand localId="278" locator="113:4-113:98" xsi:type="Add">
<operand localId="271" locator="113:4-113:40" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="270" locator="113:23-113:39" path="birthDate" xsi:type="Property">
<source localId="269" locator="113:23-113:29" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="277" locator="113:44-113:98" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="276" locator="113:67-113:97" strict="false" xsi:type="As">
<operand localId="274" locator="113:67-113:85" path="abatement" xsi:type="Property">
<source localId="273" locator="113:67-113:75" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="275" locator="113:90-113:97" name="fhir:Age" xsi:type="NamedTypeSpecifier"/>
</operand>
</operand>
</operand>
<operand localId="279" locator="113:102-113:107" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</highClosedExpression>
</then>
<else localId="326" locator="114:7-119:10" xsi:type="If">
<condition localId="285" locator="114:10-114:42" xsi:type="Is">
<operand localId="283" locator="114:10-114:28" path="abatement" xsi:type="Property">
<source localId="282" locator="114:10-114:18" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="284" locator="114:33-114:42" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</condition>
<then xsi:type="Interval">
<low xsi:type="ToDateTime">
<operand path="low" xsi:type="Property">
<source localId="312" locator="115:4-116:118" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="297" locator="115:13-115:115" xsi:type="Add">
<operand localId="289" locator="115:13-115:49" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="288" locator="115:32-115:48" path="birthDate" xsi:type="Property">
<source localId="287" locator="115:32-115:38" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="296" locator="115:53-115:115" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="295" locator="115:76-115:114" path="low" xsi:type="Property">
<source localId="294" locator="115:76-115:110" strict="false" xsi:type="As">
<operand localId="292" locator="115:77-115:95" path="abatement" xsi:type="Property">
<source localId="291" locator="115:77-115:85" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="293" locator="115:100-115:109" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="311" locator="116:5-116:117" xsi:type="Add">
<operand localId="309" locator="116:5-116:108" xsi:type="Add">
<operand localId="301" locator="116:5-116:41" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="300" locator="116:24-116:40" path="birthDate" xsi:type="Property">
<source localId="299" locator="116:24-116:30" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="308" locator="116:45-116:108" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="307" locator="116:68-116:107" path="high" xsi:type="Property">
<source localId="306" locator="116:68-116:102" strict="false" xsi:type="As">
<operand localId="304" locator="116:69-116:87" path="abatement" xsi:type="Property">
<source localId="303" locator="116:69-116:77" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="305" locator="116:92-116:101" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="310" locator="116:112-116:117" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</low>
<lowClosedExpression path="lowClosed" xsi:type="Property">
<source localId="312" locator="115:4-116:118" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="297" locator="115:13-115:115" xsi:type="Add">
<operand localId="289" locator="115:13-115:49" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="288" locator="115:32-115:48" path="birthDate" xsi:type="Property">
<source localId="287" locator="115:32-115:38" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="296" locator="115:53-115:115" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="295" locator="115:76-115:114" path="low" xsi:type="Property">
<source localId="294" locator="115:76-115:110" strict="false" xsi:type="As">
<operand localId="292" locator="115:77-115:95" path="abatement" xsi:type="Property">
<source localId="291" locator="115:77-115:85" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="293" locator="115:100-115:109" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="311" locator="116:5-116:117" xsi:type="Add">
<operand localId="309" locator="116:5-116:108" xsi:type="Add">
<operand localId="301" locator="116:5-116:41" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="300" locator="116:24-116:40" path="birthDate" xsi:type="Property">
<source localId="299" locator="116:24-116:30" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="308" locator="116:45-116:108" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="307" locator="116:68-116:107" path="high" xsi:type="Property">
<source localId="306" locator="116:68-116:102" strict="false" xsi:type="As">
<operand localId="304" locator="116:69-116:87" path="abatement" xsi:type="Property">
<source localId="303" locator="116:69-116:77" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="305" locator="116:92-116:101" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="310" locator="116:112-116:117" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</lowClosedExpression>
<high xsi:type="ToDateTime">
<operand path="high" xsi:type="Property">
<source localId="312" locator="115:4-116:118" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="297" locator="115:13-115:115" xsi:type="Add">
<operand localId="289" locator="115:13-115:49" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="288" locator="115:32-115:48" path="birthDate" xsi:type="Property">
<source localId="287" locator="115:32-115:38" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="296" locator="115:53-115:115" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="295" locator="115:76-115:114" path="low" xsi:type="Property">
<source localId="294" locator="115:76-115:110" strict="false" xsi:type="As">
<operand localId="292" locator="115:77-115:95" path="abatement" xsi:type="Property">
<source localId="291" locator="115:77-115:85" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="293" locator="115:100-115:109" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="311" locator="116:5-116:117" xsi:type="Add">
<operand localId="309" locator="116:5-116:108" xsi:type="Add">
<operand localId="301" locator="116:5-116:41" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="300" locator="116:24-116:40" path="birthDate" xsi:type="Property">
<source localId="299" locator="116:24-116:30" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="308" locator="116:45-116:108" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="307" locator="116:68-116:107" path="high" xsi:type="Property">
<source localId="306" locator="116:68-116:102" strict="false" xsi:type="As">
<operand localId="304" locator="116:69-116:87" path="abatement" xsi:type="Property">
<source localId="303" locator="116:69-116:77" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="305" locator="116:92-116:101" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="310" locator="116:112-116:117" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</operand>
</high>
<highClosedExpression path="highClosed" xsi:type="Property">
<source localId="312" locator="115:4-116:118" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="297" locator="115:13-115:115" xsi:type="Add">
<operand localId="289" locator="115:13-115:49" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="288" locator="115:32-115:48" path="birthDate" xsi:type="Property">
<source localId="287" locator="115:32-115:38" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="296" locator="115:53-115:115" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="295" locator="115:76-115:114" path="low" xsi:type="Property">
<source localId="294" locator="115:76-115:110" strict="false" xsi:type="As">
<operand localId="292" locator="115:77-115:95" path="abatement" xsi:type="Property">
<source localId="291" locator="115:77-115:85" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="293" locator="115:100-115:109" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</low>
<high localId="311" locator="116:5-116:117" xsi:type="Add">
<operand localId="309" locator="116:5-116:108" xsi:type="Add">
<operand localId="301" locator="116:5-116:41" name="ToDate" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="300" locator="116:24-116:40" path="birthDate" xsi:type="Property">
<source localId="299" locator="116:24-116:30" name="Patient" xsi:type="ExpressionRef"/>
</operand>
</operand>
<operand localId="308" locator="116:45-116:108" name="ToQuantity" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="307" locator="116:68-116:107" path="high" xsi:type="Property">
<source localId="306" locator="116:68-116:102" strict="false" xsi:type="As">
<operand localId="304" locator="116:69-116:87" path="abatement" xsi:type="Property">
<source localId="303" locator="116:69-116:77" name="condition" xsi:type="OperandRef"/>
</operand>
<asTypeSpecifier localId="305" locator="116:92-116:101" name="fhir:Range" xsi:type="NamedTypeSpecifier"/>
</source>
</operand>
</operand>
</operand>
<operand localId="310" locator="116:112-116:117" value="1" unit="year" xsi:type="Quantity"/>
</high>
</source>
</highClosedExpression>
</then>
<else localId="325" locator="117:7-119:10" xsi:type="If">
<condition localId="316" locator="117:10-117:44" xsi:type="Is">
<operand localId="314" locator="117:10-117:28" path="abatement" xsi:type="Property">
<source localId="313" locator="117:10-117:18" name="condition" xsi:type="OperandRef"/>
</operand>
<isTypeSpecifier localId="315" locator="117:33-117:44" name="fhir:boolean" xsi:type="NamedTypeSpecifier"/>
</condition>
<then localId="323" locator="118:4-118:71" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="320" locator="118:13-118:46" xsi:type="End">
<operand localId="319" locator="118:20-118:46" name="ToInterval" xsi:type="FunctionRef">
<operand localId="318" locator="118:31-118:45" path="onset" xsi:type="Property">
<source localId="317" locator="118:31-118:39" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
</low>
<high name="ToDateTime" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="322" locator="118:49-118:70" path="recordedDate" xsi:type="Property">
<source localId="321" locator="118:49-118:57" name="condition" xsi:type="OperandRef"/>
</operand>
</high>
</then>
<else xsi:type="As">
<operand localId="324" locator="119:7-119:10" xsi:type="Null"/>
<asTypeSpecifier xsi:type="IntervalTypeSpecifier">
<pointType name="t:DateTime" xsi:type="NamedTypeSpecifier"/>
</asTypeSpecifier>
</else>
</else>
</else>
</else>
</else>
</else>
</expression>
<operand name="condition">
<operandTypeSpecifier localId="212" locator="104:47-104:55" name="fhir:Condition" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="364" locator="126:1-132:87" name="ToPrevalenceInterval" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns an interval representing the normalized prevalence period of a given Condition resource."/>
<a:t name="comment" value="Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition."/>
<a:s r="364">
<a:s>/*
@description: Returns an interval representing the normalized prevalence period of a given Condition resource.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
define function ToPrevalenceInterval(condition </a:s>
<a:s r="332">
<a:s>Condition</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="363">
<a:s r="363">
<a:s>if </a:s>
<a:s r="346">
<a:s r="341">
<a:s r="336">
<a:s r="334">
<a:s r="333">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="334">
<a:s>clinicalStatus</a:s>
</a:s>
</a:s>
<a:s> ~ </a:s>
<a:s r="335">
<a:s>"active"</a:s>
</a:s>
</a:s>
<a:s>
or </a:s>
<a:s r="340">
<a:s r="338">
<a:s r="337">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="338">
<a:s>clinicalStatus</a:s>
</a:s>
</a:s>
<a:s> ~ </a:s>
<a:s r="339">
<a:s>"recurrence"</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
or </a:s>
<a:s r="345">
<a:s r="343">
<a:s r="342">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="343">
<a:s>clinicalStatus</a:s>
</a:s>
</a:s>
<a:s> ~ </a:s>
<a:s r="344">
<a:s>"relapse"</a:s>
</a:s>
</a:s>
</a:s>
<a:s> then
</a:s>
<a:s r="354">
<a:s>Interval[</a:s>
<a:s r="350">
<a:s>start of </a:s>
<a:s r="349">
<a:s>ToInterval(</a:s>
<a:s r="348">
<a:s r="347">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="348">
<a:s>onset</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="353">
<a:s>end of </a:s>
<a:s r="352">
<a:s>ToAbatementInterval(</a:s>
<a:s r="351">
<a:s>condition</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>]</a:s>
</a:s>
<a:s>
else
</a:s>
<a:s r="362">
<a:s>Interval[</a:s>
<a:s r="358">
<a:s>start of </a:s>
<a:s r="357">
<a:s>ToInterval(</a:s>
<a:s r="356">
<a:s r="355">
<a:s>condition</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="356">
<a:s>onset</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="361">
<a:s>end of </a:s>
<a:s r="360">
<a:s>ToAbatementInterval(</a:s>
<a:s r="359">
<a:s>condition</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="363" locator="127:1-132:87" xsi:type="If">
<condition localId="346" locator="127:4-129:41" xsi:type="Or">
<operand localId="341" locator="127:4-128:44" xsi:type="Or">
<operand localId="336" locator="127:4-127:38" xsi:type="Equivalent">
<operand name="ToConcept" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="334" locator="127:4-127:27" path="clinicalStatus" xsi:type="Property">
<source localId="333" locator="127:4-127:12" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
<operand xsi:type="ToConcept">
<operand localId="335" locator="127:31-127:38" name="active" xsi:type="CodeRef"/>
</operand>
</operand>
<operand localId="340" locator="128:6-128:44" xsi:type="Equivalent">
<operand name="ToConcept" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="338" locator="128:6-128:29" path="clinicalStatus" xsi:type="Property">
<source localId="337" locator="128:6-128:14" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
<operand xsi:type="ToConcept">
<operand localId="339" locator="128:33-128:44" name="recurrence" xsi:type="CodeRef"/>
</operand>
</operand>
</operand>
<operand localId="345" locator="129:6-129:41" xsi:type="Equivalent">
<operand name="ToConcept" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="343" locator="129:6-129:29" path="clinicalStatus" xsi:type="Property">
<source localId="342" locator="129:6-129:14" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
<operand xsi:type="ToConcept">
<operand localId="344" locator="129:33-129:41" name="relapse" xsi:type="CodeRef"/>
</operand>
</operand>
</condition>
<then localId="354" locator="130:3-130:87" lowClosed="true" highClosed="true" xsi:type="Interval">
<low localId="350" locator="130:12-130:47" xsi:type="Start">
<operand localId="349" locator="130:21-130:47" name="ToInterval" xsi:type="FunctionRef">
<operand localId="348" locator="130:32-130:46" path="onset" xsi:type="Property">
<source localId="347" locator="130:32-130:40" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
</low>
<high localId="353" locator="130:50-130:86" xsi:type="End">
<operand localId="352" locator="130:57-130:86" name="ToAbatementInterval" xsi:type="FunctionRef">
<operand localId="351" locator="130:77-130:85" name="condition" xsi:type="OperandRef"/>
</operand>
</high>
</then>
<else localId="362" locator="132:3-132:87" lowClosed="true" highClosed="false" xsi:type="Interval">
<low localId="358" locator="132:12-132:47" xsi:type="Start">
<operand localId="357" locator="132:21-132:47" name="ToInterval" xsi:type="FunctionRef">
<operand localId="356" locator="132:32-132:46" path="onset" xsi:type="Property">
<source localId="355" locator="132:32-132:40" name="condition" xsi:type="OperandRef"/>
</operand>
</operand>
</low>
<high localId="361" locator="132:50-132:86" xsi:type="End">
<operand localId="360" locator="132:57-132:86" name="ToAbatementInterval" xsi:type="FunctionRef">
<operand localId="359" locator="132:77-132:85" name="condition" xsi:type="OperandRef"/>
</operand>
</high>
</else>
</expression>
<operand name="condition">
<operandTypeSpecifier localId="332" locator="126:48-126:56" name="fhir:Condition" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="376" locator="140:1-143:10" name="Extensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any extensions defined on the given resource with the specified url."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info."/>
<a:s r="376">
<a:s>/*
@description: Returns any extensions defined on the given resource with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define function Extensions(domainResource </a:s>
<a:s r="365">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="366">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="375">
<a:s r="375">
<a:s>
<a:s r="368">
<a:s r="367">
<a:s>
<a:s>domainResource.extension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="372">
<a:s>where </a:s>
<a:s r="372">
<a:s r="370">
<a:s r="369">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="370">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="371">
<a:s>url</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="374">
<a:s>return </a:s>
<a:s r="373">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="375" locator="141:3-143:10" xsi:type="Query">
<source localId="368" locator="141:3-141:28" alias="E">
<expression localId="367" locator="141:3-141:26" path="extension" xsi:type="Property">
<source name="domainResource" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="372" locator="142:4-142:20" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="370" locator="142:10-142:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="371" locator="142:18-142:20" name="url" xsi:type="OperandRef"/>
</where>
<return localId="374" locator="143:3-143:10">
<expression localId="373" locator="143:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="365" locator="140:43-140:56" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="366" locator="140:63-140:68" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="383" locator="150:1-151:50" name="Extension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single extension (if present) on the given resource with the specified url."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="383">
<a:s>/*
@description: Returns the single extension (if present) on the given resource with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function Extension(domainResource </a:s>
<a:s r="377">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="378">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="382">
<a:s r="382">
<a:s>singleton from </a:s>
<a:s r="381">
<a:s>"Extensions"(</a:s>
<a:s r="379">
<a:s>domainResource</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="380">
<a:s>url</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="382" locator="151:3-151:50" xsi:type="SingletonFrom">
<operand localId="381" locator="151:18-151:50" name="Extensions" xsi:type="FunctionRef">
<operand localId="379" locator="151:31-151:44" name="domainResource" xsi:type="OperandRef"/>
<operand localId="380" locator="151:47-151:49" name="url" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="377" locator="150:42-150:55" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="378" locator="150:62-150:67" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="395" locator="158:1-161:10" name="Extensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any extensions defined on the given element with the specified url."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="395">
<a:s>/*
@description: Returns any extensions defined on the given element with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function Extensions(element </a:s>
<a:s r="384">
<a:s>Element</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="385">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="394">
<a:s r="394">
<a:s>
<a:s r="387">
<a:s r="386">
<a:s>
<a:s>element.extension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="391">
<a:s>where </a:s>
<a:s r="391">
<a:s r="389">
<a:s r="388">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="389">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="390">
<a:s>url</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="393">
<a:s>return </a:s>
<a:s r="392">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="394" locator="159:3-161:10" xsi:type="Query">
<source localId="387" locator="159:3-159:21" alias="E">
<expression localId="386" locator="159:3-159:19" path="extension" xsi:type="Property">
<source name="element" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="391" locator="160:4-160:20" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="389" locator="160:10-160:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="390" locator="160:18-160:20" name="url" xsi:type="OperandRef"/>
</where>
<return localId="393" locator="161:3-161:10">
<expression localId="392" locator="161:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="element">
<operandTypeSpecifier localId="384" locator="158:36-158:42" name="fhir:Element" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="385" locator="158:49-158:54" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="402" locator="168:1-169:41" name="Extension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single extension (if present) on the given element with the specified url."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="402">
<a:s>/*
@description: Returns the single extension (if present) on the given element with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function Extension(element </a:s>
<a:s r="396">
<a:s>Element</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="397">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="401">
<a:s r="401">
<a:s>singleton from </a:s>
<a:s r="400">
<a:s>Extensions(</a:s>
<a:s r="398">
<a:s>element</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="399">
<a:s>url</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="401" locator="169:3-169:41" xsi:type="SingletonFrom">
<operand localId="400" locator="169:18-169:41" name="Extensions" xsi:type="FunctionRef">
<operand localId="398" locator="169:29-169:35" name="element" xsi:type="OperandRef"/>
<operand localId="399" locator="169:38-169:40" name="url" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="element">
<operandTypeSpecifier localId="396" locator="168:35-168:41" name="fhir:Element" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="397" locator="168:48-168:53" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="414" locator="177:1-180:10" name="ModifierExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any modifier extensions defined on the given resource with the specified url."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info."/>
<a:s r="414">
<a:s>/*
@description: Returns any modifier extensions defined on the given resource with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define function ModifierExtensions(domainResource </a:s>
<a:s r="403">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="404">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="413">
<a:s r="413">
<a:s>
<a:s r="406">
<a:s r="405">
<a:s>
<a:s>domainResource.modifierExtension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="410">
<a:s>where </a:s>
<a:s r="410">
<a:s r="408">
<a:s r="407">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="408">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="409">
<a:s>url</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="412">
<a:s>return </a:s>
<a:s r="411">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="413" locator="178:3-180:10" xsi:type="Query">
<source localId="406" locator="178:3-178:36" alias="E">
<expression localId="405" locator="178:3-178:34" path="modifierExtension" xsi:type="Property">
<source name="domainResource" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="410" locator="179:4-179:20" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="408" locator="179:10-179:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="409" locator="179:18-179:20" name="url" xsi:type="OperandRef"/>
</where>
<return localId="412" locator="180:3-180:10">
<expression localId="411" locator="180:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="403" locator="177:51-177:64" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="404" locator="177:71-177:76" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="421" locator="187:1-188:56" name="ModifierExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single modifier extension (if present) on the given resource with the specified url."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="421">
<a:s>/*
@description: Returns the single modifier extension (if present) on the given resource with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function ModifierExtension(domainResource </a:s>
<a:s r="415">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="416">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="420">
<a:s r="420">
<a:s>singleton from </a:s>
<a:s r="419">
<a:s>ModifierExtensions(</a:s>
<a:s r="417">
<a:s>domainResource</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="418">
<a:s>url</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="420" locator="188:3-188:56" xsi:type="SingletonFrom">
<operand localId="419" locator="188:18-188:56" name="ModifierExtensions" xsi:type="FunctionRef">
<operand localId="417" locator="188:37-188:50" name="domainResource" xsi:type="OperandRef"/>
<operand localId="418" locator="188:53-188:55" name="url" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="415" locator="187:50-187:63" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="416" locator="187:70-187:75" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="433" locator="195:1-198:10" name="ModifierExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any modifier extensions defined on the given element with the specified url."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="433">
<a:s>/*
@description: Returns any modifier extensions defined on the given element with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function ModifierExtensions(element </a:s>
<a:s r="422">
<a:s>BackboneElement</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="423">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="432">
<a:s r="432">
<a:s>
<a:s r="425">
<a:s r="424">
<a:s>
<a:s>element.modifierExtension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="429">
<a:s>where </a:s>
<a:s r="429">
<a:s r="427">
<a:s r="426">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="427">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="428">
<a:s>url</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="431">
<a:s>return </a:s>
<a:s r="430">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="432" locator="196:3-198:10" xsi:type="Query">
<source localId="425" locator="196:3-196:29" alias="E">
<expression localId="424" locator="196:3-196:27" path="modifierExtension" xsi:type="Property">
<source name="element" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="429" locator="197:4-197:20" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="427" locator="197:10-197:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="428" locator="197:18-197:20" name="url" xsi:type="OperandRef"/>
</where>
<return localId="431" locator="198:3-198:10">
<expression localId="430" locator="198:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="element">
<operandTypeSpecifier localId="422" locator="195:44-195:58" name="fhir:BackboneElement" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="423" locator="195:65-195:70" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="440" locator="205:1-206:49" name="ModifierExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single modifier extension (if present) on the given element with the specified url."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="440">
<a:s>/*
@description: Returns the single modifier extension (if present) on the given element with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function ModifierExtension(element </a:s>
<a:s r="434">
<a:s>BackboneElement</a:s>
</a:s>
<a:s>, url </a:s>
<a:s r="435">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="439">
<a:s r="439">
<a:s>singleton from </a:s>
<a:s r="438">
<a:s>ModifierExtensions(</a:s>
<a:s r="436">
<a:s>element</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="437">
<a:s>url</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="439" locator="206:3-206:49" xsi:type="SingletonFrom">
<operand localId="438" locator="206:18-206:49" name="ModifierExtensions" xsi:type="FunctionRef">
<operand localId="436" locator="206:37-206:43" name="element" xsi:type="OperandRef"/>
<operand localId="437" locator="206:46-206:48" name="url" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="element">
<operandTypeSpecifier localId="434" locator="205:43-205:57" name="fhir:BackboneElement" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="url">
<operandTypeSpecifier localId="435" locator="205:64-205:69" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="454" locator="213:1-216:10" name="BaseExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any base-FHIR extensions defined on the given resource with the specified id."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="454">
<a:s>/*
@description: Returns any base-FHIR extensions defined on the given resource with the specified id.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function BaseExtensions(domainResource </a:s>
<a:s r="441">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="442">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="453">
<a:s r="453">
<a:s>
<a:s r="444">
<a:s r="443">
<a:s>
<a:s>domainResource.extension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="450">
<a:s>where </a:s>
<a:s r="450">
<a:s r="446">
<a:s r="445">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="446">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="449">
<a:s>(</a:s>
<a:s r="449">
<a:s r="447">
<a:s>'http://hl7.org/fhir/StructureDefinition/'</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="448">
<a:s>id</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="452">
<a:s>return </a:s>
<a:s r="451">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="453" locator="214:3-216:10" xsi:type="Query">
<source localId="444" locator="214:3-214:28" alias="E">
<expression localId="443" locator="214:3-214:26" path="extension" xsi:type="Property">
<source name="domainResource" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="450" locator="215:4-215:66" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="446" locator="215:10-215:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="449" locator="215:18-215:66" xsi:type="Concatenate">
<operand localId="447" locator="215:19-215:60" valueType="t:String" value="http://hl7.org/fhir/StructureDefinition/" xsi:type="Literal"/>
<operand localId="448" locator="215:64-215:65" name="id" xsi:type="OperandRef"/>
</operand>
</where>
<return localId="452" locator="216:3-216:10">
<expression localId="451" locator="216:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="441" locator="213:47-213:60" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="442" locator="213:66-213:71" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="461" locator="223:1-224:51" name="BaseExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single base-FHIR extension (if present) on the given resource with the specified id."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="461">
<a:s>/*
@description: Returns the single base-FHIR extension (if present) on the given resource with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function BaseExtension(domainResource </a:s>
<a:s r="455">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="456">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="460">
<a:s r="460">
<a:s>singleton from </a:s>
<a:s r="459">
<a:s>BaseExtensions(</a:s>
<a:s r="457">
<a:s>domainResource</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="458">
<a:s>id</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="460" locator="224:3-224:51" xsi:type="SingletonFrom">
<operand localId="459" locator="224:18-224:51" name="BaseExtensions" xsi:type="FunctionRef">
<operand localId="457" locator="224:33-224:46" name="domainResource" xsi:type="OperandRef"/>
<operand localId="458" locator="224:49-224:50" name="id" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="455" locator="223:46-223:59" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="456" locator="223:65-223:70" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="475" locator="231:1-234:10" name="BaseExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any base-FHIR extensions defined on the given element with the specified id."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="475">
<a:s>/*
@description: Returns any base-FHIR extensions defined on the given element with the specified id.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function BaseExtensions(element </a:s>
<a:s r="462">
<a:s>Element</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="463">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="474">
<a:s r="474">
<a:s>
<a:s r="465">
<a:s r="464">
<a:s>
<a:s>element.extension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="471">
<a:s>where </a:s>
<a:s r="471">
<a:s r="467">
<a:s r="466">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="467">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="470">
<a:s>(</a:s>
<a:s r="470">
<a:s r="468">
<a:s>'http://hl7.org/fhir/StructureDefinition/'</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="469">
<a:s>id</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="473">
<a:s>return </a:s>
<a:s r="472">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="474" locator="232:3-234:10" xsi:type="Query">
<source localId="465" locator="232:3-232:21" alias="E">
<expression localId="464" locator="232:3-232:19" path="extension" xsi:type="Property">
<source name="element" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="471" locator="233:4-233:66" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="467" locator="233:10-233:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="470" locator="233:18-233:66" xsi:type="Concatenate">
<operand localId="468" locator="233:19-233:60" valueType="t:String" value="http://hl7.org/fhir/StructureDefinition/" xsi:type="Literal"/>
<operand localId="469" locator="233:64-233:65" name="id" xsi:type="OperandRef"/>
</operand>
</where>
<return localId="473" locator="234:3-234:10">
<expression localId="472" locator="234:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="element">
<operandTypeSpecifier localId="462" locator="231:40-231:46" name="fhir:Element" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="463" locator="231:52-231:57" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="482" locator="241:1-242:44" name="BaseExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single base-FHIR extension (if present) on the given element with the specified id."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="482">
<a:s>/*
@description: Returns the single base-FHIR extension (if present) on the given element with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function BaseExtension(element </a:s>
<a:s r="476">
<a:s>Element</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="477">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="481">
<a:s r="481">
<a:s>singleton from </a:s>
<a:s r="480">
<a:s>BaseExtensions(</a:s>
<a:s r="478">
<a:s>element</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="479">
<a:s>id</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="481" locator="242:3-242:44" xsi:type="SingletonFrom">
<operand localId="480" locator="242:18-242:44" name="BaseExtensions" xsi:type="FunctionRef">
<operand localId="478" locator="242:33-242:39" name="element" xsi:type="OperandRef"/>
<operand localId="479" locator="242:42-242:43" name="id" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="element">
<operandTypeSpecifier localId="476" locator="241:39-241:45" name="fhir:Element" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="477" locator="241:51-241:56" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="496" locator="249:1-252:10" name="BaseModifierExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any base-FHIR modifier extensions defined on the given resource with the specified id."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="496">
<a:s>/*
@description: Returns any base-FHIR modifier extensions defined on the given resource with the specified id.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function BaseModifierExtensions(domainResource </a:s>
<a:s r="483">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="484">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="495">
<a:s r="495">
<a:s>
<a:s r="486">
<a:s r="485">
<a:s>
<a:s>domainResource.modifierExtension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="492">
<a:s>where </a:s>
<a:s r="492">
<a:s r="488">
<a:s r="487">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="488">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="491">
<a:s>(</a:s>
<a:s r="491">
<a:s r="489">
<a:s>'http://hl7.org/fhir/StructureDefinition/'</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="490">
<a:s>id</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="494">
<a:s>return </a:s>
<a:s r="493">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="495" locator="250:3-252:10" xsi:type="Query">
<source localId="486" locator="250:3-250:36" alias="E">
<expression localId="485" locator="250:3-250:34" path="modifierExtension" xsi:type="Property">
<source name="domainResource" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="492" locator="251:4-251:66" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="488" locator="251:10-251:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="491" locator="251:18-251:66" xsi:type="Concatenate">
<operand localId="489" locator="251:19-251:60" valueType="t:String" value="http://hl7.org/fhir/StructureDefinition/" xsi:type="Literal"/>
<operand localId="490" locator="251:64-251:65" name="id" xsi:type="OperandRef"/>
</operand>
</where>
<return localId="494" locator="252:3-252:10">
<expression localId="493" locator="252:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="483" locator="249:55-249:68" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="484" locator="249:74-249:79" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="503" locator="259:1-260:59" name="BaseModifierExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single base-FHIR modifier extension (if present) on the given resource with the specified id."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="503">
<a:s>/*
@description: Returns the single base-FHIR modifier extension (if present) on the given resource with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function BaseModifierExtension(domainResource </a:s>
<a:s r="497">
<a:s>DomainResource</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="498">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="502">
<a:s r="502">
<a:s>singleton from </a:s>
<a:s r="501">
<a:s>BaseModifierExtensions(</a:s>
<a:s r="499">
<a:s>domainResource</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="500">
<a:s>id</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="502" locator="260:3-260:59" xsi:type="SingletonFrom">
<operand localId="501" locator="260:18-260:59" name="BaseModifierExtensions" xsi:type="FunctionRef">
<operand localId="499" locator="260:41-260:54" name="domainResource" xsi:type="OperandRef"/>
<operand localId="500" locator="260:57-260:58" name="id" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="domainResource">
<operandTypeSpecifier localId="497" locator="259:54-259:67" name="fhir:DomainResource" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="498" locator="259:73-259:78" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="517" locator="267:1-270:10" name="BaseModifierExtensions" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns any base-FHIR modifier extensions defined on the given element with the specified id."/>
<a:t name="comment" value="NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info."/>
<a:s r="517">
<a:s>/*
@description: Returns any base-FHIR modifier extensions defined on the given element with the specified id.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the CQL model info.
*/
define function BaseModifierExtensions(element </a:s>
<a:s r="504">
<a:s>BackboneElement</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="505">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="516">
<a:s r="516">
<a:s>
<a:s r="507">
<a:s r="506">
<a:s>
<a:s>element.modifierExtension</a:s>
</a:s>
</a:s>
<a:s> E</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="513">
<a:s>where </a:s>
<a:s r="513">
<a:s r="509">
<a:s r="508">
<a:s>E</a:s>
</a:s>
<a:s>.</a:s>
<a:s r="509">
<a:s>url</a:s>
</a:s>
</a:s>
<a:s> = </a:s>
<a:s r="512">
<a:s>(</a:s>
<a:s r="512">
<a:s r="510">
<a:s>'http://hl7.org/fhir/StructureDefinition/'</a:s>
</a:s>
<a:s> + </a:s>
<a:s r="511">
<a:s>id</a:s>
</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
<a:s>
</a:s>
<a:s r="515">
<a:s>return </a:s>
<a:s r="514">
<a:s>E</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="516" locator="268:3-270:10" xsi:type="Query">
<source localId="507" locator="268:3-268:29" alias="E">
<expression localId="506" locator="268:3-268:27" path="modifierExtension" xsi:type="Property">
<source name="element" xsi:type="OperandRef"/>
</expression>
</source>
<where localId="513" locator="269:4-269:66" xsi:type="Equal">
<operand name="ToString" libraryName="FHIRHelpers" xsi:type="FunctionRef">
<operand localId="509" locator="269:10-269:14" path="url" scope="E" xsi:type="Property"/>
</operand>
<operand localId="512" locator="269:18-269:66" xsi:type="Concatenate">
<operand localId="510" locator="269:19-269:60" valueType="t:String" value="http://hl7.org/fhir/StructureDefinition/" xsi:type="Literal"/>
<operand localId="511" locator="269:64-269:65" name="id" xsi:type="OperandRef"/>
</operand>
</where>
<return localId="515" locator="270:3-270:10">
<expression localId="514" locator="270:10" name="E" xsi:type="AliasRef"/>
</return>
</expression>
<operand name="element">
<operandTypeSpecifier localId="504" locator="267:48-267:62" name="fhir:BackboneElement" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="505" locator="267:68-267:73" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
<def localId="524" locator="277:1-278:52" name="BaseModifierExtension" context="Patient" accessLevel="Public" xsi:type="FunctionDef">
<annotation xsi:type="a:Annotation">
<a:t name="description" value="Returns the single base-FHIR extension (if present) on the given element with the specified id."/>
<a:t name="comment" value="This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url."/>
<a:s r="524">
<a:s>/*
@description: Returns the single base-FHIR extension (if present) on the given element with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function BaseModifierExtension(element </a:s>
<a:s r="518">
<a:s>BackboneElement</a:s>
</a:s>
<a:s>, id </a:s>
<a:s r="519">
<a:s>String</a:s>
</a:s>
<a:s>):
</a:s>
<a:s r="523">
<a:s r="523">
<a:s>singleton from </a:s>
<a:s r="522">
<a:s>BaseModifierExtensions(</a:s>
<a:s r="520">
<a:s>element</a:s>
</a:s>
<a:s>, </a:s>
<a:s r="521">
<a:s>id</a:s>
</a:s>
<a:s>)</a:s>
</a:s>
</a:s>
</a:s>
</a:s>
</annotation>
<expression localId="523" locator="278:3-278:52" xsi:type="SingletonFrom">
<operand localId="522" locator="278:18-278:52" name="BaseModifierExtensions" xsi:type="FunctionRef">
<operand localId="520" locator="278:41-278:47" name="element" xsi:type="OperandRef"/>
<operand localId="521" locator="278:50-278:51" name="id" xsi:type="OperandRef"/>
</operand>
</expression>
<operand name="element">
<operandTypeSpecifier localId="518" locator="277:47-277:61" name="fhir:BackboneElement" xsi:type="NamedTypeSpecifier"/>
</operand>
<operand name="id">
<operandTypeSpecifier localId="519" locator="277:67-277:72" name="t:String" xsi:type="NamedTypeSpecifier"/>
</operand>
</def>
</statements>
</library>
application/elm+json
{
"library" : {
"annotation" : [ {
"translatorVersion" : "2.9.0-SNAPSHOT",
"translatorOptions" : "EnableAnnotations,EnableLocators,DisableListDemotion,DisableListPromotion",
"type" : "CqlToElmInfo"
}, {
"type" : "Annotation",
"s" : {
"r" : "524",
"s" : [ {
"value" : [ "","library FHIRCommon version '4.1.000'" ]
} ]
}
} ],
"identifier" : {
"id" : "FHIRCommon",
"system" : "http://ecqi.healthit.gov/ecqms",
"version" : "4.1.000"
},
"schemaIdentifier" : {
"id" : "urn:hl7-org:elm",
"version" : "r1"
},
"usings" : {
"def" : [ {
"localIdentifier" : "System",
"uri" : "urn:hl7-org:elm-types:r1"
}, {
"localId" : "1",
"locator" : "3:1-3:26",
"localIdentifier" : "FHIR",
"uri" : "http://hl7.org/fhir",
"version" : "4.0.1",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "1",
"s" : [ {
"value" : [ "","using " ]
}, {
"s" : [ {
"value" : [ "FHIR" ]
} ]
}, {
"value" : [ " version ","'4.0.1'" ]
} ]
}
} ]
} ]
},
"includes" : {
"def" : [ {
"localId" : "2",
"locator" : "5:1-5:37",
"localIdentifier" : "FHIRHelpers",
"path" : "http://ecqi.healthit.gov/ecqms/FHIRHelpers",
"version" : "4.1.000",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "2",
"s" : [ {
"value" : [ "","include " ]
}, {
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ " version ","'4.1.000'" ]
} ]
}
} ]
} ]
},
"codeSystems" : {
"def" : [ {
"localId" : "3",
"locator" : "8:1-8:38",
"name" : "LOINC",
"id" : "http://loinc.org",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "3",
"s" : [ {
"value" : [ "","codesystem ","\"LOINC\"",": ","'http://loinc.org'" ]
} ]
}
} ]
}, {
"localId" : "4",
"locator" : "9:1-9:47",
"name" : "SNOMEDCT",
"id" : "http://snomed.info/sct",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "4",
"s" : [ {
"value" : [ "","codesystem ","\"SNOMEDCT\"",": ","'http://snomed.info/sct'" ]
} ]
}
} ]
}, {
"localId" : "5",
"locator" : "10:1-10:74",
"name" : "RoleCode",
"id" : "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "5",
"s" : [ {
"value" : [ "","codesystem ","\"RoleCode\"",": ","'http://terminology.hl7.org/CodeSystem/v3-RoleCode'" ]
} ]
}
} ]
}, {
"localId" : "6",
"locator" : "11:1-11:83",
"name" : "Diagnosis Role",
"id" : "http://terminology.hl7.org/CodeSystem/diagnosis-role",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "6",
"s" : [ {
"value" : [ "","codesystem ","\"Diagnosis Role\"",": ","'http://terminology.hl7.org/CodeSystem/diagnosis-role'" ]
} ]
}
} ]
}, {
"localId" : "7",
"locator" : "12:1-12:82",
"name" : "RequestIntent",
"id" : "http://terminology.hl7.org/CodeSystem/request-intent",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "7",
"s" : [ {
"value" : [ "","codesystem ","\"RequestIntent\"",": ","'http://terminology.hl7.org/CodeSystem/request-intent'" ]
} ]
}
} ]
}, {
"localId" : "8",
"locator" : "13:1-13:106",
"name" : "MedicationRequestCategory",
"id" : "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "8",
"s" : [ {
"value" : [ "","codesystem ","\"MedicationRequestCategory\"",": ","'http://terminology.hl7.org/CodeSystem/medicationrequest-category'" ]
} ]
}
} ]
}, {
"localId" : "9",
"locator" : "14:1-14:101",
"name" : "ConditionClinicalStatusCodes",
"id" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "9",
"s" : [ {
"value" : [ "","codesystem ","\"ConditionClinicalStatusCodes\"",": ","'http://terminology.hl7.org/CodeSystem/condition-clinical'" ]
} ]
}
} ]
}, {
"localId" : "10",
"locator" : "15:1-15:107",
"name" : "ConditionVerificationStatusCodes",
"id" : "http://terminology.hl7.org/CodeSystem/condition-ver-status",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "10",
"s" : [ {
"value" : [ "","codesystem ","\"ConditionVerificationStatusCodes\"",": ","'http://terminology.hl7.org/CodeSystem/condition-ver-status'" ]
} ]
}
} ]
}, {
"localId" : "11",
"locator" : "16:1-16:119",
"name" : "AllergyIntoleranceClinicalStatusCodes",
"id" : "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "11",
"s" : [ {
"value" : [ "","codesystem ","\"AllergyIntoleranceClinicalStatusCodes\"",": ","'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical'" ]
} ]
}
} ]
}, {
"localId" : "12",
"locator" : "17:1-17:127",
"name" : "AllergyIntoleranceVerificationStatusCodes",
"id" : "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "12",
"s" : [ {
"value" : [ "","codesystem ","\"AllergyIntoleranceVerificationStatusCodes\"",": ","'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification'" ]
} ]
}
} ]
} ]
},
"codes" : {
"def" : [ {
"localId" : "14",
"locator" : "23:1-23:61",
"name" : "Birthdate",
"id" : "21112-8",
"display" : "Birth date",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "14",
"s" : [ {
"value" : [ "//Currently unresolveable in VSAC:\n//valueset \"Active Condition\": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition'\n//valueset \"Inactive Condition\": 'http://fhir.org/guides/cqf/common/ValueSet/inactive-condition'\n","code ","\"Birthdate\"",": ","'21112-8'"," from " ]
}, {
"r" : "13",
"s" : [ {
"value" : [ "\"LOINC\"" ]
} ]
}, {
"value" : [ " display ","'Birth date'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "13",
"locator" : "23:34-23:40",
"name" : "LOINC"
}
}, {
"localId" : "16",
"locator" : "24:1-24:55",
"name" : "Dead",
"id" : "419099009",
"display" : "Dead",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "16",
"s" : [ {
"value" : [ "","code ","\"Dead\"",": ","'419099009'"," from " ]
}, {
"r" : "15",
"s" : [ {
"value" : [ "\"SNOMEDCT\"" ]
} ]
}, {
"value" : [ " display ","'Dead'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "15",
"locator" : "24:31-24:40",
"name" : "SNOMEDCT"
}
}, {
"localId" : "18",
"locator" : "25:1-25:56",
"name" : "ER",
"id" : "ER",
"display" : "Emergency room",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "18",
"s" : [ {
"value" : [ "","code ","\"ER\"",": ","'ER'"," from " ]
}, {
"r" : "17",
"s" : [ {
"value" : [ "\"RoleCode\"" ]
} ]
}, {
"value" : [ " display ","'Emergency room'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "17",
"locator" : "25:22-25:31",
"name" : "RoleCode"
}
}, {
"localId" : "20",
"locator" : "26:1-26:63",
"name" : "ICU",
"id" : "ICU",
"display" : "Intensive care unit",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "20",
"s" : [ {
"value" : [ "","code ","\"ICU\"",": ","'ICU'"," from " ]
}, {
"r" : "19",
"s" : [ {
"value" : [ "\"RoleCode\"" ]
} ]
}, {
"value" : [ " display ","'Intensive care unit'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "19",
"locator" : "26:24-26:33",
"name" : "RoleCode"
}
}, {
"localId" : "22",
"locator" : "27:1-27:65",
"name" : "Billing",
"id" : "billing",
"display" : "Billing",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "22",
"s" : [ {
"value" : [ "","code ","\"Billing\"",": ","'billing'"," from " ]
}, {
"r" : "21",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'Billing'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "21",
"locator" : "27:32-27:47",
"name" : "Diagnosis Role"
}
}, {
"localId" : "24",
"locator" : "30:1-30:59",
"name" : "active",
"id" : "active",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "24",
"s" : [ {
"value" : [ "// Condition Clinical Status Codes - Consider value sets for these\n","code ","\"active\"",": ","'active'"," from " ]
}, {
"r" : "23",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "23",
"locator" : "30:30-30:59",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "26",
"locator" : "31:1-31:67",
"name" : "recurrence",
"id" : "recurrence",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "26",
"s" : [ {
"value" : [ "","code ","\"recurrence\"",": ","'recurrence'"," from " ]
}, {
"r" : "25",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "25",
"locator" : "31:38-31:67",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "28",
"locator" : "32:1-32:61",
"name" : "relapse",
"id" : "relapse",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "28",
"s" : [ {
"value" : [ "","code ","\"relapse\"",": ","'relapse'"," from " ]
}, {
"r" : "27",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "27",
"locator" : "32:32-32:61",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "30",
"locator" : "33:1-33:63",
"name" : "inactive",
"id" : "inactive",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "30",
"s" : [ {
"value" : [ "","code ","\"inactive\"",": ","'inactive'"," from " ]
}, {
"r" : "29",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "29",
"locator" : "33:34-33:63",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "32",
"locator" : "34:1-34:65",
"name" : "remission",
"id" : "remission",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "32",
"s" : [ {
"value" : [ "","code ","\"remission\"",": ","'remission'"," from " ]
}, {
"r" : "31",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "31",
"locator" : "34:36-34:65",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "34",
"locator" : "35:1-35:63",
"name" : "resolved",
"id" : "resolved",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "34",
"s" : [ {
"value" : [ "","code ","\"resolved\"",": ","'resolved'"," from " ]
}, {
"r" : "33",
"s" : [ {
"value" : [ "\"ConditionClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "33",
"locator" : "35:34-35:63",
"name" : "ConditionClinicalStatusCodes"
}
}, {
"localId" : "36",
"locator" : "38:1-38:71",
"name" : "unconfirmed",
"id" : "unconfirmed",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "36",
"s" : [ {
"value" : [ "// Condition Verification Status Codes - Consider value sets for these\n","code ","\"unconfirmed\"",": ","'unconfirmed'"," from " ]
}, {
"r" : "35",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "35",
"locator" : "38:40-38:71",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "38",
"locator" : "39:1-39:71",
"name" : "provisional",
"id" : "provisional",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "38",
"s" : [ {
"value" : [ "","code ","\"provisional\"",": ","'provisional'"," from " ]
}, {
"r" : "37",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "37",
"locator" : "39:40-39:71",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "40",
"locator" : "40:1-40:73",
"name" : "differential",
"id" : "differential",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "40",
"s" : [ {
"value" : [ "","code ","\"differential\"",": ","'differential'"," from " ]
}, {
"r" : "39",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "39",
"locator" : "40:42-40:73",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "42",
"locator" : "41:1-41:67",
"name" : "confirmed",
"id" : "confirmed",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "42",
"s" : [ {
"value" : [ "","code ","\"confirmed\"",": ","'confirmed'"," from " ]
}, {
"r" : "41",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "41",
"locator" : "41:36-41:67",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "44",
"locator" : "42:1-42:63",
"name" : "refuted",
"id" : "refuted",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "44",
"s" : [ {
"value" : [ "","code ","\"refuted\"",": ","'refuted'"," from " ]
}, {
"r" : "43",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "43",
"locator" : "42:32-42:63",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "46",
"locator" : "43:1-43:81",
"name" : "entered-in-error",
"id" : "entered-in-error",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "46",
"s" : [ {
"value" : [ "","code ","\"entered-in-error\"",": ","'entered-in-error'"," from " ]
}, {
"r" : "45",
"s" : [ {
"value" : [ "ConditionVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "45",
"locator" : "43:50-43:81",
"name" : "ConditionVerificationStatusCodes"
}
}, {
"localId" : "48",
"locator" : "45:1-45:76",
"name" : "allergy-active",
"id" : "active",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "48",
"s" : [ {
"value" : [ "","code ","\"allergy-active\"",": ","'active'"," from " ]
}, {
"r" : "47",
"s" : [ {
"value" : [ "\"AllergyIntoleranceClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "47",
"locator" : "45:38-45:76",
"name" : "AllergyIntoleranceClinicalStatusCodes"
}
}, {
"localId" : "50",
"locator" : "46:1-46:80",
"name" : "allergy-inactive",
"id" : "inactive",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "50",
"s" : [ {
"value" : [ "","code ","\"allergy-inactive\"",": ","'inactive'"," from " ]
}, {
"r" : "49",
"s" : [ {
"value" : [ "\"AllergyIntoleranceClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "49",
"locator" : "46:42-46:80",
"name" : "AllergyIntoleranceClinicalStatusCodes"
}
}, {
"localId" : "52",
"locator" : "47:1-47:80",
"name" : "allergy-resolved",
"id" : "resolved",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "52",
"s" : [ {
"value" : [ "","code ","\"allergy-resolved\"",": ","'resolved'"," from " ]
}, {
"r" : "51",
"s" : [ {
"value" : [ "\"AllergyIntoleranceClinicalStatusCodes\"" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "51",
"locator" : "47:42-47:80",
"name" : "AllergyIntoleranceClinicalStatusCodes"
}
}, {
"localId" : "54",
"locator" : "50:1-50:88",
"name" : "allergy-unconfirmed",
"id" : "unconfirmed",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "54",
"s" : [ {
"value" : [ "// Allergy/Intolerance Verification Status Codes - Consider value sets for these\n","code ","\"allergy-unconfirmed\"",": ","'unconfirmed'"," from " ]
}, {
"r" : "53",
"s" : [ {
"value" : [ "AllergyIntoleranceVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "53",
"locator" : "50:48-50:88",
"name" : "AllergyIntoleranceVerificationStatusCodes"
}
}, {
"localId" : "56",
"locator" : "51:1-51:84",
"name" : "allergy-confirmed",
"id" : "confirmed",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "56",
"s" : [ {
"value" : [ "","code ","\"allergy-confirmed\"",": ","'confirmed'"," from " ]
}, {
"r" : "55",
"s" : [ {
"value" : [ "AllergyIntoleranceVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "55",
"locator" : "51:44-51:84",
"name" : "AllergyIntoleranceVerificationStatusCodes"
}
}, {
"localId" : "58",
"locator" : "52:1-52:80",
"name" : "allergy-refuted",
"id" : "refuted",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "58",
"s" : [ {
"value" : [ "","code ","\"allergy-refuted\"",": ","'refuted'"," from " ]
}, {
"r" : "57",
"s" : [ {
"value" : [ "AllergyIntoleranceVerificationStatusCodes" ]
} ]
} ]
}
} ],
"codeSystem" : {
"localId" : "57",
"locator" : "52:40-52:80",
"name" : "AllergyIntoleranceVerificationStatusCodes"
}
}, {
"localId" : "60",
"locator" : "55:1-55:82",
"name" : "Community",
"id" : "community",
"display" : "Community",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "60",
"s" : [ {
"value" : [ "// MedicationRequest Category Codes\n","code ","\"Community\"",": ","'community'"," from " ]
}, {
"r" : "59",
"s" : [ {
"value" : [ "\"MedicationRequestCategory\"" ]
} ]
}, {
"value" : [ " display ","'Community'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "59",
"locator" : "55:36-55:62",
"name" : "MedicationRequestCategory"
}
}, {
"localId" : "62",
"locator" : "56:1-56:82",
"name" : "Discharge",
"id" : "discharge",
"display" : "Discharge",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "62",
"s" : [ {
"value" : [ "","code ","\"Discharge\"",": ","'discharge'"," from " ]
}, {
"r" : "61",
"s" : [ {
"value" : [ "\"MedicationRequestCategory\"" ]
} ]
}, {
"value" : [ " display ","'Discharge'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "61",
"locator" : "56:36-56:62",
"name" : "MedicationRequestCategory"
}
}, {
"localId" : "64",
"locator" : "59:1-59:67",
"name" : "AD",
"id" : "AD",
"display" : "Admission diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "64",
"s" : [ {
"value" : [ "// Diagnosis Role Codes\n","code ","\"AD\"",": ","'AD'"," from " ]
}, {
"r" : "63",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'Admission diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "63",
"locator" : "59:22-59:37",
"name" : "Diagnosis Role"
}
}, {
"localId" : "66",
"locator" : "60:1-60:67",
"name" : "DD",
"id" : "DD",
"display" : "Discharge diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "66",
"s" : [ {
"value" : [ "","code ","\"DD\"",": ","'DD'"," from " ]
}, {
"r" : "65",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'Discharge diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "65",
"locator" : "60:22-60:37",
"name" : "Diagnosis Role"
}
}, {
"localId" : "68",
"locator" : "61:1-61:63",
"name" : "CC",
"id" : "CC",
"display" : "Chief complaint",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "68",
"s" : [ {
"value" : [ "","code ","\"CC\"",": ","'CC'"," from " ]
}, {
"r" : "67",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'Chief complaint'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "67",
"locator" : "61:22-61:37",
"name" : "Diagnosis Role"
}
}, {
"localId" : "70",
"locator" : "62:1-62:69",
"name" : "CM",
"id" : "CM",
"display" : "Comorbidity diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "70",
"s" : [ {
"value" : [ "","code ","\"CM\"",": ","'CM'"," from " ]
}, {
"r" : "69",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'Comorbidity diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "69",
"locator" : "62:22-62:37",
"name" : "Diagnosis Role"
}
}, {
"localId" : "72",
"locator" : "63:1-63:72",
"name" : "pre-op",
"id" : "pre-op",
"display" : "pre-op diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "72",
"s" : [ {
"value" : [ "","code ","\"pre-op\"",": ","'pre-op'"," from " ]
}, {
"r" : "71",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'pre-op diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "71",
"locator" : "63:30-63:45",
"name" : "Diagnosis Role"
}
}, {
"localId" : "74",
"locator" : "64:1-64:75",
"name" : "post-op",
"id" : "post-op",
"display" : "post-op diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "74",
"s" : [ {
"value" : [ "","code ","\"post-op\"",": ","'post-op'"," from " ]
}, {
"r" : "73",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'post-op diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "73",
"locator" : "64:32-64:47",
"name" : "Diagnosis Role"
}
}, {
"localId" : "76",
"locator" : "65:1-65:75",
"name" : "billing",
"id" : "billing",
"display" : "billing diagnosis",
"accessLevel" : "Public",
"annotation" : [ {
"type" : "Annotation",
"s" : {
"r" : "76",
"s" : [ {
"value" : [ "","code ","\"billing\"",": ","'billing'"," from " ]
}, {
"r" : "75",
"s" : [ {
"value" : [ "\"Diagnosis Role\"" ]
} ]
}, {
"value" : [ " display ","'billing diagnosis'" ]
} ]
}
} ],
"codeSystem" : {
"localId" : "75",
"locator" : "65:32-65:47",
"name" : "Diagnosis Role"
}
} ]
},
"contexts" : {
"def" : [ {
"locator" : "67:1-67:15",
"name" : "Patient"
} ]
},
"statements" : {
"def" : [ {
"locator" : "67:1-67:15",
"name" : "Patient",
"context" : "Patient",
"expression" : {
"type" : "SingletonFrom",
"operand" : {
"locator" : "67:1-67:15",
"dataType" : "{http://hl7.org/fhir}Patient",
"templateId" : "http://hl7.org/fhir/StructureDefinition/Patient",
"type" : "Retrieve"
}
}
}, {
"localId" : "211",
"locator" : "77:1-97:4",
"name" : "ToInterval",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Normalizes a value that is a choice of timing-valued types to an equivalent interval"
}, {
"name" : "comment",
"value" : "Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in FHIR, allowing this function to be used across any resource. NOTE: Due to the\ncomplexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used\nwith a Timing or String."
} ],
"s" : {
"r" : "211",
"s" : [ {
"value" : [ "/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in FHIR, allowing this function to be used across any resource. NOTE: Due to the\ncomplexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used\nwith a Timing or String.\n*/\n","define function ","ToInterval","(","choice"," " ]
}, {
"r" : "84",
"s" : [ {
"value" : [ "Choice<" ]
}, {
"r" : "77",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "78",
"s" : [ {
"value" : [ "FHIR",".","Period" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "79",
"s" : [ {
"value" : [ "FHIR",".","Timing" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "80",
"s" : [ {
"value" : [ "FHIR",".","instant" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "81",
"s" : [ {
"value" : [ "FHIR",".","string" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "82",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "83",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
}, {
"value" : [ ">" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "210",
"s" : [ {
"r" : "210",
"s" : [ {
"value" : [ "case\n\t " ]
}, {
"r" : "99",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "87",
"s" : [ {
"r" : "85",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "86",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ " then\n \t" ]
}, {
"r" : "98",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "92",
"s" : [ {
"r" : "88",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "92",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "91",
"s" : [ {
"r" : "89",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "90",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "97",
"s" : [ {
"r" : "93",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "97",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "96",
"s" : [ {
"r" : "94",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "95",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "]" ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "108",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "102",
"s" : [ {
"r" : "100",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "101",
"s" : [ {
"value" : [ "FHIR",".","Period" ]
} ]
} ]
}, {
"value" : [ " then\n \t\t" ]
}, {
"r" : "107",
"s" : [ {
"r" : "103",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "107",
"s" : [ {
"value" : [ "ToInterval","(" ]
}, {
"r" : "106",
"s" : [ {
"r" : "104",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "105",
"s" : [ {
"value" : [ "FHIR",".","Period" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "123",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "111",
"s" : [ {
"r" : "109",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "110",
"s" : [ {
"value" : [ "FHIR",".","instant" ]
} ]
} ]
}, {
"value" : [ " then\n\t\t\t" ]
}, {
"r" : "122",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "116",
"s" : [ {
"r" : "112",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "116",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "115",
"s" : [ {
"r" : "113",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "114",
"s" : [ {
"value" : [ "FHIR",".","instant" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "121",
"s" : [ {
"r" : "117",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "121",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "120",
"s" : [ {
"r" : "118",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "119",
"s" : [ {
"value" : [ "FHIR",".","instant" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "]" ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "150",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "126",
"s" : [ {
"r" : "124",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "125",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ " then\n\t\t " ]
}, {
"r" : "149",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "136",
"s" : [ {
"r" : "130",
"s" : [ {
"r" : "127",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "130",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "129",
"s" : [ {
"r" : "128",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "129",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "135",
"s" : [ {
"r" : "131",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "135",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "134",
"s" : [ {
"r" : "132",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "133",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ ",\n\t\t\t " ]
}, {
"r" : "148",
"s" : [ {
"r" : "146",
"s" : [ {
"r" : "140",
"s" : [ {
"r" : "137",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "140",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "139",
"s" : [ {
"r" : "138",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "139",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "145",
"s" : [ {
"r" : "141",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "145",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "144",
"s" : [ {
"r" : "142",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "143",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "147",
"s" : [ {
"value" : [ "1 ","year" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "179",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "153",
"s" : [ {
"r" : "151",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "152",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ " then\n\t\t " ]
}, {
"r" : "178",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "164",
"s" : [ {
"r" : "157",
"s" : [ {
"r" : "154",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "157",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "156",
"s" : [ {
"r" : "155",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "156",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "163",
"s" : [ {
"r" : "158",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "163",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "162",
"s" : [ {
"r" : "161",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "161",
"s" : [ {
"r" : "159",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "160",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "162",
"s" : [ {
"value" : [ "low" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ ",\n\t\t\t " ]
}, {
"r" : "177",
"s" : [ {
"r" : "175",
"s" : [ {
"r" : "168",
"s" : [ {
"r" : "165",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "168",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "167",
"s" : [ {
"r" : "166",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "167",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "174",
"s" : [ {
"r" : "169",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "174",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "173",
"s" : [ {
"r" : "172",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "172",
"s" : [ {
"r" : "170",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "171",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "173",
"s" : [ {
"value" : [ "high" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "176",
"s" : [ {
"value" : [ "1 ","year" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "192",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "182",
"s" : [ {
"r" : "180",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "181",
"s" : [ {
"value" : [ "FHIR",".","Timing" ]
} ]
} ]
}, {
"value" : [ " then\n\t\t " ]
}, {
"r" : "191",
"s" : [ {
"value" : [ "Message","(" ]
}, {
"r" : "186",
"s" : [ {
"r" : "183",
"value" : [ "null"," as " ]
}, {
"r" : "185",
"s" : [ {
"value" : [ "Interval<" ]
}, {
"r" : "184",
"s" : [ {
"value" : [ "DateTime" ]
} ]
}, {
"value" : [ ">" ]
} ]
} ]
}, {
"r" : "187",
"value" : [ ", ","true",", " ]
}, {
"r" : "188",
"s" : [ {
"value" : [ "'1'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "189",
"s" : [ {
"value" : [ "'Error'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "190",
"s" : [ {
"value" : [ "'Cannot compute a single interval from a Timing type'" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "\n " ]
}, {
"r" : "205",
"s" : [ {
"value" : [ "when " ]
}, {
"r" : "195",
"s" : [ {
"r" : "193",
"s" : [ {
"value" : [ "choice" ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "194",
"s" : [ {
"value" : [ "FHIR",".","string" ]
} ]
} ]
}, {
"value" : [ " then\n " ]
}, {
"r" : "204",
"s" : [ {
"value" : [ "Message","(" ]
}, {
"r" : "199",
"s" : [ {
"r" : "196",
"value" : [ "null"," as " ]
}, {
"r" : "198",
"s" : [ {
"value" : [ "Interval<" ]
}, {
"r" : "197",
"s" : [ {
"value" : [ "DateTime" ]
} ]
}, {
"value" : [ ">" ]
} ]
} ]
}, {
"r" : "200",
"value" : [ ", ","true",", " ]
}, {
"r" : "201",
"s" : [ {
"value" : [ "'1'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "202",
"s" : [ {
"value" : [ "'Error'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "203",
"s" : [ {
"value" : [ "'Cannot compute an interval from a String value'" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "\n\t\telse\n\t\t\t" ]
}, {
"r" : "209",
"s" : [ {
"r" : "206",
"value" : [ "null"," as " ]
}, {
"r" : "208",
"s" : [ {
"value" : [ "Interval<" ]
}, {
"r" : "207",
"s" : [ {
"value" : [ "DateTime" ]
} ]
}, {
"value" : [ ">" ]
} ]
} ]
}, {
"value" : [ "\n\tend" ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "210",
"locator" : "78:3-97:4",
"type" : "Case",
"caseItem" : [ {
"localId" : "99",
"locator" : "79:4-80:111",
"when" : {
"localId" : "87",
"locator" : "79:9-79:31",
"type" : "Is",
"operand" : {
"localId" : "85",
"locator" : "79:9-79:14",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "86",
"locator" : "79:19-79:31",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "98",
"locator" : "80:6-80:111",
"lowClosed" : true,
"highClosed" : true,
"type" : "Interval",
"low" : {
"localId" : "92",
"locator" : "80:15-80:61",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "91",
"locator" : "80:38-80:60",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "89",
"locator" : "80:38-80:43",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "90",
"locator" : "80:48-80:60",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
} ]
},
"high" : {
"localId" : "97",
"locator" : "80:64-80:110",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "96",
"locator" : "80:87-80:109",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "94",
"locator" : "80:87-80:92",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "95",
"locator" : "80:97-80:109",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
} ]
}
}
}, {
"localId" : "108",
"locator" : "81:3-82:49",
"when" : {
"localId" : "102",
"locator" : "81:8-81:28",
"type" : "Is",
"operand" : {
"localId" : "100",
"locator" : "81:8-81:13",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "101",
"locator" : "81:18-81:28",
"name" : "{http://hl7.org/fhir}Period",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "107",
"locator" : "82:5-82:49",
"name" : "ToInterval",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "106",
"locator" : "82:28-82:48",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "104",
"locator" : "82:28-82:33",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "105",
"locator" : "82:38-82:48",
"name" : "{http://hl7.org/fhir}Period",
"type" : "NamedTypeSpecifier"
}
} ]
}
}, {
"localId" : "123",
"locator" : "83:3-84:107",
"when" : {
"localId" : "111",
"locator" : "83:8-83:29",
"type" : "Is",
"operand" : {
"localId" : "109",
"locator" : "83:8-83:13",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "110",
"locator" : "83:18-83:29",
"name" : "{http://hl7.org/fhir}instant",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "122",
"locator" : "84:4-84:107",
"lowClosed" : true,
"highClosed" : true,
"type" : "Interval",
"low" : {
"localId" : "116",
"locator" : "84:13-84:58",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "115",
"locator" : "84:36-84:57",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "113",
"locator" : "84:36-84:41",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "114",
"locator" : "84:46-84:57",
"name" : "{http://hl7.org/fhir}instant",
"type" : "NamedTypeSpecifier"
}
} ]
},
"high" : {
"localId" : "121",
"locator" : "84:61-84:106",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "120",
"locator" : "84:84-84:105",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "118",
"locator" : "84:84-84:89",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "119",
"locator" : "84:94-84:105",
"name" : "{http://hl7.org/fhir}instant",
"type" : "NamedTypeSpecifier"
}
} ]
}
}
}, {
"localId" : "150",
"locator" : "85:3-87:97",
"when" : {
"localId" : "126",
"locator" : "85:8-85:25",
"type" : "Is",
"operand" : {
"localId" : "124",
"locator" : "85:8-85:13",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "125",
"locator" : "85:18-85:25",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"type" : "Interval",
"low" : {
"type" : "ToDateTime",
"operand" : {
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "149",
"locator" : "86:5-87:97",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "136",
"locator" : "86:14-86:95",
"type" : "Add",
"operand" : [ {
"localId" : "130",
"locator" : "86:14-86:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "129",
"locator" : "86:33-86:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "128",
"locator" : "86:33-86:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "135",
"locator" : "86:54-86:95",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "134",
"locator" : "86:77-86:94",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "132",
"locator" : "86:77-86:82",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "133",
"locator" : "86:87-86:94",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "148",
"locator" : "87:6-87:96",
"type" : "Add",
"operand" : [ {
"localId" : "146",
"locator" : "87:6-87:87",
"type" : "Add",
"operand" : [ {
"localId" : "140",
"locator" : "87:6-87:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "139",
"locator" : "87:25-87:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "138",
"locator" : "87:25-87:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "145",
"locator" : "87:46-87:87",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "144",
"locator" : "87:69-87:86",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "142",
"locator" : "87:69-87:74",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "143",
"locator" : "87:79-87:86",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "147",
"locator" : "87:91-87:96",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"lowClosedExpression" : {
"path" : "lowClosed",
"type" : "Property",
"source" : {
"localId" : "149",
"locator" : "86:5-87:97",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "136",
"locator" : "86:14-86:95",
"type" : "Add",
"operand" : [ {
"localId" : "130",
"locator" : "86:14-86:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "129",
"locator" : "86:33-86:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "128",
"locator" : "86:33-86:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "135",
"locator" : "86:54-86:95",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "134",
"locator" : "86:77-86:94",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "132",
"locator" : "86:77-86:82",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "133",
"locator" : "86:87-86:94",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "148",
"locator" : "87:6-87:96",
"type" : "Add",
"operand" : [ {
"localId" : "146",
"locator" : "87:6-87:87",
"type" : "Add",
"operand" : [ {
"localId" : "140",
"locator" : "87:6-87:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "139",
"locator" : "87:25-87:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "138",
"locator" : "87:25-87:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "145",
"locator" : "87:46-87:87",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "144",
"locator" : "87:69-87:86",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "142",
"locator" : "87:69-87:74",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "143",
"locator" : "87:79-87:86",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "147",
"locator" : "87:91-87:96",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
},
"high" : {
"type" : "ToDateTime",
"operand" : {
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "149",
"locator" : "86:5-87:97",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "136",
"locator" : "86:14-86:95",
"type" : "Add",
"operand" : [ {
"localId" : "130",
"locator" : "86:14-86:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "129",
"locator" : "86:33-86:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "128",
"locator" : "86:33-86:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "135",
"locator" : "86:54-86:95",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "134",
"locator" : "86:77-86:94",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "132",
"locator" : "86:77-86:82",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "133",
"locator" : "86:87-86:94",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "148",
"locator" : "87:6-87:96",
"type" : "Add",
"operand" : [ {
"localId" : "146",
"locator" : "87:6-87:87",
"type" : "Add",
"operand" : [ {
"localId" : "140",
"locator" : "87:6-87:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "139",
"locator" : "87:25-87:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "138",
"locator" : "87:25-87:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "145",
"locator" : "87:46-87:87",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "144",
"locator" : "87:69-87:86",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "142",
"locator" : "87:69-87:74",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "143",
"locator" : "87:79-87:86",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "147",
"locator" : "87:91-87:96",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"highClosedExpression" : {
"path" : "highClosed",
"type" : "Property",
"source" : {
"localId" : "149",
"locator" : "86:5-87:97",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "136",
"locator" : "86:14-86:95",
"type" : "Add",
"operand" : [ {
"localId" : "130",
"locator" : "86:14-86:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "129",
"locator" : "86:33-86:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "128",
"locator" : "86:33-86:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "135",
"locator" : "86:54-86:95",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "134",
"locator" : "86:77-86:94",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "132",
"locator" : "86:77-86:82",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "133",
"locator" : "86:87-86:94",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "148",
"locator" : "87:6-87:96",
"type" : "Add",
"operand" : [ {
"localId" : "146",
"locator" : "87:6-87:87",
"type" : "Add",
"operand" : [ {
"localId" : "140",
"locator" : "87:6-87:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "139",
"locator" : "87:25-87:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "138",
"locator" : "87:25-87:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "145",
"locator" : "87:46-87:87",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "144",
"locator" : "87:69-87:86",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "142",
"locator" : "87:69-87:74",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "143",
"locator" : "87:79-87:86",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "147",
"locator" : "87:91-87:96",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
}
}, {
"localId" : "179",
"locator" : "88:3-90:106",
"when" : {
"localId" : "153",
"locator" : "88:8-88:27",
"type" : "Is",
"operand" : {
"localId" : "151",
"locator" : "88:8-88:13",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "152",
"locator" : "88:18-88:27",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"type" : "Interval",
"low" : {
"type" : "ToDateTime",
"operand" : {
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "178",
"locator" : "89:5-90:106",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "164",
"locator" : "89:14-89:103",
"type" : "Add",
"operand" : [ {
"localId" : "157",
"locator" : "89:14-89:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "156",
"locator" : "89:33-89:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "155",
"locator" : "89:33-89:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "163",
"locator" : "89:54-89:103",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "162",
"locator" : "89:77-89:102",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "161",
"locator" : "89:77-89:98",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "159",
"locator" : "89:78-89:83",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "160",
"locator" : "89:88-89:97",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "177",
"locator" : "90:6-90:105",
"type" : "Add",
"operand" : [ {
"localId" : "175",
"locator" : "90:6-90:96",
"type" : "Add",
"operand" : [ {
"localId" : "168",
"locator" : "90:6-90:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "167",
"locator" : "90:25-90:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "166",
"locator" : "90:25-90:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "174",
"locator" : "90:46-90:96",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "173",
"locator" : "90:69-90:95",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "172",
"locator" : "90:69-90:90",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "170",
"locator" : "90:70-90:75",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "171",
"locator" : "90:80-90:89",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "176",
"locator" : "90:100-90:105",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"lowClosedExpression" : {
"path" : "lowClosed",
"type" : "Property",
"source" : {
"localId" : "178",
"locator" : "89:5-90:106",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "164",
"locator" : "89:14-89:103",
"type" : "Add",
"operand" : [ {
"localId" : "157",
"locator" : "89:14-89:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "156",
"locator" : "89:33-89:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "155",
"locator" : "89:33-89:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "163",
"locator" : "89:54-89:103",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "162",
"locator" : "89:77-89:102",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "161",
"locator" : "89:77-89:98",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "159",
"locator" : "89:78-89:83",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "160",
"locator" : "89:88-89:97",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "177",
"locator" : "90:6-90:105",
"type" : "Add",
"operand" : [ {
"localId" : "175",
"locator" : "90:6-90:96",
"type" : "Add",
"operand" : [ {
"localId" : "168",
"locator" : "90:6-90:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "167",
"locator" : "90:25-90:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "166",
"locator" : "90:25-90:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "174",
"locator" : "90:46-90:96",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "173",
"locator" : "90:69-90:95",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "172",
"locator" : "90:69-90:90",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "170",
"locator" : "90:70-90:75",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "171",
"locator" : "90:80-90:89",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "176",
"locator" : "90:100-90:105",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
},
"high" : {
"type" : "ToDateTime",
"operand" : {
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "178",
"locator" : "89:5-90:106",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "164",
"locator" : "89:14-89:103",
"type" : "Add",
"operand" : [ {
"localId" : "157",
"locator" : "89:14-89:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "156",
"locator" : "89:33-89:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "155",
"locator" : "89:33-89:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "163",
"locator" : "89:54-89:103",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "162",
"locator" : "89:77-89:102",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "161",
"locator" : "89:77-89:98",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "159",
"locator" : "89:78-89:83",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "160",
"locator" : "89:88-89:97",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "177",
"locator" : "90:6-90:105",
"type" : "Add",
"operand" : [ {
"localId" : "175",
"locator" : "90:6-90:96",
"type" : "Add",
"operand" : [ {
"localId" : "168",
"locator" : "90:6-90:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "167",
"locator" : "90:25-90:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "166",
"locator" : "90:25-90:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "174",
"locator" : "90:46-90:96",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "173",
"locator" : "90:69-90:95",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "172",
"locator" : "90:69-90:90",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "170",
"locator" : "90:70-90:75",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "171",
"locator" : "90:80-90:89",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "176",
"locator" : "90:100-90:105",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"highClosedExpression" : {
"path" : "highClosed",
"type" : "Property",
"source" : {
"localId" : "178",
"locator" : "89:5-90:106",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "164",
"locator" : "89:14-89:103",
"type" : "Add",
"operand" : [ {
"localId" : "157",
"locator" : "89:14-89:50",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "156",
"locator" : "89:33-89:49",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "155",
"locator" : "89:33-89:39",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "163",
"locator" : "89:54-89:103",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "162",
"locator" : "89:77-89:102",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "161",
"locator" : "89:77-89:98",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "159",
"locator" : "89:78-89:83",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "160",
"locator" : "89:88-89:97",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "177",
"locator" : "90:6-90:105",
"type" : "Add",
"operand" : [ {
"localId" : "175",
"locator" : "90:6-90:96",
"type" : "Add",
"operand" : [ {
"localId" : "168",
"locator" : "90:6-90:42",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "167",
"locator" : "90:25-90:41",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "166",
"locator" : "90:25-90:31",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "174",
"locator" : "90:46-90:96",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "173",
"locator" : "90:69-90:95",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "172",
"locator" : "90:69-90:90",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "170",
"locator" : "90:70-90:75",
"name" : "choice",
"type" : "OperandRef"
},
"asTypeSpecifier" : {
"localId" : "171",
"locator" : "90:80-90:89",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "176",
"locator" : "90:100-90:105",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
}
}, {
"localId" : "192",
"locator" : "91:3-92:114",
"when" : {
"localId" : "182",
"locator" : "91:8-91:28",
"type" : "Is",
"operand" : {
"localId" : "180",
"locator" : "91:8-91:13",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "181",
"locator" : "91:18-91:28",
"name" : "{http://hl7.org/fhir}Timing",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "191",
"locator" : "92:5-92:114",
"type" : "Message",
"source" : {
"localId" : "186",
"locator" : "92:13-92:38",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "183",
"locator" : "92:13-92:16",
"type" : "Null"
},
"asTypeSpecifier" : {
"localId" : "185",
"locator" : "92:21-92:38",
"type" : "IntervalTypeSpecifier",
"pointType" : {
"localId" : "184",
"locator" : "92:30-92:37",
"name" : "{urn:hl7-org:elm-types:r1}DateTime",
"type" : "NamedTypeSpecifier"
}
}
},
"condition" : {
"localId" : "187",
"locator" : "92:41-92:44",
"valueType" : "{urn:hl7-org:elm-types:r1}Boolean",
"value" : "true",
"type" : "Literal"
},
"code" : {
"localId" : "188",
"locator" : "92:47-92:49",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "1",
"type" : "Literal"
},
"severity" : {
"localId" : "189",
"locator" : "92:52-92:58",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Error",
"type" : "Literal"
},
"message" : {
"localId" : "190",
"locator" : "92:61-92:113",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Cannot compute a single interval from a Timing type",
"type" : "Literal"
}
}
}, {
"localId" : "205",
"locator" : "93:5-94:111",
"when" : {
"localId" : "195",
"locator" : "93:10-93:30",
"type" : "Is",
"operand" : {
"localId" : "193",
"locator" : "93:10-93:15",
"name" : "choice",
"type" : "OperandRef"
},
"isTypeSpecifier" : {
"localId" : "194",
"locator" : "93:20-93:30",
"name" : "{http://hl7.org/fhir}string",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "204",
"locator" : "94:7-94:111",
"type" : "Message",
"source" : {
"localId" : "199",
"locator" : "94:15-94:40",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "196",
"locator" : "94:15-94:18",
"type" : "Null"
},
"asTypeSpecifier" : {
"localId" : "198",
"locator" : "94:23-94:40",
"type" : "IntervalTypeSpecifier",
"pointType" : {
"localId" : "197",
"locator" : "94:32-94:39",
"name" : "{urn:hl7-org:elm-types:r1}DateTime",
"type" : "NamedTypeSpecifier"
}
}
},
"condition" : {
"localId" : "200",
"locator" : "94:43-94:46",
"valueType" : "{urn:hl7-org:elm-types:r1}Boolean",
"value" : "true",
"type" : "Literal"
},
"code" : {
"localId" : "201",
"locator" : "94:49-94:51",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "1",
"type" : "Literal"
},
"severity" : {
"localId" : "202",
"locator" : "94:54-94:60",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Error",
"type" : "Literal"
},
"message" : {
"localId" : "203",
"locator" : "94:63-94:110",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Cannot compute an interval from a String value",
"type" : "Literal"
}
}
} ],
"else" : {
"localId" : "209",
"locator" : "96:4-96:29",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "206",
"locator" : "96:4-96:7",
"type" : "Null"
},
"asTypeSpecifier" : {
"localId" : "208",
"locator" : "96:12-96:29",
"type" : "IntervalTypeSpecifier",
"pointType" : {
"localId" : "207",
"locator" : "96:21-96:28",
"name" : "{urn:hl7-org:elm-types:r1}DateTime",
"type" : "NamedTypeSpecifier"
}
}
}
},
"operand" : [ {
"name" : "choice",
"operandTypeSpecifier" : {
"localId" : "84",
"locator" : "77:35-77:130",
"type" : "ChoiceTypeSpecifier",
"choice" : [ {
"localId" : "77",
"locator" : "77:42-77:54",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "78",
"locator" : "77:57-77:67",
"name" : "{http://hl7.org/fhir}Period",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "79",
"locator" : "77:70-77:80",
"name" : "{http://hl7.org/fhir}Timing",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "80",
"locator" : "77:83-77:94",
"name" : "{http://hl7.org/fhir}instant",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "81",
"locator" : "77:97-77:107",
"name" : "{http://hl7.org/fhir}string",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "82",
"locator" : "77:110-77:117",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}, {
"localId" : "83",
"locator" : "77:120-77:129",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
} ]
}
} ]
}, {
"localId" : "331",
"locator" : "104:1-119:10",
"name" : "ToAbatementInterval",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns an interval representing the normalized Abatement of a given Condition resource."
}, {
"name" : "comment",
"value" : "NOTE: Due to the complexity of determining an interval from a String, this function will throw\na run-time exception if used with a Condition instance that has a String as the abatement value."
} ],
"s" : {
"r" : "331",
"s" : [ {
"value" : [ "/*\n@description: Returns an interval representing the normalized Abatement of a given Condition resource.\n@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw\na run-time exception if used with a Condition instance that has a String as the abatement value.\n*/\n","define function ","ToAbatementInterval","(","condition"," " ]
}, {
"r" : "212",
"s" : [ {
"value" : [ "Condition" ]
} ]
}, {
"value" : [ "):\n\t" ]
}, {
"r" : "330",
"s" : [ {
"r" : "330",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "216",
"s" : [ {
"r" : "214",
"s" : [ {
"r" : "213",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "214",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "215",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ " then\n\t " ]
}, {
"r" : "229",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "222",
"s" : [ {
"r" : "217",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "222",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "221",
"s" : [ {
"r" : "219",
"s" : [ {
"r" : "218",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "219",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "220",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "228",
"s" : [ {
"r" : "223",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "228",
"s" : [ {
"value" : [ "ToDateTime","(" ]
}, {
"r" : "227",
"s" : [ {
"r" : "225",
"s" : [ {
"r" : "224",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "225",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "226",
"s" : [ {
"value" : [ "FHIR",".","dateTime" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "]" ]
} ]
}, {
"value" : [ "\n\telse " ]
}, {
"r" : "329",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "233",
"s" : [ {
"r" : "231",
"s" : [ {
"r" : "230",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "231",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "232",
"s" : [ {
"value" : [ "FHIR",".","Period" ]
} ]
} ]
}, {
"value" : [ " then\n\t " ]
}, {
"r" : "239",
"s" : [ {
"r" : "234",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "239",
"s" : [ {
"value" : [ "ToInterval","(" ]
}, {
"r" : "238",
"s" : [ {
"r" : "236",
"s" : [ {
"r" : "235",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "236",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "237",
"s" : [ {
"value" : [ "FHIR",".","Period" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "\n\telse " ]
}, {
"r" : "328",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "243",
"s" : [ {
"r" : "241",
"s" : [ {
"r" : "240",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "241",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "242",
"s" : [ {
"value" : [ "FHIR",".","string" ]
} ]
} ]
}, {
"value" : [ " then\n " ]
}, {
"r" : "252",
"s" : [ {
"value" : [ "Message","(" ]
}, {
"r" : "247",
"s" : [ {
"r" : "244",
"value" : [ "null"," as " ]
}, {
"r" : "246",
"s" : [ {
"value" : [ "Interval<" ]
}, {
"r" : "245",
"s" : [ {
"value" : [ "DateTime" ]
} ]
}, {
"value" : [ ">" ]
} ]
} ]
}, {
"r" : "248",
"value" : [ ", ","true",", " ]
}, {
"r" : "249",
"s" : [ {
"value" : [ "'1'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "250",
"s" : [ {
"value" : [ "'Error'" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "251",
"s" : [ {
"value" : [ "'Cannot compute an interval from a String value'" ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "\n\telse " ]
}, {
"r" : "327",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "256",
"s" : [ {
"r" : "254",
"s" : [ {
"r" : "253",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "254",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "255",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ " then\n\t\t" ]
}, {
"r" : "281",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "267",
"s" : [ {
"r" : "260",
"s" : [ {
"r" : "257",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "260",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "259",
"s" : [ {
"r" : "258",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "259",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "266",
"s" : [ {
"r" : "261",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "266",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "265",
"s" : [ {
"r" : "263",
"s" : [ {
"r" : "262",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "263",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "264",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ ",\n\t\t\t" ]
}, {
"r" : "280",
"s" : [ {
"r" : "278",
"s" : [ {
"r" : "271",
"s" : [ {
"r" : "268",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "271",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "270",
"s" : [ {
"r" : "269",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "270",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "277",
"s" : [ {
"r" : "272",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "277",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "276",
"s" : [ {
"r" : "274",
"s" : [ {
"r" : "273",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "274",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "275",
"s" : [ {
"value" : [ "FHIR",".","Age" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "279",
"s" : [ {
"value" : [ "1 ","year" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "\n\telse " ]
}, {
"r" : "326",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "285",
"s" : [ {
"r" : "283",
"s" : [ {
"r" : "282",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "283",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "284",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ " then\n\t " ]
}, {
"r" : "312",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "297",
"s" : [ {
"r" : "289",
"s" : [ {
"r" : "286",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "289",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "288",
"s" : [ {
"r" : "287",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "288",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "296",
"s" : [ {
"r" : "290",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "296",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "295",
"s" : [ {
"r" : "294",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "294",
"s" : [ {
"r" : "292",
"s" : [ {
"r" : "291",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "292",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "293",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "295",
"s" : [ {
"value" : [ "low" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ ",\n\t\t " ]
}, {
"r" : "311",
"s" : [ {
"r" : "309",
"s" : [ {
"r" : "301",
"s" : [ {
"r" : "298",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "301",
"s" : [ {
"value" : [ "ToDate","(" ]
}, {
"r" : "300",
"s" : [ {
"r" : "299",
"s" : [ {
"value" : [ "Patient" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "300",
"s" : [ {
"value" : [ "birthDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "308",
"s" : [ {
"r" : "302",
"s" : [ {
"value" : [ "FHIRHelpers" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "308",
"s" : [ {
"value" : [ "ToQuantity","(" ]
}, {
"r" : "307",
"s" : [ {
"r" : "306",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "306",
"s" : [ {
"r" : "304",
"s" : [ {
"r" : "303",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "304",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " as " ]
}, {
"r" : "305",
"s" : [ {
"value" : [ "FHIR",".","Range" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "307",
"s" : [ {
"value" : [ "high" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "310",
"s" : [ {
"value" : [ "1 ","year" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"value" : [ "\n\telse " ]
}, {
"r" : "325",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "316",
"s" : [ {
"r" : "314",
"s" : [ {
"r" : "313",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "314",
"s" : [ {
"value" : [ "abatement" ]
} ]
} ]
}, {
"value" : [ " is " ]
}, {
"r" : "315",
"s" : [ {
"value" : [ "FHIR",".","boolean" ]
} ]
} ]
}, {
"value" : [ " then\n\t " ]
}, {
"r" : "323",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "320",
"s" : [ {
"value" : [ "end of " ]
}, {
"r" : "319",
"s" : [ {
"value" : [ "ToInterval","(" ]
}, {
"r" : "318",
"s" : [ {
"r" : "317",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "318",
"s" : [ {
"value" : [ "onset" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "322",
"s" : [ {
"r" : "321",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "322",
"s" : [ {
"value" : [ "recordedDate" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
}, {
"r" : "324",
"value" : [ "\n\telse ","null" ]
} ]
} ]
} ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "330",
"locator" : "105:2-119:10",
"type" : "If",
"condition" : {
"localId" : "216",
"locator" : "105:5-105:40",
"type" : "Is",
"operand" : {
"localId" : "214",
"locator" : "105:5-105:23",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "213",
"locator" : "105:5-105:13",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "215",
"locator" : "105:28-105:40",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "229",
"locator" : "106:4-106:135",
"lowClosed" : true,
"highClosed" : true,
"type" : "Interval",
"low" : {
"localId" : "222",
"locator" : "106:13-106:72",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "221",
"locator" : "106:36-106:71",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "219",
"locator" : "106:36-106:54",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "218",
"locator" : "106:36-106:44",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "220",
"locator" : "106:59-106:71",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
} ]
},
"high" : {
"localId" : "228",
"locator" : "106:75-106:134",
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "227",
"locator" : "106:98-106:133",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "225",
"locator" : "106:98-106:116",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "224",
"locator" : "106:98-106:106",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "226",
"locator" : "106:121-106:133",
"name" : "{http://hl7.org/fhir}dateTime",
"type" : "NamedTypeSpecifier"
}
} ]
}
},
"else" : {
"localId" : "329",
"locator" : "107:7-119:10",
"type" : "If",
"condition" : {
"localId" : "233",
"locator" : "107:10-107:43",
"type" : "Is",
"operand" : {
"localId" : "231",
"locator" : "107:10-107:28",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "230",
"locator" : "107:10-107:18",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "232",
"locator" : "107:33-107:43",
"name" : "{http://hl7.org/fhir}Period",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "239",
"locator" : "108:4-108:61",
"name" : "ToInterval",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "238",
"locator" : "108:27-108:60",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "236",
"locator" : "108:27-108:45",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "235",
"locator" : "108:27-108:35",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "237",
"locator" : "108:50-108:60",
"name" : "{http://hl7.org/fhir}Period",
"type" : "NamedTypeSpecifier"
}
} ]
},
"else" : {
"localId" : "328",
"locator" : "109:7-119:10",
"type" : "If",
"condition" : {
"localId" : "243",
"locator" : "109:10-109:43",
"type" : "Is",
"operand" : {
"localId" : "241",
"locator" : "109:10-109:28",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "240",
"locator" : "109:10-109:18",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "242",
"locator" : "109:33-109:43",
"name" : "{http://hl7.org/fhir}string",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "252",
"locator" : "110:5-110:109",
"type" : "Message",
"source" : {
"localId" : "247",
"locator" : "110:13-110:38",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "244",
"locator" : "110:13-110:16",
"type" : "Null"
},
"asTypeSpecifier" : {
"localId" : "246",
"locator" : "110:21-110:38",
"type" : "IntervalTypeSpecifier",
"pointType" : {
"localId" : "245",
"locator" : "110:30-110:37",
"name" : "{urn:hl7-org:elm-types:r1}DateTime",
"type" : "NamedTypeSpecifier"
}
}
},
"condition" : {
"localId" : "248",
"locator" : "110:41-110:44",
"valueType" : "{urn:hl7-org:elm-types:r1}Boolean",
"value" : "true",
"type" : "Literal"
},
"code" : {
"localId" : "249",
"locator" : "110:47-110:49",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "1",
"type" : "Literal"
},
"severity" : {
"localId" : "250",
"locator" : "110:52-110:58",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Error",
"type" : "Literal"
},
"message" : {
"localId" : "251",
"locator" : "110:61-110:108",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "Cannot compute an interval from a String value",
"type" : "Literal"
}
},
"else" : {
"localId" : "327",
"locator" : "111:7-119:10",
"type" : "If",
"condition" : {
"localId" : "256",
"locator" : "111:10-111:40",
"type" : "Is",
"operand" : {
"localId" : "254",
"locator" : "111:10-111:28",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "253",
"locator" : "111:10-111:18",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "255",
"locator" : "111:33-111:40",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"type" : "Interval",
"low" : {
"type" : "ToDateTime",
"operand" : {
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "281",
"locator" : "112:3-113:108",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "267",
"locator" : "112:12-112:106",
"type" : "Add",
"operand" : [ {
"localId" : "260",
"locator" : "112:12-112:48",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "259",
"locator" : "112:31-112:47",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "258",
"locator" : "112:31-112:37",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "266",
"locator" : "112:52-112:106",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "265",
"locator" : "112:75-112:105",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "263",
"locator" : "112:75-112:93",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "262",
"locator" : "112:75-112:83",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "264",
"locator" : "112:98-112:105",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "280",
"locator" : "113:4-113:107",
"type" : "Add",
"operand" : [ {
"localId" : "278",
"locator" : "113:4-113:98",
"type" : "Add",
"operand" : [ {
"localId" : "271",
"locator" : "113:4-113:40",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "270",
"locator" : "113:23-113:39",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "269",
"locator" : "113:23-113:29",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "277",
"locator" : "113:44-113:98",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "276",
"locator" : "113:67-113:97",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "274",
"locator" : "113:67-113:85",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "273",
"locator" : "113:67-113:75",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "275",
"locator" : "113:90-113:97",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "279",
"locator" : "113:102-113:107",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"lowClosedExpression" : {
"path" : "lowClosed",
"type" : "Property",
"source" : {
"localId" : "281",
"locator" : "112:3-113:108",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "267",
"locator" : "112:12-112:106",
"type" : "Add",
"operand" : [ {
"localId" : "260",
"locator" : "112:12-112:48",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "259",
"locator" : "112:31-112:47",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "258",
"locator" : "112:31-112:37",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "266",
"locator" : "112:52-112:106",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "265",
"locator" : "112:75-112:105",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "263",
"locator" : "112:75-112:93",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "262",
"locator" : "112:75-112:83",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "264",
"locator" : "112:98-112:105",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "280",
"locator" : "113:4-113:107",
"type" : "Add",
"operand" : [ {
"localId" : "278",
"locator" : "113:4-113:98",
"type" : "Add",
"operand" : [ {
"localId" : "271",
"locator" : "113:4-113:40",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "270",
"locator" : "113:23-113:39",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "269",
"locator" : "113:23-113:29",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "277",
"locator" : "113:44-113:98",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "276",
"locator" : "113:67-113:97",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "274",
"locator" : "113:67-113:85",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "273",
"locator" : "113:67-113:75",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "275",
"locator" : "113:90-113:97",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "279",
"locator" : "113:102-113:107",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
},
"high" : {
"type" : "ToDateTime",
"operand" : {
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "281",
"locator" : "112:3-113:108",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "267",
"locator" : "112:12-112:106",
"type" : "Add",
"operand" : [ {
"localId" : "260",
"locator" : "112:12-112:48",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "259",
"locator" : "112:31-112:47",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "258",
"locator" : "112:31-112:37",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "266",
"locator" : "112:52-112:106",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "265",
"locator" : "112:75-112:105",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "263",
"locator" : "112:75-112:93",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "262",
"locator" : "112:75-112:83",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "264",
"locator" : "112:98-112:105",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "280",
"locator" : "113:4-113:107",
"type" : "Add",
"operand" : [ {
"localId" : "278",
"locator" : "113:4-113:98",
"type" : "Add",
"operand" : [ {
"localId" : "271",
"locator" : "113:4-113:40",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "270",
"locator" : "113:23-113:39",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "269",
"locator" : "113:23-113:29",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "277",
"locator" : "113:44-113:98",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "276",
"locator" : "113:67-113:97",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "274",
"locator" : "113:67-113:85",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "273",
"locator" : "113:67-113:75",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "275",
"locator" : "113:90-113:97",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "279",
"locator" : "113:102-113:107",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"highClosedExpression" : {
"path" : "highClosed",
"type" : "Property",
"source" : {
"localId" : "281",
"locator" : "112:3-113:108",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "267",
"locator" : "112:12-112:106",
"type" : "Add",
"operand" : [ {
"localId" : "260",
"locator" : "112:12-112:48",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "259",
"locator" : "112:31-112:47",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "258",
"locator" : "112:31-112:37",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "266",
"locator" : "112:52-112:106",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "265",
"locator" : "112:75-112:105",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "263",
"locator" : "112:75-112:93",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "262",
"locator" : "112:75-112:83",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "264",
"locator" : "112:98-112:105",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
},
"high" : {
"localId" : "280",
"locator" : "113:4-113:107",
"type" : "Add",
"operand" : [ {
"localId" : "278",
"locator" : "113:4-113:98",
"type" : "Add",
"operand" : [ {
"localId" : "271",
"locator" : "113:4-113:40",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "270",
"locator" : "113:23-113:39",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "269",
"locator" : "113:23-113:29",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "277",
"locator" : "113:44-113:98",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "276",
"locator" : "113:67-113:97",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "274",
"locator" : "113:67-113:85",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "273",
"locator" : "113:67-113:75",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "275",
"locator" : "113:90-113:97",
"name" : "{http://hl7.org/fhir}Age",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}, {
"localId" : "279",
"locator" : "113:102-113:107",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"else" : {
"localId" : "326",
"locator" : "114:7-119:10",
"type" : "If",
"condition" : {
"localId" : "285",
"locator" : "114:10-114:42",
"type" : "Is",
"operand" : {
"localId" : "283",
"locator" : "114:10-114:28",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "282",
"locator" : "114:10-114:18",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "284",
"locator" : "114:33-114:42",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"type" : "Interval",
"low" : {
"type" : "ToDateTime",
"operand" : {
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "312",
"locator" : "115:4-116:118",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "297",
"locator" : "115:13-115:115",
"type" : "Add",
"operand" : [ {
"localId" : "289",
"locator" : "115:13-115:49",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "288",
"locator" : "115:32-115:48",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "287",
"locator" : "115:32-115:38",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "296",
"locator" : "115:53-115:115",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "295",
"locator" : "115:76-115:114",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "294",
"locator" : "115:76-115:110",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "292",
"locator" : "115:77-115:95",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "291",
"locator" : "115:77-115:85",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "293",
"locator" : "115:100-115:109",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "311",
"locator" : "116:5-116:117",
"type" : "Add",
"operand" : [ {
"localId" : "309",
"locator" : "116:5-116:108",
"type" : "Add",
"operand" : [ {
"localId" : "301",
"locator" : "116:5-116:41",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "300",
"locator" : "116:24-116:40",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "299",
"locator" : "116:24-116:30",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "308",
"locator" : "116:45-116:108",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "307",
"locator" : "116:68-116:107",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "306",
"locator" : "116:68-116:102",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "304",
"locator" : "116:69-116:87",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "303",
"locator" : "116:69-116:77",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "305",
"locator" : "116:92-116:101",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "310",
"locator" : "116:112-116:117",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"lowClosedExpression" : {
"path" : "lowClosed",
"type" : "Property",
"source" : {
"localId" : "312",
"locator" : "115:4-116:118",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "297",
"locator" : "115:13-115:115",
"type" : "Add",
"operand" : [ {
"localId" : "289",
"locator" : "115:13-115:49",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "288",
"locator" : "115:32-115:48",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "287",
"locator" : "115:32-115:38",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "296",
"locator" : "115:53-115:115",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "295",
"locator" : "115:76-115:114",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "294",
"locator" : "115:76-115:110",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "292",
"locator" : "115:77-115:95",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "291",
"locator" : "115:77-115:85",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "293",
"locator" : "115:100-115:109",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "311",
"locator" : "116:5-116:117",
"type" : "Add",
"operand" : [ {
"localId" : "309",
"locator" : "116:5-116:108",
"type" : "Add",
"operand" : [ {
"localId" : "301",
"locator" : "116:5-116:41",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "300",
"locator" : "116:24-116:40",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "299",
"locator" : "116:24-116:30",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "308",
"locator" : "116:45-116:108",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "307",
"locator" : "116:68-116:107",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "306",
"locator" : "116:68-116:102",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "304",
"locator" : "116:69-116:87",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "303",
"locator" : "116:69-116:77",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "305",
"locator" : "116:92-116:101",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "310",
"locator" : "116:112-116:117",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
},
"high" : {
"type" : "ToDateTime",
"operand" : {
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "312",
"locator" : "115:4-116:118",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "297",
"locator" : "115:13-115:115",
"type" : "Add",
"operand" : [ {
"localId" : "289",
"locator" : "115:13-115:49",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "288",
"locator" : "115:32-115:48",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "287",
"locator" : "115:32-115:38",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "296",
"locator" : "115:53-115:115",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "295",
"locator" : "115:76-115:114",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "294",
"locator" : "115:76-115:110",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "292",
"locator" : "115:77-115:95",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "291",
"locator" : "115:77-115:85",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "293",
"locator" : "115:100-115:109",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "311",
"locator" : "116:5-116:117",
"type" : "Add",
"operand" : [ {
"localId" : "309",
"locator" : "116:5-116:108",
"type" : "Add",
"operand" : [ {
"localId" : "301",
"locator" : "116:5-116:41",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "300",
"locator" : "116:24-116:40",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "299",
"locator" : "116:24-116:30",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "308",
"locator" : "116:45-116:108",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "307",
"locator" : "116:68-116:107",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "306",
"locator" : "116:68-116:102",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "304",
"locator" : "116:69-116:87",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "303",
"locator" : "116:69-116:77",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "305",
"locator" : "116:92-116:101",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "310",
"locator" : "116:112-116:117",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"highClosedExpression" : {
"path" : "highClosed",
"type" : "Property",
"source" : {
"localId" : "312",
"locator" : "115:4-116:118",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "297",
"locator" : "115:13-115:115",
"type" : "Add",
"operand" : [ {
"localId" : "289",
"locator" : "115:13-115:49",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "288",
"locator" : "115:32-115:48",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "287",
"locator" : "115:32-115:38",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "296",
"locator" : "115:53-115:115",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "295",
"locator" : "115:76-115:114",
"path" : "low",
"type" : "Property",
"source" : {
"localId" : "294",
"locator" : "115:76-115:110",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "292",
"locator" : "115:77-115:95",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "291",
"locator" : "115:77-115:85",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "293",
"locator" : "115:100-115:109",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
},
"high" : {
"localId" : "311",
"locator" : "116:5-116:117",
"type" : "Add",
"operand" : [ {
"localId" : "309",
"locator" : "116:5-116:108",
"type" : "Add",
"operand" : [ {
"localId" : "301",
"locator" : "116:5-116:41",
"name" : "ToDate",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "300",
"locator" : "116:24-116:40",
"path" : "birthDate",
"type" : "Property",
"source" : {
"localId" : "299",
"locator" : "116:24-116:30",
"name" : "Patient",
"type" : "ExpressionRef"
}
} ]
}, {
"localId" : "308",
"locator" : "116:45-116:108",
"name" : "ToQuantity",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "307",
"locator" : "116:68-116:107",
"path" : "high",
"type" : "Property",
"source" : {
"localId" : "306",
"locator" : "116:68-116:102",
"strict" : false,
"type" : "As",
"operand" : {
"localId" : "304",
"locator" : "116:69-116:87",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "303",
"locator" : "116:69-116:77",
"name" : "condition",
"type" : "OperandRef"
}
},
"asTypeSpecifier" : {
"localId" : "305",
"locator" : "116:92-116:101",
"name" : "{http://hl7.org/fhir}Range",
"type" : "NamedTypeSpecifier"
}
}
} ]
} ]
}, {
"localId" : "310",
"locator" : "116:112-116:117",
"value" : 1,
"unit" : "year",
"type" : "Quantity"
} ]
}
}
}
},
"else" : {
"localId" : "325",
"locator" : "117:7-119:10",
"type" : "If",
"condition" : {
"localId" : "316",
"locator" : "117:10-117:44",
"type" : "Is",
"operand" : {
"localId" : "314",
"locator" : "117:10-117:28",
"path" : "abatement",
"type" : "Property",
"source" : {
"localId" : "313",
"locator" : "117:10-117:18",
"name" : "condition",
"type" : "OperandRef"
}
},
"isTypeSpecifier" : {
"localId" : "315",
"locator" : "117:33-117:44",
"name" : "{http://hl7.org/fhir}boolean",
"type" : "NamedTypeSpecifier"
}
},
"then" : {
"localId" : "323",
"locator" : "118:4-118:71",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "320",
"locator" : "118:13-118:46",
"type" : "End",
"operand" : {
"localId" : "319",
"locator" : "118:20-118:46",
"name" : "ToInterval",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "318",
"locator" : "118:31-118:45",
"path" : "onset",
"type" : "Property",
"source" : {
"localId" : "317",
"locator" : "118:31-118:39",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}
},
"high" : {
"name" : "ToDateTime",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "322",
"locator" : "118:49-118:70",
"path" : "recordedDate",
"type" : "Property",
"source" : {
"localId" : "321",
"locator" : "118:49-118:57",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}
},
"else" : {
"type" : "As",
"operand" : {
"localId" : "324",
"locator" : "119:7-119:10",
"type" : "Null"
},
"asTypeSpecifier" : {
"type" : "IntervalTypeSpecifier",
"pointType" : {
"name" : "{urn:hl7-org:elm-types:r1}DateTime",
"type" : "NamedTypeSpecifier"
}
}
}
}
}
}
}
}
},
"operand" : [ {
"name" : "condition",
"operandTypeSpecifier" : {
"localId" : "212",
"locator" : "104:47-104:55",
"name" : "{http://hl7.org/fhir}Condition",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "364",
"locator" : "126:1-132:87",
"name" : "ToPrevalenceInterval",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns an interval representing the normalized prevalence period of a given Condition resource."
}, {
"name" : "comment",
"value" : "Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition."
} ],
"s" : {
"r" : "364",
"s" : [ {
"value" : [ "/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition resource.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition.\n*/\n","define function ","ToPrevalenceInterval","(","condition"," " ]
}, {
"r" : "332",
"s" : [ {
"value" : [ "Condition" ]
} ]
}, {
"value" : [ "):\n" ]
}, {
"r" : "363",
"s" : [ {
"r" : "363",
"s" : [ {
"value" : [ "if " ]
}, {
"r" : "346",
"s" : [ {
"r" : "341",
"s" : [ {
"r" : "336",
"s" : [ {
"r" : "334",
"s" : [ {
"r" : "333",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "334",
"s" : [ {
"value" : [ "clinicalStatus" ]
} ]
} ]
}, {
"value" : [ " ","~"," " ]
}, {
"r" : "335",
"s" : [ {
"value" : [ "\"active\"" ]
} ]
} ]
}, {
"value" : [ "\n or " ]
}, {
"r" : "340",
"s" : [ {
"r" : "338",
"s" : [ {
"r" : "337",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "338",
"s" : [ {
"value" : [ "clinicalStatus" ]
} ]
} ]
}, {
"value" : [ " ","~"," " ]
}, {
"r" : "339",
"s" : [ {
"value" : [ "\"recurrence\"" ]
} ]
} ]
} ]
}, {
"value" : [ "\n or " ]
}, {
"r" : "345",
"s" : [ {
"r" : "343",
"s" : [ {
"r" : "342",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "343",
"s" : [ {
"value" : [ "clinicalStatus" ]
} ]
} ]
}, {
"value" : [ " ","~"," " ]
}, {
"r" : "344",
"s" : [ {
"value" : [ "\"relapse\"" ]
} ]
} ]
} ]
}, {
"value" : [ " then\n " ]
}, {
"r" : "354",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "350",
"s" : [ {
"value" : [ "start of " ]
}, {
"r" : "349",
"s" : [ {
"value" : [ "ToInterval","(" ]
}, {
"r" : "348",
"s" : [ {
"r" : "347",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "348",
"s" : [ {
"value" : [ "onset" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "353",
"s" : [ {
"value" : [ "end of " ]
}, {
"r" : "352",
"s" : [ {
"value" : [ "ToAbatementInterval","(" ]
}, {
"r" : "351",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ "]" ]
} ]
}, {
"value" : [ "\nelse\n " ]
}, {
"r" : "362",
"s" : [ {
"value" : [ "Interval[" ]
}, {
"r" : "358",
"s" : [ {
"value" : [ "start of " ]
}, {
"r" : "357",
"s" : [ {
"value" : [ "ToInterval","(" ]
}, {
"r" : "356",
"s" : [ {
"r" : "355",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "356",
"s" : [ {
"value" : [ "onset" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "361",
"s" : [ {
"value" : [ "end of " ]
}, {
"r" : "360",
"s" : [ {
"value" : [ "ToAbatementInterval","(" ]
}, {
"r" : "359",
"s" : [ {
"value" : [ "condition" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "363",
"locator" : "127:1-132:87",
"type" : "If",
"condition" : {
"localId" : "346",
"locator" : "127:4-129:41",
"type" : "Or",
"operand" : [ {
"localId" : "341",
"locator" : "127:4-128:44",
"type" : "Or",
"operand" : [ {
"localId" : "336",
"locator" : "127:4-127:38",
"type" : "Equivalent",
"operand" : [ {
"name" : "ToConcept",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "334",
"locator" : "127:4-127:27",
"path" : "clinicalStatus",
"type" : "Property",
"source" : {
"localId" : "333",
"locator" : "127:4-127:12",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}, {
"type" : "ToConcept",
"operand" : {
"localId" : "335",
"locator" : "127:31-127:38",
"name" : "active",
"type" : "CodeRef"
}
} ]
}, {
"localId" : "340",
"locator" : "128:6-128:44",
"type" : "Equivalent",
"operand" : [ {
"name" : "ToConcept",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "338",
"locator" : "128:6-128:29",
"path" : "clinicalStatus",
"type" : "Property",
"source" : {
"localId" : "337",
"locator" : "128:6-128:14",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}, {
"type" : "ToConcept",
"operand" : {
"localId" : "339",
"locator" : "128:33-128:44",
"name" : "recurrence",
"type" : "CodeRef"
}
} ]
} ]
}, {
"localId" : "345",
"locator" : "129:6-129:41",
"type" : "Equivalent",
"operand" : [ {
"name" : "ToConcept",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "343",
"locator" : "129:6-129:29",
"path" : "clinicalStatus",
"type" : "Property",
"source" : {
"localId" : "342",
"locator" : "129:6-129:14",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}, {
"type" : "ToConcept",
"operand" : {
"localId" : "344",
"locator" : "129:33-129:41",
"name" : "relapse",
"type" : "CodeRef"
}
} ]
} ]
},
"then" : {
"localId" : "354",
"locator" : "130:3-130:87",
"lowClosed" : true,
"highClosed" : true,
"type" : "Interval",
"low" : {
"localId" : "350",
"locator" : "130:12-130:47",
"type" : "Start",
"operand" : {
"localId" : "349",
"locator" : "130:21-130:47",
"name" : "ToInterval",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "348",
"locator" : "130:32-130:46",
"path" : "onset",
"type" : "Property",
"source" : {
"localId" : "347",
"locator" : "130:32-130:40",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}
},
"high" : {
"localId" : "353",
"locator" : "130:50-130:86",
"type" : "End",
"operand" : {
"localId" : "352",
"locator" : "130:57-130:86",
"name" : "ToAbatementInterval",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "351",
"locator" : "130:77-130:85",
"name" : "condition",
"type" : "OperandRef"
} ]
}
}
},
"else" : {
"localId" : "362",
"locator" : "132:3-132:87",
"lowClosed" : true,
"highClosed" : false,
"type" : "Interval",
"low" : {
"localId" : "358",
"locator" : "132:12-132:47",
"type" : "Start",
"operand" : {
"localId" : "357",
"locator" : "132:21-132:47",
"name" : "ToInterval",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "356",
"locator" : "132:32-132:46",
"path" : "onset",
"type" : "Property",
"source" : {
"localId" : "355",
"locator" : "132:32-132:40",
"name" : "condition",
"type" : "OperandRef"
}
} ]
}
},
"high" : {
"localId" : "361",
"locator" : "132:50-132:86",
"type" : "End",
"operand" : {
"localId" : "360",
"locator" : "132:57-132:86",
"name" : "ToAbatementInterval",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "359",
"locator" : "132:77-132:85",
"name" : "condition",
"type" : "OperandRef"
} ]
}
}
}
},
"operand" : [ {
"name" : "condition",
"operandTypeSpecifier" : {
"localId" : "332",
"locator" : "126:48-126:56",
"name" : "{http://hl7.org/fhir}Condition",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "376",
"locator" : "140:1-143:10",
"name" : "Extensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any extensions defined on the given resource with the specified url."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the\nCQL model info."
} ],
"s" : {
"r" : "376",
"s" : [ {
"value" : [ "/*\n@description: Returns any extensions defined on the given resource with the specified url.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the\nCQL model info.\n*/\n","define function ","Extensions","(","domainResource"," " ]
}, {
"r" : "365",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "366",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "375",
"s" : [ {
"r" : "375",
"s" : [ {
"s" : [ {
"r" : "368",
"s" : [ {
"r" : "367",
"s" : [ {
"s" : [ {
"value" : [ "domainResource",".","extension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "372",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "372",
"s" : [ {
"r" : "370",
"s" : [ {
"r" : "369",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "370",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "371",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "374",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "373",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "375",
"locator" : "141:3-143:10",
"type" : "Query",
"source" : [ {
"localId" : "368",
"locator" : "141:3-141:28",
"alias" : "E",
"expression" : {
"localId" : "367",
"locator" : "141:3-141:26",
"path" : "extension",
"type" : "Property",
"source" : {
"name" : "domainResource",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "372",
"locator" : "142:4-142:20",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "370",
"locator" : "142:10-142:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "371",
"locator" : "142:18-142:20",
"name" : "url",
"type" : "OperandRef"
} ]
},
"return" : {
"localId" : "374",
"locator" : "143:3-143:10",
"expression" : {
"localId" : "373",
"locator" : "143:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "365",
"locator" : "140:43-140:56",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "366",
"locator" : "140:63-140:68",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "383",
"locator" : "150:1-151:50",
"name" : "Extension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single extension (if present) on the given resource with the specified url."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "383",
"s" : [ {
"value" : [ "/*\n@description: Returns the single extension (if present) on the given resource with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","Extension","(","domainResource"," " ]
}, {
"r" : "377",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "378",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "382",
"s" : [ {
"r" : "382",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "381",
"s" : [ {
"value" : [ "\"Extensions\"","(" ]
}, {
"r" : "379",
"s" : [ {
"value" : [ "domainResource" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "380",
"s" : [ {
"value" : [ "url" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "382",
"locator" : "151:3-151:50",
"type" : "SingletonFrom",
"operand" : {
"localId" : "381",
"locator" : "151:18-151:50",
"name" : "Extensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "379",
"locator" : "151:31-151:44",
"name" : "domainResource",
"type" : "OperandRef"
}, {
"localId" : "380",
"locator" : "151:47-151:49",
"name" : "url",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "377",
"locator" : "150:42-150:55",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "378",
"locator" : "150:62-150:67",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "395",
"locator" : "158:1-161:10",
"name" : "Extensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any extensions defined on the given element with the specified url."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "395",
"s" : [ {
"value" : [ "/*\n@description: Returns any extensions defined on the given element with the specified url.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","Extensions","(","element"," " ]
}, {
"r" : "384",
"s" : [ {
"value" : [ "Element" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "385",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "394",
"s" : [ {
"r" : "394",
"s" : [ {
"s" : [ {
"r" : "387",
"s" : [ {
"r" : "386",
"s" : [ {
"s" : [ {
"value" : [ "element",".","extension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "391",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "391",
"s" : [ {
"r" : "389",
"s" : [ {
"r" : "388",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "389",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "390",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "393",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "392",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "394",
"locator" : "159:3-161:10",
"type" : "Query",
"source" : [ {
"localId" : "387",
"locator" : "159:3-159:21",
"alias" : "E",
"expression" : {
"localId" : "386",
"locator" : "159:3-159:19",
"path" : "extension",
"type" : "Property",
"source" : {
"name" : "element",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "391",
"locator" : "160:4-160:20",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "389",
"locator" : "160:10-160:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "390",
"locator" : "160:18-160:20",
"name" : "url",
"type" : "OperandRef"
} ]
},
"return" : {
"localId" : "393",
"locator" : "161:3-161:10",
"expression" : {
"localId" : "392",
"locator" : "161:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "384",
"locator" : "158:36-158:42",
"name" : "{http://hl7.org/fhir}Element",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "385",
"locator" : "158:49-158:54",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "402",
"locator" : "168:1-169:41",
"name" : "Extension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single extension (if present) on the given element with the specified url."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "402",
"s" : [ {
"value" : [ "/*\n@description: Returns the single extension (if present) on the given element with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","Extension","(","element"," " ]
}, {
"r" : "396",
"s" : [ {
"value" : [ "Element" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "397",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "401",
"s" : [ {
"r" : "401",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "400",
"s" : [ {
"value" : [ "Extensions","(" ]
}, {
"r" : "398",
"s" : [ {
"value" : [ "element" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "399",
"s" : [ {
"value" : [ "url" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "401",
"locator" : "169:3-169:41",
"type" : "SingletonFrom",
"operand" : {
"localId" : "400",
"locator" : "169:18-169:41",
"name" : "Extensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "398",
"locator" : "169:29-169:35",
"name" : "element",
"type" : "OperandRef"
}, {
"localId" : "399",
"locator" : "169:38-169:40",
"name" : "url",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "396",
"locator" : "168:35-168:41",
"name" : "{http://hl7.org/fhir}Element",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "397",
"locator" : "168:48-168:53",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "414",
"locator" : "177:1-180:10",
"name" : "ModifierExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any modifier extensions defined on the given resource with the specified url."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the\nCQL model info."
} ],
"s" : {
"r" : "414",
"s" : [ {
"value" : [ "/*\n@description: Returns any modifier extensions defined on the given resource with the specified url.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the\nCQL model info.\n*/\n","define function ","ModifierExtensions","(","domainResource"," " ]
}, {
"r" : "403",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "404",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "413",
"s" : [ {
"r" : "413",
"s" : [ {
"s" : [ {
"r" : "406",
"s" : [ {
"r" : "405",
"s" : [ {
"s" : [ {
"value" : [ "domainResource",".","modifierExtension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "410",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "410",
"s" : [ {
"r" : "408",
"s" : [ {
"r" : "407",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "408",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "409",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "412",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "411",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "413",
"locator" : "178:3-180:10",
"type" : "Query",
"source" : [ {
"localId" : "406",
"locator" : "178:3-178:36",
"alias" : "E",
"expression" : {
"localId" : "405",
"locator" : "178:3-178:34",
"path" : "modifierExtension",
"type" : "Property",
"source" : {
"name" : "domainResource",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "410",
"locator" : "179:4-179:20",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "408",
"locator" : "179:10-179:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "409",
"locator" : "179:18-179:20",
"name" : "url",
"type" : "OperandRef"
} ]
},
"return" : {
"localId" : "412",
"locator" : "180:3-180:10",
"expression" : {
"localId" : "411",
"locator" : "180:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "403",
"locator" : "177:51-177:64",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "404",
"locator" : "177:71-177:76",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "421",
"locator" : "187:1-188:56",
"name" : "ModifierExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single modifier extension (if present) on the given resource with the specified url."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "421",
"s" : [ {
"value" : [ "/*\n@description: Returns the single modifier extension (if present) on the given resource with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","ModifierExtension","(","domainResource"," " ]
}, {
"r" : "415",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "416",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "420",
"s" : [ {
"r" : "420",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "419",
"s" : [ {
"value" : [ "ModifierExtensions","(" ]
}, {
"r" : "417",
"s" : [ {
"value" : [ "domainResource" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "418",
"s" : [ {
"value" : [ "url" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "420",
"locator" : "188:3-188:56",
"type" : "SingletonFrom",
"operand" : {
"localId" : "419",
"locator" : "188:18-188:56",
"name" : "ModifierExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "417",
"locator" : "188:37-188:50",
"name" : "domainResource",
"type" : "OperandRef"
}, {
"localId" : "418",
"locator" : "188:53-188:55",
"name" : "url",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "415",
"locator" : "187:50-187:63",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "416",
"locator" : "187:70-187:75",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "433",
"locator" : "195:1-198:10",
"name" : "ModifierExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any modifier extensions defined on the given element with the specified url."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "433",
"s" : [ {
"value" : [ "/*\n@description: Returns any modifier extensions defined on the given element with the specified url.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","ModifierExtensions","(","element"," " ]
}, {
"r" : "422",
"s" : [ {
"value" : [ "BackboneElement" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "423",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "432",
"s" : [ {
"r" : "432",
"s" : [ {
"s" : [ {
"r" : "425",
"s" : [ {
"r" : "424",
"s" : [ {
"s" : [ {
"value" : [ "element",".","modifierExtension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "429",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "429",
"s" : [ {
"r" : "427",
"s" : [ {
"r" : "426",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "427",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "428",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "431",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "430",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "432",
"locator" : "196:3-198:10",
"type" : "Query",
"source" : [ {
"localId" : "425",
"locator" : "196:3-196:29",
"alias" : "E",
"expression" : {
"localId" : "424",
"locator" : "196:3-196:27",
"path" : "modifierExtension",
"type" : "Property",
"source" : {
"name" : "element",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "429",
"locator" : "197:4-197:20",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "427",
"locator" : "197:10-197:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "428",
"locator" : "197:18-197:20",
"name" : "url",
"type" : "OperandRef"
} ]
},
"return" : {
"localId" : "431",
"locator" : "198:3-198:10",
"expression" : {
"localId" : "430",
"locator" : "198:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "422",
"locator" : "195:44-195:58",
"name" : "{http://hl7.org/fhir}BackboneElement",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "423",
"locator" : "195:65-195:70",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "440",
"locator" : "205:1-206:49",
"name" : "ModifierExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single modifier extension (if present) on the given element with the specified url."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "440",
"s" : [ {
"value" : [ "/*\n@description: Returns the single modifier extension (if present) on the given element with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","ModifierExtension","(","element"," " ]
}, {
"r" : "434",
"s" : [ {
"value" : [ "BackboneElement" ]
} ]
}, {
"value" : [ ", ","url"," " ]
}, {
"r" : "435",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "439",
"s" : [ {
"r" : "439",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "438",
"s" : [ {
"value" : [ "ModifierExtensions","(" ]
}, {
"r" : "436",
"s" : [ {
"value" : [ "element" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "437",
"s" : [ {
"value" : [ "url" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "439",
"locator" : "206:3-206:49",
"type" : "SingletonFrom",
"operand" : {
"localId" : "438",
"locator" : "206:18-206:49",
"name" : "ModifierExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "436",
"locator" : "206:37-206:43",
"name" : "element",
"type" : "OperandRef"
}, {
"localId" : "437",
"locator" : "206:46-206:48",
"name" : "url",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "434",
"locator" : "205:43-205:57",
"name" : "{http://hl7.org/fhir}BackboneElement",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "url",
"operandTypeSpecifier" : {
"localId" : "435",
"locator" : "205:64-205:69",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "454",
"locator" : "213:1-216:10",
"name" : "BaseExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any base-FHIR extensions defined on the given resource with the specified id."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "454",
"s" : [ {
"value" : [ "/*\n@description: Returns any base-FHIR extensions defined on the given resource with the specified id.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","BaseExtensions","(","domainResource"," " ]
}, {
"r" : "441",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "442",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "453",
"s" : [ {
"r" : "453",
"s" : [ {
"s" : [ {
"r" : "444",
"s" : [ {
"r" : "443",
"s" : [ {
"s" : [ {
"value" : [ "domainResource",".","extension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "450",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "450",
"s" : [ {
"r" : "446",
"s" : [ {
"r" : "445",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "446",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "449",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "449",
"s" : [ {
"r" : "447",
"s" : [ {
"value" : [ "'http://hl7.org/fhir/StructureDefinition/'" ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "448",
"s" : [ {
"value" : [ "id" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "452",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "451",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "453",
"locator" : "214:3-216:10",
"type" : "Query",
"source" : [ {
"localId" : "444",
"locator" : "214:3-214:28",
"alias" : "E",
"expression" : {
"localId" : "443",
"locator" : "214:3-214:26",
"path" : "extension",
"type" : "Property",
"source" : {
"name" : "domainResource",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "450",
"locator" : "215:4-215:66",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "446",
"locator" : "215:10-215:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "449",
"locator" : "215:18-215:66",
"type" : "Concatenate",
"operand" : [ {
"localId" : "447",
"locator" : "215:19-215:60",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "http://hl7.org/fhir/StructureDefinition/",
"type" : "Literal"
}, {
"localId" : "448",
"locator" : "215:64-215:65",
"name" : "id",
"type" : "OperandRef"
} ]
} ]
},
"return" : {
"localId" : "452",
"locator" : "216:3-216:10",
"expression" : {
"localId" : "451",
"locator" : "216:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "441",
"locator" : "213:47-213:60",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "442",
"locator" : "213:66-213:71",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "461",
"locator" : "223:1-224:51",
"name" : "BaseExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single base-FHIR extension (if present) on the given resource with the specified id."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "461",
"s" : [ {
"value" : [ "/*\n@description: Returns the single base-FHIR extension (if present) on the given resource with the specified id.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","BaseExtension","(","domainResource"," " ]
}, {
"r" : "455",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "456",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "460",
"s" : [ {
"r" : "460",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "459",
"s" : [ {
"value" : [ "BaseExtensions","(" ]
}, {
"r" : "457",
"s" : [ {
"value" : [ "domainResource" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "458",
"s" : [ {
"value" : [ "id" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "460",
"locator" : "224:3-224:51",
"type" : "SingletonFrom",
"operand" : {
"localId" : "459",
"locator" : "224:18-224:51",
"name" : "BaseExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "457",
"locator" : "224:33-224:46",
"name" : "domainResource",
"type" : "OperandRef"
}, {
"localId" : "458",
"locator" : "224:49-224:50",
"name" : "id",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "455",
"locator" : "223:46-223:59",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "456",
"locator" : "223:65-223:70",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "475",
"locator" : "231:1-234:10",
"name" : "BaseExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any base-FHIR extensions defined on the given element with the specified id."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "475",
"s" : [ {
"value" : [ "/*\n@description: Returns any base-FHIR extensions defined on the given element with the specified id.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","BaseExtensions","(","element"," " ]
}, {
"r" : "462",
"s" : [ {
"value" : [ "Element" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "463",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "474",
"s" : [ {
"r" : "474",
"s" : [ {
"s" : [ {
"r" : "465",
"s" : [ {
"r" : "464",
"s" : [ {
"s" : [ {
"value" : [ "element",".","extension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "471",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "471",
"s" : [ {
"r" : "467",
"s" : [ {
"r" : "466",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "467",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "470",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "470",
"s" : [ {
"r" : "468",
"s" : [ {
"value" : [ "'http://hl7.org/fhir/StructureDefinition/'" ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "469",
"s" : [ {
"value" : [ "id" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "473",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "472",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "474",
"locator" : "232:3-234:10",
"type" : "Query",
"source" : [ {
"localId" : "465",
"locator" : "232:3-232:21",
"alias" : "E",
"expression" : {
"localId" : "464",
"locator" : "232:3-232:19",
"path" : "extension",
"type" : "Property",
"source" : {
"name" : "element",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "471",
"locator" : "233:4-233:66",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "467",
"locator" : "233:10-233:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "470",
"locator" : "233:18-233:66",
"type" : "Concatenate",
"operand" : [ {
"localId" : "468",
"locator" : "233:19-233:60",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "http://hl7.org/fhir/StructureDefinition/",
"type" : "Literal"
}, {
"localId" : "469",
"locator" : "233:64-233:65",
"name" : "id",
"type" : "OperandRef"
} ]
} ]
},
"return" : {
"localId" : "473",
"locator" : "234:3-234:10",
"expression" : {
"localId" : "472",
"locator" : "234:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "462",
"locator" : "231:40-231:46",
"name" : "{http://hl7.org/fhir}Element",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "463",
"locator" : "231:52-231:57",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "482",
"locator" : "241:1-242:44",
"name" : "BaseExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single base-FHIR extension (if present) on the given element with the specified id."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "482",
"s" : [ {
"value" : [ "/*\n@description: Returns the single base-FHIR extension (if present) on the given element with the specified id.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","BaseExtension","(","element"," " ]
}, {
"r" : "476",
"s" : [ {
"value" : [ "Element" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "477",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "481",
"s" : [ {
"r" : "481",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "480",
"s" : [ {
"value" : [ "BaseExtensions","(" ]
}, {
"r" : "478",
"s" : [ {
"value" : [ "element" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "479",
"s" : [ {
"value" : [ "id" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "481",
"locator" : "242:3-242:44",
"type" : "SingletonFrom",
"operand" : {
"localId" : "480",
"locator" : "242:18-242:44",
"name" : "BaseExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "478",
"locator" : "242:33-242:39",
"name" : "element",
"type" : "OperandRef"
}, {
"localId" : "479",
"locator" : "242:42-242:43",
"name" : "id",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "476",
"locator" : "241:39-241:45",
"name" : "{http://hl7.org/fhir}Element",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "477",
"locator" : "241:51-241:56",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "496",
"locator" : "249:1-252:10",
"name" : "BaseModifierExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any base-FHIR modifier extensions defined on the given resource with the specified id."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "496",
"s" : [ {
"value" : [ "/*\n@description: Returns any base-FHIR modifier extensions defined on the given resource with the specified id.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","BaseModifierExtensions","(","domainResource"," " ]
}, {
"r" : "483",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "484",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "495",
"s" : [ {
"r" : "495",
"s" : [ {
"s" : [ {
"r" : "486",
"s" : [ {
"r" : "485",
"s" : [ {
"s" : [ {
"value" : [ "domainResource",".","modifierExtension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "492",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "492",
"s" : [ {
"r" : "488",
"s" : [ {
"r" : "487",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "488",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "491",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "491",
"s" : [ {
"r" : "489",
"s" : [ {
"value" : [ "'http://hl7.org/fhir/StructureDefinition/'" ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "490",
"s" : [ {
"value" : [ "id" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "494",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "493",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "495",
"locator" : "250:3-252:10",
"type" : "Query",
"source" : [ {
"localId" : "486",
"locator" : "250:3-250:36",
"alias" : "E",
"expression" : {
"localId" : "485",
"locator" : "250:3-250:34",
"path" : "modifierExtension",
"type" : "Property",
"source" : {
"name" : "domainResource",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "492",
"locator" : "251:4-251:66",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "488",
"locator" : "251:10-251:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "491",
"locator" : "251:18-251:66",
"type" : "Concatenate",
"operand" : [ {
"localId" : "489",
"locator" : "251:19-251:60",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "http://hl7.org/fhir/StructureDefinition/",
"type" : "Literal"
}, {
"localId" : "490",
"locator" : "251:64-251:65",
"name" : "id",
"type" : "OperandRef"
} ]
} ]
},
"return" : {
"localId" : "494",
"locator" : "252:3-252:10",
"expression" : {
"localId" : "493",
"locator" : "252:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "483",
"locator" : "249:55-249:68",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "484",
"locator" : "249:74-249:79",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "503",
"locator" : "259:1-260:59",
"name" : "BaseModifierExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single base-FHIR modifier extension (if present) on the given resource with the specified id."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "503",
"s" : [ {
"value" : [ "/*\n@description: Returns the single base-FHIR modifier extension (if present) on the given resource with the specified id.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","BaseModifierExtension","(","domainResource"," " ]
}, {
"r" : "497",
"s" : [ {
"value" : [ "DomainResource" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "498",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "502",
"s" : [ {
"r" : "502",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "501",
"s" : [ {
"value" : [ "BaseModifierExtensions","(" ]
}, {
"r" : "499",
"s" : [ {
"value" : [ "domainResource" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "500",
"s" : [ {
"value" : [ "id" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "502",
"locator" : "260:3-260:59",
"type" : "SingletonFrom",
"operand" : {
"localId" : "501",
"locator" : "260:18-260:59",
"name" : "BaseModifierExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "499",
"locator" : "260:41-260:54",
"name" : "domainResource",
"type" : "OperandRef"
}, {
"localId" : "500",
"locator" : "260:57-260:58",
"name" : "id",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "domainResource",
"operandTypeSpecifier" : {
"localId" : "497",
"locator" : "259:54-259:67",
"name" : "{http://hl7.org/fhir}DomainResource",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "498",
"locator" : "259:73-259:78",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "517",
"locator" : "267:1-270:10",
"name" : "BaseModifierExtensions",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns any base-FHIR modifier extensions defined on the given element with the specified id."
}, {
"name" : "comment",
"value" : "NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info."
} ],
"s" : {
"r" : "517",
"s" : [ {
"value" : [ "/*\n@description: Returns any base-FHIR modifier extensions defined on the given element with the specified id.\n@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the CQL model info.\n*/\n","define function ","BaseModifierExtensions","(","element"," " ]
}, {
"r" : "504",
"s" : [ {
"value" : [ "BackboneElement" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "505",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "516",
"s" : [ {
"r" : "516",
"s" : [ {
"s" : [ {
"r" : "507",
"s" : [ {
"r" : "506",
"s" : [ {
"s" : [ {
"value" : [ "element",".","modifierExtension" ]
} ]
} ]
}, {
"value" : [ " ","E" ]
} ]
} ]
}, {
"value" : [ "\n\t " ]
}, {
"r" : "513",
"s" : [ {
"value" : [ "where " ]
}, {
"r" : "513",
"s" : [ {
"r" : "509",
"s" : [ {
"r" : "508",
"s" : [ {
"value" : [ "E" ]
} ]
}, {
"value" : [ "." ]
}, {
"r" : "509",
"s" : [ {
"value" : [ "url" ]
} ]
} ]
}, {
"value" : [ " ","="," " ]
}, {
"r" : "512",
"s" : [ {
"value" : [ "(" ]
}, {
"r" : "512",
"s" : [ {
"r" : "510",
"s" : [ {
"value" : [ "'http://hl7.org/fhir/StructureDefinition/'" ]
} ]
}, {
"value" : [ " + " ]
}, {
"r" : "511",
"s" : [ {
"value" : [ "id" ]
} ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
}, {
"value" : [ "\n\t\t" ]
}, {
"r" : "515",
"s" : [ {
"value" : [ "return " ]
}, {
"r" : "514",
"s" : [ {
"value" : [ "E" ]
} ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "516",
"locator" : "268:3-270:10",
"type" : "Query",
"source" : [ {
"localId" : "507",
"locator" : "268:3-268:29",
"alias" : "E",
"expression" : {
"localId" : "506",
"locator" : "268:3-268:27",
"path" : "modifierExtension",
"type" : "Property",
"source" : {
"name" : "element",
"type" : "OperandRef"
}
}
} ],
"relationship" : [ ],
"where" : {
"localId" : "513",
"locator" : "269:4-269:66",
"type" : "Equal",
"operand" : [ {
"name" : "ToString",
"libraryName" : "FHIRHelpers",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "509",
"locator" : "269:10-269:14",
"path" : "url",
"scope" : "E",
"type" : "Property"
} ]
}, {
"localId" : "512",
"locator" : "269:18-269:66",
"type" : "Concatenate",
"operand" : [ {
"localId" : "510",
"locator" : "269:19-269:60",
"valueType" : "{urn:hl7-org:elm-types:r1}String",
"value" : "http://hl7.org/fhir/StructureDefinition/",
"type" : "Literal"
}, {
"localId" : "511",
"locator" : "269:64-269:65",
"name" : "id",
"type" : "OperandRef"
} ]
} ]
},
"return" : {
"localId" : "515",
"locator" : "270:3-270:10",
"expression" : {
"localId" : "514",
"locator" : "270:10",
"name" : "E",
"type" : "AliasRef"
}
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "504",
"locator" : "267:48-267:62",
"name" : "{http://hl7.org/fhir}BackboneElement",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "505",
"locator" : "267:68-267:73",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
}, {
"localId" : "524",
"locator" : "277:1-278:52",
"name" : "BaseModifierExtension",
"context" : "Patient",
"accessLevel" : "Public",
"type" : "FunctionDef",
"annotation" : [ {
"type" : "Annotation",
"t" : [ {
"name" : "description",
"value" : "Returns the single base-FHIR extension (if present) on the given element with the specified id."
}, {
"name" : "comment",
"value" : "This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url."
} ],
"s" : {
"r" : "524",
"s" : [ {
"value" : [ "/*\n@description: Returns the single base-FHIR extension (if present) on the given element with the specified id.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\n","define function ","BaseModifierExtension","(","element"," " ]
}, {
"r" : "518",
"s" : [ {
"value" : [ "BackboneElement" ]
} ]
}, {
"value" : [ ", ","id"," " ]
}, {
"r" : "519",
"s" : [ {
"value" : [ "String" ]
} ]
}, {
"value" : [ "):\n " ]
}, {
"r" : "523",
"s" : [ {
"r" : "523",
"s" : [ {
"value" : [ "singleton from " ]
}, {
"r" : "522",
"s" : [ {
"value" : [ "BaseModifierExtensions","(" ]
}, {
"r" : "520",
"s" : [ {
"value" : [ "element" ]
} ]
}, {
"value" : [ ", " ]
}, {
"r" : "521",
"s" : [ {
"value" : [ "id" ]
} ]
}, {
"value" : [ ")" ]
} ]
} ]
} ]
} ]
}
} ],
"expression" : {
"localId" : "523",
"locator" : "278:3-278:52",
"type" : "SingletonFrom",
"operand" : {
"localId" : "522",
"locator" : "278:18-278:52",
"name" : "BaseModifierExtensions",
"type" : "FunctionRef",
"operand" : [ {
"localId" : "520",
"locator" : "278:41-278:47",
"name" : "element",
"type" : "OperandRef"
}, {
"localId" : "521",
"locator" : "278:50-278:51",
"name" : "id",
"type" : "OperandRef"
} ]
}
},
"operand" : [ {
"name" : "element",
"operandTypeSpecifier" : {
"localId" : "518",
"locator" : "277:47-277:61",
"name" : "{http://hl7.org/fhir}BackboneElement",
"type" : "NamedTypeSpecifier"
}
}, {
"name" : "id",
"operandTypeSpecifier" : {
"localId" : "519",
"locator" : "277:67-277:72",
"name" : "{urn:hl7-org:elm-types:r1}String",
"type" : "NamedTypeSpecifier"
}
} ]
} ]
}
}
}