<?xml-model href="../../../core/DECOR.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<decor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../core/DECOR.xsd" xmlns:f="http://hl7.org/fhir" f:dummy-0="http://hl7.org/fhir">
    <project id="2.16.840.1.113883.3.1937.99.60.10" prefix="demo10-" experimental="true" defaultLanguage="en-US">
        <name language="en-US" lastTranslated="2022-06-27T19:06:39">Demo 10: Test set for ART-DECOR using FHIR</name>
        <desc language="en-US" lastTranslated="2022-06-27T19:06:39">This is the demo project with a set of tests for ART-DECOR using <ul>
                <li>StructureDefinition (FHIR profiles, managed by the Rules-&gt;Profiles Panel)</li>
                <li>Questionnaire/QuestionnaireResponse (FHIR artefacts, managed by the Rules-&gt;Questionnaires Panel)</li>
            </ul>
        </desc>
        <copyright years="2021-" by="The ART-DECOR Expert Group" type="author" logo="art-decor-logo2.png">
            <addrLine>The ART-DECOR Expert Group</addrLine>
            <addrLine type="email">info@art-decor.org</addrLine>
            <addrLine type="email">contact@art-decor.org</addrLine>
            <addrLine type="uri">https://art-decor.org</addrLine>
            <addrLine type="linkedin">https://www.linkedin.com/company/art-decor-org</addrLine>
            <addrLine type="twitter">https://twitter.com/artdecortool</addrLine>
        </copyright>
        <copyright years="2021-" by="ART-DECOR Open Tools GmbH" type="reviewer" logo="art-decor-open-tools.jpg">
            <addrLine>ART-DECOR Open Tools GmbH</addrLine>
            <addrLine type="email">info@art-decor-open-tools.net</addrLine>
            <addrLine type="uri">https://art-decor-open-tools.net</addrLine>
            <addrLine type="linkedin">https://www.linkedin.com/company/art-decor-open-tools</addrLine>
        </copyright>
        <author id="1" username="admin" notifier="off">Admin</author>
        <author id="2" username="kai" email="info@kheitmann.de" notifier="on" effectiveDate="2022-06-27T19:06:39">dr Kai Heitmann</author>
        <author id="3" username="fritz" notifier="off" expirationDate="2022-01-01T00:00:00" active="false">Fritz Expired</author>
        <reference url="https://examples.art-decor.pub/demo10/"/>
        <restURI for="FHIR" format="4.0">https://art-decor.org/fhir/4.0/</restURI>
        <buildingBlockRepository url="http://art-decor.org/decor/services/" ident="ad1bbr-"/>
        <buildingBlockRepository url="http://art-decor.org/decor/services/" ident="ad2bbr-"/>
        <buildingBlockRepository url="http://art-decor.org/decor/services/" ident="ad3bbr-"/>
        <buildingBlockRepository url="http://art-decor.org/decor/services/" ident="hl7ips-"/>
    </project>
    <datasets>
        <dataset id="2.16.840.1.113883.3.1937.99.60.10.1.1" statusCode="draft" effectiveDate="2022-01-03T00:00:00" lastModifiedDate="2022-08-22T22:59:37">
            <name language="en-US">Vital Signs</name>
            <desc language="en-US">Decor Demo 10 dataset: Vital Signs, actually only two, for simplicity reasons. <p/> It has two main groups: <ul>
                    <li>one for a rudimentary set of patient demographic data</li>
                    <li>one for a minimal set of vital signs, body weight, heart rate and body temperature</li>
                </ul>
            </desc>
            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.85" effectiveDate="2023-02-22T15:55:02" statusCode="draft" lastModifiedDate="2023-02-22T15:55:19">
                <contains ref="2.16.840.1.113883.3.1937.99.60.10.2.11" flexibility="2022-01-03T00:00:00"/>
            </concept>
            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.3" type="group" statusCode="draft" effectiveDate="2022-01-03T00:00:00" lastModifiedDate="2023-02-22T15:55:19">
                <name language="en-US">Vital Signs</name>
                <desc language="en-US">Set of Vital Signs to be used in the demo project</desc>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.80" effectiveDate="2022-01-03T00:00:00" statusCode="draft" type="item" lastModifiedDate="2022-06-27T18:00:10">
                    <name language="en-US" lastTranslated="2022-06-27T18:00:10">Date</name>
                    <desc language="en-US" lastTranslated="2022-06-27T18:00:10">Date when the measurement took place</desc>
                    <operationalization language="en-US" lastTranslated="2022-06-27T18:00:10"><p>This shall be the dat when the measurement was performed, (not when documented).</p></operationalization>
                    <valueDomain type="datetime"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.81" type="item" statusCode="draft" effectiveDate="2022-01-03T00:00:00">
                    <name language="en-US">Body weight</name>
                    <desc language="en-US">Body weight, measured in kg</desc>
                    <valueDomain type="quantity">
                        <property unit="kg"/>
                    </valueDomain>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.82" effectiveDate="2022-01-03T00:00:00" type="item" statusCode="draft">
                    <name language="en-US">Heart rate</name>
                    <desc language="en-US">Heart rate</desc>
                    <valueDomain type="quantity">
                        <property unit="/min"/>
                    </valueDomain>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.84" effectiveDate="2022-06-28T10:33:46" statusCode="draft" type="item" lastModifiedDate="2022-06-28T10:38:13">
                    <name language="en-US" lastTranslated="2022-06-28T10:36:04">Pulse Regularity</name>
                    <desc language="en-US" lastTranslated="2022-06-28T10:36:04"><p>Pulse rhythm regularity</p></desc>
                    <operationalization language="en-US" lastTranslated="2022-06-28T10:38:13"><p>Place the tips of your first and second finger on the inside of the patient's wrist. Press gently against the pulse. Take your time to note any irregularities in strength or rhythm. If the pulse is regular and strong, <strong>measure the pulse for 30 seconds</strong>.</p></operationalization>
                    <valueDomain type="code">
                        <conceptList id="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.0">
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.1" exception="false">
                                <name language="en-US" lastTranslated="2022-06-28T10:38:13">regular</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.2" exception="false">
                                <name language="en-US" lastTranslated="2022-06-28T10:38:13">irregular</name>
                            </concept>
                        </conceptList>
                    </valueDomain>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.83" type="item" statusCode="draft" effectiveDate="2022-01-03T00:00:00">
                    <name language="en-US">Body temperature</name>
                    <desc language="en-US">Body temperature</desc>
                    <valueDomain type="quantity">
                        <property unit="C"/>
                    </valueDomain>
                </concept>
            </concept>
        </dataset>
        <dataset id="2.16.840.1.113883.3.1937.99.60.10.1.2" effectiveDate="2021-12-10T18:00:33" statusCode="final" lastModifiedDate="2023-02-22T12:32:47" versionLabel="v1">
            <name language="en-US">Estimated Delivery Date</name>
            <desc language="en-US">Estimated Delivery Date</desc>
            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.6" effectiveDate="2022-01-03T00:00:00" statusCode="final" type="group" versionLabel="v 1" lastModifiedDate="2023-02-22T12:32:47">
                <name language="en-US" lastTranslated="2021-12-10T18:02:15">Estimated Delivery</name>
                <desc language="en-US" lastTranslated="2021-12-10T18:02:15"><p>Estimated Delivery</p></desc>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.4" effectiveDate="2021-12-10T18:00:33" statusCode="final" type="item" lastModifiedDate="2023-02-22T12:32:47">
                    <name language="en-US" lastTranslated="2021-12-10T18:01:11">Estimated Delivery Date</name>
                    <desc language="en-US" lastTranslated="2021-12-10T18:01:11">Estimated Delivery Date</desc>
                    <valueDomain type="date"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.5" effectiveDate="2021-12-10T18:01:35" statusCode="final" type="item" lastModifiedDate="2023-02-22T12:32:47">
                    <name language="en-US" lastTranslated="2021-12-10T18:01:49">Determined on</name>
                    <desc language="en-US" lastTranslated="2021-12-10T18:01:49">Determined on</desc>
                    <valueDomain type="date"/>
                </concept>
            </concept>
        </dataset>
        <dataset id="2.16.840.1.113883.3.1937.99.60.10.1.3" effectiveDate="2021-12-10T18:00:33" statusCode="draft" versionLabel="v2" lastModifiedDate="2023-02-22T12:56:40">
            <name language="en-US">Estimated Delivery Date</name>
            <desc language="en-US">Estimated Delivery Date</desc>
            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.7" effectiveDate="2021-12-10T18:03:42" statusCode="draft" type="group" versionLabel="v 2" lastModifiedDate="2022-12-08T22:01:44">
                <name language="en-US" lastTranslated="2021-12-10T18:03:57">Estimated Delivery</name>
                <desc language="en-US" lastTranslated="2021-12-10T18:03:57"><p>Estimated Delivery</p></desc>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.1" effectiveDate="2022-01-03T00:00:00" statusCode="draft">
                    <inherit ref="2.16.840.1.113883.3.1937.99.60.10.2.4" effectiveDate="2021-12-10T18:00:33"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.9" effectiveDate="2021-12-10T18:04:47" statusCode="draft">
                    <inherit ref="2.16.840.1.113883.3.1937.99.60.10.2.5" effectiveDate="2021-12-10T18:01:35"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10" effectiveDate="2021-12-10T18:05:08" statusCode="draft" type="item" versionLabel="123" lastModifiedDate="2022-12-08T22:01:44">
                    <name language="en-US" lastTranslated="2021-12-10T18:05:26">Method of estimation</name>
                    <desc language="en-US" lastTranslated="2021-12-10T18:05:26"><p>Method of estimation</p></desc>
                    <valueDomain type="code">
                        <conceptList id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.0">
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.1" exception="false">
                                <name language="en-US" lastTranslated="2021-12-10T18:07:04">last ovulation</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.2" exception="false">
                                <name language="en-US" lastTranslated="2021-12-10T18:07:04">last conception</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.3" exception="false">
                                <name language="en-US" lastTranslated="2021-12-10T18:07:04">last menstrual period </name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.4" exception="false">
                                <name language="en-US" lastTranslated="2021-12-10T18:07:04">quickening</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.5" exception="false">
                                <name language="en-US" lastTranslated="2021-12-10T18:07:04">ultrassound</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.6" exception="false">
                                <name language="en-US" lastTranslated="2022-06-27T18:41:10">prior gestational age assessment</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.7" exception="false">
                                <name language="en-US" lastTranslated="2022-09-28T14:46:00">fundal height reaches umb</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.8" exception="false">
                                <name language="en-US" lastTranslated="2022-09-28T14:46:00">physical exam</name>
                            </concept>
                        </conceptList>
                    </valueDomain>
                </concept>
            </concept>
        </dataset>
        <dataset id="2.16.840.1.113883.3.1937.99.60.10.1.4" effectiveDate="2022-01-03T00:00:00" statusCode="draft" versionLabel="v1" lastModifiedDate="2023-02-22T21:49:54">
            <name language="en-US" lastTranslated="2023-02-22T15:42:51">Patient</name>
            <desc language="en-US" lastTranslated="2023-02-22T15:42:51">Decor Demo 10 dataset: Patient</desc>
            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.11" effectiveDate="2022-01-03T00:00:00" statusCode="draft" type="group" lastModifiedDate="2023-02-22T21:49:54">
                <name language="en-US" lastTranslated="2023-02-22T15:42:35">Patient</name>
                <desc language="en-US" lastTranslated="2023-02-22T15:42:35"><p>Patient as a Person</p></desc>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.31" type="item" statusCode="draft" effectiveDate="2022-01-03T00:00:00">
                    <name language="en-US">Name</name>
                    <desc language="en-US">Name of the person, handled here as a simple string only</desc>
                    <valueDomain type="string"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.30" type="item" statusCode="draft" effectiveDate="2022-01-03T00:00:00">
                    <name language="en-US">Date of birth</name>
                    <desc language="en-US">Date of birth of the person</desc>
                    <valueDomain type="date"/>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.40" effectiveDate="2022-01-03T00:00:00" statusCode="draft" type="item" lastModifiedDate="2023-02-22T15:43:15">
                    <name language="en-US" lastTranslated="2022-08-22T22:58:58">Gender</name>
                    <desc language="en-US" lastTranslated="2022-08-22T22:58:58">Gender of the person, administraive and only a subset of choices here</desc>
                    <valueDomain type="code">
                        <conceptList id="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.0">
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.1" exception="false">
                                <name language="en-US" lastTranslated="2022-08-22T22:59:37">male</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.2" exception="false">
                                <name language="en-US" lastTranslated="2022-08-22T22:59:37">female</name>
                            </concept>
                            <concept id="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.3" exception="false">
                                <name language="en-US" lastTranslated="2022-08-22T22:59:37">divers</name>
                            </concept>
                        </conceptList>
                    </valueDomain>
                </concept>
                <concept id="2.16.840.1.113883.3.1937.99.60.10.2.20" effectiveDate="2022-01-03T00:00:00" statusCode="draft" type="item" lastModifiedDate="2023-02-22T15:42:51">
                    <name language="en-US" lastTranslated="2023-02-22T15:42:51">National Patient Identifier</name>
                    <desc language="en-US" lastTranslated="2023-02-22T15:42:51">National Patient Identifier</desc>
                    <valueDomain type="identifier"/>
                </concept>
            </concept>
        </dataset>
    </datasets>
    <scenarios>
        <actors>
            <actor id="2.16.840.1.113883.3.1937.99.60.10.7.1" type="person">
                <name language="en-US">Patient</name>
                <desc language="en-US">Patient performing the vital signs mesurement</desc>
            </actor>
            <actor id="2.16.840.1.113883.3.1937.99.60.10.7.2" type="person">
                <name language="en-US">Gynecologist</name>
                <desc language="en-US">Gynecologist performing the estimation of the delivery date</desc>
            </actor>
        </actors>
        <scenario id="2.16.840.1.113883.3.1937.99.60.10.3.1" effectiveDate="2022-02-16T00:00:00" statusCode="draft" lastModifiedDate="2022-12-08T22:33:51">
            <name language="en-US">Vital Signs</name>
            <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.1" effectiveDate="2022-02-16T00:00:00" statusCode="draft" type="group" lastModifiedDate="2022-06-28T11:07:05">
                <name language="en-US" lastTranslated="2022-02-16T16:38:59">Daily Recording of base Vital Signs</name>
                <trigger language="en-US" lastTranslated="2022-02-16T16:41:54"><p>Done daily around noon.</p></trigger>
                <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.2" effectiveDate="2022-02-16T00:00:00" statusCode="draft" type="stationary" label="recordvitalsigns" model="POCD_MT000040" lastModifiedDate="2022-06-28T11:07:05">
                    <name language="en-US" lastTranslated="2022-02-16T16:38:59">Vital Signs Measurement</name>
                    <desc language="en-US" lastTranslated="2022-02-16T17:03:25"><p>This is a single measurement of Vitals Signs, done daily, preferably at noon.</p></desc>
                    <trigger language="en-US" lastTranslated="2022-02-16T16:39:47"><p>Shall be done every day around noon, the doctor said.</p></trigger>
                    <actors>
                        <actor id="2.16.840.1.113883.3.1937.99.60.10.7.1" role="stationary"/>
                    </actors>
                    <representingTemplate sourceDataset="2.16.840.1.113883.3.1937.99.60.10.1.1" sourceDatasetFlexibility="2022-01-03T00:00:00" representingQuestionnaire="2.16.840.1.113883.3.1937.99.60.10.27.3" representingQuestionnaireFlexibility="2022-08-12T21:36:04">
                        <!--group 3 :: Vital Signs-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.3" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 80 :: Date-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.80" flexibility="2022-01-03T00:00:00" conformance="C">
                            <condition minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"><desc language="en-US" lastTranslated="2022-02-17T11:11:17">If you know what the date is</desc></condition>
                            <condition conformance="NP">
                                <desc language="en-US" lastTranslated="2022-02-17T11:11:17">Otherwise</desc></condition>
                        </concept>
                        <!--item 81 :: Body weight-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.81" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 82 :: Heart rate-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.82" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 84 :: Pulse Regularity-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.84" flexibility="2022-06-28T10:33:46" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 83 :: Body temperature-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.83" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                    </representingTemplate>
                </transaction>
            </transaction>
            <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.3" effectiveDate="2022-02-16T00:00:00" statusCode="draft" type="group" lastModifiedDate="2022-06-28T11:06:34">
                <name language="en-US" lastTranslated="2022-02-16T16:38:59">Base Vital Signs Report</name>
                <desc language="en-US" lastTranslated="2022-02-16T16:38:59">Base Vital Signs Report</desc>
                <trigger language="en-US" lastTranslated="2022-02-16T16:41:54"><p>Done daily around noon.</p></trigger>
                <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.4" effectiveDate="2022-02-16T00:00:00" statusCode="draft" type="stationary" label="reportvitalsigns" model="POCD_MT000040" lastModifiedDate="2022-06-28T11:06:34">
                    <name language="en-US" lastTranslated="2022-02-16T16:38:59">Vital Signs Report</name>
                    <desc language="en-US" lastTranslated="2022-02-16T16:38:59">Vital Signs Report</desc>
                    <trigger language="en-US" lastTranslated="2022-02-16T16:39:47"><p>Shall be done every day around noon, the doctor said.</p></trigger>
                    <actors>
                        <actor id="2.16.840.1.113883.3.1937.99.60.10.7.1" role="stationary"/>
                    </actors>
                    <representingTemplate sourceDataset="2.16.840.1.113883.3.1937.99.60.10.1.1" sourceDatasetFlexibility="2022-01-03T00:00:00">
                        <!--group 85 :: Patient-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.85" flexibility="2023-02-22T15:55:02" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--<transaction ref="2.16.840.1.113883.3.1937.99.60.10.4.8" flexibility="2023-02-23T00:00:00"/>-->
                        <!--group 3 :: Vital Signs-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.3" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="*" conformance="R"/>
                        <!--item 80 :: Date-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.80" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 81 :: Body weight-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.81" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 82 :: Heart rate-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.82" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 84 :: Pulse Regularity-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.84" flexibility="2022-06-28T10:33:46" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 83 :: Body temperature-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.83" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                    </representingTemplate>
                </transaction>
            </transaction>
        </scenario>
        <scenario id="2.16.840.1.113883.3.1937.99.60.10.3.2" effectiveDate="2022-06-21T00:00:00" statusCode="draft" lastModifiedDate="2022-06-21T13:57:02">
            <name language="en-US">Estimated Delivery Date</name>
            <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.5" effectiveDate="2022-06-21T00:00:00" statusCode="draft" type="group" lastModifiedDate="2022-06-21T13:57:02">
                <name language="en-US" lastTranslated="2022-06-21T13:51:55">Estimated Delivery Date Determination</name>
                <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.6" effectiveDate="2022-06-21T00:00:00" statusCode="draft" type="stationary" lastModifiedDate="2022-06-21T13:57:02">
                    <name language="en-US" lastTranslated="2022-06-21T13:51:55">Estimated Delivery Date Documentation</name>
                    <actors>
                        <actor id="2.16.840.1.113883.3.1937.99.60.10.7.2" role="stationary"/>
                    </actors>
                    <representingTemplate sourceDataset="2.16.840.1.113883.3.1937.99.60.10.1.3" sourceDatasetFlexibility="2021-12-10T18:00:33">
                        <!--group 7 :: Estimated Delivery-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.7" flexibility="2021-12-10T18:03:42" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 8 :: Estimated Delivery Date-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.1" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 9 :: Determined on-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.9" flexibility="2021-12-10T18:04:47" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 10 :: Method of estimation-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.10" flexibility="2021-12-10T18:05:08" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                    </representingTemplate>
                </transaction>
            </transaction>
        </scenario>
        <scenario id="2.16.840.1.113883.3.1937.99.60.10.3.3" effectiveDate="2023-02-23T00:00:00" statusCode="draft" lastModifiedDate="2023-02-23T16:00:34">
            <name language="en-US">Patient</name>
            <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.7" effectiveDate="2023-02-23T00:00:00" statusCode="draft" type="group" lastModifiedDate="2023-02-23T16:00:34">
                <name language="en-US" lastTranslated="2023-02-23T15:58:53">Registration</name>
                <transaction id="2.16.840.1.113883.3.1937.99.60.10.4.8" effectiveDate="2023-02-23T00:00:00" statusCode="draft" type="stationary" lastModifiedDate="2023-02-23T16:00:34">
                    <name language="en-US" lastTranslated="2023-02-23T15:58:53">Patient (typical)</name>
                    <actors>
                        <actor id="2.16.840.1.113883.3.1937.99.60.10.7.1" role="sender"/>
                    </actors>
                    <representingTemplate sourceDataset="2.16.840.1.113883.3.1937.99.60.10.1.4" sourceDatasetFlexibility="2022-01-03T00:00:00">
                        <!--group 11 :: Patient-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.11" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 10 :: Name-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.31" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                        <!--item 30 :: Date of birth-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.30" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 40 :: Gender-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.40" flexibility="2022-01-03T00:00:00" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R"/>
                        <!--item 20 :: National Patient Identifier-->
                        <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.20" flexibility="2022-01-03T00:00:00" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R"/>
                    </representingTemplate>
                </transaction>
            </transaction>
        </scenario>
    </scenarios>
    <ids>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.1" type="DS" prefix="demo10-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.2" type="DE" prefix="demo10-dataelement-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.3" type="SC" prefix="demo10-scenario-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.4" type="TR" prefix="demo10-transactions-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.5" type="CS" prefix="demo10-codesystem-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.6" type="IS" prefix="demo10-issue-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.7" type="AC" prefix="demo10-actors-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.8" type="CL" prefix="demo10-conceptlist-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.9" type="EL" prefix="demo10-element-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.10" type="TM" prefix="demo10-template-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.11" type="VS" prefix="demo10-valueset-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.12" type="RL" prefix="demo10-regel-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.17" type="SX" prefix="demo10-example-scenario-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.18" type="TX" prefix="demo10-example-transaction-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.19" type="EX" prefix="demo10-example-instance-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.20" type="QX" prefix="demo10-qualification-test-instances-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.22" type="CM" prefix="demo10-mycommunity-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.24" type="MP" prefix="demo10-mapping-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.26" type="SD" prefix="demo10-structuredefinition-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.27" type="QQ" prefix="demo10-questionnaire-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.28" type="QR" prefix="demo10-questionnaire-response-"/>
        <baseId id="2.16.840.1.113883.3.1937.99.60.10.29" type="IG" prefix="demo10-implementationguide-"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.1" type="DS"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.2" type="DE"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.3" type="SC"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.4" type="TR"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.5" type="CS"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.6" type="IS"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.7" type="AC"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.8" type="CL"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.9" type="EL"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.10" type="TM"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.11" type="VS"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.12" type="RL"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.17" type="SX"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.18" type="TX"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.19" type="EX"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.20" type="QX"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.22" type="CM"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.24" type="MP"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.26" type="SD"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.27" type="QQ"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.28" type="QR"/>
        <defaultBaseId id="2.16.840.1.113883.3.1937.99.60.10.29" type="IG"/>
    </ids>
    <terminology>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.83" conceptFlexibility="2022-01-03T00:00:00" code="8310-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Body temperature" effectiveDate="2020-06-24T16:31:24"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.83" conceptFlexibility="2022-01-03T00:00:00" code="386725007" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Body temperature (observable entity)" effectiveDate="2020-06-24T16:32:02"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.3.8.130.2" code="F" codeSystem="2.16.840.1.113883.5.1" displayName="Female" effectiveDate="2020-06-24T17:53:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.3.8.130.1" code="M" codeSystem="2.16.840.1.113883.5.1" displayName="Male" effectiveDate="2020-06-24T17:53:51"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.4" conceptFlexibility="2021-12-10T18:00:33" code="161714006" codeSystem="2.16.840.1.113883.6.96" displayName="Estimated date of delivery (observable entity)" effectiveDate="2022-06-21T13:59:15"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.4" conceptFlexibility="2021-12-10T18:00:33" code="11778-8" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated" effectiveDate="2022-06-21T13:59:15"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.0" valueSet="2.16.840.1.113883.3.1937.99.60.10.11.10" flexibility="dynamic" strength="preferred" effectiveDate="2022-06-27T18:41:46"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.0" valueSet="2.16.840.1.113883.1.11.1" effectiveDate="2020-06-24T17:53:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.1" code="F" codeSystem="2.16.840.1.113883.5.1" displayName="female" effectiveDate="2020-06-24T17:53:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.2" code="M" codeSystem="2.16.840.1.113883.5.1" displayName="male" effectiveDate="2020-06-24T17:53:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.40.20220103000000.3" code="UN" codeSystem="2.16.840.1.113883.5.1" displayName="undifferentiated" effectiveDate="2020-06-24T17:53:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.81" conceptFlexibility="2022-01-03T00:00:00" code="3141-9" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Measured" equivalence="equivalent" effectiveDate="2022-06-27T18:44:10"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.82" conceptFlexibility="2022-01-03T00:00:00" code="8867-4" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate" equivalence="equivalent" effectiveDate="2022-06-27T18:44:42"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.2" code="LA19581-0" codeSystem="2.16.840.1.113883.6.1" displayName="Arrhythmic" effectiveDate="2020-06-24T17:58:07"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.1" code="LA28148-7" codeSystem="2.16.840.1.113883.6.1" displayName="Rhythmic" effectiveDate="2020-06-24T17:57:57"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.2" code="275954009" codeSystem="2.16.840.1.113883.6.96" displayName="On examination - irregular pulse (finding)" effectiveDate="2020-06-24T17:57:38"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.1" code="162999005" codeSystem="2.16.840.1.113883.6.96" displayName="On examination - pulse rhythm regular (finding)" effectiveDate="2020-06-24T17:57:28"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.2" code="53692-0" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from conception date" effectiveDate="2022-08-18T19:19:45"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.3" code="11779-6" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from last menstrual period" effectiveDate="2022-08-18T19:20:13"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.1" code="11780-4" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from ovulation date" effectiveDate="2022-09-28T14:28:29"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.5" code="11781-2" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date US composite estimate" effectiveDate="2022-09-28T14:28:38"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.4" code="57063-0" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from quickening date" effectiveDate="2022-09-28T14:28:47"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.6" code="53694-6" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from prior gestational age assessment" effectiveDate="2022-09-28T14:28:53"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84" conceptFlexibility="2022-06-28T10:33:46" code="88104-5" codeSystem="2.16.840.1.113883.6.1" displayName="Rhythmic or arrhythmic heart rate" effectiveDate="2022-09-28T14:42:44"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.0" valueSet="2.16.840.1.113883.3.1937.99.60.10.11.12" flexibility="dynamic" strength="CNE" effectiveDate="2022-09-28T14:43:04"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.84.20220628103346.0" valueSet="2.16.840.1.113883.3.1937.99.60.10.11.11" flexibility="dynamic" effectiveDate="2022-09-28T14:43:10"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.7" code="57064-8" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from date fundal height reaches umb" effectiveDate="2022-09-28T14:46:30"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.10.20211210180508.8" code="90368-2" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from physical exam" effectiveDate="2022-09-28T14:46:32"/>
        <terminologyAssociation conceptId="2.16.840.1.113883.3.1937.99.60.10.2.81" conceptFlexibility="2022-01-03T00:00:00" code="29463-7" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight" effectiveDate="2022-11-17T14:36:31"/>

        <codeSystem ref="2.16.840.1.113883.5.1" name="AdministrativeGender" displayName="AdministrativeGender"/>
        <codeSystem ref="2.16.840.1.113883.6.1" name="LOINC" displayName="LOINC"/>
        <codeSystem ref="2.16.840.1.113883.6.96" name="SNOMED-CT" displayName="SNOMED-CT"/>
        <valueSet ref="2.16.840.1.113883.1.11.1" name="AdministrativeGender" displayName="AdministrativeGender"/>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.7" name="HeartRateByMethod" displayName="Heart Rate By Method" effectiveDate="2013-12-31T00:00:00" statusCode="draft">
            <desc language="en-US">Heart Rate By Method, LOINC coded</desc>
            <conceptList>
                <concept code="8867-4" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate" level="0" type="L"/>
                <concept code="68999-2" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate -supine" level="1" type="L"/>
                <concept code="40443-4" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate -resting" level="1" type="L"/>
                <concept code="69000-8" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate -sitting" level="1" type="L"/>
                <concept code="69001-6" codeSystem="2.16.840.1.113883.6.1" displayName="Heart rate -standing" level="1" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.8" name="BodyWeightByMethod" displayName="Body Weight By Method" effectiveDate="2013-12-31T00:00:00" statusCode="draft">
            <desc language="en-US">Body Weight By Method, LOINC coded</desc>
            <conceptList>
                <concept code="3141-9" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Measured" level="0" type="L"/>
                <concept code="8350-1" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Measured -with clothes" level="1" type="L"/>
                <concept code="8351-9" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Measured -without clothes" level="1" type="L"/>
                <concept code="3142-7" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Stated" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.9" name="BodyTemperatureByMethod" displayName="Body Temperature By Method" effectiveDate="2013-12-31T00:00:00" statusCode="draft">
            <desc language="en-US">Body Temperature By Method, LOINC coded</desc>
            <conceptList>
                <concept code="8310-5" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature" level="0" type="L"/>
                <concept code="8329-5" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Core" level="1" type="L"/>
                <concept code="8331-1" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Mouth" level="1" type="L"/>
                <concept code="8332-9" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Rectum" level="1" type="L"/>
                <concept code="8328-7" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Axillary" level="1" type="L"/>
                <concept code="8330-3" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Intravascular" level="1" type="L"/>
                <concept code="8334-5" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Urinary bladder" level="1" type="L"/>
                <concept code="8333-7" codeSystem="2.16.840.1.113883.6.1" displayName="Body temperature - Tympanic membrane" level="1" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.10" name="EstimatedDeliveryDateByMethod" displayName="Estimated Delivery Date By Method" effectiveDate="2022-06-10T00:00:00" statusCode="draft">
            <desc language="en-US">Estimated Delivery Date, LOINC coded</desc>
            <conceptList>
                <concept code="11778-8" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated" level="0" type="L"/>
                <concept code="11779-6" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from last menstrual period" level="1" type="L"/>
                <concept code="11780-4" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from ovulation date" level="1" type="L"/>
                <concept code="11781-2" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date US composite estimate" level="1" type="L"/>
                <concept code="53692-0" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from conception date" level="1" type="L"/>
                <concept code="53694-6" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from prior gestational age assessment" level="1" type="L"/>
                <concept code="57063-0" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from quickening date" level="1" type="L"/>
                <concept code="57064-8" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from date fundal height reaches umb" level="1" type="L"/>
                <concept code="90368-2" codeSystem="2.16.840.1.113883.6.1" displayName="Delivery date Estimated from physical exam" level="1" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.11" name="PulseRhythmsnomed" displayName="Pulse Rhythm (SNOMED)" effectiveDate="2022-06-10T00:00:00" statusCode="draft">
            <conceptList>
                <concept code="162999005" codeSystem="2.16.840.1.113883.6.96" displayName="On examination - pulse rhythm regular (finding)" level="0" type="L"/>
                <concept code="275954009" codeSystem="2.16.840.1.113883.6.96" displayName="On examination - irregular pulse (finding)" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.12" name="PulseRhythmloinc" displayName="Pulse Rhythm (LOINC)" effectiveDate="2022-06-10T00:00:00" statusCode="draft">
            <conceptList>
                <concept code="LA28148-7" codeSystem="2.16.840.1.113883.6.1" displayName="Rhythmic" level="0" type="L"/>
                <concept code="LA19581-0" codeSystem="2.16.840.1.113883.6.1" displayName="Arrhythmic" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="2.16.840.1.113883.3.1937.99.60.10.11.13" name="MedicationTimeUnits" displayName="Medication Time Units (UCUM)" effectiveDate="2023-02-01T11:12:08" statusCode="final" versionLabel="3.0" lastModifiedDate="2023-02-01T11:13:32">
            <desc language="en-US" lastTranslated="2023-02-01T11:12:08">Medication Time Units, expressed in UCUM</desc>
            <conceptList>
                <concept code="a" codeSystem="2.16.840.1.113883.6.8" displayName="Year" level="0" type="L"/>
                <concept code="d" codeSystem="2.16.840.1.113883.6.8" displayName="Day" level="0" type="L"/>
                <concept code="h" codeSystem="2.16.840.1.113883.6.8" displayName="Hour" level="0" type="L"/>
                <concept code="min" codeSystem="2.16.840.1.113883.6.8" displayName="Minute" level="0" type="L"/>
                <concept code="mo" codeSystem="2.16.840.1.113883.6.8" displayName="Month" level="0" type="L"/>
                <concept code="s" codeSystem="2.16.840.1.113883.6.8" displayName="Second" level="0" type="L"/>
                <concept code="wk" codeSystem="2.16.840.1.113883.6.8" displayName="Week" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="1.3.6.1.4.1.12009.10.1.2209" name="LL356-7" displayName="GCS_2_Verbal" effectiveDate="2023-08-15T00:00:00" statusCode="final" versionLabel="Loinc_2.75" lastModifiedDate="2023-08-15T15:28:00" canonicalUri="http://loinc.org/vs/LL356-7">
            <publishingAuthority name="Regenstrief Institute, Inc.">
                <addrLine>Regenstrief Institute, Inc.</addrLine>
                <addrLine type="uri">https://loinc.org</addrLine>
            </publishingAuthority>
            <copyright language="en-US">This material contains content from LOINC (http://loinc.org). LOINC is copyright ©1995-2023, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.</copyright>
            <conceptList>
                <concept code="LA6557-8" codeSystem="2.16.840.1.113883.6.1" displayName="No verbal response (>2 yrs); no vocal response (&lt;=2 yrs)" level="0" type="L"/>
                <concept code="LA6558-6" codeSystem="2.16.840.1.113883.6.1" displayName="Incomprehensible sounds" level="0" type="L"/>
                <concept code="LA6559-4" codeSystem="2.16.840.1.113883.6.1" displayName="Inappropriate words" level="0" type="L"/>
                <concept code="LA6560-2" codeSystem="2.16.840.1.113883.6.1" displayName="Confused" level="0" type="L"/>
                <concept code="LA6561-0" codeSystem="2.16.840.1.113883.6.1" displayName="Oriented" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="1.3.6.1.4.1.12009.10.1.2215" name="LL357-5" displayName="GCS_3_Motor" effectiveDate="2023-08-15T00:00:00" statusCode="final" versionLabel="Loinc_2.75" lastModifiedDate="2023-08-15T15:28:00" canonicalUri="http://loinc.org/vs/LL357-5">
            <publishingAuthority name="Regenstrief Institute, Inc.">
                <addrLine>Regenstrief Institute, Inc.</addrLine>
                <addrLine type="uri">https://loinc.org</addrLine>
            </publishingAuthority>
            <copyright language="en-US">This material contains content from LOINC (http://loinc.org). LOINC is copyright ©1995-2023, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.</copyright>
            <conceptList>
                <concept code="LA6562-8" codeSystem="2.16.840.1.113883.6.1" displayName="No motor response" level="0" type="L"/>
                <concept code="LA6563-6" codeSystem="2.16.840.1.113883.6.1" displayName="Extension to pain" level="0" type="L"/>
                <concept code="LA6564-4" codeSystem="2.16.840.1.113883.6.1" displayName="Flexion to pain" level="0" type="L"/>
                <concept code="LA6565-1" codeSystem="2.16.840.1.113883.6.1" displayName="Withdrawal from pain" level="0" type="L"/>
                <concept code="LA6566-9" codeSystem="2.16.840.1.113883.6.1" displayName="Localizing pain" level="0" type="L"/>
                <concept code="LA6567-7" codeSystem="2.16.840.1.113883.6.1" displayName="Obeys commands" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet id="1.3.6.1.4.1.12009.10.1.2208" name="LL355-9" displayName="GCS_1_Eye" effectiveDate="2023-08-15T00:00:00" statusCode="final" versionLabel="Loinc_2.75" lastModifiedDate="2023-08-15T15:28:00" canonicalUri="http://loinc.org/vs/LL355-9">
            <publishingAuthority name="Regenstrief Institute, Inc.">
                <addrLine>Regenstrief Institute, Inc.</addrLine>
                <addrLine type="uri">https://loinc.org</addrLine>
            </publishingAuthority>
            <copyright language="en-US">This material contains content from LOINC (http://loinc.org). LOINC is copyright ©1995-2023, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.</copyright>
            <conceptList>
                <concept code="LA6553-7" codeSystem="2.16.840.1.113883.6.1" displayName="No eye opening" level="0" type="L"/>
                <concept code="LA6554-5" codeSystem="2.16.840.1.113883.6.1" displayName="Eye opening to pain" level="0" type="L"/>
                <concept code="LA6555-2" codeSystem="2.16.840.1.113883.6.1" displayName="Eye opening to verbal command" level="0" type="L"/>
                <concept code="LA6556-0" codeSystem="2.16.840.1.113883.6.1" displayName="Eyes open spontaneously" level="0" type="L"/>
            </conceptList>
        </valueSet>
        <valueSet ref="2.16.840.1.113883.1.11.12212" name="MaritalStatus" displayName="MaritalStatus"/>
        <valueSet ref="2.16.840.1.113883.1.11.20386" name="SeverityObservationCode" displayName="SeverityObservationCode"/>
        <valueSet ref="2.16.840.1.113883.11.22.18" name="IPSProblemSeverity" displayName="Problem Severity"/>
        <valueSet ref="2.16.840.1.113883.1.11.15933" name="ActStatus" displayName="ActStatus"/>
    </terminology>
    <rules>
        <template ref="2.16.840.1.113883.10.22.3.4" name="IPSHistoryofProceduresSection" displayName="IPS History of Procedures Section"/>
        <!-- IPS Severity Observation -->
        <templateAssociation templateId="2.16.840.1.113883.3.1937.99.60.10.10.1" effectiveDate="2022-08-10T12:33:16"/>
        <template id="2.16.840.1.113883.3.1937.99.60.10.10.1" name="EntrySeverity" displayName="IPS Severity Observation" effectiveDate="2022-08-10T12:33:16" statusCode="draft" versionLabel="STU1" lastModifiedDate="2022-08-10T12:39:01">
            <desc language="en-US" lastTranslated="2022-08-10T12:33:16"><p>This clinical statement represents the <strong>subjective assessment</strong> of the severity of the condition as evaluated by the clinician.<br/><br/>The Severity Observation can be associated with a Reaction Observation. </p><p>When the Severity Observation is associated with a Reaction Observation it characterizes a
                    reaction. A person may manifest many symptoms in a reaction to a single substance, and each reaction to the substance can be represented. However, each reaction observation can have only one severity observation associated with it. For example, someone may have a rash reaction observation as well as an itching reaction observation, but each can have only one level of
                    severity.</p></desc>
            <classification type="cdaentrylevel"/>
            <relationship type="ADAPT" template="1.3.6.1.4.1.19376.1.5.3.1.4.1" flexibility="dynamic"/>
            <relationship type="SPEC" template="2.16.840.1.113883.10.22.4.25" flexibility="2017-04-07T00:00:00"/>
            <context id="**"/>
            <example type="neutral">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.3.1937.99.60.10.10.1"/>
                    <id root="1.2.3.999" extension="__example only__"/>
                    <code code="SEV" displayName="Severity Observation" codeSystem="2.16.840.1.113883.5.4">
                        <text>
                            <reference value="#example"/>
                        </text>
                        <statusCode code="completed"/>
                        <value code="255604002" displayName="Mild" codeSystem="2.16.840.1.113883.6.96"/>
                    </code>
                </observation>
            </example>
            <element name="hl7:observation" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.11.9.1">
                <attribute name="classCode" value="OBS" datatype="cs" isOptional="true" id="2.16.840.1.113883.3.1937.777.11.9.2"/>
                <attribute name="moodCode" value="EVN" datatype="cs" id="2.16.840.1.113883.3.1937.777.11.9.3"/>
                <element name="hl7:templateId" datatype="II" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" isMandatory="true" id="2.16.840.1.113883.3.1937.777.13.9.148">
                    <attribute name="root" value="2.16.840.1.113883.3.1937.99.60.10.10.1" datatype="uid" id="2.16.840.1.113883.3.1937.777.13.9.149"/>
                </element>
                <element name="hl7:id" datatype="II" minimumMultiplicity="0" maximumMultiplicity="*" conformance="R" id="2.16.840.1.113883.3.1937.777.11.9.9"/>
                <element name="hl7:code" datatype="CD" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.11.9.10">
                    <vocabulary valueSet="2.16.840.1.113883.1.11.20386"/>
                </element>
                <element name="hl7:text" datatype="ED" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.11.9.11">
                    <desc language="en-US" lastTranslated="2022-08-10T12:33:16">If present, the <text> element shall contain a <reference> element pointing to the narrative where the severity is recorded</reference>
                        </text>
                    </desc>
                    <element name="hl7:reference" datatype="TEL" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" isMandatory="true" id="2.16.840.1.113883.3.1937.777.11.9.709">
                        <attribute name="value" id="2.16.840.1.113883.3.1937.777.11.9.710">
                            <desc language="en-US" lastTranslated="2022-08-10T12:33:16">Reference pointing to the narrative, typically #{label}-{generated-id}, e.g. #xxx-1</desc>
                        </attribute>
                    </element>
                </element>
                <element name="hl7:statusCode" datatype="CS" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" isMandatory="true" id="2.16.840.1.113883.3.1937.777.11.9.14">
                    <vocabulary code="completed"/>
                    <vocabulary code="active"/>
                </element>
                <element name="hl7:value" datatype="CD.IPS" strength="preferred" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.11.9.15">
                    <desc language="en-US" lastTranslated="2022-08-10T12:33:16">The &lt;value&gt; element contains the level of severity.</desc>
                    <vocabulary valueSet="2.16.840.1.113883.11.22.18"/>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.10.2" name="Useperiod" displayName="UV Use Period" effectiveDate="2023-01-30T09:55:27" statusCode="draft" versionLabel="2023" lastModifiedDate="2023-01-30T10:02:40">
            <desc language="en-US">This element encodes the start and stop time of the medication regimen. This is an interval of time (xsi:type='IVL_TS'), and must be specified as shown. This is an additional constraint placed upon CDA Release 2.0 by this profile, and simplifies the exchange of start/stop and frequency information between EMR systems.</desc>
            <classification type="cdaentrylevel"/>
            <choice minimumMultiplicity="1" maximumMultiplicity="1">
                <desc language="en-US">The effectiveTime element encodes the use period of the medication, it is always expressed as an interval of time.<br clear="none"/>It may be expressed using the low and high OR with the width element.<br clear="none"/>The first is used to indicate a specified interval (e.g. from march 15th, 2017); the latter for indicating a 'floating' period (e.g. 2
                    weeks).</desc>
                <element name="hl7:effectiveTime[hl7:low | hl7:high]" datatype="IVL_TS" minimumMultiplicity="0" maximumMultiplicity="1" conformance="C" id="2.16.840.1.113883.3.1937.777.15.9.10703">
                    <desc language="en-US"><b>Case 1: specified interval</b>
                        <br clear="none"/>The low and high values of the first effectiveTime element represent the start and stop times for the medication. The low value represents the start time, and the high value represents the stop time. If either the low or the high value is unknown, this shall be recorded by setting the nullFlavor attribute to UNK.<br clear="none"/>
                        <br clear="none"/>In case of unbounded period (continuous therapy) the high element will be valued with the nullFlavor attribute to NA.<br clear="none"/>
                        <br clear="none"/>The high value records the end of the medication regime according to the information provided in the prescription or order. For example, if the prescription is for enough medication to last 30 days, then the high value should contain a date that is 30 days later then the low value. The rationale is that a provider, seeing a prescription that has not been
                        refilled would normally assume that the medication is no longer being taken, even if the intent of the treatment plan is to continue the medication indefinitely.</desc>
                    <example caption="Known Interval">
                        <effectiveTime type="IVL_TS">
                            <low value="20130321"/>
                            <high value="20140321"/>
                        </effectiveTime>
                    </example>
                    <example caption="Information not available about the period">
                        <effectiveTime type="IVL_TS" nullFlavor="NI"/>
                    </example>
                    <example caption="Unknown end date">
                        <effectiveTime type="IVL_TS">
                            <low value="20130321"/>
                            <high nullFlavor="UNK"/>
                        </effectiveTime>
                    </example>
                    <example caption="continous therapy">
                        <effectiveTime type="IVL_TS">
                            <low value="20130321"/>
                            <high nullFlavor="NA"/>
                        </effectiveTime>
                    </example>
                    <attribute name="nullFlavor" datatype="cs" isOptional="true" id="2.16.840.1.113883.3.1937.777.15.9.10704"/>
                    <element name="hl7:low" datatype="IVXB_TS" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.15.9.10705"/>
                    <element name="hl7:high" datatype="IVXB_TS" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.15.9.10706"/>
                </element>
                <element name="hl7:effectiveTime[hl7:width]" datatype="IVL_TS" minimumMultiplicity="0" maximumMultiplicity="1" conformance="C" id="2.16.840.1.113883.3.1937.777.15.9.10707">
                    <desc language="en-US"><b>Case 2: 'floating' period:</b>
                        <br clear="none"/>The width element is used to specify a period of (actual or intended) administration that is not anchored to any specific date (e.g. a two weeks therapy)</desc>
                    <example caption="2 week period">
                        <effectiveTime type="IVL_TS">
                            <width value="2" unit="w"/>
                        </effectiveTime>
                    </example>
                    <element name="hl7:low" conformance="NP" id="2.16.840.1.113883.3.1937.777.15.9.10708"/>
                    <element name="hl7:high" conformance="NP" id="2.16.840.1.113883.3.1937.777.15.9.10980"/>
                    <element name="hl7:center" conformance="NP" id="2.16.840.1.113883.3.1937.777.15.9.10981"/>
                    <element name="hl7:width" datatype="PQ" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.13.9.122">
                        <attribute name="unit" datatype="cs" id="2.16.840.1.113883.3.1937.777.13.9.123">
                            <vocabulary valueSet="2.16.840.1.113883.3.1937.99.60.10.11.13" flexibility="dynamic"/>
                        </attribute>
                    </element>
                </element>
                <element name="hl7:effectiveTime[hl7:low | hl7:width]" datatype="IVL_TS" minimumMultiplicity="0" maximumMultiplicity="1" conformance="C" id="2.16.840.1.113883.3.1937.777.15.9.10982">
                    <desc language="en-US"><b>Case 3: anchored period:</b>
                        <br clear="none"/>The width element is used to specify a period of (actual or intended) administration anchored to a specific date (e.g. a two weeks therapy starting today)</desc>
                    <example caption="2 week period starting on 2013-03-21">
                        <effectiveTime type="IVL_TS">
                            <low value="20130321"/>
                            <width value="2" unit="w"/>
                        </effectiveTime>
                    </example>
                    <element name="hl7:low" datatype="IVXB_TS" minimumMultiplicity="0" maximumMultiplicity="1" conformance="C" id="2.16.840.1.113883.3.1937.777.15.9.10983"/>
                    <element name="hl7:width" datatype="PQ" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.15.9.10984">
                        <attribute name="unit" datatype="cs" id="2.16.840.1.113883.3.1937.777.15.9.10985">
                            <vocabulary valueSet="2.16.840.1.113883.3.1937.99.60.10.11.13" flexibility="dynamic"/>
                        </attribute>
                    </element>
                </element>
            </choice>
        </template>

        <template id="2.16.840.1.113883.3.1937.99.60.10.10.3" name="UVMedicationstatement" displayName="UV Medication Statement" effectiveDate="2023-01-30T08:32:34" statusCode="draft" versionLabel="2023" lastModifiedDate="2023-01-31T19:49:33">
            <desc language="en-US" lastTranslated="2023-01-31T19:45:02">Universal Medication Statement: Recording a "medication statement" is an activity that can be performed by a variety of healthcare professionals, or the patient, or non-healthcare professionals. Examples of recording medication statements include taking a patient's medication history, recording reported use of medications
                where the source of the patient information is from a third party and not the patient e.g. a family member when the patient is unable to communicate their medication history. </desc>
            <classification type="cdaentrylevel"/>
            <relationship type="SPEC" template="2.16.840.1.113883.10.12.308" flexibility="2005-09-07T00:00:00"/>
            <context id="**"/>
            <item label="MedicationStatement"/>
            <example type="neutral">
                <substanceAdministration classCode="SBADM" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.3.1937.99.60.10.10.3"/>
                    <id root="1.2.3.99.99.99" extension="988437489739"/>
                    <code code="DRUG" codeSystem="2.16.840.1.113883.5.4"/>
                    <text>...</text>
                    <statusCode code="active"/>
                    <effectiveTime value="..."/>
                    <consumable typeCode="CSM">
                        <!-- Consumable -->
                    </consumable>
                </substanceAdministration>
            </example>
            <element name="hl7:substanceAdministration" id="2.16.840.1.113883.3.1937.777.15.9.19">
                <attribute name="classCode" value="SBADM" datatype="cs" id="2.16.840.1.113883.3.1937.777.15.9.20"/>
                <attribute name="moodCode" datatype="cs" id="2.16.840.1.113883.3.1937.777.15.9.21">
                    <desc language="en-US" lastTranslated="2023-01-31T19:45:02">EVN will be used to record a medication statement where the patient is currently taking or has taken the medication in the past.<br/>INT will be used to record a medication statement where the patient plans to take the medication or be administered the medication in the future.</desc>
                    <vocabulary code="EVN"/>
                    <vocabulary code="INT"/>
                </attribute>
                <element name="hl7:templateId" datatype="II" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" isMandatory="true" id="2.16.840.1.113883.3.1937.777.15.9.22">
                    <attribute name="root" value="2.16.840.1.113883.3.1937.99.60.10.10.3" datatype="uid" id="2.16.840.1.113883.3.1937.777.15.9.23"/>
                </element>
                <element name="hl7:id" datatype="II" minimumMultiplicity="0" maximumMultiplicity="*" conformance="R" id="2.16.840.1.113883.3.1937.777.15.9.24"/>
                <element name="hl7:code" datatype="CD" strength="preferred" minimumMultiplicity="0" maximumMultiplicity="1" conformance="R" id="2.16.840.1.113883.3.1937.777.15.9.25">
                    <desc language="en-US" lastTranslated="2023-01-31T19:45:02">The code element is valorized with the ACT code DRUG.</desc>
                    <vocabulary code="DRUG" codeSystem="2.16.840.1.113883.5.4" displayName="Drug therapy"/>
                </element>
                <element name="hl7:text" datatype="ED" minimumMultiplicity="0" maximumMultiplicity="1" id="2.16.840.1.113883.3.1937.777.15.9.26"/>
                <element name="hl7:statusCode" datatype="CS" strength="required" minimumMultiplicity="1" maximumMultiplicity="1" conformance="R" isMandatory="true" id="2.16.840.1.113883.3.1937.777.15.9.27">
                    <vocabulary valueSet="2.16.840.1.113883.1.11.15933" flexibility="dynamic"/>
                </element>
                <include ref="2.16.840.1.113883.3.1937.99.60.10.10.2"/>
            </element>
        </template>


        <!-- FHIR base profiles -->
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.1" name="Resource" displayName="Resource" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Resource">
            <desc language="en-US">This is the base resource type for everything.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="true" type="Resource" baseDefinition="" derivation="">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Resource" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Base Resource</desc>
                <fhir fid="Resource" definition="This is the base resource type for everything.">
                    <mapping identity="rim" map="Entity. Role, or Act"/>
                </fhir>
                <element name="id" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Logical id of this artifact</desc>
                    <fhir fid="Resource.id" definition="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." comment="The only time that a resource does not have an id is when it is being submitted to the server using a create operation." isSummary="true">
                        <type value="http://hl7.org/fhirpath/System.String"/>
                    </fhir>
                </element>
                <element name="meta" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Metadata about the resource</desc>
                    <fhir fid="Resource.meta" definition="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." isSummary="true">
                        <type value="Meta"/>
                    </fhir>
                </element>
                <element name="implicitRules" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A set of rules under which this content was created</desc>
                    <fhir fid="Resource.implicitRules" definition="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."
                        comment="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc."
                        isModifier="true" isSummary="true">
                        <type value="uri"/>
                    </fhir>
                </element>
                <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Language of the resource content</desc>
                    <fhir fid="Resource.language" definition="The base language in which the resource is written."
                        comment="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).">
                        <type value="code"/>
                        <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.2" name="Account" displayName="Account" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Account">
            <desc language="en-US">A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Account" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Account" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Tracks balance, charges, for patient or cost center</desc>
                <fhir fid="Account" definition="A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.">
                    <mapping identity="rim" map="Account"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Account number</desc>
                    <fhir fid="Account.identifier" definition="Unique identifier used to reference the account.  Might or might not be intended for human use (e.g. credit card number)." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error | on-hold | unknown</desc>
                    <fhir fid="Account.status" definition="Indicates whether the account is presently used/usable or not." comment="This element is labeled as a modifier because the status contains the codes inactive and entered-in-error that mark the Account as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="AccountStatus" strength="required" description="Indicates whether the account is available to be used." valueSet="2.16.840.1.113883.4.642.3.726" canonicalUri="http://hl7.org/fhir/ValueSet/account-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">E.g. patient, expense, depreciation</desc>
                    <fhir fid="Account.type" definition="Categorizes the account for reporting and searching purposes." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Account Types" strength="example" description="The usage type of this account, permits categorization of accounts." valueSet="2.16.840.1.113883.4.642.3.728" canonicalUri="http://hl7.org/fhir/ValueSet/account-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human-readable label</desc>
                    <fhir fid="Account.name" definition="Name used for the account when displaying it to humans in reports, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".title"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The entity that caused the expenses</desc>
                    <fhir fid="Account.subject" definition="Identifies the entity which incurs the expenses. While the immediate recipients of services or goods might be entities related to the subject, the expenses were ultimately incurred by the subject of the Account."
                        comment="Accounts can be applied to non-patients for tracking other non-patient related activities, such as group services (patients not tracked, and costs charged to another body), or might not be allocated." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".subject"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="servicePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Transaction window</desc>
                    <fhir fid="Account.servicePeriod" definition="The date range of services associated with this account." comment="It is possible for transactions to be posted outside the service period, as long as the service was provided within the defined service period." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".coverage.insurancePolicy.effectiveTime"/>
                    </fhir>
                </element>
                <element name="coverage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account</desc>
                    <fhir fid="Account.coverage" definition="The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account."
                        comment="Typically. this may be some form of insurance, internal charges, or self-pay.&#xA;&#xA;Local or jurisdictional business rules may determine which coverage covers which types of billable items charged to the account, and in which order.&#xA;Where the order is important, a local/jurisdictional extension may be defined to specify the order for the type of charge."
                        isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".coverage"/>
                    </fhir>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The party(s), such as insurances, that may contribute to the payment of this account</desc>
                        <fhir fid="Account.coverage.coverage" definition="The party(s) that contribute to payment (or part of) of the charges applied to this account (including self-pay).&#xA;&#xA;A coverage may only be responsible for specific types of charges, and the sequence of the coverages in the account could be important when processing billing." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                            <mapping identity="rim" map=".coverage.insurancePolicy.author"/>
                        </fhir>
                    </element>
                    <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The priority of the coverage in the context of this account</desc>
                        <fhir fid="Account.coverage.priority" definition="The priority of the coverage in the context of this account." comment="It is common in some jurisdictions for there to be multiple coverages allocated to an account, and a sequence is required to order the settling of the account (often with insurance claiming)." isSummary="true">
                            <type value="positiveInt"/>
                            <mapping identity="rim" map=".coverage.sequenceNumber"/>
                        </fhir>
                    </element>
                </element>
                <element name="owner" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Entity managing the Account</desc>
                    <fhir fid="Account.owner" definition="Indicates the service area, hospital, department, etc. with responsibility for managing the Account." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".holder"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Explanation of purpose/use</desc>
                    <fhir fid="Account.description" definition="Provides additional information about what the account tracks and how it is used." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".subjectOf.observationEvent[code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="guarantor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The parties ultimately responsible for balancing the Account</desc>
                    <fhir fid="Account.guarantor" definition="The parties responsible for balancing the account if other payment options fall short.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".holder.guarantorRole"/>
                    </fhir>
                    <element name="party" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Responsible entity</desc>
                        <fhir fid="Account.guarantor.party" definition="The entity who is responsible.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map=".holder.guarantorRole[guarantorPerson|guarantorOrganization]"/>
                        </fhir>
                    </element>
                    <element name="onHold" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Credit or other hold applied</desc>
                        <fhir fid="Account.guarantor.onHold" definition="A guarantor may be placed on credit hold or otherwise have their role temporarily suspended.">
                            <type value="boolean"/>
                            <mapping identity="rim" map=".holder.guarantorRole.statusCode"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Guarantee account during</desc>
                        <fhir fid="Account.guarantor.period" definition="The timeframe during which the guarantor accepts responsibility for the account.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".holder.guarantorRole.effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reference to a parent Account</desc>
                    <fhir fid="Account.partOf" definition="Reference to a parent Account.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Account"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.3" name="ActivityDefinition" displayName="ActivityDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ActivityDefinition">
            <desc language="en-US">This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ActivityDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="ActivityDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The definition of a specific activity to be taken, independent of any particular patient or context</desc>
                <fhir fid="ActivityDefinition" definition="This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.">
                    <mapping identity="workflow" map="Definition"/>
                    <mapping identity="rim" map="Act[classCode=ACT; moodCode=DEFN]"/>
                    <constraint key="adf-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this activity definition, represented as a URI (globally unique)</desc>
                    <fhir fid="ActivityDefinition.url"
                        definition="An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the activity definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier[scope=BUSN;reliability=ISS]"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the activity definition</desc>
                    <fhir fid="ActivityDefinition.identifier" definition="A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this activity definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the activity definition</desc>
                    <fhir fid="ActivityDefinition.version"
                        definition="The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets."
                        comment="There may be different activity definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the activity definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this activity definition (computer friendly)</desc>
                    <fhir fid="ActivityDefinition.name" definition="A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this activity definition (human friendly)</desc>
                    <fhir fid="ActivityDefinition.title" definition="A short, descriptive, user-friendly title for the activity definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                        <mapping identity="rim" map=".title"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the activity definition</desc>
                    <fhir fid="ActivityDefinition.subtitle" definition="An explanatory or alternate title for the activity definition giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ActivityDefinition.status" definition="The status of this activity definition. Enables tracking the life-cycle of the content." comment="Allows filtering of activity definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status {different ValueSet}"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ActivityDefinition.experimental" definition="A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of activity definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level activity definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of individual the activity definition is intended for</desc>
                    <fhir fid="ActivityDefinition.subject[x]" definition="A code or group definition that describes the intended subject of the activity being defined.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for an activity (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                        <mapping identity="workflow" map="Definition.subject"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="ActivityDefinition.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="ActivityDefinition.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ActivityDefinition.date" definition="The date  (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the activity definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ActivityDefinition.publisher" definition="The name of the organization or individual that published the activity definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the activity definition is the organization or individual primarily responsible for the maintenance and upkeep of the activity definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the activity definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the activity definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher {as string instead of CodeableConcept}"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ActivityDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                        <mapping identity="rim" map=".participation[typeCode=CALLBCK].role"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the activity definition</desc>
                    <fhir fid="ActivityDefinition.description" definition="A free text natural language description of the activity definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the activity definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the activity definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the activity definition is presumed to be the predominant language in the place the activity definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ActivityDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for activity definition (if applicable)</desc>
                    <fhir fid="ActivityDefinition.jurisdiction" definition="A legal or geographic region in which the activity definition is intended to be used." comment="It may be possible for the activity definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this activity definition is defined</desc>
                    <fhir fid="ActivityDefinition.purpose" definition="Explanation of why this activity definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the activity definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this activity definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode.text"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the activity definition</desc>
                    <fhir fid="ActivityDefinition.usage" definition="A detailed description of how the activity definition is used from a clinical perspective.">
                        <type value="string"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ActivityDefinition.copyright" definition="A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition." requirements="Consumers must be able to determine any legal restrictions on the use of the activity definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the activity definition was approved by publisher</desc>
                    <fhir fid="ActivityDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;approval&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the activity definition was last reviewed</desc>
                    <fhir fid="ActivityDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;; subsetCode=&#34;RECENT&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;review&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the activity definition is expected to be used</desc>
                    <fhir fid="ActivityDefinition.effectivePeriod" definition="The period during which the activity definition content was or is planned to be in active use."
                        comment="The effective period for a activity definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the activity definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">E.g. Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="ActivityDefinition.topic" definition="Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the activity definition so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="ActivityDefinition.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="ActivityDefinition.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="ActivityDefinition.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="ActivityDefinition.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="ActivityDefinition.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="Activity definitions must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DOC,RSON,PREV, DRIV, USE, COMP] {successor would be PREV w/ inversionInd=true; No support for citation}"/>
                    </fhir>
                </element>
                <element name="library" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Logic used by the activity definition</desc>
                    <fhir fid="ActivityDefinition.library" definition="A reference to a Library resource containing any formal logic used by the activity definition.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Library"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=USE].target[classCode=GROUPER,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="kind" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of resource</desc>
                    <fhir fid="ActivityDefinition.kind" definition="A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource." comment="May determine what types of extensions are permitted." isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestResourceType" strength="required" description="The kind of activity the definition is describing." valueSet="2.16.840.1.113883.4.642.3.1058" canonicalUri="http://hl7.org/fhir/ValueSet/request-resource-types|4.0.1"/>
                        <mapping identity="rim" map=".classCode"/>
                    </fhir>
                </element>
                <element name="profile" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What profile the resource needs to conform to</desc>
                    <fhir fid="ActivityDefinition.profile" definition="A profile to which the target of the activity definition is expected to conform." requirements="Allows profiles to be used to describe the types of activities that can be performed within a workflow, protocol, or order set.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Detail type of activity</desc>
                    <fhir fid="ActivityDefinition.code" definition="Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter." comment="Tends to be less relevant for activities involving particular products." requirements="Allows matching performed to planned as well as validation against protocols." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Codes (SNOMED CT)" strength="example" description="Detailed type of the activity; e.g. CBC." valueSet="2.16.840.1.113883.4.642.3.427" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-code"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="ActivityDefinition.intent" definition="Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.">
                        <type value="code"/>
                        <binding displayName="RequestIntent" strength="required" description="Codes indicating the degree of authority/intentionality associated with a request." valueSet="2.16.840.1.113883.4.642.3.113" canonicalUri="http://hl7.org/fhir/ValueSet/request-intent|4.0.1"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="ActivityDefinition.priority" definition="Indicates how quickly the activity  should be addressed with respect to other requests.">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                    </fhir>
                </element>
                <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">True if the activity should not be performed</desc>
                    <fhir fid="ActivityDefinition.doNotPerform" definition="Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action."
                        comment="This element is not intended to be used to communicate a decision support response to cancel an order in progress. That should be done with the &#34;remove&#34; type of a PlanDefinition or RequestGroup." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When activity is to occur</desc>
                    <fhir fid="ActivityDefinition.timing[x]" definition="The period, timing or frequency upon which the described activity is to occur." requirements="Allows prompting for activities and detection of missed planned activities.">
                        <type value="Timing"/>
                        <type value="dateTime"/>
                        <type value="Age"/>
                        <type value="Period"/>
                        <type value="Range"/>
                        <type value="Duration"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="timingTiming">
                        <fhir fid="ActivityDefinition.timingTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                    <element name="timingDateTime">
                        <fhir fid="ActivityDefinition.timingDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="timingAge">
                        <fhir fid="ActivityDefinition.timingAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="timingPeriod">
                        <fhir fid="ActivityDefinition.timingPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="timingRange">
                        <fhir fid="ActivityDefinition.timingRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="timingDuration">
                        <fhir fid="ActivityDefinition.timingDuration">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                </choice>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where it should happen</desc>
                    <fhir fid="ActivityDefinition.location" definition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." comment="May reference a specific clinical location or may just identify a type of location." requirements="Helps in planning of activity.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who should participate in the action</desc>
                    <fhir fid="ActivityDefinition.participant" definition="Indicates who should participate in performing the action described.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=PFM]"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">patient | practitioner | related-person | device</desc>
                        <fhir fid="ActivityDefinition.participant.type" definition="The type of participant in the action.">
                            <type value="code"/>
                            <binding displayName="ActionParticipantType" strength="required" description="The type of participant in the activity." valueSet="2.16.840.1.113883.4.642.3.811" canonicalUri="http://hl7.org/fhir/ValueSet/action-participant-type|4.0.1"/>
                            <mapping identity="rim" map=".role.classCode"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">E.g. Nurse, Surgeon, Parent, etc.</desc>
                        <fhir fid="ActivityDefinition.participant.role" definition="The role the participant should play in performing the described action.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Action participant role" strength="example" description="Defines roles played by participants for the action." valueSet="2.16.840.1.113883.4.642.3.796" canonicalUri="http://hl7.org/fhir/ValueSet/action-participant-role"/>
                            <mapping identity="rim" map=".role.code"/>
                        </fhir>
                    </element>
                </element>
                <choice name="product[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What's administered/supplied</desc>
                    <fhir fid="ActivityDefinition.product[x]" definition="Identifies the food, drug or other product being consumed or supplied in the activity.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </type>
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="Code describing the type of substance or medication." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role"/>
                    </fhir>
                    <element name="productReference">
                        <fhir fid="ActivityDefinition.productReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </fhir>
                    </element>
                    <element name="productCodeableConcept">
                        <fhir fid="ActivityDefinition.productCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How much is administered/consumed/supplied</desc>
                    <fhir fid="ActivityDefinition.quantity" definition="Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).">
                        <type value="Quantity"/>
                        <mapping identity="rim" map=".quantity {for classCode=SPLY}"/>
                    </fhir>
                </element>
                <element name="dosage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Detailed dosage instructions</desc>
                    <fhir fid="ActivityDefinition.dosage" definition="Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources." comment="If a dosage instruction is used, the definition should not specify timing or quantity.">
                        <type value="Dosage"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=SBADM; moodCode=DEFN]"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What part of body to perform on</desc>
                    <fhir fid="ActivityDefinition.bodySite" definition="Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites)." comment="Only used if not implicit in the code found in ServiceRequest.type." requirements="Knowing where the procedure is made is important for tracking if multiple sites are possible.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="A code that identifies the anatomical location." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="rim" map=".targetSiteCode {for classCode=PROC, SBADM}"/>
                    </fhir>
                </element>
                <element name="specimenRequirement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What specimens are required to perform this action</desc>
                    <fhir fid="ActivityDefinition.specimenRequirement" definition="Defines specimen requirements for the action to be performed, such as required specimens for a lab test." requirements="Needed to represent lab order definitions.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SpecimenDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="observationRequirement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What observations are required to perform this action</desc>
                    <fhir fid="ActivityDefinition.observationRequirement" definition="Defines observation requirements for the action to be performed, such as body weight or surface area." requirements="Needed to represent observation definitions.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="observationResultRequirement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What observations must be produced by this action</desc>
                    <fhir fid="ActivityDefinition.observationResultRequirement" definition="Defines the observations that are expected to be produced by the action.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="transform" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Transform to apply the template</desc>
                    <fhir fid="ActivityDefinition.transform" definition="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input." comment="Note that if both a transform and dynamic values are specified, the dynamic values will be applied to the result of the transform.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureMap"/>
                        </type>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="dynamicValue" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Dynamic aspects of the definition</desc>
                    <fhir fid="ActivityDefinition.dynamicValue"
                        definition="Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result."
                        comment="Dynamic values are applied in the order in which they are defined in the ActivityDefinition. Note that if both a transform and dynamic values are specified, the dynamic values will be applied to the result of the transform.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                    <element name="path" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The path to the element to be set dynamically</desc>
                        <fhir fid="ActivityDefinition.dynamicValue.path"
                            definition="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)."
                            comment="The path attribute contains a [Simple FHIRPath Subset](fhirpath.html#simple) that allows path traversal, but not calculation.">
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">An expression that provides the dynamic value for the customization</desc>
                        <fhir fid="ActivityDefinition.dynamicValue.expression" definition="An expression specifying the value of the customized element." comment="The expression may be inlined, or may be a reference to a named expression within a logic library referenced by the library element.">
                            <type value="Expression"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.4" name="AdverseEvent" displayName="AdverseEvent" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/AdverseEvent">
            <desc language="en-US">Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="AdverseEvent" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="AdverseEvent" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Medical care, research study or other healthcare event causing physical injury</desc>
                <fhir fid="AdverseEvent" definition="Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business identifier for the event</desc>
                    <fhir fid="AdverseEvent.identifier" definition="Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the adverse event as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="actuality" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">actual | potential</desc>
                    <fhir fid="AdverseEvent.actuality" definition="Whether the event actually happened, or just had the potential to. Note that this is independent of whether anyone was affected or harmed or how severely." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="AdverseEventActuality" strength="required" description="Overall nature of the adverse event, e.g. real or potential." valueSet="2.16.840.1.113883.4.642.3.831" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-actuality|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">product-problem | product-quality | product-use-error | wrong-dose | incorrect-prescribing-information | wrong-technique | wrong-route-of-administration | wrong-rate | wrong-duration | wrong-time | expired-drug | medical-device-use-error | problem-different-manufacturer | unsafe-physical-environment</desc>
                    <fhir fid="AdverseEvent.category" definition="The overall type of event, intended for search and filtering purposes." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AdverseEventCategory" strength="extensible" description="Overall categorization of the event, e.g. product-related or situational." valueSet="2.16.840.1.113883.4.642.3.833" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="event" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of the event itself in relation to the subject</desc>
                    <fhir fid="AdverseEvent.event" definition="This element defines the specific type of event that occurred or that was prevented from occurring." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Detailed type of event." valueSet="2.16.840.1.113883.4.642.3.835" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-type"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Subject impacted by event</desc>
                    <fhir fid="AdverseEvent.subject" definition="This subject or group impacted by the event." comment="If AdverseEvent.resultingCondition differs among members of the group, then use Patient as the subject." requirements="Allows for exposure of biohazard (such as legionella) to a group of individuals in a hospital." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.who"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="AdverseEvent.encounter" definition="The Encounter during which AdverseEvent was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.  For example, if a medication administration was considered an adverse event because it resulted in a rash, then the encounter when the medication administration was given is the context.  If the patient reports the AdverseEvent during a second encounter, that second encounter is not the context."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event occurred</desc>
                    <fhir fid="AdverseEvent.date" definition="The date (and perhaps time) when the adverse event occurred." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                    </fhir>
                </element>
                <element name="detected" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event was detected</desc>
                    <fhir fid="AdverseEvent.detected" definition="Estimated or actual date the AdverseEvent began, in the opinion of the reporter." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="recordedDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event was recorded</desc>
                    <fhir fid="AdverseEvent.recordedDate" definition="The date on which the existence of the AdverseEvent was first recorded." comment="The recordedDate represents the date when this particular AdverseEvent record was created in the system, not the date of the most recent update.  The date of the last record modification can be retrieved from the resource metadata."
                        isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="resultingCondition" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Effect on the subject due to this event</desc>
                    <fhir fid="AdverseEvent.resultingCondition" definition="Includes information about the reaction that occurred as a result of exposure to a substance (for example, a drug or a chemical)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                        </type>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Location where adverse event occurred</desc>
                    <fhir fid="AdverseEvent.location" definition="The information about where the adverse event occurred." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                    </fhir>
                </element>
                <element name="seriousness" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Seriousness of the event</desc>
                    <fhir fid="AdverseEvent.seriousness" definition="Assessment whether this event was of real importance." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AdverseEventSeriousness" strength="example" description="Overall seriousness of this event for the patient." valueSet="2.16.840.1.113883.4.642.3.838" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-seriousness"/>
                    </fhir>
                </element>
                <element name="severity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">mild | moderate | severe</desc>
                    <fhir fid="AdverseEvent.severity" definition="Describes the severity of the adverse event, in relation to the subject. Contrast to AdverseEvent.seriousness - a severe rash might not be serious, but a mild heart problem is." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AdverseEventSeverity" strength="required" description="The severity of the adverse event itself, in direct relation to the subject." valueSet="2.16.840.1.113883.4.642.3.844" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-severity|4.0.1"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">resolved | recovering | ongoing | resolvedWithSequelae | fatal | unknown</desc>
                    <fhir fid="AdverseEvent.outcome" definition="Describes the type of outcome from the adverse event." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AdverseEventOutcome" strength="required" description="TODO (and should this be required?)." valueSet="2.16.840.1.113883.4.642.3.836" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="recorder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who recorded the adverse event</desc>
                    <fhir fid="AdverseEvent.recorder" definition="Information on who recorded the adverse event.  May be the patient or a practitioner." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="contributor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who was involved in the adverse event or the potential adverse event</desc>
                    <fhir fid="AdverseEvent.contributor"
                        definition="Parties that may or should contribute or have contributed information to the adverse event, which can consist of one or more activities.  Such information includes information leading to the decision to perform the activity and how to perform the activity (e.g. consultant), information that the activity itself seeks to reveal (e.g. informant of clinical history), or information about what activity was performed (e.g. informant witness)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                    </fhir>
                </element>
                <element name="suspectEntity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The suspected agent causing the adverse event</desc>
                    <fhir fid="AdverseEvent.suspectEntity" definition="Describes the entity that is suspected to have caused the adverse event." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="instance" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Refers to the specific entity that caused the adverse event</desc>
                        <fhir fid="AdverseEvent.suspectEntity.instance" definition="Identifies the actual instance of what caused the adverse event.  May be a substance, medication, medication administration, medication statement or a device." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="causality" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Information on the possible cause of the event</desc>
                        <fhir fid="AdverseEvent.suspectEntity.causality" definition="Information on the possible cause of the event." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="assessment" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Assessment of if the entity caused the event</desc>
                            <fhir fid="AdverseEvent.suspectEntity.causality.assessment" definition="Assessment of if the entity caused the event." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="AdverseEventCausalityAssessment" strength="example" description="Codes for the assessment of whether the entity caused the event." valueSet="2.16.840.1.113883.4.642.3.840" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-causality-assess"/>
                            </fhir>
                        </element>
                        <element name="productRelatedness" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">AdverseEvent.suspectEntity.causalityProductRelatedness</desc>
                            <fhir fid="AdverseEvent.suspectEntity.causality.productRelatedness" definition="AdverseEvent.suspectEntity.causalityProductRelatedness." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">AdverseEvent.suspectEntity.causalityAuthor</desc>
                            <fhir fid="AdverseEvent.suspectEntity.causality.author" definition="AdverseEvent.suspectEntity.causalityAuthor." isSummary="true">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">ProbabilityScale | Bayesian | Checklist</desc>
                            <fhir fid="AdverseEvent.suspectEntity.causality.method" definition="ProbabilityScale | Bayesian | Checklist." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="AdverseEventCausalityMethod" strength="example" description="TODO." valueSet="2.16.840.1.113883.4.642.3.842" canonicalUri="http://hl7.org/fhir/ValueSet/adverse-event-causality-method"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="subjectMedicalHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">AdverseEvent.subjectMedicalHistory</desc>
                    <fhir fid="AdverseEvent.subjectMedicalHistory" definition="AdverseEvent.subjectMedicalHistory." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <element name="referenceDocument" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">AdverseEvent.referenceDocument</desc>
                    <fhir fid="AdverseEvent.referenceDocument" definition="AdverseEvent.referenceDocument." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <element name="study" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">AdverseEvent.study</desc>
                    <fhir fid="AdverseEvent.study" definition="AdverseEvent.study." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.5" name="AllergyIntolerance" displayName="AllergyIntolerance" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance">
            <desc language="en-US">Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">To record a clinical assessment of a propensity, or potential risk to an individual, of an adverse reaction upon future exposure to the specified substance, or class of substance.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="AllergyIntolerance" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="AllergyIntolerance" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Allergy or Intolerance (generally: Risk of adverse reaction to a substance)</desc>
                <fhir fid="AllergyIntolerance" definition="Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."
                    comment="Substances include, but are not limited to: a therapeutic substance administered correctly at an appropriate dosage for the individual; food; material derived from plants or animals; or venom from insect stings.">
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN]"/>
                    <constraint key="ait-1" severity="error" human="AllergyIntolerance.clinicalStatus SHALL be present if verificationStatus is not entered-in-error." expression="verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').exists() or clinicalStatus.exists()"
                        xpath="f:verificationStatus/f:coding/f:code/@value='entered-in-error' or exists(f:clinicalStatus)" source=""/>
                    <constraint key="ait-2" severity="error" human="AllergyIntolerance.clinicalStatus SHALL NOT be present if verification Status is entered-in-error" expression="verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').empty() or clinicalStatus.empty()"
                        xpath="not(f:verificationStatus/f:coding/f:code/@value='entered-in-error') or not(exists(f:clinicalStatus))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External ids for this item</desc>
                    <fhir fid="AllergyIntolerance.identifier" definition="Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the AllergyIntolerance as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="IAM-7"/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="clinicalStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | resolved</desc>
                    <fhir fid="AllergyIntolerance.clinicalStatus" definition="The clinical status of the allergy or intolerance."
                        comment="Refer to [discussion](extensibility.html#Special-Case) if clincalStatus is missing data.&#xA;The data type is CodeableConcept because clinicalStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." isModifier="true"
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AllergyIntolerance Clinical Status Codes" strength="required" description="The clinical status of the allergy or intolerance." valueSet="2.16.840.1.113883.4.642.3.1372" canonicalUri="http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&#34;clinicalStatus&#34;, moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="verificationStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">unconfirmed | confirmed | refuted | entered-in-error</desc>
                    <fhir fid="AllergyIntolerance.verificationStatus" definition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product)."
                        comment="The data type is CodeableConcept because verificationStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." isModifier="true" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AllergyIntolerance Verification Status Codes" strength="required" description="Assertion about certainty associated with a propensity, or potential risk, of a reaction to the identified substance." valueSet="2.16.840.1.113883.4.642.3.1370" canonicalUri="http://hl7.org/fhir/ValueSet/allergyintolerance-verification|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="Observation ACT .inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&#34;verificationStatus&#34;, moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">allergy | intolerance - Underlying mechanism (if known)</desc>
                    <fhir fid="AllergyIntolerance.type" definition="Identification of the underlying physiological mechanism for the reaction risk."
                        comment="Allergic (typically immune-mediated) reactions have been traditionally regarded as an indicator for potential escalation to significant future risk. Contemporary knowledge suggests that some reactions previously thought to be immune-mediated are, in fact, non-immune, but in some cases can still pose a life threatening risk. It is acknowledged that many clinicians might not be in a position to distinguish the mechanism of a particular reaction. Often the term &#34;allergy&#34; is used rather generically and may overlap with the use of &#34;intolerance&#34; - in practice the boundaries between these two concepts might not be well-defined or understood. This data element is included nevertheless, because many legacy systems have captured this attribute. Immunologic testing may provide supporting evidence for the basis of the reaction and the causative substance, but no tests are 100% sensitive or specific for sensitivity to a particular substance. If, as is commonly the case, it is unclear whether the reaction is due to an allergy or an intolerance, then the type element should be omitted from the resource."
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="AllergyIntoleranceType" strength="required" description="Identification of the underlying physiological mechanism for a Reaction Risk." valueSet="2.16.840.1.113883.4.642.3.131" canonicalUri="http://hl7.org/fhir/ValueSet/allergy-intolerance-type|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="IAM-9"/>
                        <mapping identity="rim" map="code"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">food | medication | environment | biologic</desc>
                    <fhir fid="AllergyIntolerance.category" definition="Category of the identified substance."
                        comment="This data element has been included because it is currently being captured in some clinical systems. This data can be derived from the substance where coding systems are used, and is effectively redundant in that situation.  When searching on category, consider the implications of AllergyIntolerance resources without a category.  For example, when searching on category = medication, medication allergies that don't have a category valued will not be returned.  Refer to [search](search.html) for more information on how to search category with a :missing modifier to get allergies that don't have a category.  Additionally, category should be used with caution because category can be subjective based on the sender."
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="AllergyIntoleranceCategory" strength="required" description="Category of an identified substance associated with allergies or intolerances." valueSet="2.16.840.1.113883.4.642.3.133" canonicalUri="http://hl7.org/fhir/ValueSet/allergy-intolerance-category|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="AL1-2"/>
                        <mapping identity="rim" map="value &lt; IntoleranceValue (Agent)"/>
                    </fhir>
                </element>
                <element name="criticality" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">low | high | unable-to-assess</desc>
                    <fhir fid="AllergyIntolerance.criticality" definition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance."
                        comment="The default criticality value for any propensity to an adverse reaction should be 'Low Risk', indicating at the very least a relative contraindication to deliberate or voluntary exposure to the substance. 'High Risk' is flagged if the clinician has identified a propensity for a more serious or potentially life-threatening reaction, such as anaphylaxis, and implies an absolute contraindication to deliberate or voluntary exposure to the substance. If this element is missing, the criticality is unknown (though it may be known elsewhere).  Systems that capture a severity at the condition level are actually representing the concept of criticality whereas the severity documented at the reaction level is representing the true reaction severity.  Existing systems that are capturing both condition criticality and reaction severity may use the term &#34;severity&#34; to represent both.  Criticality is the worst it could be in the future (i.e. situation-agnostic) whereas severity is situation-dependent."
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="AllergyIntoleranceCriticality" strength="required" description="Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance." valueSet="2.16.840.1.113883.4.642.3.129" canonicalUri="http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="AL1-4"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value &lt;= SeverityObservation (Severity Level)]"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Code that identifies the allergy or intolerance</desc>
                    <fhir fid="AllergyIntolerance.code"
                        definition="Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., &#34;Latex&#34;), an allergy or intolerance condition (e.g., &#34;Latex allergy&#34;), or a negated/excluded code for a specific substance or class (e.g., &#34;No latex allergy&#34;) or a general or categorical negated statement (e.g.,  &#34;No known allergy&#34;, &#34;No known drug allergies&#34;).  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance."
                        comment="It is strongly recommended that this element be populated using a terminology, where possible. For example, some terminologies used include RxNorm, SNOMED CT, DM+D, NDFRT, ICD-9, IDC-10, UNII, and ATC. Plain text should only be used if there is no appropriate terminology available. Additional details can be specified in the text.&#xD;&#xD;When a substance or product code is specified for the 'code' element, the &#34;default&#34; semantic context is that this is a positive statement of an allergy or intolerance (depending on the value of the 'type' element, if present) condition to the specified substance/product.  In the corresponding SNOMED CT allergy model, the specified substance/product is the target (destination) of the &#34;Causative agent&#34; relationship.&#xD;&#xD;The 'substanceExposureRisk' extension is available as a structured and more flexible alternative to the 'code' element for making positive or negative allergy or intolerance statements.  This extension provides the capability to make &#34;no known allergy&#34; (or &#34;no risk of adverse reaction&#34;) statements regarding any coded substance/product (including cases when a pre-coordinated &#34;no allergy to x&#34; concept for that substance/product does not exist).  If the 'substanceExposureRisk' extension is present, the AllergyIntolerance.code element SHALL be omitted."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AllergyIntolerance Substance/Product, Condition and Negation Codes" strength="example" description="Type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies." valueSet="2.16.840.1.113883.4.642.3.137" canonicalUri="http://hl7.org/fhir/ValueSet/allergyintolerance-code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="AL1-3 / IAM-3"/>
                        <mapping identity="rim"
                            map="substance/product:&#xD;&#xD;.participation[typeCode=CAGNT].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code &lt;= ExposureAgentEntityType]&#xD;&#xD;negated/excluded substance/product:&#xD;&#xD;.participation[typeCode=CAGNT, negationInd=true].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code &lt;= ExposureAgentEntityType]&#xD;&#xD;positive or negated/excluded condition/situation:&#xD;&#xD;Observation.code=ASSERTION; Observation.value"
                        />
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who the sensitivity is for</desc>
                    <fhir fid="AllergyIntolerance.patient" definition="The patient who has the allergy or intolerance." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="(PID-3)"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter when the allergy or intolerance was asserted</desc>
                    <fhir fid="AllergyIntolerance.encounter" definition="The encounter when the allergy or intolerance was asserted.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="onset[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When allergy or intolerance was identified</desc>
                    <fhir fid="AllergyIntolerance.onset[x]" definition="Estimated or actual date,  date-time, or age when allergy or intolerance was identified.">
                        <type value="dateTime"/>
                        <type value="Age"/>
                        <type value="Period"/>
                        <type value="Range"/>
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="rim" map="effectiveTime.low"/>
                    </fhir>
                    <element name="onsetDateTime">
                        <fhir fid="AllergyIntolerance.onsetDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="onsetAge">
                        <fhir fid="AllergyIntolerance.onsetAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="onsetPeriod">
                        <fhir fid="AllergyIntolerance.onsetPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="onsetRange">
                        <fhir fid="AllergyIntolerance.onsetRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="onsetString">
                        <fhir fid="AllergyIntolerance.onsetString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recordedDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date first version of the resource instance was recorded</desc>
                    <fhir fid="AllergyIntolerance.recordedDate" definition="The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="IAM-13"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="recorder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who recorded the sensitivity</desc>
                    <fhir fid="AllergyIntolerance.recorder" definition="Individual who recorded the record and takes responsibility for its content.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="asserter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Source of the information about the allergy</desc>
                    <fhir fid="AllergyIntolerance.asserter" definition="The source of the information about the allergy that is recorded." comment="The recorder takes responsibility for the content, but can reference the source from where they got it." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="v2" map="IAM-14 (if patient) / IAM-18 (if practitioner)"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role"/>
                    </fhir>
                </element>
                <element name="lastOccurrence" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date(/time) of last known occurrence of a reaction</desc>
                    <fhir fid="AllergyIntolerance.lastOccurrence" definition="Represents the date and/or time of the last known occurrence of a reaction event." comment="This date may be replicated by one of the Onset of Reaction dates. Where a textual representation of the date of last occurrence is required e.g. 'In Childhood, '10 years ago' the Comment element should be used.">
                        <type value="dateTime"/>
                        <mapping identity="rim" map="outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code &lt;= CommonClinicalObservationType, value &lt;= ObservationValue (Reaction Type)].effectiveTime"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional text not captured in other fields</desc>
                    <fhir fid="AllergyIntolerance.note" definition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields."
                        comment="For example: including reason for flagging a seriousness of 'High Risk'; and instructions related to future exposure or administration of the substance, such as administration within an Intensive Care Unit or under corticosteroid cover. The notes should be related to an allergy or intolerance as a condition in general and not related to any particular episode of it. For episode notes and descriptions, use AllergyIntolerance.event.description and  AllergyIntolerance.event.notes.">
                        <type value="Annotation"/>
                        <mapping identity="rim" map="subjectOf.observationEvent[code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="reaction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Adverse Reaction Events linked to exposure to substance</desc>
                    <fhir fid="AllergyIntolerance.reaction" definition="Details about each adverse reaction event linked to exposure to the identified substance.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="outBoundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN, code &lt;= CommonClinicalObservationType, value &lt;= ObservationValue (Reaction Type)]"/>
                    </fhir>
                    <element name="substance" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific substance or pharmaceutical product considered to be responsible for event</desc>
                        <fhir fid="AllergyIntolerance.reaction.substance"
                            definition="Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance."
                            comment="Coding of the specific substance (or pharmaceutical product) with a terminology capable of triggering decision support should be used wherever possible.  The 'code' element allows for the use of a specific substance or pharmaceutical product, or a group or class of substances. In the case of an allergy or intolerance to a class of substances, (for example, &#34;penicillins&#34;), the 'reaction.substance' element could be used to code the specific substance that was identified as having caused the reaction (for example, &#34;amoxycillin&#34;). Duplication of the value in the 'code' and 'reaction.substance' elements is acceptable when a specific substance has been recorded in 'code'.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Substance Code" strength="example" description="Codes defining the type of the substance (including pharmaceutical products)." valueSet="2.16.840.1.113883.4.642.3.473" canonicalUri="http://hl7.org/fhir/ValueSet/substance-code"/>
                            <mapping identity="rim" map="outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code &lt;= ExposureCode].participation[typeCode=CSM].role[classCode=ADMM].player[classCode=MAT, determinerCode=KIND, code &lt;= ExposureAgentEntityType]"/>
                        </fhir>
                    </element>
                    <element name="manifestation" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Clinical symptoms/signs associated with the Event</desc>
                        <fhir fid="AllergyIntolerance.reaction.manifestation" definition="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event."
                            comment="Manifestation can be expressed as a single word, phrase or brief description. For example: nausea, rash or no reaction. It is preferable that manifestation should be coded with a terminology, where possible. The values entered here may be used to display on an application screen as part of a list of adverse reactions, as recommended in the UK NHS CUI guidelines.  Terminologies commonly used include, but are not limited to, SNOMED CT or ICD10.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                            <mapping identity="v2" map="AL1-5"/>
                            <mapping identity="rim" map="code"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of the event as a whole</desc>
                        <fhir fid="AllergyIntolerance.reaction.description" definition="Text description about the reaction as a whole, including details of the manifestation if required."
                            comment="Use the description to provide any details of a particular event of the occurred reaction such as circumstances, reaction specifics, what happened before/after. Information, related to the event, but not describing a particular care should be captured in the comment field. For example: at the age of four, the patient was given penicillin for strep throat and subsequently developed severe hives.">
                            <type value="string"/>
                            <mapping identity="rim" map="text"/>
                        </fhir>
                    </element>
                    <element name="onset" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date(/time) when manifestations showed</desc>
                        <fhir fid="AllergyIntolerance.reaction.onset" definition="Record of the date and/or time of the onset of the Reaction.">
                            <type value="dateTime"/>
                            <mapping identity="v2" map="AL1-6"/>
                            <mapping identity="rim" map="effectiveTime.low"/>
                        </fhir>
                    </element>
                    <element name="severity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">mild | moderate | severe (of event as a whole)</desc>
                        <fhir fid="AllergyIntolerance.reaction.severity" definition="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations."
                            comment="It is acknowledged that this assessment is very subjective. There may be some specific practice domains where objective scales have been applied. Objective scales can be included in this model as extensions.">
                            <type value="code"/>
                            <binding displayName="AllergyIntoleranceSeverity" strength="required" description="Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations." valueSet="2.16.840.1.113883.4.642.3.135" canonicalUri="http://hl7.org/fhir/ValueSet/reaction-event-severity|4.0.1"/>
                            <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV, value &lt;= SeverityObservation (Severity Level)]"/>
                        </fhir>
                    </element>
                    <element name="exposureRoute" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How the subject was exposed to the substance</desc>
                        <fhir fid="AllergyIntolerance.reaction.exposureRoute" definition="Identification of the route by which the subject was exposed to the substance." comment="Coding of the route of exposure with a terminology should be used wherever possible.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Route Codes" strength="example" description="A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject." valueSet="2.16.840.1.113883.4.642.3.98" canonicalUri="http://hl7.org/fhir/ValueSet/route-codes"/>
                            <mapping identity="rim" map="outBoundRelationship[typeCode=SAS].target[classCode=SBADM, code &lt;= ExposureCode].routeCode"/>
                        </fhir>
                    </element>
                    <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Text about event not captured in other fields</desc>
                        <fhir fid="AllergyIntolerance.reaction.note" definition="Additional text about the adverse reaction event not captured in other fields."
                            comment="Use this field to record information indirectly related to a particular event and not captured in the description. For example: Clinical records are no longer available, recorded based on information provided to the patient by her mother and her mother is deceased.">
                            <type value="Annotation"/>
                            <mapping identity="rim" map="subjectOf.observationEvent[code=&#34;annotation&#34;].value"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.6" name="Appointment" displayName="Appointment" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Appointment">
            <desc language="en-US">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Appointment" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="ical" uri="http://ietf.org/rfc/2445" name="iCalendar"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Appointment" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)</desc>
                <fhir fid="Appointment" definition="A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="rim" map="Act[@moodCode &lt;= 'INT']"/>
                    <mapping identity="ical" map="VEVENT"/>
                    <constraint key="app-4" severity="error" human="Cancelation reason is only used for appointments that have been cancelled, or no-show" expression="Appointment.cancelationReason.exists() implies (Appointment.status='no-show' or Appointment.status='cancelled')" xpath="not(exists(f:cancellationReason)) or f:status/@value=('no-show', 'cancelled')" source=""/>
                    <constraint key="app-3" severity="error" human="Only proposed or cancelled appointments can be missing start/end dates" expression="(start.exists() and end.exists()) or (status in ('proposed' | 'cancelled' | 'waitlist'))" xpath="((exists(f:start) and exists(f:end)) or (f:status/@value='proposed') or (f:status/@value='cancelled') or (f:status/@value='waitlist'))" source=""/>
                    <constraint key="app-2" severity="error" human="Either start and end are specified, or neither" expression="start.exists() = end.exists()" xpath="((exists(f:start) and exists(f:end)) or (not(exists(f:start)) and not(exists(f:end))))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this item</desc>
                    <fhir fid="Appointment.identifier" definition="This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="SCH-1, SCH-2, ARQ-1, ARQ-2"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="ical" map="UID"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist</desc>
                    <fhir fid="Appointment.status" definition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status."
                        comment="If the Appointment's status is &#34;cancelled&#34; then all participants are expected to have their calendars released for the appointment period, and as such any Slots that were marked as BUSY can be re-set to FREE.&#xA;&#xA;This element is labeled as a modifier because the status contains the code entered-in-error that mark the Appointment as not currently valid."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="AppointmentStatus" strength="required" description="The free/busy status of an appointment." valueSet="2.16.840.1.113883.4.642.3.484" canonicalUri="http://hl7.org/fhir/ValueSet/appointmentstatus|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="SCH-25"/>
                        <mapping identity="rim" map=".statusCode"/>
                        <mapping identity="ical" map="STATUS"/>
                    </fhir>
                </element>
                <element name="cancelationReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The coded reason for the appointment being cancelled</desc>
                    <fhir fid="Appointment.cancelationReason" definition="The coded reason for the appointment being cancelled. This is often used in reporting/billing/futher processing to determine if further actions are required, or specific fees apply." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Appointment cancellation reason" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.1381" canonicalUri="http://hl7.org/fhir/ValueSet/appointment-cancellation-reason"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="serviceCategory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A broad categorization of the service that is to be performed during this appointment</desc>
                    <fhir fid="Appointment.serviceCategory" definition="A broad categorization of the service that is to be performed during this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service category" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.516" canonicalUri="http://hl7.org/fhir/ValueSet/service-category"/>
                        <mapping identity="rim" map="n/a, might be inferred from the ServiceDeliveryLocation"/>
                        <mapping identity="ical" map="CATEGORIES"/>
                    </fhir>
                </element>
                <element name="serviceType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The specific service that is to be performed during this appointment</desc>
                    <fhir fid="Appointment.serviceType" definition="The specific service that is to be performed during this appointment." comment="For a provider to provider appointment the code &#34;FOLLOWUP&#34; may be appropriate, as this is expected to be discussing some patient that was seen in the past." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service type" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.518" canonicalUri="http://hl7.org/fhir/ValueSet/service-type"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="rim" map="n/a, might be inferred from the ServiceDeliveryLocation"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The specialty of a practitioner that would be required to perform the service requested in this appointment</desc>
                    <fhir fid="Appointment.specialty" definition="The specialty of a practitioner that would be required to perform the service requested in this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="" valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".performer.AssignedPerson.code"/>
                    </fhir>
                </element>
                <element name="appointmentType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The style of appointment or patient that has been booked in the slot (not service type)</desc>
                    <fhir fid="Appointment.appointmentType" definition="The style of appointment or patient that has been booked in the slot (not service type)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v2 Appointment Reason Codes" strength="preferred" description="" canonicalUri="http://terminology.hl7.org/ValueSet/v2-0276"/>
                        <mapping identity="v2" map="ARQ-7"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="ical" map="CLASSIFICATION"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coded reason this appointment is scheduled</desc>
                    <fhir fid="Appointment.reasonCode" definition="The coded reason that this appointment is being scheduled. This is more clinical than administrative." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Encounter Reason Codes" strength="preferred" description="The Reason for the appointment to take place." valueSet="2.16.840.1.113883.4.642.3.261" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-reason"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="v2" map="AIS-3, SCH-7"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason the appointment is to take place (resource)</desc>
                    <fhir fid="Appointment.reasonReference" definition="Reason the appointment has been scheduled to take place, as specified using information from another resource. When the patient arrives and the encounter begins it may be used as the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="rim" map=".inboundRelationship[@typeCode = 'RSON'].observation"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Used to make informed decisions if needing to re-prioritize</desc>
                    <fhir fid="Appointment.priority" definition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)."
                        comment="Seeking implementer feedback on this property and how interoperable it is.&#xD;&#xD;Using an extension to record a CodeableConcept for named values may be tested at a future connectathon.">
                        <type value="unsignedInt"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="ARQ-12, SCH-11.6 / TQ1-9"/>
                        <mapping identity="rim" map=".priorityCode"/>
                        <mapping identity="ical" map="PRIORITY"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Shown on a subject line in a meeting request, or appointment list</desc>
                    <fhir fid="Appointment.description" definition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.">
                        <type value="string"/>
                        <mapping identity="v2" map="NTE-3"/>
                        <mapping identity="rim" map=".text"/>
                        <mapping identity="ical" map="SUMMARY"/>
                    </fhir>
                </element>
                <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional information to support the appointment</desc>
                    <fhir fid="Appointment.supportingInformation" definition="Additional information to support the appointment provided when making the appointment.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship[@typeCode = 'SPRT'].observation"/>
                        <mapping identity="ical" map="ATTACH"/>
                    </fhir>
                </element>
                <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When appointment is to take place</desc>
                    <fhir fid="Appointment.start" definition="Date/Time that the appointment is to take place." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="v2" map="ARQ-11.1, SCH-11.4 / TQ1-7"/>
                        <mapping identity="rim" map=".effectiveTime.low"/>
                        <mapping identity="ical" map="DTSTART"/>
                    </fhir>
                </element>
                <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When appointment is to conclude</desc>
                    <fhir fid="Appointment.end" definition="Date/Time that the appointment is to conclude." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="SCH-11.5 / TQ1-8/ calculated based on the start and the duration which is in ARQ-9"/>
                        <mapping identity="rim" map=".effectiveTime.high"/>
                        <mapping identity="ical" map="DTEND"/>
                    </fhir>
                </element>
                <element name="minutesDuration" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Can be less than start/end (e.g. estimate)</desc>
                    <fhir fid="Appointment.minutesDuration"
                        definition="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times.  For example, where the actual time of appointment is only an estimate or if a 30 minute appointment is being requested, but any time would work.  Also, if there is, for example, a planned 15 minute break in the middle of a long appointment, the duration may be 15 minutes less than the difference between the start and end.">
                        <type value="positiveInt"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="rim" map=".activityTime[@xsi:type = ('SXPR_TS', 'PIVL_TS')].width"/>
                        <mapping identity="ical" map="DURATION (e.g. PT15M)"/>
                    </fhir>
                </element>
                <element name="slot" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The slots that this appointment is filling</desc>
                    <fhir fid="Appointment.slot" definition="The slots from the participants' schedules that will be filled by the appointment.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Slot"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[@typeCode = 'REFR'].act[@classCode = 'ACT'][@moodCode = 'SLOT']"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date that this appointment was initially created</desc>
                    <fhir fid="Appointment.created" definition="The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment."
                        comment="This property is required for many use cases where the age of an appointment is considered in processing workflows for scheduling and billing of appointments.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="rim" map=".author.time"/>
                        <mapping identity="ical" map="CREATED"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional comments</desc>
                    <fhir fid="Appointment.comment" definition="Additional comments about the appointment."
                        comment="Additional text to aid in facilitating the appointment. For instance, a comment might be, &#34;patient should proceed immediately to infusion room upon arrival&#34;&#xD;&#xD;Where this is a planned appointment and the start/end dates are not set then this field can be used to provide additional guidance on the details of the appointment request, including any restrictions on when to book it.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="v2" map="NTE-3"/>
                        <mapping identity="rim" map=".subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value"/>
                        <mapping identity="ical" map="DESCRIPTION (for internal use)"/>
                    </fhir>
                </element>
                <element name="patientInstruction" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Detailed information and instructions for the patient</desc>
                    <fhir fid="Appointment.patientInstruction" definition="While Appointment.comment contains information for internal use, Appointment.patientInstructions is used to capture patient facing information about the Appointment (e.g. please bring your referral or fast from 8pm night before).">
                        <type value="string"/>
                        <mapping identity="v2" map="NTE-3"/>
                        <mapping identity="rim" map=".subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value"/>
                        <mapping identity="ical" map="DESCRIPTION (for patient use)"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The service request this appointment is allocated to assess</desc>
                    <fhir fid="Appointment.basedOn" definition="The service request this appointment is allocated to assess (e.g. incoming referral or procedure request).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[@typeCode = 'FLFS'].act[@classCode &lt; 'ActCareProvisionRequestType'][@moodCode = 'RQO']"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Participants involved in appointment</desc>
                    <fhir fid="Appointment.participant" definition="List of participants involved in the appointment.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Request.performer, Request.subject"/>
                        <mapping identity="v2" map="PID, AIP, AIG, AIL"/>
                        <mapping identity="rim" map="performer | reusableDevice | subject | location"/>
                        <mapping identity="ical" map="ATTENDEE component to be created"/>
                        <constraint key="app-1" severity="error" human="Either the type or actor on the participant SHALL be specified" expression="type.exists() or actor.exists()" xpath="(exists(f:type) or exists(f:actor))" source=""/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Role of participant in the appointment</desc>
                        <fhir fid="Appointment.participant.type" definition="Role of participant in the appointment."
                            comment="The role of the participant can be used to declare what the actor will be doing in the scope of this appointment.&#xD;&#xD;If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.&#xD;&#xD;This value SHALL be the same when creating an AppointmentResponse so that they can be matched, and subsequently update the Appointment."
                            isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Participant type" strength="extensible" description="Role of participant in encounter." valueSet="2.16.840.1.113883.4.642.3.250" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-participant-type"/>
                            <mapping identity="v2" map="AIP-4, AIG-4"/>
                            <mapping identity="rim" map="(performer | reusableDevice | subject | location).@typeCode"/>
                            <mapping identity="ical" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Person, Location/HealthcareService or Device</desc>
                        <fhir fid="Appointment.participant.actor" definition="A Person, Location/HealthcareService or Device that is participating in the appointment." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="v2" map="PID-3-Patient ID List | AIL-3 | AIG-3 | AIP-3"/>
                            <mapping identity="rim" map="performer.person | reusableDevice.manufacturedDevice | subject.patient | location.serviceDeliveryLocation"/>
                            <mapping identity="ical" map="ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource) where the participant type is not &#34;information-only&#34;"/>
                        </fhir>
                    </element>
                    <element name="required" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">required | optional | information-only</desc>
                        <fhir fid="Appointment.participant.required" definition="Whether this participant is required to be present at the meeting. This covers a use-case where two doctors need to meet to discuss the results for a specific patient, and the patient is not required to be present." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ParticipantRequired" strength="required" description="Is the Participant required to attend the appointment." valueSet="2.16.840.1.113883.4.642.3.488" canonicalUri="http://hl7.org/fhir/ValueSet/participantrequired|4.0.1"/>
                            <mapping identity="rim" map="(performer | reusableDevice | subject | location).@performInd"/>
                            <mapping identity="ical" map="ROLE=REQ-PARTICIPANT (roleparam)"/>
                        </fhir>
                    </element>
                    <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">accepted | declined | tentative | needs-action</desc>
                        <fhir fid="Appointment.participant.status" definition="Participation status of the actor." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ParticipationStatus" strength="required" description="The Participation status of an appointment." valueSet="2.16.840.1.113883.4.642.3.486" canonicalUri="http://hl7.org/fhir/ValueSet/participationstatus|4.0.1"/>
                            <mapping identity="v2" map="AIP-12, AIG-14"/>
                            <mapping identity="rim" map="(performer | reusableDevice | subject | location).statusCode"/>
                            <mapping identity="ical" map="ATTENDEE;CN=&#34;John Doe&#34;;RSVP=TRUE:mailto:john@doe.com (rsvpparam | partstatparam)"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Participation period of the actor</desc>
                        <fhir fid="Appointment.participant.period" definition="Participation period of the actor.">
                            <type value="Period"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                </element>
                <element name="requestedPeriod" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Potential date/time interval(s) requested to allocate the appointment within</desc>
                    <fhir fid="Appointment.requestedPeriod"
                        definition="A set of date ranges (potentially including times) that the appointment is preferred to be scheduled within.&#xA;&#xA;The duration (usually in minutes) could also be provided to indicate the length of the appointment to fill and populate the start/end times for the actual allocated time. However, in other situations the duration may be calculated by the scheduling system."
                        comment="This does not introduce a capacity for recurring appointments.">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="v2" map="ARQ-11"/>
                        <mapping identity="rim" map=".activityTime[@xsi:type = ('SXPR_TS', 'PIVL_TS')]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.7" name="AppointmentResponse" displayName="AppointmentResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/AppointmentResponse">
            <desc language="en-US">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="AppointmentResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="ical" uri="http://ietf.org/rfc/2445" name="iCalendar"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="AppointmentResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection</desc>
                <fhir fid="AppointmentResponse" definition="A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="rim" map="Appointment[@moodCode &amp;lt;= 'PRMS']"/>
                    <mapping identity="ical" map="VEVENT"/>
                    <constraint key="apr-1" severity="error" human="Either the participantType or actor must be specified" expression="participantType.exists() or actor.exists()" xpath="(exists(f:participantType) or exists(f:actor))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this item</desc>
                    <fhir fid="AppointmentResponse.identifier" definition="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="ical" map="UID"/>
                    </fhir>
                </element>
                <element name="appointment" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Appointment this response relates to</desc>
                    <fhir fid="AppointmentResponse.appointment" definition="Appointment that this response is replying to." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Appointment"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="rim" map="scheduleRequest.ActAppointmentRequest[@moodCode &amp;lt;= 'ARQ']"/>
                    </fhir>
                </element>
                <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time from appointment, or requested new start time</desc>
                    <fhir fid="AppointmentResponse.start" definition="Date/Time that the appointment is to take place, or requested new start time." comment="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the start time.">
                        <type value="instant"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="rim" map=".effectiveTime.low"/>
                    </fhir>
                </element>
                <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time from appointment, or requested new end time</desc>
                    <fhir fid="AppointmentResponse.end" definition="This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.">
                        <type value="instant"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime.high"/>
                    </fhir>
                </element>
                <element name="participantType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Role of participant in the appointment</desc>
                    <fhir fid="AppointmentResponse.participantType" definition="Role of participant in the appointment."
                        comment="The role of the participant can be used to declare what the actor will be doing in the scope of the referenced appointment.&#xD;&#xD;If the actor is not specified, then it is expected that the actor will be filled in at a later stage of planning.&#xD;&#xD;This value SHALL be the same as specified on the referenced Appointment so that they can be matched, and subsequently updated."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Participant type" strength="extensible" description="Role of participant in encounter." valueSet="2.16.840.1.113883.4.642.3.250" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-participant-type"/>
                        <mapping identity="workflow" map="Request.performerType"/>
                        <mapping identity="rim" map="(performer | reusableDevice | subject | location).@typeCode"/>
                        <mapping identity="ical" map="n/a"/>
                    </fhir>
                </element>
                <element name="actor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person, Location, HealthcareService, or Device</desc>
                    <fhir fid="AppointmentResponse.actor" definition="A Person, Location, HealthcareService, or Device that is participating in the appointment." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.who"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map="performer.person | reusableDevice.manufacturedDevice | subject.patient | location.serviceDeliveryLocation"/>
                        <mapping identity="ical" map="ATTENDEE: (Need to provide the common name CN and also the MAILTO properties from the practitioner resource)"/>
                    </fhir>
                </element>
                <element name="participantStatus" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">accepted | declined | tentative | needs-action</desc>
                    <fhir fid="AppointmentResponse.participantStatus"
                        definition="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty."
                        comment="This element is labeled as a modifier because the status contains the code entered-in-error that marks the participant as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ParticipationStatus" strength="required" description="The Participation status of an appointment." valueSet="2.16.840.1.113883.4.642.3.486" canonicalUri="http://hl7.org/fhir/ValueSet/participationstatus|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="rim" map="(performer | reusableDevice | subject | location).statusCode"/>
                        <mapping identity="ical" map="ATTENDEE;CN=&#34;Brian Postlethwaite&#34;;RSVP=TRUE:mailto:BPostlethwaite@data.com (rsvpparam | partstatparam)"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional comments</desc>
                    <fhir fid="AppointmentResponse.comment" definition="Additional comments about the appointment." comment="This comment is particularly important when the responder is declining, tentatively accepting or requesting another time to indicate the reasons why.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="rim" map=".subjectOf.observation[@moodCode = 'EVN'][code = 'annotation'].value"/>
                        <mapping identity="ical" map="COMMENT"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.8" name="AuditEvent" displayName="AuditEvent" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/AuditEvent">
            <desc language="en-US">A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="AuditEvent" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="dicom" uri="http://nema.org/dicom" name="DICOM Tag Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="w3c.prov" uri="http://www.w3.org/ns/prov" name="W3C PROV"/>
                <mapping identity="fhirprovenance" uri="http://hl7.org/fhir/provenance" name="FHIR Provenance Mapping"/>
            </fhir>
            <element name="AuditEvent" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Event record kept for security purposes</desc>
                <fhir fid="AuditEvent" definition="A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage." comment="Based on IHE-ATNA.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="ControlAct[moodCode=EVN]"/>
                    <mapping identity="dicom" map="Message"/>
                </fhir>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Type/identifier of event</desc>
                    <fhir fid="AuditEvent.type" definition="Identifier for a family of the event.  For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function." requirements="This identifies the performed function. For &#34;Execute&#34; Event Action Code audit records, this identifies the application function performed."
                        isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="Audit Event ID" strength="extensible" description="Type of event." valueSet="2.16.840.1.113883.4.642.3.462" canonicalUri="http://hl7.org/fhir/ValueSet/audit-event-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code (type, subtype and action are pre-coordinated or sent as translations)"/>
                        <mapping identity="dicom" map="EventId"/>
                        <mapping identity="w3c.prov" map="Activity"/>
                    </fhir>
                </element>
                <element name="subtype" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">More specific type/id for the event</desc>
                    <fhir fid="AuditEvent.subtype" definition="Identifier for the category of event." requirements="This field enables queries of messages by implementation-defined event categories." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="Audit Event Sub-Type" strength="extensible" description="Sub-type of event." valueSet="2.16.840.1.113883.4.642.3.464" canonicalUri="http://hl7.org/fhir/ValueSet/audit-event-sub-type"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code (type, subtype and action are pre-coordinated or sent as translations)"/>
                        <mapping identity="dicom" map="EventTypeCode"/>
                    </fhir>
                </element>
                <element name="action" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of action performed during the event</desc>
                    <fhir fid="AuditEvent.action" definition="Indicator for type of action performed during the event that generated the audit." requirements="This broadly indicates what kind of action was done on the AuditEvent.entity by the AuditEvent.agent." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AuditEventAction" strength="required" description="Indicator for type of action performed during the event that generated the event." valueSet="2.16.840.1.113883.4.642.3.452" canonicalUri="http://hl7.org/fhir/ValueSet/audit-event-action|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code (type, subtype and action are pre-coordinated or sent as translations)"/>
                        <mapping identity="dicom" map="EventActionCode"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the activity occurred</desc>
                    <fhir fid="AuditEvent.period" definition="The period during which the activity occurred." comment="The period can be a little arbitrary; where possible, the time should correspond to human assessment of the activity time.">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurred[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map="./effectiveTime[type=IVL_TS]"/>
                        <mapping identity="dicom" map="EventDateTime"/>
                        <mapping identity="w3c.prov" map="Activity.startTime &amp; Activity.endTime"/>
                        <mapping identity="fhirprovenance" map="Provenance.occurred[x]"/>
                    </fhir>
                </element>
                <element name="recorded" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Time when the event was recorded</desc>
                    <fhir fid="AuditEvent.recorded" definition="The time when the event was recorded." comment="In a distributed system, some sort of common time base (e.g. an NTP [RFC1305] server) is a good implementation tactic."
                        requirements="This ties an event to a specific date and time. Security audits typically require a consistent time base (e.g. UTC), to eliminate time-zone issues arising from geographical distribution." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                        <mapping identity="w3c.prov" map="Activity.when"/>
                        <mapping identity="fhirprovenance" map="Provenance.recorded"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether the event succeeded or failed</desc>
                    <fhir fid="AuditEvent.outcome" definition="Indicates whether the event succeeded or failed." comment="In some cases a &#34;success&#34; may be partial, for example, an incomplete or interrupted transfer of a radiological study. For the purpose of establishing accountability, these distinctions are not relevant." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AuditEventOutcome" strength="required" description="Indicates whether the event succeeded or failed." valueSet="2.16.840.1.113883.4.642.3.454" canonicalUri="http://hl7.org/fhir/ValueSet/audit-event-outcome|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".actionNegationInd"/>
                        <mapping identity="dicom" map="EventOutcomeIndicator"/>
                    </fhir>
                </element>
                <element name="outcomeDesc" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of the event outcome</desc>
                    <fhir fid="AuditEvent.outcomeDesc" definition="A free text description of the outcome of the event." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=OUT].target.text"/>
                        <mapping identity="dicom" map="EventOutcomeDescription"/>
                    </fhir>
                </element>
                <element name="purposeOfEvent" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The purposeOfUse of the event</desc>
                    <fhir fid="AuditEvent.purposeOfEvent" definition="The purposeOfUse (reason) that was used during the event being recorded."
                        comment="Use AuditEvent.agent.purposeOfUse when you know that it is specific to the agent, otherwise use AuditEvent.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetPurposeOfUse" strength="extensible" description="The reason the activity took place." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map="* .reasonCode [ControlActReason when Act.class = CACT Control Act]&#xA;*.outboundRelationship[typeCode=RSON].target"/>
                        <mapping identity="dicom" map="EventPurposeOfUse"/>
                        <mapping identity="w3c.prov" map="Activity.Activity"/>
                        <mapping identity="fhirprovenance" map="Provenance.reason, Provenance.activity"/>
                    </fhir>
                </element>
                <element name="agent" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Actor involved in the event</desc>
                    <fhir fid="AuditEvent.agent" definition="An actor taking an active role in the event or activity that is logged."
                        comment="Several agents may be associated (i.e. have some responsibility for an activity) with an event or activity.&#xA;&#xA;For example, an activity may be initiated by one user for other users or involve more than one user. However, only one user may be the initiator/requestor for the activity."
                        requirements="An agent can be a person, an organization, software, device, or other actors that may be ascribed responsibility.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.who"/>
                        <mapping identity="rim" map=".participation"/>
                        <mapping identity="dicom" map="ActiveParticipant"/>
                        <mapping identity="w3c.prov" map="Agent"/>
                        <mapping identity="fhirprovenance" map="Provenance.agent"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How agent participated</desc>
                        <fhir fid="AuditEvent.agent.type" definition="Specification of the participation type the user plays when performing the event.">
                            <type value="CodeableConcept"/>
                            <binding displayName="ParticipationRoleType" strength="extensible" description="The Participation type of the agent to the event." valueSet="2.16.840.1.113883.4.642.3.54" canonicalUri="http://hl7.org/fhir/ValueSet/participation-role-type"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".typeCode and/or .functionCode"/>
                            <mapping identity="dicom" map="RoleIdCode"/>
                            <mapping identity="w3c.prov" map="Agent.Attribution"/>
                            <mapping identity="fhirprovenance" map="Provenance.agent.type"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Agent role in the event</desc>
                        <fhir fid="AuditEvent.agent.role" definition="The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context." comment="Should be roles relevant to the event. Should  not be an exhaustive list of roles."
                            requirements="This value ties an audited event to a user's role(s). It is an optional value that might be used to group events for analysis by user functional role categories.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SecurityRoleType" strength="example" description="What security role enabled the agent to participate in the event." valueSet="2.16.840.1.113883.4.642.3.978" canonicalUri="http://hl7.org/fhir/ValueSet/security-role-type"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".role"/>
                            <mapping identity="dicom" map="RoleIdCode"/>
                            <mapping identity="w3c.prov" map="Agent.Attribution"/>
                            <mapping identity="fhirprovenance" map="Provenance.agent.role"/>
                        </fhir>
                    </element>
                    <element name="who" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifier of who</desc>
                        <fhir fid="AuditEvent.agent.who" definition="Reference to who this agent is that was involved in the event." comment="Where a User ID is available it will go into who.identifier." requirements="This field ties an audit event to a specific resource or identifier." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".id"/>
                            <mapping identity="dicom" map="UserId"/>
                            <mapping identity="w3c.prov" map="Agent.Identity"/>
                            <mapping identity="fhirprovenance" map="Provenance.agent.who"/>
                        </fhir>
                    </element>
                    <element name="altId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Alternative User identity</desc>
                        <fhir fid="AuditEvent.agent.altId" definition="Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available."
                            requirements="In some situations, a human user may authenticate with one identity but, to access a specific application system, may use a synonymous identify. For example, some &#34;single sign on&#34; implementations will do this. The alternative identifier would then be the original identify  used for authentication, and the User ID is the one known to and used by the application.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".id (distinguish id type by root)"/>
                            <mapping identity="dicom" map="AlternativeUserId"/>
                            <mapping identity="w3c.prov" map="Agent.Identity"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Human friendly name for the agent</desc>
                        <fhir fid="AuditEvent.agent.name" definition="Human-meaningful name for the agent." requirements="The User ID and Authorization User ID may be internal or otherwise obscure values. This field assists the auditor in identifying the actual user.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".name"/>
                            <mapping identity="dicom" map="UserName"/>
                            <mapping identity="w3c.prov" map="Agent.Identity"/>
                        </fhir>
                    </element>
                    <element name="requestor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether user is initiator</desc>
                        <fhir fid="AuditEvent.agent.requestor" definition="Indicator that the user is or is not the requestor, or initiator, for the event being audited." comment="There can only be one initiator. If the initiator is not clear, then do not choose any one agent as the initiator."
                            requirements="This value is used to distinguish between requestor-users and recipient-users. For example, one person may initiate a report-output to be sent to another user." isSummary="true">
                            <type value="boolean"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map="If participation.typeCode was author, then true"/>
                            <mapping identity="dicom" map="UserIsRequestor"/>
                        </fhir>
                    </element>
                    <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Where</desc>
                        <fhir fid="AuditEvent.agent.location" definition="Where the event occurred.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <mapping identity="workflow" map="Event.location"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                            <mapping identity="rim" map="* Role.Class =SDLOC&#xA;*Role.Code = ServiceDeliveryLocationRoleType&#xA; *Entity.Code  = PlaceEntityType = df.Types of places for  Entity.Class = PLC&#xA;*EntityClass = PLC = df.A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place might or might not be constant."/>
                            <mapping identity="w3c.prov" map="Activity.location"/>
                            <mapping identity="fhirprovenance" map="Provenance.location"/>
                        </fhir>
                    </element>
                    <element name="policy" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Policy that authorized event</desc>
                        <fhir fid="AuditEvent.agent.policy" definition="The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used."
                            comment="For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element." requirements="This value is used retrospectively to determine the authorization policies.">
                            <type value="uri"/>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                            <mapping identity="rim" map="ActPolicyType"/>
                            <mapping identity="dicom" map="ParticipantRoleIDCode"/>
                            <mapping identity="fhirprovenance" map="Provenance.policy"/>
                        </fhir>
                    </element>
                    <element name="media" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of media</desc>
                        <fhir fid="AuditEvent.agent.media" definition="Type of media involved. Used when the event is about exporting/importing onto media." requirements="Usually, this is used instead of specifying a network address. This field is not used for Media Id (i.e. the serial number of a CD).">
                            <type value="Coding"/>
                            <binding displayName="Media Type Code" strength="extensible" description="Used when the event is about exporting/importing onto media." valueSet="1.2.840.10008.6.​1.​908" canonicalUri="http://hl7.org/fhir/ValueSet/dicm-405-mediatype"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                            <mapping identity="rim" map=".player.description.mediaType"/>
                            <mapping identity="dicom" map="MediaType"/>
                        </fhir>
                    </element>
                    <element name="network" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Logical network location for application activity</desc>
                        <fhir fid="AuditEvent.agent.network" definition="Logical network location for application activity, if the activity has a network location.">
                            <type value="BackboneElement"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                            <mapping identity="rim" map=".player.description.reference"/>
                        </fhir>
                        <element name="address" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Identifier for the network access point of the user device</desc>
                            <fhir fid="AuditEvent.agent.network.address" definition="An identifier for the network access point of the user device for the audit event." comment="This could be a device id, IP address or some other identifier associated with a device."
                                requirements="This datum identifies the user's network access point, which may be distinct from the server that performed the action. It is an optional value that may be used to group events recorded on separate servers for analysis of a specific network access point's data access across all servers.">
                                <type value="string"/>
                                <mapping identity="w5" map="FiveWs.where[x]"/>
                                <mapping identity="rim" map="pre-coordinated into URL"/>
                                <mapping identity="dicom" map="NetworkAccessPointID"/>
                                <mapping identity="w3c.prov" map="Agent.Location"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The type of network access point</desc>
                            <fhir fid="AuditEvent.agent.network.type" definition="An identifier for the type of network access point that originated the audit event."
                                requirements="This datum identifies the type of network access point identifier of the user device for the audit event. It is an optional value that may be used to group events recorded on separate servers for analysis of access according to a network access point's type.">
                                <type value="code"/>
                                <binding displayName="AuditEventAgentNetworkType" strength="required" description="The type of network access point of this agent in the audit event." valueSet="2.16.840.1.113883.4.642.3.456" canonicalUri="http://hl7.org/fhir/ValueSet/network-type|4.0.1"/>
                                <mapping identity="w5" map="FiveWs.where[x]"/>
                                <mapping identity="rim" map="pre-coordinated into URL"/>
                                <mapping identity="dicom" map="NetworkAccessPointTypeCode"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="purposeOfUse" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Reason given for this user</desc>
                        <fhir fid="AuditEvent.agent.purposeOfUse" definition="The reason (purpose of use), specific to this agent, that was used during the event being recorded."
                            comment="Use AuditEvent.agent.purposeOfUse when you know that is specific to the agent, otherwise use AuditEvent.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetPurposeOfUse" strength="extensible" description="The reason the activity took place." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                            <mapping identity="rim" map="*.reasonCode [ActHealthInformationPurposeOfUseReason codes/v:PurposeOfUse&#xA;(2.16.840.1.113883.1.11.20448)&#xA;* .outboundRelationship[typeCode=RSON or SUBJ].target"/>
                            <mapping identity="w3c.prov" map="Agent.Activity"/>
                        </fhir>
                    </element>
                </element>
                <element name="source" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Audit Event Reporter</desc>
                    <fhir fid="AuditEvent.source" definition="The system that is reporting the event."
                        comment="Since multi-tier, distributed, or composite applications make source identification ambiguous, this collection of fields may repeat for each application or process actively involved in the event. For example, multiple value-sets can identify participating web servers, application processes, and database server threads in an n-tier distributed application. Passive event participants (e.g. low-level network transports) need not be identified."
                        requirements="The event is reported by one source.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role[classCode=ASSIGN].player[classCode=DEV, determinerCode=INSTANCE]"/>
                        <mapping identity="dicom" map="AuditSourceIdentification"/>
                    </fhir>
                    <element name="site" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Logical source location within the enterprise</desc>
                        <fhir fid="AuditEvent.source.site" definition="Logical source location within the healthcare enterprise network.  For example, a hospital or other provider location within a multi-entity provider group." requirements="This value differentiates among the sites in a multi-site enterprise health information system.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.witness"/>
                            <mapping identity="rim" map=".scopedRole[classCode=LOCE].player.desc"/>
                            <mapping identity="dicom" map="AuditEnterpriseSiteId"/>
                        </fhir>
                    </element>
                    <element name="observer" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The identity of source detecting the event</desc>
                        <fhir fid="AuditEvent.source.observer" definition="Identifier of the source where the event was detected." requirements="This field ties the event to a specific source system. It may be used to group events for analysis according to where the event was detected." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.witness"/>
                            <mapping identity="rim" map=".id"/>
                            <mapping identity="dicom" map="AuditSourceId"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The type of source where event originated</desc>
                        <fhir fid="AuditEvent.source.type" definition="Code specifying the type of source where event originated." requirements="This field indicates which type of source is identified by the Audit Source ID. It is an optional value that may be used to group events for analysis according to the type of source where the event occurred.">
                            <type value="Coding"/>
                            <binding displayName="Audit Event Source Type" strength="extensible" description="Code specifying the type of system that detected and recorded the event." valueSet="2.16.840.1.113883.4.642.3.466" canonicalUri="http://hl7.org/fhir/ValueSet/audit-source-type"/>
                            <mapping identity="w5" map="FiveWs.witness"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="dicom" map="AuditSourceTypeCode"/>
                        </fhir>
                    </element>
                </element>
                <element name="entity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Data or objects used</desc>
                    <fhir fid="AuditEvent.entity" definition="Specific instances of data or objects that have been accessed." comment="Required unless the values for event identification, agent identification, and audit source identification are sufficient to document the entire auditable event. Because events may have more than one entity, this group can be a repeating set of values."
                        requirements="The event may have other entities involved.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SUBJ].target  or  .participation[typeCode=SBJ].role"/>
                        <mapping identity="dicom" map="ParticipantObjectIdentification"/>
                        <mapping identity="w3c.prov" map="Entity"/>
                        <mapping identity="fhirprovenance" map="Provenance.target, Provenance.entity"/>
                        <constraint key="sev-1" severity="error" human="Either a name or a query (NOT both)" expression="name.empty() or query.empty()" xpath="not(exists(f:name)) or not(exists(f:query))" source=""/>
                    </fhir>
                    <element name="what" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific instance of resource</desc>
                        <fhir fid="AuditEvent.entity.what" definition="Identifies a specific instance of the entity. The reference should be version specific." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map=".id"/>
                            <mapping identity="dicom" map="ParticipantObjectID and ParticipantObjectIDTypeCode"/>
                            <mapping identity="fhirprovenance" map="Provenance.target, Provenance.entity.what"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of entity involved</desc>
                        <fhir fid="AuditEvent.entity.type" definition="The type of the object that was involved in this audit event." comment="This value is distinct from the user's role or any user relationship to the entity."
                            requirements="To describe the object being acted upon. In addition to queries on the subject of the action in an auditable event, it is also important to be able to query on the object type for the action.">
                            <type value="Coding"/>
                            <binding displayName="Audit event entity type" strength="extensible" description="Code for the entity type involved in the audit event." valueSet="2.16.840.1.113883.4.642.3.458" canonicalUri="http://hl7.org/fhir/ValueSet/audit-entity-type"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="[self::Act].code or role.player.code"/>
                            <mapping identity="dicom" map="ParticipantObjectTypeCode"/>
                            <mapping identity="w3c.prov" map="Entity.type"/>
                            <mapping identity="fhirprovenance" map="Provenance.entity.type"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What role the entity played</desc>
                        <fhir fid="AuditEvent.entity.role" definition="Code representing the role the entity played in the event being audited." requirements="For some detailed audit analysis it may be necessary to indicate a more granular type of entity, based on the application role it serves.">
                            <type value="Coding"/>
                            <binding displayName="AuditEventEntityRole" strength="extensible" description="Code representing the role the entity played in the audit event." valueSet="2.16.840.1.113883.4.642.3.460" canonicalUri="http://hl7.org/fhir/ValueSet/object-role"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map="role.code (not sure what this would mean for an Act)"/>
                            <mapping identity="dicom" map="ParticipantObjectTypeCodeRole"/>
                            <mapping identity="w3c.prov" map="Entity.role"/>
                        </fhir>
                    </element>
                    <element name="lifecycle" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Life-cycle stage for the entity</desc>
                        <fhir fid="AuditEvent.entity.lifecycle" definition="Identifier for the data life-cycle stage for the entity." comment="This can be used to provide an audit trail for data, over time, as it passes through the system."
                            requirements="Institutional policies for privacy and security may optionally fall under different accountability rules based on data life cycle. This provides a differentiating value for those cases.">
                            <type value="Coding"/>
                            <binding displayName="AuditEventEntityLifecycle" strength="extensible" description="Identifier for the data life-cycle stage for the entity." canonicalUri="http://hl7.org/fhir/ValueSet/object-lifecycle-events"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map="target of ObservationEvent[code=&#34;lifecycle&#34;].value"/>
                            <mapping identity="dicom" map="ParticipantObjectDataLifeCycle"/>
                            <mapping identity="w3c.prov" map="Entity.role"/>
                            <mapping identity="fhirprovenance" map="Provenance.entity.role"/>
                        </fhir>
                    </element>
                    <element name="securityLabel" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Security labels on the entity</desc>
                        <fhir fid="AuditEvent.entity.securityLabel" definition="Security labels for the identified entity." comment="Copied from entity meta security tags." requirements="This field identifies the security labels for a specific instance of an object, such as a patient, to detect/track privacy and security issues.">
                            <type value="Coding"/>
                            <binding displayName="SecurityLabels" strength="extensible" description="Security Labels from the Healthcare Privacy and Security Classification System." valueSet="2.16.840.1.113883.4.642.3.47" canonicalUri="http://hl7.org/fhir/ValueSet/security-labels"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map=".confidentialityCode"/>
                            <mapping identity="dicom" map="ParticipantObjectSensitivity"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Descriptor for entity</desc>
                        <fhir fid="AuditEvent.entity.name" definition="A name of the entity in the audit event." comment="This field may be used in a query/report to identify audit events for a specific person.  For example, where multiple synonymous entity identifiers (patient number, medical record number, encounter number, etc.) have been used."
                            requirements="Use only where entity can't be identified with an identifier." isSummary="true">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map=".title"/>
                            <mapping identity="dicom" map="ParticipantObjectName"/>
                            <mapping identity="w3c.prov" map="Entity.Label"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Descriptive text</desc>
                        <fhir fid="AuditEvent.entity.description" definition="Text that describes the entity in more detail." requirements="Use only where entity can't be identified with an identifier.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map=".text"/>
                            <mapping identity="dicom" map="ParticipantObjectDescription"/>
                        </fhir>
                    </element>
                    <element name="query" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Query parameters</desc>
                        <fhir fid="AuditEvent.entity.query" definition="The query parameters for a query-type entities."
                            comment="The meaning and secondary-encoding of the content of base64 encoded blob is specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and AuditEvent.entity.role.  The base64 is a general-use and safe container for event specific data blobs regardless of the encoding used by the transaction being recorded.  An AuditEvent consuming application must understand the event it is consuming and the formats used by the event. For example, if auditing an Oracle network database access, the Oracle formats must be understood as they will be simply encoded in the base64binary blob."
                            requirements="For query events, it may be necessary to capture the actual query input to the query process in order to identify the specific event. Because of differences among query implementations and data encoding for them, this is a base 64 encoded data blob. It may be subsequently decoded or interpreted by downstream audit analysis processing." isSummary="true">
                            <type value="base64Binary"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map="No mapping"/>
                            <mapping identity="dicom" map="ParticipantObjectQuery"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Additional Information about the entity</desc>
                        <fhir fid="AuditEvent.entity.detail" definition="Tagged value pairs for conveying additional information about the entity." requirements="Implementation-defined data about specific details of the object accessed or used.">
                            <type value="BackboneElement"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN]"/>
                            <mapping identity="dicom" map="ParticipantObjectDetail"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Name of the property</desc>
                            <fhir fid="AuditEvent.entity.detail.type" definition="The type of extra detail provided in the value.">
                                <type value="string"/>
                                <mapping identity="w5" map="FiveWs.context"/>
                                <mapping identity="rim" map=".code"/>
                                <mapping identity="dicom" map="ParticipantObjectDetail.type"/>
                            </fhir>
                        </element>
                        <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Property value</desc>
                            <fhir fid="AuditEvent.entity.detail.value[x]" definition="The  value of the extra detail."
                                comment="The value can be string when known to be a string, else base64 encoding should be used to protect binary or undefined content.  The meaning and secondary-encoding of the content of base64 encoded blob is specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and AuditEvent.entity.role.  The base64 is a general-use and safe container for event specific data blobs regardless of the encoding used by the transaction being recorded.  An AuditEvent consuming application must understand the event it is consuming and the formats used by the event. For example if auditing an Oracle network database access, the Oracle formats must be understood as they will be simply encoded in the base64binary blob."
                                requirements="Should not duplicate the entity value unless absolutely necessary.">
                                <type value="string"/>
                                <type value="base64Binary"/>
                                <mapping identity="w5" map="FiveWs.context"/>
                                <mapping identity="rim" map=".value"/>
                                <mapping identity="dicom" map="ParticipantObjectDetail.value"/>
                            </fhir>
                            <element name="valueString">
                                <fhir fid="AuditEvent.entity.detail.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueBase64Binary">
                                <fhir fid="AuditEvent.entity.detail.valueBase64Binary">
                                    <type value="base64Binary"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.9" name="Basic" displayName="Basic" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Basic">
            <desc language="en-US">Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need some way to safely (without breaking interoperability) allow implementers to exchange content not supported by the initial set of declared resources.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Basic" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Basic" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Resource for non-supported content</desc>
                <fhir fid="Basic" definition="Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.">
                    <mapping identity="rim" map="Act, Entity or Role"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="Basic.identifier" definition="Identifier assigned to the resource for business purposes, outside the context of FHIR." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="./identifier"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Kind of Resource</desc>
                    <fhir fid="Basic.code" definition="Identifies the 'type' of resource - equivalent to the resource name for other resources."
                        comment="Because resource references will only be able to indicate 'Basic', the type of reference will need to be specified in a Profile identified as part of the resource.  Refer to the resource notes section for information on appropriate terminologies for this code.&#xA;&#xA;This element is labeled as a modifier because it defines the meaning of the resource and cannot be ignored."
                        requirements="Must be able to distinguish different types of Basic resources." isModifier="true" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Basic Resource Types" strength="example" description="Codes for identifying types of resources not yet defined by FHIR." valueSet="2.16.840.1.113883.4.642.3.138" canonicalUri="http://hl7.org/fhir/ValueSet/basic-resource-type"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="./code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifies the focus of this resource</desc>
                    <fhir fid="Basic.subject" definition="Identifies the patient, practitioner, device or any other resource that is the &#34;focus&#34; of this resource." comment="Optional as not all potential resources will have subjects.  Resources associated with multiple subjects can handle this via extension." requirements="Needed for partitioning the resource by Patient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map="./participation[typeCode='SBJ'] (possibly through a ControlAct and Role)"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When created</desc>
                    <fhir fid="Basic.created" definition="Identifies when the resource was first created." requirements="Allows ordering resource instances by time." isSummary="true">
                        <type value="date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="./participation[typeCode='AUT']/time (possibly through a ControlAct and Role)"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who created</desc>
                    <fhir fid="Basic.author" definition="Indicates who was responsible for creating the resource instance." requirements="Needed for partitioning the resource." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map="./participation[typeCode='SUB'] (possibly through a ControlAct and Role)"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.10" name="Binary" displayName="Binary" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Binary">
            <desc language="en-US">A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">There are situations where it is useful or required to handle pure binary content using the same framework as other resources.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Binary" baseDefinition="http://hl7.org/fhir/StructureDefinition/Resource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Binary" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Pure binary content defined by a format other than FHIR</desc>
                <fhir fid="Binary" definition="A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc."
                    comment="Typically, Binary resources are used for handling content such as:  &#xA;&#xA;* CDA Documents (i.e. with XDS) &#xA;* PDF Documents &#xA;* Images (the Media resource is preferred for handling images, but not possible when the content is already binary - e.g. XDS).">
                    <mapping identity="rim" map="ED"/>
                </fhir>
                <element name="contentType" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">MimeType of the binary content</desc>
                    <fhir fid="Binary.contentType" definition="MimeType of the binary content represented as a standard MimeType (BCP 13)." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                        <mapping identity="rim" map="ED.mediaType"/>
                    </fhir>
                </element>
                <element name="securityContext" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifies another resource to use as proxy when enforcing access control</desc>
                    <fhir fid="Binary.securityContext"
                        definition="This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient."
                        comment="Very often, a server will also know of a resource that references the binary, and can automatically apply the appropriate access rules based on that reference. However, there are some circumstances where this is not appropriate, e.g. the binary is uploaded directly to the server without any linking resource, the binary is referred to from multiple different resources, and/or the binary is content such as an application logo that has less protection than any of the resources that reference it."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="data" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The actual content</desc>
                    <fhir fid="Binary.data" definition="The actual content, base64 encoded." comment="If the content type is itself base64 encoding, then this will be base64 encoded twice - what is created by un-base64ing the content must be the specified content type." isSummary="false">
                        <type value="base64Binary"/>
                        <mapping identity="rim" map="ED.data"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.11" name="BiologicallyDerivedProduct" displayName="BiologicallyDerivedProduct" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct">
            <desc language="en-US">A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="BiologicallyDerivedProduct" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="BiologicallyDerivedProduct" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A material substance originating from a biological entity</desc>
                <fhir fid="BiologicallyDerivedProduct" definition="A material substance originating from a biological entity intended to be transplanted or infused&#xA;into another (possibly the same) biological entity." comment="Substances include, but are not limited to: whole blood, bone marrow, organs, and manipulated blood cells.">
                    <mapping identity="rim" map="Material[classCode=                       Observation[classCode=OBS, moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External ids for this item</desc>
                    <fhir fid="BiologicallyDerivedProduct.identifier" definition="This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="IAM-7"/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="productCategory" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">organ | tissue | fluid | cells | biologicalAgent</desc>
                    <fhir fid="BiologicallyDerivedProduct.productCategory" definition="Broad category of this product.">
                        <type value="code"/>
                        <binding displayName="BiologicallyDerivedProductCategory" strength="required" description="Biologically Derived Product Category." valueSet="2.16.840.1.113883.4.642.3.900" canonicalUri="http://hl7.org/fhir/ValueSet/product-category|4.0.1"/>
                    </fhir>
                </element>
                <element name="productCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What this biologically derived product is</desc>
                    <fhir fid="BiologicallyDerivedProduct.productCode" definition="A code that identifies the kind of this biologically derived product (SNOMED Ctcode).">
                        <type value="CodeableConcept"/>
                        <binding displayName="BiologicallyDerivedProductCode" strength="example" description="Biologically Derived Product Code."/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">available | unavailable</desc>
                    <fhir fid="BiologicallyDerivedProduct.status" definition="Whether the product is currently available.">
                        <type value="code"/>
                        <binding displayName="BiologicallyDerivedProductStatus" strength="required" description="Biologically Derived Product Status." valueSet="2.16.840.1.113883.4.642.3.902" canonicalUri="http://hl7.org/fhir/ValueSet/product-status|4.0.1"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Procedure request</desc>
                    <fhir fid="BiologicallyDerivedProduct.request" definition="Procedure request to obtain this biologically derived product.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The amount of this biologically derived product</desc>
                    <fhir fid="BiologicallyDerivedProduct.quantity" definition="Number of discrete units within this product.">
                        <type value="integer"/>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">BiologicallyDerivedProduct parent</desc>
                    <fhir fid="BiologicallyDerivedProduct.parent" definition="Parent product (if any)." comment="For products that have multiple collections. For example Peripheral Blood Stem Cells may be collected over several days from a single donor and the donation split into in multiple containers which must be linked to the parent donation.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct"/>
                        </type>
                    </fhir>
                </element>
                <element name="collection" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How this product was collected</desc>
                    <fhir fid="BiologicallyDerivedProduct.collection" definition="How this product was collected.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="collector" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Individual performing collection</desc>
                        <fhir fid="BiologicallyDerivedProduct.collection.collector" definition="Healthcare professional who is performing the collection.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who is product from</desc>
                        <fhir fid="BiologicallyDerivedProduct.collection.source" definition="The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <choice name="collected[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time of product collection</desc>
                        <fhir fid="BiologicallyDerivedProduct.collection.collected[x]" definition="Time of product collection.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                        </fhir>
                        <element name="collectedDateTime">
                            <fhir fid="BiologicallyDerivedProduct.collection.collectedDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="collectedPeriod">
                            <fhir fid="BiologicallyDerivedProduct.collection.collectedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="processing" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Any processing of the product during collection</desc>
                    <fhir fid="BiologicallyDerivedProduct.processing" definition="Any processing of the product during collection that does not change the fundamental nature of the product. For example adding anti-coagulants during the collection of Peripheral Blood Stem Cells.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of of processing</desc>
                        <fhir fid="BiologicallyDerivedProduct.processing.description" definition="Description of of processing.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="procedure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Procesing code</desc>
                        <fhir fid="BiologicallyDerivedProduct.processing.procedure" definition="Procesing code.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Procedure Codes (SNOMED CT)" strength="example" description="Biologically Derived Product Procedure." valueSet="2.16.840.1.113883.4.642.3.427" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-code"/>
                        </fhir>
                    </element>
                    <element name="additive" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Substance added during processing</desc>
                        <fhir fid="BiologicallyDerivedProduct.processing.additive" definition="Substance added during processing.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                        </fhir>
                    </element>
                    <choice name="time[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time of processing</desc>
                        <fhir fid="BiologicallyDerivedProduct.processing.time[x]" definition="Time of processing.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                        </fhir>
                        <element name="timeDateTime">
                            <fhir fid="BiologicallyDerivedProduct.processing.timeDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="timePeriod">
                            <fhir fid="BiologicallyDerivedProduct.processing.timePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="manipulation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Any manipulation of product post-collection</desc>
                    <fhir fid="BiologicallyDerivedProduct.manipulation" definition="Any manipulation of product post-collection that is intended to alter the product.  For example a buffy-coat enrichment or CD8 reduction of Peripheral Blood Stem Cells to make it more suitable for infusion.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of manipulation</desc>
                        <fhir fid="BiologicallyDerivedProduct.manipulation.description" definition="Description of manipulation.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="time[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time of manipulation</desc>
                        <fhir fid="BiologicallyDerivedProduct.manipulation.time[x]" definition="Time of manipulation.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                        </fhir>
                        <element name="timeDateTime">
                            <fhir fid="BiologicallyDerivedProduct.manipulation.timeDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="timePeriod">
                            <fhir fid="BiologicallyDerivedProduct.manipulation.timePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="storage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Product storage</desc>
                    <fhir fid="BiologicallyDerivedProduct.storage" definition="Product storage.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of storage</desc>
                        <fhir fid="BiologicallyDerivedProduct.storage.description" definition="Description of storage.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="temperature" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Storage temperature</desc>
                        <fhir fid="BiologicallyDerivedProduct.storage.temperature" definition="Storage temperature.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="scale" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">farenheit | celsius | kelvin</desc>
                        <fhir fid="BiologicallyDerivedProduct.storage.scale" definition="Temperature scale used.">
                            <type value="code"/>
                            <binding displayName="BiologicallyDerivedProductStorageScale" strength="required" description="BiologicallyDerived Product Storage Scale." valueSet="2.16.840.1.113883.4.642.3.904" canonicalUri="http://hl7.org/fhir/ValueSet/product-storage-scale|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Storage timeperiod</desc>
                        <fhir fid="BiologicallyDerivedProduct.storage.duration" definition="Storage timeperiod.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.12" name="BodyStructure" displayName="BodyStructure" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/BodyStructure">
            <desc language="en-US">Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="BodyStructure" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="openehr" uri="http://openehr.org" name="Open EHR Archetype Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="BodyStructure" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Specific and identified anatomical structure</desc>
                <fhir fid="BodyStructure" definition="Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.">
                    <mapping identity="rim" map="ActSIte"/>
                    <mapping identity="openehr"
                        map="Archetype ID   openEHR-EHR-CLUSTER.anatomical_location.v1      Concept name   Anatomical Location      Concept description   Record details about an anatomical location.      Keywords   location, site, anatomical      Copyright   © openEHR Foundation      Purpose   To record details about anatomical location.      Misuse   Not for specifiying unilateral/bilateral occurrence - this is related to an evaluation which perhaps includes multiple locations.      Author   Author name: Heather Leslie Organization: Ocean Informatics Email: heather.leslie@oceaninformatics.com Date of Origination: 2008-11-10       Translator   Norwegian Bokmål: Lars Bitsch-Larsen, Haukeland University Hospital of Bergen, Norway, MD, DEAA, MBA, spec in anesthesia, spec in tropical medicine. Arabic (Syria): Mona Saleh       Other contributors   Heather Leslie, Ocean Informatics, Australia (Editor) Ian McNicoll, freshEHR Clinical Informatics, United Kingdom (Editor) Dunmail Hodkinson, Black Pear Software Ltd, UK      References   Use cases: - 5LICS, midclavicular line - L forearm, 2cm anterior to the cubital fossa - Right iliac fossa - 5 cm below L tibial tuberosity - 2 cm medial to R nipple - 4 cm below R costal margin in midclavicular line - R femur - midline nose - medial aspect of R great toe nail."
                    />
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Bodystructure identifier</desc>
                    <fhir fid="BodyStructure.identifier" definition="Identifier for this instance of the anatomical structure." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="openehr" map="Specific location  Cluster Optional (0..1) Cardinality: Mandatory, repeating, unordered (1..*)"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this record is in active use</desc>
                    <fhir fid="BodyStructure.active" definition="Whether this body site is in active use." comment="This element is labeled as a modifier because it may be used to mark that the resource was created in error." requirements="Need to be able to mark a body site entry as not to be used because it was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="statusCode"/>
                    </fhir>
                </element>
                <element name="morphology" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of Structure</desc>
                    <fhir fid="BodyStructure.morphology" definition="The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies." comment="The minimum cardinality of 0 supports the use case of specifying a location without defining a morphology." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Morphologic Abnormalities" strength="example" description="Codes describing anatomic morphology." valueSet="2.16.840.1.113883.4.642.3.142" canonicalUri="http://hl7.org/fhir/ValueSet/bodystructure-code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="SPM-4/SPM-5"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Body site</desc>
                    <fhir fid="BodyStructure.location" definition="The anatomical location or region of the specimen, lesion, or body structure." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="OBX-20/SPM-8/SPM-10"/>
                        <mapping identity="rim" map=".targetSiteCode"/>
                        <mapping identity="openehr" map="Name of location"/>
                    </fhir>
                </element>
                <element name="locationQualifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Body site modifier</desc>
                    <fhir fid="BodyStructure.locationQualifier" definition="Qualifier to refine the anatomical location.  These include qualifiers for laterality, relative location, directionality, number, and plane.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Bodystructure Location Qualifier" strength="example" description="Concepts modifying the anatomic location." valueSet="2.16.840.1.113883.4.642.3.140" canonicalUri="http://hl7.org/fhir/ValueSet/bodystructure-relative-location"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="No distinct element defined in V2.x. The IHE Radiology Technical Framework directs the use of OBR-15-specimen source to contain laterality for imaging studies./SPM-9"/>
                        <mapping identity="rim" map=".targetSiteCode"/>
                        <mapping identity="openehr" map="Combines Side, Numerical identifier, Anatomical plane,and Aspect"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Text description</desc>
                    <fhir fid="BodyStructure.description" definition="A summary, characterization or explanation of the body structure." comment="This description could include any visual markings used to orientate the viewer e.g. external reference points, special sutures, ink markings." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".text"/>
                        <mapping identity="openehr" map="Description of anatomical location/Visual markings/orientation"/>
                    </fhir>
                </element>
                <element name="image" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Attached images</desc>
                    <fhir fid="BodyStructure.image" definition="Image or images used to identify a location.">
                        <type value="Attachment"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="OBX"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=COMP].target"/>
                        <mapping identity="openehr" map="Image"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who this is about</desc>
                    <fhir fid="BodyStructure.patient" definition="The person to which the body site belongs." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".scoper or .scoper.playsRole"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.13" name="Bundle" displayName="Bundle" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Bundle">
            <desc language="en-US">A container for a collection of resources.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Bundle" baseDefinition="http://hl7.org/fhir/StructureDefinition/Resource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="cda" uri="http://hl7.org/v3/cda" name="CDA (R2)"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Bundle" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Contains a collection of resources</desc>
                <fhir fid="Bundle" definition="A container for a collection of resources.">
                    <mapping identity="v2" map="N/A"/>
                    <mapping identity="rim" map="N/A"/>
                    <mapping identity="cda" map="ClinicalDocument, if bundle.type = document"/>
                    <constraint key="bdl-7" severity="error" human="FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)" expression="(type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&amp;resource.meta.versionId).isDistinct()"
                        xpath="(f:type/@value = 'history') or (count(for $entry in f:entry[f:resource] return $entry[count(parent::f:Bundle/f:entry[f:fullUrl/@value=$entry/f:fullUrl/@value and ((not(f:resource/*/f:meta/f:versionId/@value) and not($entry/f:resource/*/f:meta/f:versionId/@value)) or f:resource/*/f:meta/f:versionId/@value=$entry/f:resource/*/f:meta/f:versionId/@value)])!=1])=0)"
                        source=""/>
                    <constraint key="bdl-9" severity="error" human="A document must have an identifier with a system and a value" expression="type = 'document' implies (identifier.system.exists() and identifier.value.exists())" xpath="not(f:type/@value = 'document') or exists(f:identifier/f:system) or exists(f:identifier/f:value)" source=""/>
                    <constraint key="bdl-3" severity="error" human="entry.request mandatory for batch/transaction/history, otherwise prohibited" expression="entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))"
                        xpath="not(f:entry/f:request) or (f:type/@value = 'batch') or (f:type/@value = 'transaction') or (f:type/@value = 'history')" source=""/>
                    <constraint key="bdl-4" severity="error" human="entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited" expression="entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))"
                        xpath="not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response') or (f:type/@value = 'history')" source=""/>
                    <constraint key="bdl-12" severity="error" human="A message must have a MessageHeader as the first resource" expression="type = 'message' implies entry.first().resource.is(MessageHeader)" xpath="not(f:type/@value='message') or f:entry[1]/f:resource/f:MessageHeader" source=""/>
                    <constraint key="bdl-1" severity="error" human="total only when a search or history" expression="total.empty() or (type = 'searchset') or (type = 'history')" xpath="not(f:total) or (f:type/@value = 'searchset') or (f:type/@value = 'history')" source=""/>
                    <constraint key="bdl-2" severity="error" human="entry.search only when a search" expression="entry.search.empty() or (type = 'searchset')" xpath="not(f:entry/f:search) or (f:type/@value = 'searchset')" source=""/>
                    <constraint key="bdl-11" severity="error" human="A document must have a Composition as the first resource" expression="type = 'document' implies entry.first().resource.is(Composition)" xpath="not(f:type/@value='document') or f:entry[1]/f:resource/f:Composition" source=""/>
                    <constraint key="bdl-10" severity="error" human="A document must have a date" expression="type = 'document' implies (timestamp.hasValue())" xpath="not(f:type/@value = 'document') or exists(f:timestamp/@value)" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Persistent identifier for the bundle</desc>
                    <fhir fid="Bundle.identifier" definition="A persistent identifier for the bundle that won't change as a bundle is copied from server to server."
                        comment="Persistent identity generally only matters for batches of type Document, Message, and Collection. It would not normally be populated for search and history results and servers ignore Bundle.identifier when processing batches and transactions. For Documents  the .identifier SHALL be populated such that the .identifier is globally unique." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="cda" map="ClinicalDocument.id"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection</desc>
                    <fhir fid="Bundle.type" definition="Indicates the purpose of this bundle - how it is intended to be used." comment="It's possible to use a bundle for other purposes (e.g. a document can be accepted as a transaction). This is primarily defined so that there can be specific rules for some of the bundle types." isSummary="true">
                        <type value="code"/>
                        <binding displayName="BundleType" strength="required" description="Indicates the purpose of a bundle - how it is intended to be used." valueSet="2.16.840.1.113883.4.642.3.620" canonicalUri="http://hl7.org/fhir/ValueSet/bundle-type|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="timestamp" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the bundle was assembled</desc>
                    <fhir fid="Bundle.timestamp" definition="The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle."
                        comment="For many bundles, the timestamp is equal to .meta.lastUpdated, because they are not stored (e.g. search results). When a bundle is placed in a persistent store, .meta.lastUpdated will be usually be changed by the server. When the bundle is a message, a middleware agent altering the message (even if not stored) SHOULD update .meta.lastUpdated. .timestamp is used to track the original time of the Bundle, and SHOULD be populated.  &#xA;&#xA;Usage:&#xA;&#xA;* document : the date the document was created. Note: the composition may predate the document, or be associated with multiple documents. The date of the composition - the authoring time - may be earlier than the document assembly time&#xA;* message : the date that the content of the message was assembled. This date is not changed by middleware engines unless they add additional data that changes the meaning of the time of the message&#xA;* history : the date that the history was assembled. This time would be used as the _since time to ask for subsequent updates&#xA;* searchset : the time that the search set was assembled. Note that different pages MAY have different timestamps but need not. Having different timestamps does not imply that subsequent pages will represent or include changes made since the initial query&#xA;* transaction | transaction-response | batch | batch-response | collection : no particular assigned meaning&#xA;&#xA;The timestamp value should be greater than the lastUpdated and other timestamps in the resources in the bundle, and it should be equal or earlier than the .meta.lastUpdated on the Bundle itself."
                        isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="cda" map="ClinicalDocument.effectiveTime"/>
                    </fhir>
                </element>
                <element name="total" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If search, the total number of matches</desc>
                    <fhir fid="Bundle.total" definition="If a set of search matches, this is the total number of entries of type 'match' across all pages in the search.  It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle."
                        comment="Only used if the bundle is a search result set. The total does not include resources such as OperationOutcome and included resources, only the total number of matching resources." isSummary="true">
                        <type value="unsignedInt"/>
                    </fhir>
                </element>
                <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Links related to this Bundle</desc>
                    <fhir fid="Bundle.link" definition="A series of links that provide context to this bundle."
                        comment="Both Bundle.link and Bundle.entry.link are defined to support providing additional context when Bundles are used (e.g. [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS)). &#xA;&#xA;Bundle.entry.link corresponds to links found in the HTTP header if the resource in the entry was [read](http.html#read) directly.&#xA;&#xA;This specification defines some specific uses of Bundle.link for [searching](search.html#conformance) and [paging](http.html#paging), but no specific uses for Bundle.entry.link, and no defined function in a transaction - the meaning is implementation specific."
                        isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="relation" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1</desc>
                        <fhir fid="Bundle.link.relation" definition="A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference details for the link</desc>
                        <fhir fid="Bundle.link.url" definition="The reference details for the link." isSummary="true">
                            <type value="uri"/>
                        </fhir>
                    </element>
                </element>
                <element name="entry" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Entry in the bundle - will have a resource or information</desc>
                    <fhir fid="Bundle.entry" definition="An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)." isSummary="true">
                        <type value="BackboneElement"/>
                        <constraint key="bdl-8" severity="error" human="fullUrl cannot be a version specific reference" expression="fullUrl.contains('/_history/').not()" xpath="not(exists(f:fullUrl[contains(string(@value), '/_history/')]))" source=""/>
                        <constraint key="bdl-5" severity="error" human="must be a resource unless there's a request or response" expression="resource.exists() or request.exists() or response.exists()" xpath="exists(f:resource) or exists(f:request) or exists(f:response)" source=""/>
                    </fhir>
                    <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Links related to this entry</desc>
                        <fhir fid="Bundle.entry.link" definition="A series of links that provide context to this entry." isSummary="true"/>
                    </element>
                    <element name="fullUrl" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">URI for resource (Absolute URL server address or URI for UUID/OID)</desc>
                        <fhir fid="Bundle.entry.fullUrl"
                            definition="The Absolute URL for the resource.  The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: &#xA;* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)&#xA;* Results from operations might involve resources that are not identified."
                            comment="fullUrl might not be [unique in the context of a resource](bundle.html#bundle-unique). Note that since [FHIR resources do not need to be served through the FHIR API](references.html), the fullURL might be a URN or an absolute URL that does not end with the logical id of the resource (Resource.id). However, but if the fullUrl does look like a RESTful server URL (e.g. meets the [regex](references.html#regex), then the 'id' portion of the fullUrl SHALL end with the Resource.id.&#xA;&#xA;Note that the fullUrl is not the same as the canonical URL - it's an absolute url for an endpoint serving the resource (these will happen to have the same value on the canonical server for the resource with the canonical URL)."
                            isSummary="true">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A resource in the bundle</desc>
                        <fhir fid="Bundle.entry.resource" definition="The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type." isSummary="true">
                            <type value="Resource"/>
                        </fhir>
                    </element>
                    <element name="search" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Search related information</desc>
                        <fhir fid="Bundle.entry.search" definition="Information about the search process that lead to the creation of this entry." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="mode" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">match | include | outcome - why this is in the result set</desc>
                            <fhir fid="Bundle.entry.search.mode" definition="Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process."
                                comment="There is only one mode. In some corner cases, a resource may be included because it is both a match and an include. In these circumstances, 'match' takes precedence." isSummary="true">
                                <type value="code"/>
                                <binding displayName="SearchEntryMode" strength="required" description="Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process." valueSet="2.16.840.1.113883.4.642.3.622" canonicalUri="http://hl7.org/fhir/ValueSet/search-entry-mode|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="score" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Search ranking (between 0 and 1)</desc>
                            <fhir fid="Bundle.entry.search.score" definition="When searching, the server's search ranking score for the entry."
                                comment="Servers are not required to return a ranking score. 1 is most relevant, and 0 is least relevant. Often, search results are sorted by score, but the client may specify a different sort order.&#xA;&#xA;See [Patient Match](patient-operation-match.html) for the EMPI search which relates to this element." isSummary="true">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional execution information (transaction/batch/history)</desc>
                        <fhir fid="Bundle.entry.request" definition="Additional information about how this entry should be processed as part of a transaction or batch.  For history, it shows how the entry was processed to create the version contained in the entry." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="method" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">GET | HEAD | POST | PUT | DELETE | PATCH</desc>
                            <fhir fid="Bundle.entry.request.method" definition="In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred." isSummary="true">
                                <type value="code"/>
                                <binding displayName="HTTPVerb" strength="required" description="HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details." valueSet="2.16.840.1.113883.4.642.3.624" canonicalUri="http://hl7.org/fhir/ValueSet/http-verb|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">URL for HTTP equivalent of this entry</desc>
                            <fhir fid="Bundle.entry.request.url" definition="The URL for this entry, relative to the root (the address to which the request is posted)." comment="E.g. for a Patient Create, the method would be &#34;POST&#34; and the URL would be &#34;Patient&#34;. For a Patient Update, the method would be PUT and the URL would be &#34;Patient/[id]&#34;." isSummary="true">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="ifNoneMatch" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For managing cache currency</desc>
                            <fhir fid="Bundle.entry.request.ifNoneMatch" definition="If the ETag values match, return a 304 Not Modified status. See the API documentation for [&#34;Conditional Read&#34;](http.html#cread)." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="ifModifiedSince" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For managing cache currency</desc>
                            <fhir fid="Bundle.entry.request.ifModifiedSince" definition="Only perform the operation if the last updated date matches. See the API documentation for [&#34;Conditional Read&#34;](http.html#cread)." isSummary="true">
                                <type value="instant"/>
                            </fhir>
                        </element>
                        <element name="ifMatch" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For managing update contention</desc>
                            <fhir fid="Bundle.entry.request.ifMatch" definition="Only perform the operation if the Etag value matches. For more information, see the API section [&#34;Managing Resource Contention&#34;](http.html#concurrency)." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="ifNoneExist" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For conditional creates</desc>
                            <fhir fid="Bundle.entry.request.ifNoneExist" definition="Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [&#34;Conditional Create&#34;](http.html#ccreate). This is just the query portion of the URL - what follows the &#34;?&#34; (not including the &#34;?&#34;)." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Results of execution (transaction/batch/history)</desc>
                        <fhir fid="Bundle.entry.response" definition="Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Status response code (text optional)</desc>
                            <fhir fid="Bundle.entry.response.status" definition="The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The location (if the operation returns a location)</desc>
                            <fhir fid="Bundle.entry.response.location" definition="The location header created by processing this operation, populated if the operation returns a location." isSummary="true">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="etag" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The Etag for the resource (if relevant)</desc>
                            <fhir fid="Bundle.entry.response.etag" definition="The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency))."
                                comment="Etags match the Resource.meta.versionId. The ETag has to match the version id in the header if a resource is included." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="lastModified" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Server's date time modified</desc>
                            <fhir fid="Bundle.entry.response.lastModified" definition="The date/time that the resource was modified on the server." comment="This has to match the same time in the meta header (meta.lastUpdated) if a resource is included." isSummary="true">
                                <type value="instant"/>
                            </fhir>
                        </element>
                        <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">OperationOutcome with hints and warnings (for batch/transaction)</desc>
                            <fhir fid="Bundle.entry.response.outcome" definition="An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction."
                                comment="For a POST/PUT operation, this is the equivalent outcome that would be returned for prefer = operationoutcome - except that the resource is always returned whether or not the outcome is returned.&#xA;&#xA;This outcome is not used for error responses in batch/transaction, only for hints and warnings. In a batch operation, the error will be in Bundle.entry.response, and for transaction, there will be a single OperationOutcome instead of a bundle in the case of an error."
                                isSummary="true">
                                <type value="Resource"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="signature" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Digital Signature</desc>
                    <fhir fid="Bundle.signature" definition="Digital Signature - base64 encoded. XML-DSig or a JWT." comment="The signature could be created by the &#34;author&#34; of the bundle or by the originating device.   Requirements around inclusion of a signature, verification of signatures and treatment of signed/non-signed bundles is implementation-environment specific."
                        requirements="A Signature holds an electronic representation of a signature and its supporting context in a FHIR accessible form. The signature may either be a cryptographic type (XML DigSig or a JWS), which is able to provide non-repudiation proof, or it may be a graphical image that represents a signature or a signature process. This element allows capturing signatures on documents, messages, transactions or even search responses, to support content-authentication, non-repudiation or other business cases. This is primarily relevant where the bundle may travel through multiple hops or via other mechanisms where HTTPS non-repudiation is insufficient."
                        isSummary="true">
                        <type value="Signature"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.14" name="CapabilityStatement" displayName="CapabilityStatement" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CapabilityStatement">
            <desc language="en-US">A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CapabilityStatement" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="CapabilityStatement" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A statement of system capabilities</desc>
                <fhir fid="CapabilityStatement" definition="A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation."
                    comment="Applications may implement multiple versions (see [Managing Multiple Versions](versioning.html), and the [$versions](capabilitystatement-operation-versions.html) operation). If they do, then a CapabilityStatement describes the system's support for a particular version of FHIR, and the server will have multiple statements, one for each version.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="cpb-7" severity="error" human="The set of documents must be unique by the combination of profile and mode." expression="document.select(profile&amp;mode).isDistinct()"
                        xpath="count(f:document[f:mode/@value='producer'])=count(distinct-values(f:document[f:mode/@value='producer']/f:profile/f:reference/@value)) and count(f:document[f:mode/@value='consumer'])=count(distinct-values(f:document[f:mode/@value='consumer']/f:profile/f:reference/@value))" source=""/>
                    <constraint key="cpb-16" severity="error" human="If kind = requirements, implementation and software must be absent" expression="(kind!='requirements') or (implementation.exists().not() and software.exists().not())" xpath="not(f:kind/@value='instance') or (not(exists(f:implementation)) and not(exists(f:software)))" source=""/>
                    <constraint key="cpb-15" severity="error" human="If kind = capability, implementation must be absent, software must be present" expression="(kind != 'capability') or (implementation.exists().not() and software.exists())" xpath=" not(f:kind/@value='instance') or (not(exists(f:implementation)) and exists(f:software))" source=""/>
                    <constraint key="cpb-3" severity="error" human="Messaging end-point is required (and is only permitted) when a statement is for an implementation." expression="messaging.endpoint.empty() or kind = 'instance'" xpath="not(exists(f:messaging/f:endpoint)) or f:kind/@value = 'instance'" source=""/>
                    <constraint key="cpb-14" severity="error" human="If kind = instance, implementation must be present and software may be present" expression="(kind != 'instance') or implementation.exists()" xpath="not(f:kind/@value='instance') or exists(f:implementation)" source=""/>
                    <constraint key="cpb-2" severity="error" human="A Capability Statement SHALL have at least one of description, software, or implementation element." expression="(description.count() + software.count() + implementation.count()) &gt; 0" xpath="count(f:software | f:implementation | f:description) &gt; 0" source=""/>
                    <constraint key="cpb-1" severity="error" human="A Capability Statement SHALL have at least one of REST, messaging or document element." expression="rest.exists() or messaging.exists() or document.exists()" xpath="exists(f:rest) or exists(f:messaging) or exists(f:document)" source=""/>
                    <constraint key="cpb-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this capability statement, represented as a URI (globally unique)</desc>
                    <fhir fid="CapabilityStatement.url"
                        definition="An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the capability statement to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the capability statement</desc>
                    <fhir fid="CapabilityStatement.version"
                        definition="The identifier that is used to identify this version of the capability statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the capability statement author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different capability statement instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the capability statement with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this capability statement (computer friendly)</desc>
                    <fhir fid="CapabilityStatement.name" definition="A natural language name identifying the capability statement. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this capability statement (human friendly)</desc>
                    <fhir fid="CapabilityStatement.title" definition="A short, descriptive, user-friendly title for the capability statement." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="CapabilityStatement.status" definition="The status of this capability statement. Enables tracking the life-cycle of the content." comment="Allows filtering of capability statements that are appropriate for use versus not.This is not intended for use with actual capability statements, but where capability statements are used to describe possible or desired systems."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="CapabilityStatement.experimental" definition="A Boolean value to indicate that this capability statement is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of capability statements that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level capability statement." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="CapabilityStatement.date" definition="The date  (and optionally time) when the capability statement was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the capability statement changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the capability statement. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="CapabilityStatement.publisher" definition="The name of the organization or individual that published the capability statement."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the capability statement is the organization or individual primarily responsible for the maintenance and upkeep of the capability statement. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the capability statement. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the capability statement.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="CapabilityStatement.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the capability statement</desc>
                    <fhir fid="CapabilityStatement.description" definition="A free text natural language description of the capability statement from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP."
                        comment="This description can be used to capture details such as why the capability statement was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the capability statement as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the capability statement is presumed to be the predominant language in the place the capability statement was created).This does not need to be populated if the description is adequately implied by the software or implementation details.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="CapabilityStatement.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate capability statement instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for capability statement (if applicable)</desc>
                    <fhir fid="CapabilityStatement.jurisdiction" definition="A legal or geographic region in which the capability statement is intended to be used." comment="It may be possible for the capability statement to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this capability statement is defined</desc>
                    <fhir fid="CapabilityStatement.purpose" definition="Explanation of why this capability statement is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the capability statement. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this capability statement.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="CapabilityStatement.copyright" definition="A copyright statement relating to the capability statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the capability statement." requirements="Consumers must be able to determine any legal restrictions on the use of the capability statement and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">instance | capability | requirements</desc>
                    <fhir fid="CapabilityStatement.kind" definition="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase)." requirements="Allow searching the 3 modes." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CapabilityStatementKind" strength="required" description="How a capability statement is intended to be used." valueSet="2.16.840.1.113883.4.642.3.198" canonicalUri="http://hl7.org/fhir/ValueSet/capability-statement-kind|4.0.1"/>
                    </fhir>
                </element>
                <element name="instantiates" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Canonical URL of another capability statement this implements</desc>
                    <fhir fid="CapabilityStatement.instantiates"
                        definition="Reference to a canonical URL of another CapabilityStatement that this software implements. This capability statement is a published API description that corresponds to a business service. The server may actually implement a subset of the capability statement it claims to implement, so the capability statement must specify the full capability details."
                        comment="HL7 defines the following Services: [Terminology Service](terminology-service.html).    &#xA;&#xA;Many [Implementation Guides](http://fhir.org/guides/registry) define additional services." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
                        </type>
                    </fhir>
                </element>
                <element name="imports" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Canonical URL of another capability statement this adds to</desc>
                    <fhir fid="CapabilityStatement.imports" definition="Reference to a canonical URL of another CapabilityStatement that this software adds to. The capability statement automatically includes everything in the other statement, and it is not duplicated, though the server may repeat the same resources, interactions and operations to add additional details to them."
                        comment="the contents of any directly or indirectly imported CapabilityStatements SHALL NOT overlap, i.e. they cannot refer to the same rest/resource, operations/name, searchparam/name, interaction/code, messaging/endpoint, document/mode pair.&#xA;&#xA;A capability statement that imports another CapabilityStatement automatically instantiates it too (though this is often not a very useful statement for the kinds of CapabilityStatements that are suitable for importing)."
                        isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
                        </type>
                    </fhir>
                </element>
                <element name="software" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Software that is covered by this capability statement</desc>
                    <fhir fid="CapabilityStatement.software" definition="Software that is covered by this capability statement.  It is used when the capability statement describes the capabilities of a particular software version, independent of an installation." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A name the software is known by</desc>
                        <fhir fid="CapabilityStatement.software.name" definition="Name the software is known by." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Version covered by this statement</desc>
                        <fhir fid="CapabilityStatement.software.version" definition="The version identifier for the software covered by this statement." comment="If possible, a version should be specified, as statements are likely to be different for different versions of software." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="releaseDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date this version was released</desc>
                        <fhir fid="CapabilityStatement.software.releaseDate" definition="Date this version of the software was released." isSummary="true">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="implementation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If this describes a specific instance</desc>
                    <fhir fid="CapabilityStatement.implementation" definition="Identifies a specific implementation instance that is described by the capability statement - i.e. a particular installation, rather than the capabilities of a software program." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Describes this specific instance</desc>
                        <fhir fid="CapabilityStatement.implementation.description" definition="Information about the specific installation that this capability statement relates to." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Base URL for the installation</desc>
                        <fhir fid="CapabilityStatement.implementation.url" definition="An absolute base URL for the implementation.  This forms the base for REST interfaces as well as the mailbox and document interfaces." isSummary="true">
                            <type value="url"/>
                        </fhir>
                    </element>
                    <element name="custodian" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Organization that manages the data</desc>
                        <fhir fid="CapabilityStatement.implementation.custodian" definition="The organization responsible for the management of the instance and oversight of the data on the server at the specified URL." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="fhirVersion" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">FHIR Version the system supports</desc>
                    <fhir fid="CapabilityStatement.fhirVersion" definition="The version of the FHIR specification that this CapabilityStatement describes (which SHALL be the same as the FHIR version of the CapabilityStatement itself). There is no default value."
                        comment="Servers may implement multiple versions (see [Managing Multiple Versions](versioning.html), and the [$versions](capabilitystatement-operation-versions.html) operation). If they do, and the CapabilityStatement is requested from the server, then this fhirVersion will be either the version requested, or the server's default version." isSummary="true">
                        <type value="code"/>
                        <binding displayName="FHIRVersion" strength="required" description="All published FHIR Versions." valueSet="2.16.840.1.113883.4.642.3.1309" canonicalUri="http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1"/>
                    </fhir>
                </element>
                <element name="format" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">formats supported (xml | json | ttl | mime type)</desc>
                    <fhir fid="CapabilityStatement.format" definition="A list of the formats supported by this implementation using their content types." comment="&#34;xml&#34;, &#34;json&#34; and &#34;ttl&#34; are allowed, which describe the simple encodings described in the specification (and imply appropriate bundle support). Otherwise, mime types are legal here." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                    </fhir>
                </element>
                <element name="patchFormat" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patch formats supported</desc>
                    <fhir fid="CapabilityStatement.patchFormat" definition="A list of the patch formats supported by this implementation using their content types."
                        comment="At present, the patch mime types application/json-patch+json and application/xml-patch+xml are legal. Generally, if a server supports PATCH, it would be expected to support the patch formats and match the formats it supports, but this is not always possible or necessary." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                    </fhir>
                </element>
                <element name="implementationGuide" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Implementation guides supported</desc>
                    <fhir fid="CapabilityStatement.implementationGuide" definition="A list of implementation guides that the server does (or should) support in their entirety." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImplementationGuide"/>
                        </type>
                    </fhir>
                </element>
                <element name="rest" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">If the endpoint is a RESTful one</desc>
                    <fhir fid="CapabilityStatement.rest" definition="A definition of the restful capabilities of the solution, if any." comment="Multiple repetitions allow definition of both client and/or server behaviors or possibly behaviors under different configuration settings (for software or requirements statements)." isSummary="true">
                        <type value="BackboneElement"/>
                        <constraint key="cpb-9" severity="error" human="A given resource can only be described once per RESTful mode." expression="resource.select(type).isDistinct()" xpath="count(f:resource)=count(distinct-values(f:resource/f:type/@value))" source=""/>
                    </fhir>
                    <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">client | server</desc>
                        <fhir fid="CapabilityStatement.rest.mode" definition="Identifies whether this portion of the statement is describing the ability to initiate or receive restful operations." isSummary="true">
                            <type value="code"/>
                            <binding displayName="RestfulCapabilityMode" strength="required" description="The mode of a RESTful capability statement." valueSet="2.16.840.1.113883.4.642.3.176" canonicalUri="http://hl7.org/fhir/ValueSet/restful-capability-mode|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">General description of implementation</desc>
                        <fhir fid="CapabilityStatement.rest.documentation" definition="Information about the system's restful capabilities that apply across all applications, such as security.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="security" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Information about security of implementation</desc>
                        <fhir fid="CapabilityStatement.rest.security" definition="Information about security implementation from an interface perspective - what a client needs to know." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="cors" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Adds CORS Headers (http://enable-cors.org/)</desc>
                            <fhir fid="CapabilityStatement.rest.security.cors" definition="Server adds CORS headers when responding to requests - this enables Javascript applications to use the server." comment="The easiest CORS headers to add are Access-Control-Allow-Origin: * &amp; Access-Control-Request-Method: GET, POST, PUT, DELETE. All servers SHOULD support CORS." isSummary="true">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="service" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates</desc>
                            <fhir fid="CapabilityStatement.rest.security.service" definition="Types of security services that are supported/required by the system." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="RestfulSecurityService" strength="extensible" description="Types of security services used with FHIR." valueSet="2.16.840.1.113883.4.642.3.178" canonicalUri="http://hl7.org/fhir/ValueSet/restful-security-service"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">General description of how security works</desc>
                            <fhir fid="CapabilityStatement.rest.security.description" definition="General description of how security works.">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="resource" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Resource served on the REST interface</desc>
                        <fhir fid="CapabilityStatement.rest.resource" definition="A specification of the restful capabilities of the solution for a specific resource type." comment="Max of one repetition per resource type." isSummary="true">
                            <type value="BackboneElement"/>
                            <constraint key="cpb-12" severity="error" human="Search parameter names must be unique in the context of a resource." expression="searchParam.select(name).isDistinct()" xpath="count(f:searchParam)=count(distinct-values(f:searchParam/f:name/@value))" source=""/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">A resource type that is supported</desc>
                            <fhir fid="CapabilityStatement.rest.resource.type" definition="A type of resource exposed via the restful interface." isSummary="true">
                                <type value="code"/>
                                <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="profile" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Base System profile for all uses of resource</desc>
                            <fhir fid="CapabilityStatement.rest.resource.profile" definition="A specification of the profile that describes the solution's overall support for the resource, including any constraints on cardinality, bindings, lengths or other limitations. See further discussion in [Using Profiles](profiling.html#profile-uses)."
                                comment="The profile applies to all  resources of this type - i.e. it is the superset of what is supported by the system." isSummary="true">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="supportedProfile" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Profiles for use cases supported</desc>
                            <fhir fid="CapabilityStatement.rest.resource.supportedProfile"
                                definition="A list of profiles that represent different use cases supported by the system. For a server, &#34;supported by the system&#34; means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles](profiling.html#profile-uses)."
                                comment="Supported profiles are different than the profile that applies to a particular resource in .rest.resource.profile. The resource profile is a general statement of what features of the resource are supported overall by the system - the sum total of the facilities it supports. A supported profile is a deeper statement about the functionality of the data and services provided by the server (or used by the client). A typical case is a laboratory system that produces a set of different reports - this is the list of types of data that it publishes. A key aspect of declaring profiles here is the question of how the client converts knowledge that the server publishes this data into working with the data; the client can inspect individual resources to determine whether they conform to a particular profile, but how does it find the ones that do? It does so by searching using the _profile parameter, so any resources listed here must be valid values for the _profile resource (using the identifier in the target profile)."
                                isSummary="true">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Additional information about the use of the resource type</desc>
                            <fhir fid="CapabilityStatement.rest.resource.documentation" definition="Additional information about the resource type used by the system.">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                        <element name="interaction" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">What operations are supported?</desc>
                            <fhir fid="CapabilityStatement.rest.resource.interaction" definition="Identifies a restful operation supported by the solution."
                                comment="In general, a Resource will only appear in a CapabilityStatement if the server actually has some capabilities - e.g. there is at least one interaction supported. However interactions can be omitted to support summarization (_summary = true).">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">read | vread | update | patch | delete | history-instance | history-type | create | search-type</desc>
                                <fhir fid="CapabilityStatement.rest.resource.interaction.code" definition="Coded identifier of the operation, supported by the system resource.">
                                    <type value="code"/>
                                    <binding displayName="TypeRestfulInteraction" strength="required" description="Operations supported by REST at the type or instance level." valueSet="2.16.840.1.113883.4.642.3.180" canonicalUri="http://hl7.org/fhir/ValueSet/type-restful-interaction|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Anything special about operation behavior</desc>
                                <fhir fid="CapabilityStatement.rest.resource.interaction.documentation" definition="Guidance specific to the implementation of this operation, such as 'delete is a logical delete' or 'updates are only allowed with version id' or 'creates permitted from pre-authorized certificates only'."
                                    requirements="REST allows a degree of variability in the implementation of RESTful solutions that is useful for exchange partners to be aware of.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="versioning" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">no-version | versioned | versioned-update</desc>
                            <fhir fid="CapabilityStatement.rest.resource.versioning"
                                definition="This field is set to no-version to specify that the system does not support (server) or use (client) versioning for this resource type. If this has some other value, the server must at least correctly track and populate the versionId meta-property on resources. If the value is 'versioned-update', then the server supports all the versioning features, including using e-tags for version integrity in the API."
                                comment="If a server supports versionIds correctly, it SHOULD support vread too, but is not required to do so.">
                                <type value="code"/>
                                <binding displayName="ResourceVersionPolicy" strength="required" description="How the system supports versioning for a resource." valueSet="2.16.840.1.113883.4.642.3.190" canonicalUri="http://hl7.org/fhir/ValueSet/versioning-policy|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="readHistory" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Whether vRead can return past versions</desc>
                            <fhir fid="CapabilityStatement.rest.resource.readHistory" definition="A flag for whether the server is able to return past versions as part of the vRead operation." comment="It is useful to support the vRead operation for current operations, even if past versions aren't available.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="updateCreate" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If update can commit to a new identity</desc>
                            <fhir fid="CapabilityStatement.rest.resource.updateCreate" definition="A flag to indicate that the server allows or needs to allow the client to create new identities on the server (that is, the client PUTs to a location where there is no existing resource). Allowing this operation means that the server allows the client to create new identities on the server."
                                comment="Allowing the clients to create new identities on the server means that the system administrator needs to have confidence that the clients do not create clashing identities between them. Obviously, if there is only one client, this won't happen. While creating identities on the client means that the clients need to be managed, it's much more convenient for many scenarios if such management can be put in place.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="conditionalCreate" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If allows/uses conditional create</desc>
                            <fhir fid="CapabilityStatement.rest.resource.conditionalCreate" definition="A flag that indicates that the server supports conditional create." comment="Conditional Create is mainly appropriate for interface engine scripts converting from other formats, such as v2.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="conditionalRead" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">not-supported | modified-since | not-match | full-support</desc>
                            <fhir fid="CapabilityStatement.rest.resource.conditionalRead" definition="A code that indicates how the server supports conditional read." comment="Conditional Read is mainly appropriate for interface engine scripts converting from other formats, such as v2.">
                                <type value="code"/>
                                <binding displayName="ConditionalReadStatus" strength="required" description="A code that indicates how the server supports conditional read." valueSet="2.16.840.1.113883.4.642.3.200" canonicalUri="http://hl7.org/fhir/ValueSet/conditional-read-status|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="conditionalUpdate" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If allows/uses conditional update</desc>
                            <fhir fid="CapabilityStatement.rest.resource.conditionalUpdate" definition="A flag that indicates that the server supports conditional update." comment="Conditional Update is mainly appropriate for interface engine scripts converting from other formats, such as v2.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="conditionalDelete" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">not-supported | single | multiple - how conditional delete is supported</desc>
                            <fhir fid="CapabilityStatement.rest.resource.conditionalDelete" definition="A code that indicates how the server supports conditional delete." comment="Conditional Delete is mainly appropriate for interface engine scripts converting from other formats, such as v2.">
                                <type value="code"/>
                                <binding displayName="ConditionalDeleteStatus" strength="required" description="A code that indicates how the server supports conditional delete." valueSet="2.16.840.1.113883.4.642.3.194" canonicalUri="http://hl7.org/fhir/ValueSet/conditional-delete-status|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="referencePolicy" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">literal | logical | resolves | enforced | local</desc>
                            <fhir fid="CapabilityStatement.rest.resource.referencePolicy" definition="A set of flags that defines how references are supported.">
                                <type value="code"/>
                                <binding displayName="ReferenceHandlingPolicy" strength="required" description="A set of flags that defines how references are supported." valueSet="2.16.840.1.113883.4.642.3.202" canonicalUri="http://hl7.org/fhir/ValueSet/reference-handling-policy|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="searchInclude" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">_include values supported by the server</desc>
                            <fhir fid="CapabilityStatement.rest.resource.searchInclude" definition="A list of _include values supported by the server." comment="If this list is empty, the server does not support includes.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="searchRevInclude" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">_revinclude values supported by the server</desc>
                            <fhir fid="CapabilityStatement.rest.resource.searchRevInclude" definition="A list of _revinclude (reverse include) values supported by the server." comment="If this list is empty, the server does not support reverse includes.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="searchParam" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Search parameters supported by implementation</desc>
                            <fhir fid="CapabilityStatement.rest.resource.searchParam" definition="Search parameters for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation."
                                comment="The search parameters should include the control search parameters such as _sort, _count, etc. that also apply to this resource (though many will be listed at [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). The behavior of some search parameters may be further described by other code or extension elements, or narrative within the capability statement or linked [SearchParameter](searchparameter.html#) definitions.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Name of search parameter</desc>
                                <fhir fid="CapabilityStatement.rest.resource.searchParam.name" definition="The name of the search parameter used in the interface." comment="Parameter names cannot overlap with standard parameter names, and standard parameters cannot be redefined.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Source of definition for parameter</desc>
                                <fhir fid="CapabilityStatement.rest.resource.searchParam.definition"
                                    definition="An absolute URI that is a formal reference to where this parameter was first defined, so that a client can be confident of the meaning of the search parameter (a reference to [SearchParameter.url](searchparameter-definitions.html#SearchParameter.url)). This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs."
                                    comment="This SHOULD be present, and matches refers to a SearchParameter by its canonical URL. If systems wish to document their support for modifiers, comparators, target resource types, and chained parameters, they should do using a search parameter resource. This element SHALL be populated if the search parameter refers to a SearchParameter defined by the FHIR core specification or externally defined IGs.">
                                    <type value="canonical">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SearchParameter"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">number | date | string | token | reference | composite | quantity | uri | special</desc>
                                <fhir fid="CapabilityStatement.rest.resource.searchParam.type" definition="The type of value a search parameter refers to, and how the content is interpreted."
                                    comment="While this can be looked up from the definition, it is included here as a convenience for systems that autogenerate a query interface based on the server capability statement.  It SHALL be the same as the type in the search parameter definition.">
                                    <type value="code"/>
                                    <binding displayName="SearchParamType" strength="required" description="Data types allowed to be used for search parameters." valueSet="2.16.840.1.113883.4.642.3.11" canonicalUri="http://hl7.org/fhir/ValueSet/search-param-type|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Server-specific usage</desc>
                                <fhir fid="CapabilityStatement.rest.resource.searchParam.documentation" definition="This allows documentation of any distinct behaviors about how the search parameter is used.  For example, text matching algorithms.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Definition of a resource operation</desc>
                            <fhir fid="CapabilityStatement.rest.resource.operation" definition="Definition of an operation or a named query together with its parameters and their meaning and type. Consult the definition of the operation for details about how to invoke the operation, and the parameters."
                                comment="Operations linked from CapabilityStatement.rest.resource.operation must have OperationDefinition.type = true or OperationDefinition.instance = true.    &#xA;&#xA;If an operation that is listed in multiple CapabilityStatement.rest.resource.operation (e.g. for different resource types), then clients should understand that the operation is only supported on the specified resource types, and that may be a subset of those listed in OperationDefinition.resource."
                                isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Name by which the operation/query is invoked</desc>
                                <fhir fid="CapabilityStatement.rest.resource.operation.name" definition="The name of the operation or query. For an operation, this is the name  prefixed with $ and used in the URL. For a query, this is the name used in the _query parameter when the query is called."
                                    comment="The name here SHOULD be the same as the name in the definition, unless there is a name clash and the name cannot be used. The name does not include the &#34;$&#34; portion that is always included in the URL." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="definition" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">The defined operation/query</desc>
                                <fhir fid="CapabilityStatement.rest.resource.operation.definition"
                                    definition="Where the formal definition can be found. If a server references the base definition of an Operation (i.e. from the specification itself such as ```http://hl7.org/fhir/OperationDefinition/ValueSet-expand```), that means it supports the full capabilities of the operation - e.g. both GET and POST invocation.  If it only supports a subset, it must define its own custom [OperationDefinition](operationdefinition.html#) with a 'base' of the original OperationDefinition.  The custom definition would describe the specific subset of functionality supported."
                                    comment="This can be used to build an HTML form to invoke the operation, for instance." isSummary="true">
                                    <type value="canonical">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Specific details about operation behavior</desc>
                                <fhir fid="CapabilityStatement.rest.resource.operation.documentation" definition="Documentation that describes anything special about the operation behavior, possibly detailing different behavior for system, type and instance-level invocation of the operation.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                    <element name="interaction" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What operations are supported?</desc>
                        <fhir fid="CapabilityStatement.rest.interaction" definition="A specification of restful operations supported by the system.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">transaction | batch | search-system | history-system</desc>
                            <fhir fid="CapabilityStatement.rest.interaction.code" definition="A coded identifier of the operation, supported by the system.">
                                <type value="code"/>
                                <binding displayName="SystemRestfulInteraction" strength="required" description="Operations supported by REST at the system level." valueSet="2.16.840.1.113883.4.642.3.181" canonicalUri="http://hl7.org/fhir/ValueSet/system-restful-interaction|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Anything special about operation behavior</desc>
                            <fhir fid="CapabilityStatement.rest.interaction.documentation" definition="Guidance specific to the implementation of this operation, such as limitations on the kind of transactions allowed, or information about system wide search is implemented.">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="searchParam" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Search parameters for searching all resources</desc>
                        <fhir fid="CapabilityStatement.rest.searchParam" definition="Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation."
                            comment="Typically, the only search parameters supported for all searches are those that apply to all resources - tags, profiles, text search etc. These search parameters should include the control search parameters such as _sort, _count, etc. that also apply to this resource (though many will be listed at [CapabilityStatement.rest.searchParam](capabilitystatement-definitions.html#CapabilityStatement.rest.searchParam)). The behavior of some search parameters may be further described by other code or extension elements, or narrative within the capability statement or linked [SearchParameter](searchparameter.html#) definitions."
                        />
                    </element>
                    <element name="operation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Definition of a system level operation</desc>
                        <fhir fid="CapabilityStatement.rest.operation" definition="Definition of an operation or a named query together with its parameters and their meaning and type."
                            comment="CapabilityStatement.rest.operation is for operations invoked at the system level, or for operations that are supported across multiple resource types. Operations linked from CapabilityStatement.rest.operation must have OperationDefinition.system = true, or more than one Operation.resource." isSummary="true"/>
                    </element>
                    <element name="compartment" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Compartments served/used by system</desc>
                        <fhir fid="CapabilityStatement.rest.compartment" definition="An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by its canonical URL ." comment="At present, the only defined compartments are at [CompartmentDefinition](compartmentdefinition.html).">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CompartmentDefinition"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="messaging" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">If messaging is supported</desc>
                    <fhir fid="CapabilityStatement.messaging" definition="A description of the messaging capabilities of the solution." comment="Multiple repetitions allow the documentation of multiple endpoints per solution." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Where messages should be sent</desc>
                        <fhir fid="CapabilityStatement.messaging.endpoint" definition="An endpoint (network accessible address) to which messages and/or replies are to be sent.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="protocol" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">http | ftp | mllp +</desc>
                            <fhir fid="CapabilityStatement.messaging.endpoint.protocol" definition="A list of the messaging transport protocol(s) identifiers, supported by this endpoint.">
                                <type value="Coding"/>
                                <binding displayName="MessageTransport" strength="extensible" description="The protocol used for message transport." valueSet="2.16.840.1.113883.4.642.3.184" canonicalUri="http://hl7.org/fhir/ValueSet/message-transport"/>
                            </fhir>
                        </element>
                        <element name="address" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Network address or identifier of the end-point</desc>
                            <fhir fid="CapabilityStatement.messaging.endpoint.address" definition="The network address of the endpoint. For solutions that do not use network addresses for routing, it can be just an identifier.">
                                <type value="url"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="reliableCache" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reliable Message Cache Length (min)</desc>
                        <fhir fid="CapabilityStatement.messaging.reliableCache" definition="Length if the receiver's reliable messaging cache in minutes (if a receiver) or how long the cache length on the receiver should be (if a sender)." comment="If this value is missing then the application does not implement (receiver) or depend on (sender) reliable messaging.">
                            <type value="unsignedInt"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Messaging interface behavior details</desc>
                        <fhir fid="CapabilityStatement.messaging.documentation" definition="Documentation about the system's messaging capabilities for this endpoint not otherwise documented by the capability statement.  For example, the process for becoming an authorized messaging exchange partner.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="supportedMessage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Messages supported by this system</desc>
                        <fhir fid="CapabilityStatement.messaging.supportedMessage" definition="References to message definitions for messages this system can send or receive." comment="This is a proposed alternative to the messaging.event structure." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">sender | receiver</desc>
                            <fhir fid="CapabilityStatement.messaging.supportedMessage.mode" definition="The mode of this event declaration - whether application is sender or receiver." isSummary="true">
                                <type value="code"/>
                                <binding displayName="EventCapabilityMode" strength="required" description="The mode of a message capability statement." valueSet="2.16.840.1.113883.4.642.3.182" canonicalUri="http://hl7.org/fhir/ValueSet/event-capability-mode|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="definition" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Message supported by this system</desc>
                            <fhir fid="CapabilityStatement.messaging.supportedMessage.definition" definition="Points to a message definition that identifies the messaging event, message structure, allowed responses, etc." isSummary="true">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MessageDefinition"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="document" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Document definition</desc>
                    <fhir fid="CapabilityStatement.document" definition="A document definition." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">producer | consumer</desc>
                        <fhir fid="CapabilityStatement.document.mode" definition="Mode of this document declaration - whether an application is a producer or consumer." isSummary="true">
                            <type value="code"/>
                            <binding displayName="DocumentMode" strength="required" description="Whether the application produces or consumes documents." valueSet="2.16.840.1.113883.4.642.3.186" canonicalUri="http://hl7.org/fhir/ValueSet/document-mode|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of document support</desc>
                        <fhir fid="CapabilityStatement.document.documentation" definition="A description of how the application supports or uses the specified document profile.  For example, when documents are created, what action is taken with consumed documents, etc.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="profile" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Constraint on the resources used in the document</desc>
                        <fhir fid="CapabilityStatement.document.profile" definition="A profile on the document Bundle that constrains which resources are present, and their contents." comment="The profile is actually on the Bundle." isSummary="true">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.15" name="CarePlan" displayName="CarePlan" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CarePlan">
            <desc language="en-US">Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CarePlan" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="CarePlan" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Healthcare plan for patient or group</desc>
                <fhir fid="CarePlan" definition="Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="rim" map="Act[classCode=PCPR, moodCode=INT]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this plan</desc>
                    <fhir fid="CarePlan.identifier" definition="Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the care plan as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PTH-3"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="CarePlan.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="CarePlan.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiatesUri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills CarePlan</desc>
                    <fhir fid="CarePlan.basedOn" definition="A care plan that is fulfilled in whole or in part by this care plan." requirements="Allows tracing of the care plan and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">CarePlan replaced by this CarePlan</desc>
                    <fhir fid="CarePlan.replaces" definition="Completed or terminated care plan whose function is taken by this new care plan." comment="The replacement could be because the initial care plan was immediately rejected (due to an issue) or because the previous care plan was completed, but the need for the action described by the care plan remains ongoing."
                        requirements="Allows tracing the continuation of a therapy or administrative process instantiated through multiple care plans." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced CarePlan</desc>
                    <fhir fid="CarePlan.partOf" definition="A larger care plan of which this particular care plan is a component or step." comment="Each care plan is an independent request, such that having a care plan be part of another care plan can cause issues with cascading statuses.  As such, this element is still being discussed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                        </type>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="CarePlan.status" definition="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record."
                        comment="The unknown code is not to be used to convey other statuses.  The unknown code should be used when one of the statuses applies, but the authoring system doesn't know the current state of the care plan.&#xA;&#xA;This element is labeled as a modifier because the status contains the code entered-in-error that marks the plan as not currently valid."
                        requirements="Allows clinicians to determine whether the plan is actionable or not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status {uses different ValueSet}"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="PTH-5"/>
                        <mapping identity="rim" map=".statusCode planned = new active = active completed = completed"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | order | option</desc>
                    <fhir fid="CarePlan.intent" definition="Indicates the level of authority/intentionality associated with the care plan and where the care plan fits into the workflow chain." comment="This element is labeled as a modifier because the intent alters when and how the resource is actually applicable."
                        requirements="Proposals/recommendations, plans and orders all use the same structure and can exist in the same fulfillment chain." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Care Plan Intent" strength="required" description="Codes indicating the degree of authority/intentionality associated with a care plan." valueSet="2.16.840.1.113883.4.642.3.150" canonicalUri="http://hl7.org/fhir/ValueSet/care-plan-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of plan</desc>
                    <fhir fid="CarePlan.category" definition="Identifies what &#34;kind&#34; of plan this is to support differentiation between multiple co-existing plans; e.g. &#34;Home health&#34;, &#34;psychiatric&#34;, &#34;asthma&#34;, &#34;disease management&#34;, &#34;wellness plan&#34;, etc."
                        comment="There may be multiple axes of categorization and one plan may serve multiple purposes.  In some cases, this may be redundant with references to CarePlan.concern." requirements="Used for filtering what plan(s) are retrieved and displayed to different types of users." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Care Plan Category" strength="example" description="Identifies what &#34;kind&#34; of plan this is to support differentiation between multiple co-existing plans; e.g. &#34;Home health&#34;, &#34;psychiatric&#34;, &#34;asthma&#34;, &#34;disease management&#34;, etc." valueSet="2.16.840.1.113883.4.642.3.148"
                            canonicalUri="http://hl7.org/fhir/ValueSet/care-plan-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human-friendly name for the care plan</desc>
                    <fhir fid="CarePlan.title" definition="Human-friendly name for the care plan." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Summary of nature of plan</desc>
                    <fhir fid="CarePlan.description" definition="A description of the scope and nature of the plan." requirements="Provides more detail than conveyed by category." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who the care plan is for</desc>
                    <fhir fid="CarePlan.subject" definition="Identifies the patient or group whose intended care is described by the plan." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".participation[typeCode=PAT].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="CarePlan.encounter" definition="The Encounter during which this CarePlan was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter. CarePlan activities conducted as a result of the care plan may well occur as part of other encounters." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="Associated PV1"/>
                        <mapping identity="rim" map="."/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time period plan covers</desc>
                    <fhir fid="CarePlan.period" definition="Indicates when the plan did (or is intended to) come into effect and end."
                        comment="Any activities scheduled as part of the plan should be constrained to the specified period regardless of whether the activities are planned within a single encounter/episode or across multiple encounters/episodes (e.g. the longitudinal management of a chronic condition)." requirements="Allows tracking what plan(s) are in effect at a particular time."
                        isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="v2" map="GOL-7 / GOL-8"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date record was first recorded</desc>
                    <fhir fid="CarePlan.created" definition="Represents when this particular CarePlan record was created in the system, which is often a system-generated date." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is the designated responsible party</desc>
                    <fhir fid="CarePlan.author" definition="When populated, the author is responsible for the care plan.  The care plan is attributed to the author." comment="The author may also be a contributor.  For example, an organization can be an author, but not listed as a contributor." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="contributor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who provided the content of the care plan</desc>
                    <fhir fid="CarePlan.contributor" definition="Identifies the individual(s) or organization who provided the contents of the care plan." comment="Collaborative care plans may have multiple contributors.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                    </fhir>
                </element>
                <element name="careTeam" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who's involved in plan?</desc>
                    <fhir fid="CarePlan.careTeam" definition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." requirements="Allows representation of care teams, helps scope care plan.  In some cases may be a determiner of access permissions.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer {similar but does not entail CareTeam}"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="addresses" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Health issues this plan addresses</desc>
                    <fhir fid="CarePlan.addresses" definition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan."
                        comment="When the diagnosis is related to an allergy or intolerance, the Condition and AllergyIntolerance resources can both be used. However, to be actionable for decision support, using Condition alone is not sufficient as the allergy or intolerance condition needs to be represented as an AllergyIntolerance."
                        requirements="Links plan to the conditions it manages.  The element can identify risks addressed by the plan as well as active conditions.  (The Condition resource can include things like &#34;at risk for hypertension&#34; or &#34;fall risk&#34;.)  Also scopes plans - multiple plans may exist addressing different concerns." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="PRB-4"/>
                        <mapping identity="rim" map=".actRelationship[typeCode=SUBJ].target[classCode=CONC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information considered as part of plan</desc>
                    <fhir fid="CarePlan.supportingInfo" definition="Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include comorbidities, recent procedures, limitations, recent assessments, etc." comment="Use &#34;concern&#34; to identify specific conditions addressed by the care plan."
                        requirements="Identifies barriers and other considerations associated with the care plan.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                    </fhir>
                </element>
                <element name="goal" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Desired outcome of plan</desc>
                    <fhir fid="CarePlan.goal" definition="Describes the intended objective(s) of carrying out the care plan." comment="Goal can be achieving a particular change or merely maintaining a current state or even slowing a decline." requirements="Provides context for plan.  Allows plan effectiveness to be evaluated by clinicians.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Goal"/>
                        </type>
                        <mapping identity="v2" map="GOL.1"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode&lt;=OBJ]."/>
                    </fhir>
                </element>
                <element name="activity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Action to occur as part of plan</desc>
                    <fhir fid="CarePlan.activity" definition="Identifies a planned action to occur as part of the plan.  For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." requirements="Allows systems to prompt for performance of planned activities, and validate plans against best practice.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="{no mapping&#xA;NOTE: This is a list of contained Request-Event tuples!}"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target"/>
                        <constraint key="cpl-3" severity="error" human="Provide a reference or detail, not both" expression="detail.empty() or reference.empty()" xpath="not(exists(f:detail)) or not(exists(f:reference))" source=""/>
                    </fhir>
                    <element name="outcomeCodeableConcept" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Results of the activity</desc>
                        <fhir fid="CarePlan.activity.outcomeCodeableConcept" definition="Identifies the outcome at the point when the status of the activity is assessed.  For example, the outcome of an education activity could be patient understands (or not)." comment="Note that this should not duplicate the activity status (e.g. completed or in progress).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Care Plan Activity Outcome" strength="example" description="Identifies the results of the activity." valueSet="2.16.840.1.113883.4.642.3.149" canonicalUri="http://hl7.org/fhir/ValueSet/care-plan-activity-outcome"/>
                        </fhir>
                    </element>
                    <element name="outcomeReference" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Appointment, Encounter, Procedure, etc.</desc>
                        <fhir fid="CarePlan.activity.outcomeReference"
                            definition="Details of the outcome or action resulting from the activity.  The reference to an &#34;event&#34; resource, such as Procedure or Encounter or Observation, is the result/outcome of the activity itself.  The activity can be conveyed using CarePlan.activity.detail OR using the CarePlan.activity.reference (a reference to a “request” resource)."
                            comment="The activity outcome is independent of the outcome of the related goal(s).  For example, if the goal is to achieve a target body weight of 150 lbs and an activity is defined to diet, then the activity outcome could be calories consumed whereas the goal outcome is an observation for the actual body weight measured."
                            requirements="Links plan to resulting actions.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="workflow" map="{Event that is outcome of Request in activity.reference}"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=FLFS].source"/>
                        </fhir>
                    </element>
                    <element name="progress" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Comments about the activity status/progress</desc>
                        <fhir fid="CarePlan.activity.progress" definition="Notes about the adherence/status/progress of the activity." comment="This element should NOT be used to describe the activity to be performed - that occurs either within the resource pointed to by activity.detail.reference or in activity.detail.description."
                            requirements="Can be used to capture information about adherence, progress, concerns, etc.">
                            <type value="Annotation"/>
                            <mapping identity="v2" map="NTE?"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Activity details defined in specific resource</desc>
                        <fhir fid="CarePlan.activity.reference" definition="The details of the proposed activity represented in a specific resource."
                            comment="Standard extension exists ([resource-pertainsToGoal](extension-resource-pertainstogoal.html)) that allows goals to be referenced from any of the referenced resources in CarePlan.activity.reference.  &#xD;The goal should be visible when the resource referenced by CarePlan.activity.reference is viewed independently from the CarePlan.  Requests that are pointed to by a CarePlan using this element should *not* point to this CarePlan using the &#34;basedOn&#34; element.  i.e. Requests that are part of a CarePlan are not &#34;based on&#34; the CarePlan."
                            requirements="Details in a form consistent with other applications and contexts of use.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Appointment"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CommunicationRequest"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceRequest"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/NutritionOrder"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Task"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/VisionPrescription"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RequestGroup"/>
                            </type>
                            <mapping identity="workflow" map="{Request that resulted in Event in activity.actionResulting}"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">In-line definition of activity</desc>
                        <fhir fid="CarePlan.activity.detail" definition="A simple summary of a planned activity suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc." requirements="Details in a simple form for generic care plan systems.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP, subsetCode=SUMM].target"/>
                        </fhir>
                        <element name="kind" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Appointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription</desc>
                            <fhir fid="CarePlan.activity.detail.kind" definition="A description of the kind of resource the in-line definition of a care plan activity is representing.  The CarePlan.activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference.  For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest."
                                requirements="May determine what types of extensions are permitted.">
                                <type value="code"/>
                                <binding displayName="Care Plan Activity Kind" strength="required" description="Resource types defined as part of FHIR that can be represented as in-line definitions of a care plan activity." valueSet="2.16.840.1.113883.4.642.3.145" canonicalUri="http://hl7.org/fhir/ValueSet/care-plan-activity-kind|4.0.1"/>
                                <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=LIST].code"/>
                            </fhir>
                        </element>
                        <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                            <fhir fid="CarePlan.activity.detail.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity." requirements="Allows Questionnaires that the patient (or practitioner) should fill in to fulfill the care plan activity.">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                                </type>
                                <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                                <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                            </fhir>
                        </element>
                        <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Instantiates external protocol or definition</desc>
                            <fhir fid="CarePlan.activity.detail.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier."
                                requirements="Allows Questionnaires that the patient (or practitioner) should fill in to fulfill the care plan activity.">
                                <type value="uri"/>
                                <mapping identity="workflow" map="Request.instantiatesUri"/>
                                <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                            </fhir>
                        </element>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Detail type of activity</desc>
                            <fhir fid="CarePlan.activity.detail.code" definition="Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter." comment="Tends to be less relevant for activities involving particular products.  Codes should not convey negation - use &#34;prohibited&#34; instead."
                                requirements="Allows matching performed to planned as well as validation against protocols.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Procedure Codes (SNOMED CT)" strength="example" description="Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter." valueSet="2.16.840.1.113883.4.642.3.427" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-code"/>
                                <mapping identity="workflow" map="Request.code"/>
                                <mapping identity="v2" map="OBR-4 / RXE-2 / RXO-1 / RXD-2"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Why activity should be done or why activity was prohibited</desc>
                            <fhir fid="CarePlan.activity.detail.reasonCode" definition="Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited." comment="This could be a diagnosis code.  If a full condition record exists or additional detail is needed, use reasonCondition instead.">
                                <type value="CodeableConcept"/>
                                <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Identifies why a care plan activity is needed.  Can include any health condition codes as well as such concepts as &#34;general wellness&#34;, prophylaxis, surgical preparation, etc." valueSet="2.16.840.1.113883.4.642.3.232"
                                    canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                                <mapping identity="workflow" map="Request.reasonCode"/>
                            </fhir>
                        </element>
                        <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Why activity is needed</desc>
                            <fhir fid="CarePlan.activity.detail.reasonReference" definition="Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan." comment="Conditions can be identified at the activity level that are not identified as reasons for the overall plan.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                </type>
                                <mapping identity="workflow" map="Request.reasonReference"/>
                            </fhir>
                        </element>
                        <element name="goal" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Goals this activity relates to</desc>
                            <fhir fid="CarePlan.activity.detail.goal" definition="Internal reference that identifies the goals that this activity is intended to contribute towards meeting." requirements="So that participants know the link explicitly.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Goal"/>
                                </type>
                                <mapping identity="rim" map=".outboundRelationship[typeCode&lt;=OBJ]."/>
                            </fhir>
                        </element>
                        <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">not-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error</desc>
                            <fhir fid="CarePlan.activity.detail.status" definition="Identifies what progress is being made for the specific activity."
                                comment="Some aspects of status can be inferred based on the resources linked in actionTaken.  Note that &#34;status&#34; is only as current as the plan was most recently updated.  &#xA;The unknown code is not to be used to convey other statuses.  The unknown code should be used when one of the statuses applies, but the authoring system doesn't know the current state of the activity."
                                requirements="Indicates progress against the plan, whether the activity is still relevant for the plan." isModifier="true">
                                <type value="code"/>
                                <binding displayName="CarePlanActivityStatus" strength="required" description="Codes that reflect the current state of a care plan activity within its overall life cycle." valueSet="2.16.840.1.113883.4.642.3.146" canonicalUri="http://hl7.org/fhir/ValueSet/care-plan-activity-status|4.0.1"/>
                                <mapping identity="workflow" map="Request.status"/>
                                <mapping identity="v2" map="ORC-5?"/>
                                <mapping identity="rim" map=".statusCode not-started = new scheduled = not-started (and fulfillment relationship to appointent) in-progress = active on-hold = suspended completed = completed cancelled = aborted"/>
                            </fhir>
                        </element>
                        <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Reason for current status</desc>
                            <fhir fid="CarePlan.activity.detail.statusReason" definition="Provides reason why the activity isn't yet started, is on hold, was cancelled, etc." comment="Will generally not be present if status is &#34;complete&#34;.  Be sure to prompt to update this (or at least remove the existing value) if the status is changed.">
                                <type value="CodeableConcept"/>
                                <mapping identity="workflow" map="Request.statusReason"/>
                            </fhir>
                        </element>
                        <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If true, activity is prohibiting action</desc>
                            <fhir fid="CarePlan.activity.detail.doNotPerform" definition="If true, indicates that the described activity is one that must NOT be engaged in when following the plan.  If false, or missing, indicates that the described activity is one that should be engaged in when following the plan."
                                comment="This element is labeled as a modifier because it marks an activity as an activity that is not to be performed." requirements="Captures intention to not do something that may have been previously typical." isModifier="true">
                                <type value="boolean"/>
                                <mapping identity="workflow" map="Request.doNotPerform"/>
                                <mapping identity="rim" map="actionNegationInd"/>
                            </fhir>
                        </element>
                        <choice name="scheduled[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">When activity is to occur</desc>
                            <fhir fid="CarePlan.activity.detail.scheduled[x]" definition="The period, timing or frequency upon which the described activity is to occur." requirements="Allows prompting for activities and detection of missed planned activities.">
                                <type value="Timing"/>
                                <type value="Period"/>
                                <type value="string"/>
                                <mapping identity="workflow" map="Request.occurrence[x]"/>
                                <mapping identity="v2" map="TQ1"/>
                                <mapping identity="rim" map=".effectiveTime"/>
                            </fhir>
                            <element name="scheduledTiming">
                                <fhir fid="CarePlan.activity.detail.scheduledTiming">
                                    <type value="Timing"/>
                                </fhir>
                            </element>
                            <element name="scheduledPeriod">
                                <fhir fid="CarePlan.activity.detail.scheduledPeriod">
                                    <type value="Period"/>
                                </fhir>
                            </element>
                            <element name="scheduledString">
                                <fhir fid="CarePlan.activity.detail.scheduledString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Where it should happen</desc>
                            <fhir fid="CarePlan.activity.detail.location" definition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." comment="May reference a specific clinical location or may identify a type of location." requirements="Helps in planning of activity.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                                </type>
                                <mapping identity="v2" map="OBR-24(???!!)"/>
                                <mapping identity="rim" map=".participation[typeCode=LOC].role"/>
                            </fhir>
                        </element>
                        <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Who will be responsible?</desc>
                            <fhir fid="CarePlan.activity.detail.performer" definition="Identifies who's expected to be involved in the activity." comment="A performer MAY also be a participant in the care plan." requirements="Helps in planning of activity.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                </type>
                                <mapping identity="workflow" map="Request.performer"/>
                                <mapping identity="v2" map="PRT-5 : ( PRV-4 = (provider participations)); PRT-5 : ( PRV-4 = (non-provider person participations )) ; PRT-5 : ( PRV-4 = (patient non-subject of care) ) ; PRT-8"/>
                                <mapping identity="rim" map=".participation[typeCode=PFM]"/>
                            </fhir>
                        </element>
                        <choice name="product[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">What is to be administered/supplied</desc>
                            <fhir fid="CarePlan.activity.detail.product[x]" definition="Identifies the food, drug or other product to be consumed or supplied in the activity.">
                                <type value="CodeableConcept"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                </type>
                                <binding displayName="SNOMED CT Medication Codes" strength="example" description="A product supplied or administered as part of a care plan activity." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                                <mapping identity="v2" map="RXE-2 / RXO-1 / RXD-2"/>
                                <mapping identity="rim" map=".participation[typeCode=PRD].role"/>
                            </fhir>
                            <element name="productCodeableConcept">
                                <fhir fid="CarePlan.activity.detail.productCodeableConcept">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="productReference">
                                <fhir fid="CarePlan.activity.detail.productReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="dailyAmount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">How to consume/day?</desc>
                            <fhir fid="CarePlan.activity.detail.dailyAmount" definition="Identifies the quantity expected to be consumed in a given day." requirements="Allows rough dose checking.">
                                <type value="Quantity"/>
                                <mapping identity="v2" map="RXO-23 / RXE-19 / RXD-12"/>
                                <mapping identity="rim" map=".outboundRelationship[typeCode=COMP][classCode=SBADM].doseQuantity"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">How much to administer/supply/consume</desc>
                            <fhir fid="CarePlan.activity.detail.quantity" definition="Identifies the quantity expected to be supplied, administered or consumed by the subject.">
                                <type value="Quantity"/>
                                <mapping identity="v2" map="RXO-11 / RXE-10 / RXD-4 / RXG-5 / RXA-6 /  TQ1-2.1  *and*  RXO-12 /  RXE-11 / RXD-5 / RXG-7 / RXA-7 / TQ1-2.2"/>
                                <mapping identity="rim" map=".outboundRelationship[typeCode=COMP][classCode=SPLY].quantity"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Extra info describing activity to perform</desc>
                            <fhir fid="CarePlan.activity.detail.description" definition="This provides a textual description of constraints on the intended activity occurrence, including relation to other activities.  It may also include objectives, pre-conditions and end-conditions.  Finally, it may convey specifics about the activity such as body site, method, route, etc.">
                                <type value="string"/>
                                <mapping identity="v2" map="NTE?"/>
                                <mapping identity="rim" map=".text"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments about the plan</desc>
                    <fhir fid="CarePlan.note" definition="General notes about the care plan not covered elsewhere." requirements="Used to capture information that applies to the plan as a whole that doesn't fit into discrete elements.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="v2" map="NTE?"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.16" name="CareTeam" displayName="CareTeam" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CareTeam">
            <desc language="en-US">The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CareTeam" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="CareTeam" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Planned participants in the coordination and delivery of care for a patient or group</desc>
                <fhir fid="CareTeam" definition="The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this team</desc>
                    <fhir fid="CareTeam.identifier" definition="Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the care team as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">proposed | active | suspended | inactive | entered-in-error</desc>
                    <fhir fid="CareTeam.status" definition="Indicates the current state of the care team." comment="This element is labeled as a modifier because the status contains the code entered-in-error that marks the care team as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="CareTeamStatus" strength="required" description="Indicates the status of the care team." valueSet="2.16.840.1.113883.4.642.3.153" canonicalUri="http://hl7.org/fhir/ValueSet/care-team-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of team</desc>
                    <fhir fid="CareTeam.category" definition="Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team." comment="There may be multiple axis of categorization and one team may serve multiple purposes."
                        requirements="Used for filtering what teams(s) are retrieved and displayed to different types of users." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Care Team category" strength="example" description="Indicates the type of care team." valueSet="2.16.840.1.113883.4.642.3.155" canonicalUri="http://hl7.org/fhir/ValueSet/care-team-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the team, such as crisis assessment team</desc>
                    <fhir fid="CareTeam.name" definition="A label for human use intended to distinguish like teams.  E.g. the &#34;red&#34; vs. &#34;green&#34; trauma teams."
                        comment="The meaning/purpose of the team is conveyed in CareTeam.category.  This element may also convey semantics of the team (e.g. &#34;Red trauma team&#34;), but its primary purpose is to distinguish between identical teams in a human-friendly way.  (&#34;Team 18735&#34; isn't as friendly.)." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who care team is for</desc>
                    <fhir fid="CareTeam.subject" definition="Identifies the patient or group whose intended care is handled by the team." requirements="Allows the team to care for a group (e.g. marriage) therapy. &#xA;Allows for an organization to designate a team such as the PICC line team." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="CareTeam.encounter" definition="The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated." comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time period team covers</desc>
                    <fhir fid="CareTeam.period" definition="Indicates when the team did (or is intended to) come into effect and end." requirements="Allows tracking what team(s) are in effect at a particular time." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Members of the team</desc>
                    <fhir fid="CareTeam.participant" definition="Identifies all people and organizations who are expected to be involved in the care team.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="REL (REL.4 is always the Patient) ( or PRT?)"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                        <constraint key="ctm-1" severity="error" human="CareTeam.participant.onBehalfOf can only be populated when CareTeam.participant.member is a Practitioner" expression="onBehalfOf.exists() implies (member.resolve().iif(empty(), true, ofType(Practitioner).exists()))"
                            xpath="starts-with(f:member/f:reference/@value, 'Practitioner/') or contains(f:member/f:reference/@value, '/Practitioner/') or exists(ancestor::*/f:contains/f:Practitioner/f:id[@value=substring-after(current()/f:member/f:reference/@value, '#')]) or not(exists(f:onBehalfOf))" source=""/>
                    </fhir>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Type of involvement</desc>
                        <fhir fid="CareTeam.participant.role" definition="Indicates specific responsibility of an individual within the care team, such as &#34;Primary care physician&#34;, &#34;Trained social worker counselor&#34;, &#34;Caregiver&#34;, etc."
                            comment="Roles may sometimes be inferred by type of Practitioner.  These are relationships that hold only within the context of the care team.  General relationships should be handled as properties of the Patient resource directly." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Participant Roles" strength="example" description="Indicates specific responsibility of an individual within the care team, such as &#34;Primary physician&#34;, &#34;Team coordinator&#34;, &#34;Caregiver&#34;, etc." valueSet="2.16.840.1.113883.4.642.3.152" canonicalUri="http://hl7.org/fhir/ValueSet/participant-role"/>
                            <mapping identity="v2" map="REL.2 (or PRT-4?)"/>
                            <mapping identity="rim" map=".functionCode"/>
                        </fhir>
                    </element>
                    <element name="member" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who is involved</desc>
                        <fhir fid="CareTeam.participant.member" definition="The specific person or organization who is participating/expected to participate in the care team." comment="Patient only needs to be listed if they have a role other than &#34;subject of care&#34;.&#xA;&#xA;Member is optional because some participants may be known only by their role, particularly in draft plans."
                            isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="v2" map="REL.5 (or PRT-5 : ( PRV-4 {provider participations} ) / PRT-5 : ( PRV-4  {non-provider person participations} ) / PRT-5 : ( PRV-4 = (patient non-subject of care) ) / PRT-8?)"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                    <element name="onBehalfOf" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Organization of the practitioner</desc>
                        <fhir fid="CareTeam.participant.onBehalfOf" definition="The organization of the practitioner." requirements="Practitioners can be associated with multiple organizations.  This element indicates which organization they were acting on behalf of." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time period of participant</desc>
                        <fhir fid="CareTeam.participant.period" definition="Indicates when the specific member or organization did (or is intended to) come into effect and end.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the care team exists</desc>
                    <fhir fid="CareTeam.reasonCode" definition="Describes why the care team exists.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Indicates the reason for the care team." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the care team exists</desc>
                    <fhir fid="CareTeam.reasonReference" definition="Condition(s) that this care team addresses.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Organization responsible for the care team</desc>
                    <fhir fid="CareTeam.managingOrganization" definition="The organization responsible for the care team." requirements="Allows for multiple organizations to collaboratively manage cross-organizational, longitudinal care plan." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the care team (that applies to all members)</desc>
                    <fhir fid="CareTeam.telecom" definition="A central contact detail for the care team (that applies to all members)." comment="The ContactPoint.use code of home is not appropriate to use. These contacts are not the contact details of individual care team members.">
                        <type value="ContactPoint"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the CareTeam</desc>
                    <fhir fid="CareTeam.note" definition="Comments made about the CareTeam.">
                        <type value="Annotation"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.17" name="CatalogEntry" displayName="CatalogEntry" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CatalogEntry">
            <desc language="en-US">Catalog entries are wrappers that contextualize items included in a catalog.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CatalogEntry" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="CatalogEntry" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An entry in a catalog</desc>
                <fhir fid="CatalogEntry" definition="Catalog entries are wrappers that contextualize items included in a catalog."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier of the catalog item</desc>
                    <fhir fid="CatalogEntry.identifier" definition="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The type of item - medication, device, service, protocol or other</desc>
                    <fhir fid="CatalogEntry.type" definition="The type of item - medication, device, service, protocol or other.">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="orderable" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Whether the entry represents an orderable item</desc>
                    <fhir fid="CatalogEntry.orderable" definition="Whether the entry represents an orderable item." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="referencedItem" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The item that is being defined</desc>
                    <fhir fid="CatalogEntry.referencedItem" definition="The item in a catalog or definition." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SpecimenDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Binary"/>
                        </type>
                    </fhir>
                </element>
                <element name="additionalIdentifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Any additional identifier(s) for the catalog item, in the same granularity or concept</desc>
                    <fhir fid="CatalogEntry.additionalIdentifier" definition="Used in supporting related concepts, e.g. NDC to RxNorm.">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="classification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Classification (category or class) of the item entry</desc>
                    <fhir fid="CatalogEntry.classification" definition="Classes of devices, or ATC for medication.">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="CatalogEntry.status" definition="Used to support catalog exchange even for unsupported products, e.g. getting list of medications even if not prescribable.">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                    </fhir>
                </element>
                <element name="validityPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The time period in which this catalog entry is expected to be active</desc>
                    <fhir fid="CatalogEntry.validityPeriod" definition="The time period in which this catalog entry is expected to be active.">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="validTo" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date until which this catalog entry is expected to be active</desc>
                    <fhir fid="CatalogEntry.validTo" definition="The date until which this catalog entry is expected to be active.">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="lastUpdated" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When was this catalog last updated</desc>
                    <fhir fid="CatalogEntry.lastUpdated" definition="Typically date of issue is different from the beginning of the validity. This can be used to see when an item was last updated." comment="Perhaps not needed - if we use fhir resource metadata.">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="additionalCharacteristic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional characteristics of the catalog entry</desc>
                    <fhir fid="CatalogEntry.additionalCharacteristic" definition="Used for examplefor Out of Formulary, or any specifics.">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="additionalClassification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional classification of the catalog entry</desc>
                    <fhir fid="CatalogEntry.additionalClassification" definition="User for example for ATC classification, or.">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="relatedEntry" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An item that this catalog entry is related to</desc>
                    <fhir fid="CatalogEntry.relatedEntry" definition="Used for example, to point to a substance, or to a device used to administer a medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="relationtype" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">triggers | is-replaced-by</desc>
                        <fhir fid="CatalogEntry.relatedEntry.relationtype" definition="The type of relation to the related item: child, parent, packageContent, containerPackage, usedIn, uses, requires, etc.">
                            <type value="code"/>
                            <binding displayName="CatalogEntryRelationType" strength="required" description="The type of relations between entries." valueSet="2.16.840.1.113883.4.642.3.1028" canonicalUri="http://hl7.org/fhir/ValueSet/relation-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="item" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The reference to the related item</desc>
                        <fhir fid="CatalogEntry.relatedEntry.item" definition="The reference to the related item.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CatalogEntry"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.18" name="ChargeItem" displayName="ChargeItem" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ChargeItem">
            <desc language="en-US">The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost
                allocation.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ChargeItem" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="ChargeItem" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Item containing charge code(s) associated with the provision of healthcare provider products</desc>
                <fhir fid="ChargeItem"
                    definition="The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="FT1"/>
                    <mapping identity="rim" map="Act[moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for item</desc>
                    <fhir fid="ChargeItem.identifier" definition="Identifiers assigned to this event performer or other systems." requirements="Allows identification of the charge Item as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="FT1.2"/>
                        <mapping identity="rim" map=".identifier"/>
                    </fhir>
                </element>
                <element name="definitionUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Defining information about the code of this charge item</desc>
                    <fhir fid="ChargeItem.definitionUri" definition="References the (external) source of pricing information, rules of application for the code this ChargeItem uses." isSummary="false">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiates"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="definitionCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Resource defining the code of this ChargeItem</desc>
                    <fhir fid="ChargeItem.definitionCanonical" definition="References the source of pricing information, rules of application for the code this ChargeItem uses." isSummary="false">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Event.instantiates"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">planned | billable | not-billable | aborted | billed | entered-in-error | unknown</desc>
                    <fhir fid="ChargeItem.status" definition="The current state of the ChargeItem."
                        comment="Unknown does not represent &#34;other&#34; - one of the defined statuses must apply.  Unknown is used when the authoring system is not sure what the current status is.&#xA;&#xA;This element is labeled as a modifier because the status contains the code entered-in-error that marks the charge item as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ChargeItemStatus" strength="required" description="Codes identifying the lifecycle stage of a ChargeItem." valueSet="2.16.840.1.113883.4.642.3.846" canonicalUri="http://hl7.org/fhir/ValueSet/chargeitem-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced ChargeItem</desc>
                    <fhir fid="ChargeItem.partOf" definition="ChargeItems can be grouped to larger ChargeItems covering the whole set." requirements="E.g. Drug administration as part of a procedure, procedure as part of observation, etc." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItem"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">A code that identifies the charge, like a billing code</desc>
                    <fhir fid="ChargeItem.code" definition="A code that identifies the charge, like a billing code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ChargeItemCode" strength="example" description="Example set of codes that can be used for billing purposes." valueSet="2.16.840.1.113883.4.642.3.848" canonicalUri="http://hl7.org/fhir/ValueSet/chargeitem-billingcodes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="FT1.7"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Individual service was done for/to</desc>
                    <fhir fid="ChargeItem.subject" definition="The individual or set of individuals the action is being or was performed on." requirements="Links the event to the Patient context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PAT in proximity to FT1 segment"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter / Episode associated with event</desc>
                    <fhir fid="ChargeItem.context" definition="The encounter or episode of care that establishes the context for this event." requirements="Links the request to the Encounter context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1 in proximity to FT1 segment"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the charged service was applied</desc>
                    <fhir fid="ChargeItem.occurrence[x]" definition="Date/time(s) or duration when the charged service was applied." comment="The list of types may be constrained as appropriate for the type of charge item." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="ChargeItem.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="ChargeItem.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurrenceTiming">
                        <fhir fid="ChargeItem.occurrenceTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                </choice>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who performed charged service</desc>
                    <fhir fid="ChargeItem.performer" definition="Indicates who or what performed or participated in the charged service." isSummary="false">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="v2" map="EVN.5 or by domain"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                    <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What type of performance was done</desc>
                        <fhir fid="ChargeItem.performer.function" definition="Describes the type of performance or participation(e.g. primary surgeon, anesthesiologiest, etc.)." isSummary="false">
                            <type value="CodeableConcept"/>
                            <binding displayName="Procedure Performer Role Codes" strength="example" description="Codes describing the types of functional roles performers can take on when performing events." valueSet="2.16.840.1.113883.4.642.3.433" canonicalUri="http://hl7.org/fhir/ValueSet/performer-role"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".participation.functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Individual who was performing</desc>
                        <fhir fid="ChargeItem.performer.actor" definition="The device, practitioner, etc. who performed or participated in the service." isSummary="false">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="v2" map="EVN.5 or by domain"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                    </element>
                </element>
                <element name="performingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization providing the charged service</desc>
                    <fhir fid="ChargeItem.performingOrganization" definition="The organization requesting the service." comment="Practitioners and Devices can be associated with multiple organizations. It has to be made clear, on behalf of which Organization the services have been rendered." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".scoper"/>
                    </fhir>
                </element>
                <element name="requestingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization requesting the charged service</desc>
                    <fhir fid="ChargeItem.requestingOrganization" definition="The organization performing the service." comment="The rendered Service might not be associated with a Request. This property indicates which Organization requested the services to be rendered. (In many cases, this may just be the Department associated with the Encounter.location)." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".scoper"/>
                    </fhir>
                </element>
                <element name="costCenter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that has ownership of the (potential, future) revenue</desc>
                    <fhir fid="ChargeItem.costCenter" definition="The financial cost center permits the tracking of charge attribution." comment="The costCenter could either be given as a reference to an Organization(Role) resource or as the identifier of the cost center determined by Reference.identifier.value and Reference.identifier.system, depending on use case requirements." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="FT1.13"/>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Quantity of which the charge item has been serviced</desc>
                    <fhir fid="ChargeItem.quantity" definition="Quantity of which the charge item has been serviced." comment="In many cases this may just be a value, if the underlying units are implicit in the definition of the charge item code." isSummary="true">
                        <type value="Quantity"/>
                        <mapping identity="v2" map="FT1.10"/>
                    </fhir>
                </element>
                <element name="bodysite" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Anatomical location, if relevant</desc>
                    <fhir fid="ChargeItem.bodysite" definition="The anatomical location where the related service has been applied."
                        comment="Only used if not implicit in code found in Condition.code. If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="rim" map=".targetBodySiteCode"/>
                    </fhir>
                </element>
                <element name="factorOverride" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Factor overriding the associated rules</desc>
                    <fhir fid="ChargeItem.factorOverride" definition="Factor overriding the factor determined by the rules associated with the code."
                        comment="There is no reason to carry the factor in the instance of a ChargeItem unless special circumstances require a manual override. The factors are usually defined by a set of rules in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                        isSummary="false">
                        <type value="decimal"/>
                        <mapping identity="v2" map="FT1.26"/>
                    </fhir>
                </element>
                <element name="priceOverride" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Price overriding the associated rules</desc>
                    <fhir fid="ChargeItem.priceOverride" definition="Total price of the charge overriding the list price associated with the code."
                        comment="There is no reason to carry the price in the instance of a ChargeItem unless circumstances require a manual override. The list prices or are usually defined in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                        isSummary="false">
                        <type value="Money"/>
                        <mapping identity="v2" map="FT1.22"/>
                    </fhir>
                </element>
                <element name="overrideReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for overriding the list price/factor</desc>
                    <fhir fid="ChargeItem.overrideReason" definition="If the list price or the rule-based factor associated with the code is overridden, this attribute can capture a text to indicate the  reason for this action." comment="Derived Profiles may choose to add invariants requiring this field to be populated if either priceOverride or factorOverride have been filled." isSummary="false">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="enterer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Individual who was entering</desc>
                    <fhir fid="ChargeItem.enterer" definition="The device, practitioner, etc. who entered the charge item." comment="The enterer is also the person considered responsible for factor/price overrides if applicable." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="EVN.5 or by domain"/>
                        <mapping identity="rim" map=".player"/>
                    </fhir>
                </element>
                <element name="enteredDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date the charge item was entered</desc>
                    <fhir fid="ChargeItem.enteredDate" definition="Date the charge item was entered." comment="The actual date when the service associated with the charge has been rendered is captured in occurrence[x]." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="reason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was the charged service rendered?</desc>
                    <fhir fid="ChargeItem.reason" definition="Describes why the event occurred in coded or textual form." comment="If the application of the charge item requires a reason to be given, it can be captured here. Textual reasons can be captured using reasonCode.text." isSummary="false">
                        <type value="CodeableConcept"/>
                        <binding displayName="ICD-10 Codes" strength="example" description="Example binding for reason." valueSet="2.16.840.1.113883.4.642.3.531" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.4 or by domain"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="service" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Which rendered service is being charged?</desc>
                    <fhir fid="ChargeItem.service" definition="Indicated the rendered service that caused this charge." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SupplyDelivery"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.4 or by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <choice name="product[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Product charged</desc>
                    <fhir fid="ChargeItem.product[x]" definition="Identifies the device, food, drug or other product being charged either by type code or reference to an instance." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </type>
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIR Device Types" strength="example" description="Example binding for product type." valueSet="2.16.840.1.113883.4.642.3.208" canonicalUri="http://hl7.org/fhir/ValueSet/device-kind"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role"/>
                    </fhir>
                    <element name="productReference">
                        <fhir fid="ChargeItem.productReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </fhir>
                    </element>
                    <element name="productCodeableConcept">
                        <fhir fid="ChargeItem.productCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="account" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Account to place this charge</desc>
                    <fhir fid="ChargeItem.account" definition="Account into which this ChargeItems belongs."
                        comment="Systems posting the ChargeItems might not always be able to determine, which accounts the Items need to be places into. It is up to the postprocessing Financial System to apply internal rules to decide based on the Encounter/EpisodeOfCare/Patient/Coverage context and the type of ChargeItem, which Account is appropriate." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Account"/>
                        </type>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the ChargeItem</desc>
                    <fhir fid="ChargeItem.note" definition="Comments made about the event by the performer, subject or other participants." isSummary="false">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                    </fhir>
                </element>
                <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Further information supporting this charge</desc>
                    <fhir fid="ChargeItem.supportingInformation" definition="Further information supporting this charge." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.supportingInfo"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.19" name="ChargeItemDefinition" displayName="ChargeItemDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition">
            <desc language="en-US">The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ChargeItemDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="ChargeItemDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of properties and rules about how the price and the applicability of a ChargeItem can be determined</desc>
                <fhir fid="ChargeItemDefinition" definition="The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.">
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="cid-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this charge item definition, represented as a URI (globally unique)</desc>
                    <fhir fid="ChargeItemDefinition.url"
                        definition="An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the charge item definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the charge item definition</desc>
                    <fhir fid="ChargeItemDefinition.identifier" definition="A formal identifier that is used to identify this charge item definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this charge item definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="N/A"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the charge item definition</desc>
                    <fhir fid="ChargeItemDefinition.version"
                        definition="The identifier that is used to identify this version of the charge item definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the charge item definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets."
                        comment="There may be different charge item definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the charge item definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this charge item definition (human friendly)</desc>
                    <fhir fid="ChargeItemDefinition.title" definition="A short, descriptive, user-friendly title for the charge item definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="derivedFromUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Underlying externally-defined charge item definition</desc>
                    <fhir fid="ChargeItemDefinition.derivedFromUri" definition="The URL pointing to an externally-defined charge item definition that is adhered to in whole or in part by this definition." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A larger definition of which this particular definition is a component or step</desc>
                    <fhir fid="ChargeItemDefinition.partOf" definition="A larger definition of which this particular definition is a component or step." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition"/>
                        </type>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Completed or terminated request(s) whose function is taken by this new request</desc>
                    <fhir fid="ChargeItemDefinition.replaces" definition="As new versions of a protocol or guideline are defined, allows identification of what versions are replaced by a new instance." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition"/>
                        </type>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ChargeItemDefinition.status" definition="The current state of the ChargeItemDefinition." comment="Allows filtering of charge item definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status {different ValueSet}"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ChargeItemDefinition.experimental" definition="A Boolean value to indicate that this charge item definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of charge item definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level charge item definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ChargeItemDefinition.date" definition="The date  (and optionally time) when the charge item definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the charge item definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the charge item definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ChargeItemDefinition.publisher" definition="The name of the organization or individual that published the charge item definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the charge item definition is the organization or individual primarily responsible for the maintenance and upkeep of the charge item definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the charge item definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the charge item definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher {as string instead of CodeableConcept}"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ChargeItemDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the charge item definition</desc>
                    <fhir fid="ChargeItemDefinition.description" definition="A free text natural language description of the charge item definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the charge item definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the charge item definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the charge item definition is presumed to be the predominant language in the place the charge item definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ChargeItemDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate charge item definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for charge item definition (if applicable)</desc>
                    <fhir fid="ChargeItemDefinition.jurisdiction" definition="A legal or geographic region in which the charge item definition is intended to be used." comment="It may be possible for the charge item definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ChargeItemDefinition.copyright" definition="A copyright statement relating to the charge item definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the charge item definition."
                        requirements="Consumers must be able to determine any legal restrictions on the use of the charge item definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="rim" map="N/A"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the charge item definition was approved by publisher</desc>
                    <fhir fid="ChargeItemDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="rim" map="N/A"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the charge item definition was last reviewed</desc>
                    <fhir fid="ChargeItemDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="rim" map="N/A"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the charge item definition is expected to be used</desc>
                    <fhir fid="ChargeItemDefinition.effectivePeriod" definition="The period during which the charge item definition content was or is planned to be in active use."
                        comment="The effective period for a charge item definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the charge item definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="rim" map="N/A"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Billing codes or product types this definition applies to</desc>
                    <fhir fid="ChargeItemDefinition.code" definition="The defined billing details in this resource pertain to the given billing code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ChargeItemCode" strength="example" description="Billing Code defined by this ChargeItemDefinition." valueSet="2.16.840.1.113883.4.642.3.848" canonicalUri="http://hl7.org/fhir/ValueSet/chargeitem-billingcodes"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="instance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instances this definition applies to</desc>
                    <fhir fid="ChargeItemDefinition.instance" definition="The defined billing details in this resource pertain to the given product instance(s)." comment="In case of highly customized, individually produced or fitted devices/substances, the pricing information may be different for each instance of the product. This reference links pricing details to specific product instances.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="applicability" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Whether or not the billing code is applicable</desc>
                    <fhir fid="ChargeItemDefinition.applicability" definition="Expressions that describe applicability criteria for the billing code." comment="The applicability conditions can be used to ascertain whether a billing item is allowed in a specific context. E.g. some billing codes may only be applicable in out-patient settings, only to male/female patients or only to children.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Natural language description of the condition</desc>
                        <fhir fid="ChargeItemDefinition.applicability.description" definition="A brief, natural language description of the condition that effectively communicates the intended semantics.">
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Language of the expression</desc>
                        <fhir fid="ChargeItemDefinition.applicability.language" definition="The media type of the language for the expression, e.g. &#34;text/cql&#34; for Clinical Query Language expressions or &#34;text/fhirpath&#34; for FHIRPath expressions.">
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Boolean-valued expression</desc>
                        <fhir fid="ChargeItemDefinition.applicability.expression" definition="An expression that returns true or false, indicating whether the condition is satisfied. When using FHIRPath expressions, the %context environment variable must be replaced at runtime with the ChargeItem resource to which this definition is applied."
                            comment="Please note that FHIRPath Expressions can only be evaluated in the scope of the current ChargeItem resource to which this definition is being applied.&#xA;FHIRPath expressions can traverse into other resources linked from the ChargeItem resource, however, testing rules such as that a billing code may be billed only once per encounter need a wider scope. In such scenarios, CQL may be the appropriate choice.">
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                </element>
                <element name="propertyGroup" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Group of properties which are applicable under the same conditions</desc>
                    <fhir fid="ChargeItemDefinition.propertyGroup" definition="Group of properties which are applicable under the same conditions. If no applicability rules are established for the group, then all properties always apply.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                    <element name="applicability" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Conditions under which the priceComponent is applicable</desc>
                        <fhir fid="ChargeItemDefinition.propertyGroup.applicability" definition="Expressions that describe applicability criteria for the priceComponent."
                            comment="The applicability conditions can be used to ascertain whether a billing item is allowed in a specific context. E.g. some billing codes may only be applicable in out-patient settings, only to male/female patients or only to children.">
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="priceComponent" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Components of total line item price</desc>
                        <fhir fid="ChargeItemDefinition.propertyGroup.priceComponent"
                            definition="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the prices have been calculated.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">base | surcharge | deduction | discount | tax | informational</desc>
                            <fhir fid="ChargeItemDefinition.propertyGroup.priceComponent.type" definition="This code identifies the type of the component.">
                                <type value="code"/>
                                <binding displayName="InvoicePriceComponentType" strength="required" description="Codes indicating the kind of the price component." valueSet="2.16.840.1.113883.4.642.3.868" canonicalUri="http://hl7.org/fhir/ValueSet/invoice-priceComponentType|4.0.1"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Code identifying the specific component</desc>
                            <fhir fid="ChargeItemDefinition.propertyGroup.priceComponent.code" definition="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc.">
                                <type value="CodeableConcept"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Factor used for calculating this component</desc>
                            <fhir fid="ChargeItemDefinition.propertyGroup.priceComponent.factor" definition="The factor that has been applied on the base price for calculating this component.">
                                <type value="decimal"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Monetary amount associated with this component</desc>
                            <fhir fid="ChargeItemDefinition.propertyGroup.priceComponent.amount" definition="The amount calculated for this component.">
                                <type value="Money"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.20" name="Claim" displayName="Claim" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Claim">
            <desc language="en-US">A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">The Claim resource is used by providers to exchange services and products rendered to patients or planned to be rendered with insurers for reimbuserment. It is also used by insurers to exchange claims information with statutory reporting and data analytics firms.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Claim" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Claim" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Claim, Pre-determination or Pre-authorization</desc>
                <fhir fid="Claim" definition="A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement."
                    comment="The Claim resource fulfills three information request requirements: Claim - a request for adjudication for reimbursement for products and/or services provided; Preauthorization - a request to authorize the future provision of products and/or services including an anticipated adjudication; and, Predetermination - a request for a non-bind adjudication of possible future products and/or services.">
                    <mapping identity="workflow" map="Request"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for claim</desc>
                    <fhir fid="Claim.identifier" definition="A unique identifier assigned to this claim." requirements="Allows claims to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="Claim.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Category or discipline</desc>
                    <fhir fid="Claim.type" definition="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." comment="The majority of jurisdictions use: oral, pharmacy, vision, professional and institutional, or variants on those terms, as the general styles of claims. The valueset is extensible to accommodate other jurisdictional requirements."
                        requirements="Claim type determine the general sets of business rules applied for information requirements and adjudication." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Claim Type Codes" strength="extensible" description="The type or discipline-style of the claim." valueSet="2.16.840.1.113883.4.642.3.558" canonicalUri="http://hl7.org/fhir/ValueSet/claim-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="subType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">More granular claim type</desc>
                    <fhir fid="Claim.subType" definition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." comment="This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type."
                        requirements="Some jurisdictions need a finer grained claim type for routing and adjudication.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Example Claim SubType Codes" strength="example" description="A more granular claim typecode." valueSet="2.16.840.1.113883.4.642.3.566" canonicalUri="http://hl7.org/fhir/ValueSet/claim-subtype"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="use" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">claim | preauthorization | predetermination</desc>
                    <fhir fid="Claim.use" definition="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future."
                        requirements="This element is required to understand the nature of the request for adjudication." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Use" strength="required" description="The purpose of the Claim: predetermination, preauthorization, claim." valueSet="2.16.840.1.113883.4.642.3.544" canonicalUri="http://hl7.org/fhir/ValueSet/claim-use|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The recipient of the products and services</desc>
                    <fhir fid="Claim.patient" definition="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual or forecast reimbursement is sought." requirements="The patient must be supplied to the insurer so that confirmation of coverage and service history may be considered as part of the authorization and/or adjudiction."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="billablePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Relevant time frame for the claim</desc>
                    <fhir fid="Claim.billablePeriod" definition="The period for which charges are being submitted." comment="Typically this would be today or in the past for a claim, and today or in the future for preauthorizations and predeterminations. Typically line item dates of service should fall within the billing period if one is specified."
                        requirements="A number jurisdictions required the submission of the billing period when submitting claims for example for hospital stays or long-term care." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Resource creation date</desc>
                    <fhir fid="Claim.created" definition="The date this resource was created." comment="This field is independent of the date of creation of the resource as it may reflect the creation date of a source document prior to digitization. Typically for claims all services must be completed as of this date."
                        requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="enterer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Author of the claim</desc>
                    <fhir fid="Claim.enterer" definition="Individual who created the claim, predetermination or preauthorization." requirements="Some jurisdictions require the contact information for personnel completing claims.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Target</desc>
                    <fhir fid="Claim.insurer" definition="The Insurer who is target of the request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                    </fhir>
                </element>
                <element name="provider" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for the claim</desc>
                    <fhir fid="Claim.provider" definition="The provider which is responsible for the claim, predetermination or preauthorization." comment="Typically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Desired processing ugency</desc>
                    <fhir fid="Claim.priority" definition="The provider-required urgency of processing the request. Typical values include: stat, routine deferred." comment="If a claim processor is unable to complete the processing as per the priority then they should generate and error and not process the request."
                        requirements="The provider may need to indicate their processing requirements so that the processor can indicate if they are unable to comply." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Process Priority Codes" strength="example" description="The timeliness with which processing is required: stat, normal, deferred." valueSet="2.16.840.1.113883.4.642.3.552" canonicalUri="http://hl7.org/fhir/ValueSet/process-priority"/>
                        <mapping identity="workflow" map="Request.priority"/>
                    </fhir>
                </element>
                <element name="fundsReserve" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For whom to reserve funds</desc>
                    <fhir fid="Claim.fundsReserve" definition="A code to indicate whether and for whom funds are to be reserved for future claims." comment="This field is only used for preauthorizations."
                        requirements="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FundsReserve" strength="example" description="For whom funds are to be reserved: (Patient, Provider, None)." valueSet="2.16.840.1.113883.4.642.3.33" canonicalUri="http://hl7.org/fhir/ValueSet/fundsreserve"/>
                    </fhir>
                </element>
                <element name="related" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Prior or corollary claims</desc>
                    <fhir fid="Claim.related" definition="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event." comment="For example,  for the original treatment and follow-up exams." requirements="For workplace or other accidents it is common to relate separate claims arising from the same event.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="claim" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the related claim</desc>
                        <fhir fid="Claim.related.claim" definition="Reference to a related claim." requirements="For workplace or other accidents it is common to relate separate claims arising from the same event.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Claim"/>
                            </type>
                            <mapping identity="workflow" map="Request.replaces"/>
                        </fhir>
                    </element>
                    <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How the reference claim is related</desc>
                        <fhir fid="Claim.related.relationship" definition="A code to convey how the claims are related." comment="For example, prior claim or umbrella." requirements="Some insurers need a declaration of the type of relationship.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Related Claim Relationship Codes" strength="example" description="Relationship of this claim to a related Claim." valueSet="2.16.840.1.113883.4.642.3.568" canonicalUri="http://hl7.org/fhir/ValueSet/related-claim-relationship"/>
                        </fhir>
                    </element>
                    <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">File or case reference</desc>
                        <fhir fid="Claim.related.reference" definition="An alternate organizational reference to the case or file to which this particular claim pertains." comment="For example, Property/Casualty insurer claim # or Workers Compensation case # ."
                            requirements="In cases where an event-triggered claim is being submitted to an insurer which requires a reference number to be specified on all exchanges.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                </element>
                <element name="prescription" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Prescription authorizing services and products</desc>
                    <fhir fid="Claim.prescription" definition="Prescription to support the dispensing of pharmacy, device or vision products." requirements="Required to authorize the dispensing of controlled substances and devices.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/VisionPrescription"/>
                        </type>
                    </fhir>
                </element>
                <element name="originalPrescription" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Original prescription if superseded by fulfiller</desc>
                    <fhir fid="Claim.originalPrescription" definition="Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products."
                        comment="For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefore issues a new prescription for an alternate medication which has the same therapeutic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'."
                        requirements="Often required when a fulfiller varies what is fulfilled from that authorized on the original prescription.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/VisionPrescription"/>
                        </type>
                    </fhir>
                </element>
                <element name="payee" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Recipient of benefits payable</desc>
                    <fhir fid="Claim.payee" definition="The party to be reimbursed for cost of the products and services according to the terms of the policy." comment="Often providers agree to receive the benefits payable to reduce the near-term costs to the patient. The insurer may decline to pay the provider and choose to pay the subscriber instead."
                        requirements="The provider needs to specify who they wish to be reimbursed and the claims processor needs express who they will reimburse.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Category of recipient</desc>
                        <fhir fid="Claim.payee.type" definition="Type of Party to be reimbursed: subscriber, provider, other." requirements="Need to know who should receive payment with the most common situations being the Provider (assignment of benefits) or the Subscriber.">
                            <type value="CodeableConcept"/>
                            <binding displayName="PayeeType" strength="example" description="A code for the party to be reimbursed." valueSet="2.16.840.1.113883.4.642.3.31" canonicalUri="http://hl7.org/fhir/ValueSet/payeetype"/>
                        </fhir>
                    </element>
                    <element name="party" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recipient reference</desc>
                        <fhir fid="Claim.payee.party" definition="Reference to the individual or organization to whom any payment will be made." comment="Not required if the payee is 'subscriber' or 'provider'." requirements="Need to provide demographics if the payee is not 'subscriber' nor 'provider'.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="referral" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Treatment referral</desc>
                    <fhir fid="Claim.referral" definition="A reference to a referral resource." comment="The referral resource which lists the date, practitioner, reason and other supporting information." requirements="Some insurers require proof of referral to pay for services or to pay specialist rates for services.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.cause"/>
                    </fhir>
                </element>
                <element name="facility" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Servicing facility</desc>
                    <fhir fid="Claim.facility" definition="Facility where the services were provided." requirements="Insurance adjudication can be dependant on where services were delivered.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                    </fhir>
                </element>
                <element name="careTeam" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Members of the care team</desc>
                    <fhir fid="Claim.careTeam" definition="The members of the team who provided the products and services." requirements="Common to identify the responsible and supporting practitioners.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Order of care team</desc>
                        <fhir fid="Claim.careTeam.sequence" definition="A number to uniquely identify care team entries." requirements="Necessary to maintain the order of the care team and provide a mechanism to link individuals to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="provider" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Practitioner or organization</desc>
                        <fhir fid="Claim.careTeam.provider" definition="Member of the team who provided the product or service." requirements="Often a regulatory requirement to specify the responsible provider.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.actor"/>
                        </fhir>
                    </element>
                    <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indicator of the lead practitioner</desc>
                        <fhir fid="Claim.careTeam.responsible" definition="The party who is billing and/or responsible for the claimed products or services." comment="Responsible might not be required when there is only a single provider listed." requirements="When multiple parties are present it is required to distinguish the lead or responsible individual.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Function within the team</desc>
                        <fhir fid="Claim.careTeam.role" definition="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." comment="Role might not be required when there is only a single provider listed." requirements="When multiple parties are present it is required to distinguish the roles performed by each member.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Claim Care Team Role Codes" strength="example" description="The role codes for the care team members." valueSet="2.16.840.1.113883.4.642.3.586" canonicalUri="http://hl7.org/fhir/ValueSet/claim-careteamrole"/>
                        </fhir>
                    </element>
                    <element name="qualification" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Practitioner credential or specialization</desc>
                        <fhir fid="Claim.careTeam.qualification" definition="The qualification of the practitioner which is applicable for this service." requirements="Need to specify which qualification a provider is delivering the product or service under.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Provider Qualification Codes" strength="example" description="Provider professional qualifications." valueSet="2.16.840.1.113883.4.642.3.570" canonicalUri="http://hl7.org/fhir/ValueSet/provider-qualification"/>
                        </fhir>
                    </element>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting information</desc>
                    <fhir fid="Claim.supportingInfo" definition="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues." comment="Often there are multiple jurisdiction specific valuesets which are required."
                        requirements="Typically these information codes are required to support the services rendered or the adjudication of the services rendered.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Information instance identifier</desc>
                        <fhir fid="Claim.supportingInfo.sequence" definition="A number to uniquely identify supporting information entries." requirements="Necessary to maintain the order of the supporting information items and provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Classification of the supplied information</desc>
                        <fhir fid="Claim.supportingInfo.category" definition="The general class of the information supplied: information; exception; accident, employment; onset, etc." comment="This may contain a category for the local bill type codes."
                            requirements="Required to group or associate information items with common characteristics. For example: admission information or prior treatments.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Claim Information Category Codes" strength="example" description="The valuset used for additional information category codes." valueSet="2.16.840.1.113883.4.642.3.582" canonicalUri="http://hl7.org/fhir/ValueSet/claim-informationcategory"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of information</desc>
                        <fhir fid="Claim.supportingInfo.code" definition="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought." requirements="Required to identify the kind of additional information.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Exception Codes" strength="example" description="The valuset used for additional information codes." valueSet="2.16.840.1.113883.4.642.3.580" canonicalUri="http://hl7.org/fhir/ValueSet/claim-exception"/>
                        </fhir>
                    </element>
                    <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When it occurred</desc>
                        <fhir fid="Claim.supportingInfo.timing[x]" definition="The date when or period to which this information refers.">
                            <type value="date"/>
                            <type value="Period"/>
                        </fhir>
                        <element name="timingDate">
                            <fhir fid="Claim.supportingInfo.timingDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="timingPeriod">
                            <fhir fid="Claim.supportingInfo.timingPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Data to be provided</desc>
                        <fhir fid="Claim.supportingInfo.value[x]" definition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." comment="Could be used to provide references to other resources, document. For example could contain a PDF in an Attachment of the Police Report for an Accident."
                            requirements="To convey the data content to be provided when the information is more than a simple code or period.">
                            <type value="boolean"/>
                            <type value="string"/>
                            <type value="Quantity"/>
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                        <element name="valueBoolean">
                            <fhir fid="Claim.supportingInfo.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="Claim.supportingInfo.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="Claim.supportingInfo.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueAttachment">
                            <fhir fid="Claim.supportingInfo.valueAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="Claim.supportingInfo.valueReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Explanation for the information</desc>
                        <fhir fid="Claim.supportingInfo.reason" definition="Provides the reason in the situation where a reason code is required in addition to the content." comment="For example: the reason for the additional stay, or why a tooth is  missing." requirements="Needed when the supporting information has both a date and amount/value and requires explanation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Missing Tooth Reason Codes" strength="example" description="Reason codes for the missing teeth." valueSet="2.16.840.1.113883.4.642.3.534" canonicalUri="http://hl7.org/fhir/ValueSet/missing-tooth-reason"/>
                        </fhir>
                    </element>
                </element>
                <element name="diagnosis" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Pertinent diagnosis information</desc>
                    <fhir fid="Claim.diagnosis" definition="Information about diagnoses relevant to the claim items." requirements="Required for the adjudication by provided context for the services and product listed.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Diagnosis instance identifier</desc>
                        <fhir fid="Claim.diagnosis.sequence" definition="A number to uniquely identify diagnosis entries." comment="Diagnosis are presented in list order to their expected importance: primary, secondary, etc." requirements="Necessary to maintain the order of the diagnosis items and provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <choice name="diagnosis[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Nature of illness or problem</desc>
                        <fhir fid="Claim.diagnosis.diagnosis[x]" definition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." requirements="Provides health context for the evaluation of the products and/or services.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            </type>
                            <binding displayName="ICD-10 Codes" strength="example" description="Example ICD10 Diagnostic codes." valueSet="2.16.840.1.113883.4.642.3.531" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10"/>
                        </fhir>
                        <element name="diagnosisCodeableConcept">
                            <fhir fid="Claim.diagnosis.diagnosisCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="diagnosisReference">
                            <fhir fid="Claim.diagnosis.diagnosisReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Timing or nature of the diagnosis</desc>
                        <fhir fid="Claim.diagnosis.type" definition="When the condition was observed or the relative ranking." comment="For example: admitting, primary, secondary, discharge." requirements="Often required to capture a particular diagnosis, for example: primary or discharge.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis Type Codes" strength="example" description="The type of the diagnosis: admitting, principal, discharge." valueSet="2.16.840.1.113883.4.642.3.590" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosistype"/>
                        </fhir>
                    </element>
                    <element name="onAdmission" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Present on admission</desc>
                        <fhir fid="Claim.diagnosis.onAdmission" definition="Indication of whether the diagnosis was present on admission to a facility." requirements="Many systems need to understand for adjudication if the diagnosis was present a time of admission.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis on Admission Codes" strength="example" description="Present on admission." valueSet="2.16.840.1.113883.4.642.3.1169" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission"/>
                        </fhir>
                    </element>
                    <element name="packageCode" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Package billing code</desc>
                        <fhir fid="Claim.diagnosis.packageCode" definition="A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system."
                            comment="For example DRG (Diagnosis Related Group) or a bundled billing code. A patient may have a diagnosis of a Myocardial Infarction and a DRG for HeartAttack would be assigned. The Claim item (and possible subsequent claims) would refer to the DRG for those line items that were for services related to the heart attack event."
                            requirements="Required to relate the current  diagnosis to a package billing code that is then referenced on the individual claim items which are specific to the health condition covered by the package code.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis Related Group Codes" strength="example" description="The DRG codes associated with the diagnosis." valueSet="2.16.840.1.113883.4.642.3.588" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup"/>
                        </fhir>
                    </element>
                </element>
                <element name="procedure" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical procedures performed</desc>
                    <fhir fid="Claim.procedure" definition="Procedures performed on the patient relevant to the billing items with the claim." requirements="The specific clinical invention are sometimes required to be provided to justify billing a greater than customary amount for a service.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Procedure instance identifier</desc>
                        <fhir fid="Claim.procedure.sequence" definition="A number to uniquely identify procedure entries." requirements="Necessary to provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Category of Procedure</desc>
                        <fhir fid="Claim.procedure.type" definition="When the condition was observed or the relative ranking." comment="For example: primary, secondary." requirements="Often required to capture a particular diagnosis, for example: primary or discharge.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Procedure Type Codes" strength="example" description="Example procedure type codes." valueSet="2.16.840.1.113883.4.642.3.1387" canonicalUri="http://hl7.org/fhir/ValueSet/ex-procedure-type"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the procedure was performed</desc>
                        <fhir fid="Claim.procedure.date" definition="Date and optionally time the procedure was performed." requirements="Required for auditing purposes.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <choice name="procedure[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Specific clinical procedure</desc>
                        <fhir fid="Claim.procedure.procedure[x]" definition="The code or reference to a Procedure resource which identifies the clinical intervention performed." requirements="This identifies the actual clinical procedure.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            </type>
                            <binding displayName="ICD-10 Procedure Codes" strength="example" description="Example ICD10 Procedure codes." valueSet="2.16.840.1.113883.4.642.3.574" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10-procedures"/>
                        </fhir>
                        <element name="procedureCodeableConcept">
                            <fhir fid="Claim.procedure.procedureCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="procedureReference">
                            <fhir fid="Claim.procedure.procedureReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Unique device identifier</desc>
                        <fhir fid="Claim.procedure.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="insurance" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Patient insurance information</desc>
                    <fhir fid="Claim.insurance" definition="Financial instruments for reimbursement for the health care products and services specified on the claim."
                        comment="All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'Coverage.subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim."
                        requirements="At least one insurer is required for a claim to be a claim." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="Coverage"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance instance identifier</desc>
                        <fhir fid="Claim.insurance.sequence" definition="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order." requirements="To maintain order of the coverages." isSummary="true">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="focal" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Coverage to be used for adjudication</desc>
                        <fhir fid="Claim.insurance.focal" definition="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                            comment="A patient may (will) have multiple insurance policies which provide reimbursement for healthcare services and products. For example a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for adjudicating this claim. Other claims would be created to request adjudication against the other listed policies."
                            requirements="To identify which coverage in the list is being used to adjudicate this claim." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Pre-assigned Claim number</desc>
                        <fhir fid="Claim.insurance.identifier" definition="The business identifier to be used when the claim is sent for adjudication against this insurance policy." comment="Only required in jurisdictions where insurers, rather than the provider, are required to send claims to  insurers that appear after them in the list. This element is not required when 'subrogation=true'."
                            requirements="This will be the claim number should it be necessary to create this claim in the future. This is provided so that payors may forward claims to other payors in the Coordination of Benefit for adjudication rather than the provider being required to initiate each adjudication.">
                            <type value="Identifier"/>
                            <mapping identity="workflow" map="Request.identifier"/>
                            <mapping identity="w5" map="FiveWs.identifier"/>
                        </fhir>
                    </element>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance information</desc>
                        <fhir fid="Claim.insurance.coverage" definition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
                            requirements="Required to allow the adjudicator to locate the correct policy and history within their information system." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="businessArrangement" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional provider contract number</desc>
                        <fhir fid="Claim.insurance.businessArrangement" definition="A business agreement number established between the provider and the insurer for special business processing purposes." requirements="Providers may have multiple business arrangements with a given insurer and must supply the specific contract number for adjudication.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="preAuthRef" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Prior authorization reference number</desc>
                        <fhir fid="Claim.insurance.preAuthRef" definition="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."
                            comment="This value is an alphanumeric string that may be provided over the phone, via text, via paper, or within a ClaimResponse resource and is not a FHIR Identifier." requirements="Providers must quote previously issued authorization reference numbers in order to obtain adjudication as previously advised on the Preauthorization.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="claimResponse" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Adjudication results</desc>
                        <fhir fid="Claim.insurance.claimResponse" definition="The result of the adjudication of the line items for the Coverage specified in this insurance." comment="Must not be specified when 'focal=true' for this insurance."
                            requirements="An insurer need the adjudication results from prior insurers to determine the outstanding balance remaining by item for the items in the curent claim.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="accident" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details of the event</desc>
                    <fhir fid="Claim.accident" definition="Details of an accident which resulted in injuries which required the products and services listed in the claim." requirements="When healthcare products and services are accident related, benefits may be payable under accident provisions of policies, such as automotive, etc before they are payable under normal health insurance.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">When the incident occurred</desc>
                        <fhir fid="Claim.accident.date" definition="Date of an accident event  related to the products and services contained in the claim." comment="The date of the accident has to precede the dates of the products and services but within a reasonable timeframe." requirements="Required for audit purposes and adjudication.">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The nature of the accident</desc>
                        <fhir fid="Claim.accident.type" definition="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." requirements="Coverage may be dependant on the type of accident.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetActIncidentCode" strength="extensible" description="Type of accident: work place, auto, etc." valueSet="2.16.840.1.113883.1.11.16508" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActIncidentCode"/>
                        </fhir>
                    </element>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Where the event occurred</desc>
                        <fhir fid="Claim.accident.location[x]" definition="The physical location of the accident event." requirements="Required for audit purposes and determination of applicable insurance liability.">
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                        </fhir>
                        <element name="locationAddress">
                            <fhir fid="Claim.accident.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="Claim.accident.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Product or service provided</desc>
                    <fhir fid="Claim.item" definition="A claim line. Either a simple  product or service or a 'group' of details which can each be a simple items or groups of sub-details." requirements="The items to be processed for adjudication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Item instance identifier</desc>
                        <fhir fid="Claim.item.sequence" definition="A number to uniquely identify item entries." requirements="Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="careTeamSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable careTeam members</desc>
                        <fhir fid="Claim.item.careTeamSequence" definition="CareTeam members related to this service or product." requirements="Need to identify the individuals and their roles in the provision of the product or service.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="diagnosisSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable diagnoses</desc>
                        <fhir fid="Claim.item.diagnosisSequence" definition="Diagnosis applicable for this service or product." requirements="Need to related the product or service to the associated diagnoses.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="procedureSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable procedures</desc>
                        <fhir fid="Claim.item.procedureSequence" definition="Procedures applicable for this service or product." requirements="Need to provide any listed specific procedures to support the product or service being claimed.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="informationSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable exception and supporting information</desc>
                        <fhir fid="Claim.item.informationSequence" definition="Exceptions, special conditions and supporting information applicable for this service or product." requirements="Need to reference the supporting information items that relate directly to this product or service.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Revenue or cost center code</desc>
                        <fhir fid="Claim.item.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                        </fhir>
                    </element>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Benefit classification</desc>
                        <fhir fid="Claim.item.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                            requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral-basic, major, glasses." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                        </fhir>
                    </element>
                    <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Billing, service, product, or drug code</desc>
                        <fhir fid="Claim.item.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                            comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                            requirements="Necessary to state what was provided or done.">
                            <type value="CodeableConcept"/>
                            <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                        </fhir>
                    </element>
                    <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Product or service billing modifiers</desc>
                        <fhir fid="Claim.item.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours."
                            requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                        </fhir>
                    </element>
                    <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Program the product or service is provided under</desc>
                        <fhir fid="Claim.item.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                        </fhir>
                    </element>
                    <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date or dates of service or product delivery</desc>
                        <fhir fid="Claim.item.serviced[x]" definition="The date or dates when the service or product was supplied, performed or completed." requirements="Needed to determine whether the  service or product was provided during the term of the insurance coverage.">
                            <type value="date"/>
                            <type value="Period"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                        </fhir>
                        <element name="servicedDate">
                            <fhir fid="Claim.item.servicedDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="servicedPeriod">
                            <fhir fid="Claim.item.servicedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Place of service or where product was supplied</desc>
                        <fhir fid="Claim.item.location[x]" definition="Where the product or service was provided." requirements="The location can alter whether the item was acceptable for insurance purposes or impact the determination of the benefit amount.">
                            <type value="CodeableConcept"/>
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <binding displayName="Example Service Place Codes" strength="example" description="Place of service: pharmacy, school, prison, etc." valueSet="2.16.840.1.113883.4.642.3.564" canonicalUri="http://hl7.org/fhir/ValueSet/service-place"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                        </fhir>
                        <element name="locationCodeableConcept">
                            <fhir fid="Claim.item.locationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="locationAddress">
                            <fhir fid="Claim.item.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="Claim.item.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Count of products or services</desc>
                        <fhir fid="Claim.item.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fee, charge or cost per item</desc>
                        <fhir fid="Claim.item.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Price scaling factor</desc>
                        <fhir fid="Claim.item.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)."
                            requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Total item cost</desc>
                        <fhir fid="Claim.item.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Unique device identifier</desc>
                        <fhir fid="Claim.item.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Anatomical location</desc>
                        <fhir fid="Claim.item.bodySite" definition="Physical service site on the patient (limb, tooth, etc.)." comment="For example: Providing a tooth code, allows an insurer to identify a provider performing a filling on a tooth that was previously removed." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Oral Site Codes" strength="example" description="The code for the teeth, quadrant, sextant and arch." valueSet="2.16.840.1.113883.4.642.3.540" canonicalUri="http://hl7.org/fhir/ValueSet/tooth"/>
                        </fhir>
                    </element>
                    <element name="subSite" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Anatomical sub-location</desc>
                        <fhir fid="Claim.item.subSite" definition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Surface Codes" strength="example" description="The code for the tooth surface and surface combinations." valueSet="2.16.840.1.113883.4.642.3.546" canonicalUri="http://hl7.org/fhir/ValueSet/surface"/>
                        </fhir>
                    </element>
                    <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Encounters related to this billed item</desc>
                        <fhir fid="Claim.item.encounter" definition="The Encounters during which this Claim was created or to which the creation of this record is tightly associated."
                            comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." requirements="Used in some jurisdictions to link clinical events to claim items.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            </type>
                            <mapping identity="workflow" map="Request.context"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Product or service provided</desc>
                        <fhir fid="Claim.item.detail" definition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." requirements="The items to be processed for adjudication.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Item instance identifier</desc>
                            <fhir fid="Claim.item.detail.sequence" definition="A number to uniquely identify item entries." requirements="Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Revenue or cost center code</desc>
                            <fhir fid="Claim.item.detail.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                            </fhir>
                        </element>
                        <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Benefit classification</desc>
                            <fhir fid="Claim.item.detail.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                                requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral-basic, major, glasses." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                            </fhir>
                        </element>
                        <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Billing, service, product, or drug code</desc>
                            <fhir fid="Claim.item.detail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                requirements="Necessary to state what was provided or done.">
                                <type value="CodeableConcept"/>
                                <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                            </fhir>
                        </element>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Service/Product billing modifiers</desc>
                            <fhir fid="Claim.item.detail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                            </fhir>
                        </element>
                        <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Program the product or service is provided under</desc>
                            <fhir fid="Claim.item.detail.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Count of products or services</desc>
                            <fhir fid="Claim.item.detail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Fee, charge or cost per item</desc>
                            <fhir fid="Claim.item.detail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Price scaling factor</desc>
                            <fhir fid="Claim.item.detail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)."
                                requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Total item cost</desc>
                            <fhir fid="Claim.item.detail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Unique device identifier</desc>
                            <fhir fid="Claim.item.detail.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="subDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Product or service provided</desc>
                            <fhir fid="Claim.item.detail.subDetail" definition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." requirements="The items to be processed for adjudication.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Item instance identifier</desc>
                                <fhir fid="Claim.item.detail.subDetail.sequence" definition="A number to uniquely identify item entries." requirements="Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Revenue or cost center code</desc>
                                <fhir fid="Claim.item.detail.subDetail.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                                </fhir>
                            </element>
                            <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Benefit classification</desc>
                                <fhir fid="Claim.item.detail.subDetail.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                                    requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral-basic, major, glasses." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                                </fhir>
                            </element>
                            <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Billing, service, product, or drug code</desc>
                                <fhir fid="Claim.item.detail.subDetail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                    comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                    requirements="Necessary to state what was provided or done.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                                </fhir>
                            </element>
                            <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Service/Product billing modifiers</desc>
                                <fhir fid="Claim.item.detail.subDetail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                    requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                                </fhir>
                            </element>
                            <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Program the product or service is provided under</desc>
                                <fhir fid="Claim.item.detail.subDetail.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                                </fhir>
                            </element>
                            <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Count of products or services</desc>
                                <fhir fid="Claim.item.detail.subDetail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fee, charge or cost per item</desc>
                                <fhir fid="Claim.item.detail.subDetail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Price scaling factor</desc>
                                <fhir fid="Claim.item.detail.subDetail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                    comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Total item cost</desc>
                                <fhir fid="Claim.item.detail.subDetail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Unique device identifier</desc>
                                <fhir fid="Claim.item.detail.subDetail.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    </type>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="total" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Total claim cost</desc>
                    <fhir fid="Claim.total" definition="The total value of the all the items in the claim." requirements="Used for  control total purposes.">
                        <type value="Money"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.21" name="ClaimResponse" displayName="ClaimResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ClaimResponse">
            <desc language="en-US">This resource provides the adjudication details from the processing of a Claim resource.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ClaimResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ClaimResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Response to a claim predetermination or preauthorization</desc>
                <fhir fid="ClaimResponse" definition="This resource provides the adjudication details from the processing of a Claim resource.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for a claim response</desc>
                    <fhir fid="ClaimResponse.identifier" definition="A unique identifier assigned to this claim response." requirements="Allows claim responses to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="ClaimResponse.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">More granular claim type</desc>
                    <fhir fid="ClaimResponse.type" definition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." comment="This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type."
                        requirements="Some jurisdictions need a finer grained claim type for routing and adjudication." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Claim Type Codes" strength="extensible" description="The type or discipline-style of the claim." valueSet="2.16.840.1.113883.4.642.3.558" canonicalUri="http://hl7.org/fhir/ValueSet/claim-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="subType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">More granular claim type</desc>
                    <fhir fid="ClaimResponse.subType" definition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." comment="This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type."
                        requirements="Some jurisdictions need a finer grained claim type for routing and adjudication.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Example Claim SubType Codes" strength="example" description="A more granular claim typecode." valueSet="2.16.840.1.113883.4.642.3.566" canonicalUri="http://hl7.org/fhir/ValueSet/claim-subtype"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="use" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">claim | preauthorization | predetermination</desc>
                    <fhir fid="ClaimResponse.use" definition="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future."
                        requirements="This element is required to understand the nature of the request for adjudication." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Use" strength="required" description="Claim, preauthorization, predetermination." valueSet="2.16.840.1.113883.4.642.3.544" canonicalUri="http://hl7.org/fhir/ValueSet/claim-use|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The recipient of the products and services</desc>
                    <fhir fid="ClaimResponse.patient" definition="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought."
                        requirements="The patient must be supplied to the insurer so that confirmation of coverage and service hstory may be considered as part of the authorization and/or adjudiction." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Response creation date</desc>
                    <fhir fid="ClaimResponse.created" definition="The date this resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for reimbursement</desc>
                    <fhir fid="ClaimResponse.insurer" definition="The party responsible for authorization, adjudication and reimbursement." requirements="To be a valid claim, preauthorization or predetermination there must be a party who is responsible for adjudicating the contents against a policy which provides benefits for the patient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                    </fhir>
                </element>
                <element name="requestor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for the claim</desc>
                    <fhir fid="ClaimResponse.requestor" definition="The provider which is responsible for the claim, predetermination or preauthorization." comment="Typically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Id of resource triggering adjudication</desc>
                    <fhir fid="ClaimResponse.request" definition="Original request resource reference." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Claim"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">queued | complete | error | partial</desc>
                    <fhir fid="ClaimResponse.outcome" definition="The outcome of the claim, predetermination, or preauthorization processing."
                        comment="The resource may be used to indicate that: the request has been held (queued) for processing; that it has been processed and errors found (error); that no errors were found and that some of the adjudication has been undertaken (partial) or that all of the adjudication has been undertaken (complete)."
                        requirements="To advise the requestor of an overall processing outcome." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Claim Processing Codes" strength="required" description="The result of the claim processing." valueSet="2.16.840.1.113883.4.642.3.13" canonicalUri="http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="disposition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disposition Message</desc>
                    <fhir fid="ClaimResponse.disposition" definition="A human readable description of the status of the adjudication." requirements="Provided for user display.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
                <element name="preAuthRef" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Preauthorization reference</desc>
                    <fhir fid="ClaimResponse.preAuthRef" definition="Reference from the Insurer which is used in later communications which refers to this adjudication." comment="This value is only present on preauthorization adjudications." requirements="On subsequent claims, the insurer may require the provider to quote this value.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="preAuthPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Preauthorization reference effective period</desc>
                    <fhir fid="ClaimResponse.preAuthPeriod" definition="The time frame during which this authorization is effective." requirements="To convey to the provider when the authorized products and services must be supplied for the authorized adjudication to apply.">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="payeeType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party to be paid any benefits payable</desc>
                    <fhir fid="ClaimResponse.payeeType" definition="Type of Party to be reimbursed: subscriber, provider, other." requirements="Need to know who should receive payment with the most common situations being the Provider (assignment of benefits) or the Subscriber.">
                        <type value="CodeableConcept"/>
                        <binding displayName="PayeeType" strength="example" description="A code for the party to be reimbursed." valueSet="2.16.840.1.113883.4.642.3.31" canonicalUri="http://hl7.org/fhir/ValueSet/payeetype"/>
                    </fhir>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Adjudication for claim line items</desc>
                    <fhir fid="ClaimResponse.item" definition="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details." requirements="The adjudication for items provided on the claim.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="itemSequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Claim item instance identifier</desc>
                        <fhir fid="ClaimResponse.item.itemSequence" definition="A number to uniquely reference the claim item entries." requirements="Necessary to provide a mechanism to link the adjudication result to the submitted claim item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable note numbers</desc>
                        <fhir fid="ClaimResponse.item.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="adjudication" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Adjudication details</desc>
                        <fhir fid="ClaimResponse.item.adjudication" definition="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."
                            requirements="The adjudication results conveys the insurer's assessment of the item provided in the claim under the terms of the patient's insurance coverage.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of adjudication information</desc>
                            <fhir fid="ClaimResponse.item.adjudication.category"
                                definition="A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item."
                                comment="For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, etc." requirements="Needed to enable understanding of the context of the other information in the adjudication.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Adjudication Value Codes" strength="example" description="The adjudication codes." valueSet="2.16.840.1.113883.4.642.3.596" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication"/>
                            </fhir>
                        </element>
                        <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Explanation of adjudication outcome</desc>
                            <fhir fid="ClaimResponse.item.adjudication.reason" definition="A code supporting the understanding of the adjudication result and explaining variance from expected amount." comment="For example may indicate that the funds for this benefit type have been exhausted." requirements="To support understanding of variance from adjudication expectations.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Adjudication Reason Codes" strength="example" description="The adjudication reason codes." valueSet="2.16.840.1.113883.4.642.3.598" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication-reason"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Monetary amount</desc>
                            <fhir fid="ClaimResponse.item.adjudication.amount" definition="Monetary amount associated with the category." comment="For example: amount submitted, eligible amount, co-payment, and benefit payable." requirements="Most adjuciation categories convey a monetary amount.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Non-monetary value</desc>
                            <fhir fid="ClaimResponse.item.adjudication.value" definition="A non-monetary value associated with the category. Mutually exclusive to the amount element above." comment="For example: eligible percentage or co-payment percentage." requirements="Some adjudication categories convey a percentage or a fixed value.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Adjudication for claim details</desc>
                        <fhir fid="ClaimResponse.item.detail" definition="A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items." requirements="The adjudication for details provided on the claim.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="detailSequence" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Claim detail instance identifier</desc>
                            <fhir fid="ClaimResponse.item.detail.detailSequence" definition="A number to uniquely reference the claim detail entry." requirements="Necessary to provide a mechanism to link the adjudication result to the submitted claim detail.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Applicable note numbers</desc>
                            <fhir fid="ClaimResponse.item.detail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="adjudication" minimumMultiplicity="1" maximumMultiplicity="*">
                            <desc language="en-US">Detail level adjudication details</desc>
                            <fhir fid="ClaimResponse.item.detail.adjudication" definition="The adjudication results."/>
                        </element>
                        <element name="subDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Adjudication for claim sub-details</desc>
                            <fhir fid="ClaimResponse.item.detail.subDetail" definition="A sub-detail adjudication of a simple product or service." requirements="The adjudication for sub-details provided on the claim.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="subDetailSequence" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Claim sub-detail instance identifier</desc>
                                <fhir fid="ClaimResponse.item.detail.subDetail.subDetailSequence" definition="A number to uniquely reference the claim sub-detail entry." requirements="Necessary to provide a mechanism to link the adjudication result to the submitted claim sub-detail.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Applicable note numbers</desc>
                                <fhir fid="ClaimResponse.item.detail.subDetail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Subdetail level adjudication details</desc>
                                <fhir fid="ClaimResponse.item.detail.subDetail.adjudication" definition="The adjudication results."/>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="addItem" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Insurer added line items</desc>
                    <fhir fid="ClaimResponse.addItem" definition="The first-tier service adjudications for payor added product or service lines."
                        requirements="Insurers may redefine the provided product or service or may package and/or decompose groups of products and services. The addItems allows the insurer to provide their line item list with linkage to the submitted items/details/sub-details. In a preauthorization the insurer may use the addItem structure to provide additional information on authorized products and services.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="itemSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Item sequence number</desc>
                        <fhir fid="ClaimResponse.addItem.itemSequence" definition="Claim items which this service line is intended to replace." requirements="Provides references to the claim items.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="detailSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Detail sequence number</desc>
                        <fhir fid="ClaimResponse.addItem.detailSequence" definition="The sequence number of the details within the claim item which this line is intended to replace." requirements="Provides references to the claim details within the claim item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="subdetailSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Subdetail sequence number</desc>
                        <fhir fid="ClaimResponse.addItem.subdetailSequence" definition="The sequence number of the sub-details within the details within the claim item which this line is intended to replace." requirements="Provides references to the claim sub-details within the claim detail.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="provider" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Authorized providers</desc>
                        <fhir fid="ClaimResponse.addItem.provider" definition="The providers who are authorized for the services rendered to the patient." requirements="Insurer may provide authorization specifically to a restricted set of providers rather than an open authorization.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.source"/>
                        </fhir>
                    </element>
                    <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Billing, service, product, or drug code</desc>
                        <fhir fid="ClaimResponse.addItem.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                            comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                            requirements="Necessary to state what was provided or done.">
                            <type value="CodeableConcept"/>
                            <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                        </fhir>
                    </element>
                    <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Service/Product billing modifiers</desc>
                        <fhir fid="ClaimResponse.addItem.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours."
                            requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                            <mapping identity="rim" map="24.C, 24.D mods"/>
                        </fhir>
                    </element>
                    <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Program the product or service is provided under</desc>
                        <fhir fid="ClaimResponse.addItem.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                            <mapping identity="rim" map="24.H"/>
                        </fhir>
                    </element>
                    <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date or dates of service or product delivery</desc>
                        <fhir fid="ClaimResponse.addItem.serviced[x]" definition="The date or dates when the service or product was supplied, performed or completed." requirements="Needed to determine whether the  service or product was provided during the term of the insurance coverage.">
                            <type value="date"/>
                            <type value="Period"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                            <mapping identity="rim" map="24.A"/>
                        </fhir>
                        <element name="servicedDate">
                            <fhir fid="ClaimResponse.addItem.servicedDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="servicedPeriod">
                            <fhir fid="ClaimResponse.addItem.servicedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Place of service or where product was supplied</desc>
                        <fhir fid="ClaimResponse.addItem.location[x]" definition="Where the product or service was provided." requirements="The location can alter whether the item was acceptable for insurance purposes or impact the determination of the benefit amount.">
                            <type value="CodeableConcept"/>
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <binding displayName="Example Service Place Codes" strength="example" description="Place of service: pharmacy, school, prison, etc." valueSet="2.16.840.1.113883.4.642.3.564" canonicalUri="http://hl7.org/fhir/ValueSet/service-place"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                            <mapping identity="rim" map="24.B"/>
                        </fhir>
                        <element name="locationCodeableConcept">
                            <fhir fid="ClaimResponse.addItem.locationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="locationAddress">
                            <fhir fid="ClaimResponse.addItem.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="ClaimResponse.addItem.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Count of products or services</desc>
                        <fhir fid="ClaimResponse.addItem.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                            <type value="Quantity"/>
                            <mapping identity="rim" map="24.G"/>
                        </fhir>
                    </element>
                    <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fee, charge or cost per item</desc>
                        <fhir fid="ClaimResponse.addItem.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Price scaling factor</desc>
                        <fhir fid="ClaimResponse.addItem.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)."
                            requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Total item cost</desc>
                        <fhir fid="ClaimResponse.addItem.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                            <type value="Money"/>
                            <mapping identity="rim" map="24.F"/>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Anatomical location</desc>
                        <fhir fid="ClaimResponse.addItem.bodySite" definition="Physical service site on the patient (limb, tooth, etc.)." comment="For example: Providing a tooth code allows an insurer to identify a provider performing a filling on a tooth that was previously removed." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Oral Site Codes" strength="example" description="The code for the teeth, quadrant, sextant and arch." valueSet="2.16.840.1.113883.4.642.3.540" canonicalUri="http://hl7.org/fhir/ValueSet/tooth"/>
                        </fhir>
                    </element>
                    <element name="subSite" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Anatomical sub-location</desc>
                        <fhir fid="ClaimResponse.addItem.subSite" definition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Surface Codes" strength="example" description="The code for the tooth surface and surface combinations." valueSet="2.16.840.1.113883.4.642.3.546" canonicalUri="http://hl7.org/fhir/ValueSet/surface"/>
                        </fhir>
                    </element>
                    <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable note numbers</desc>
                        <fhir fid="ClaimResponse.addItem.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="adjudication" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Added items adjudication</desc>
                        <fhir fid="ClaimResponse.addItem.adjudication" definition="The adjudication results."/>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Insurer added line details</desc>
                        <fhir fid="ClaimResponse.addItem.detail" definition="The second-tier service adjudications for payor added services.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Billing, service, product, or drug code</desc>
                            <fhir fid="ClaimResponse.addItem.detail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                requirements="Necessary to state what was provided or done.">
                                <type value="CodeableConcept"/>
                                <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                            </fhir>
                        </element>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Service/Product billing modifiers</desc>
                            <fhir fid="ClaimResponse.addItem.detail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours."
                                requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                                <mapping identity="rim" map="24.C, 24.D mods"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Count of products or services</desc>
                            <fhir fid="ClaimResponse.addItem.detail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                <type value="Quantity"/>
                                <mapping identity="rim" map="24.G"/>
                            </fhir>
                        </element>
                        <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Fee, charge or cost per item</desc>
                            <fhir fid="ClaimResponse.addItem.detail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Price scaling factor</desc>
                            <fhir fid="ClaimResponse.addItem.detail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Total item cost</desc>
                            <fhir fid="ClaimResponse.addItem.detail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                <type value="Money"/>
                                <mapping identity="rim" map="24.F"/>
                            </fhir>
                        </element>
                        <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Applicable note numbers</desc>
                            <fhir fid="ClaimResponse.addItem.detail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="adjudication" minimumMultiplicity="1" maximumMultiplicity="*">
                            <desc language="en-US">Added items detail adjudication</desc>
                            <fhir fid="ClaimResponse.addItem.detail.adjudication" definition="The adjudication results."/>
                        </element>
                        <element name="subDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Insurer added line items</desc>
                            <fhir fid="ClaimResponse.addItem.detail.subDetail" definition="The third-tier service adjudications for payor added services.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Billing, service, product, or drug code</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                    comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                    requirements="Necessary to state what was provided or done.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                                </fhir>
                            </element>
                            <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Service/Product billing modifiers</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours."
                                    requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                                    <mapping identity="rim" map="24.C, 24.D mods"/>
                                </fhir>
                            </element>
                            <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Count of products or services</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                    <type value="Quantity"/>
                                    <mapping identity="rim" map="24.G"/>
                                </fhir>
                            </element>
                            <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fee, charge or cost per item</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Price scaling factor</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                    comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Total item cost</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied."
                                    requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                    <type value="Money"/>
                                    <mapping identity="rim" map="24.F"/>
                                </fhir>
                            </element>
                            <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Applicable note numbers</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="adjudication" minimumMultiplicity="1" maximumMultiplicity="*">
                                <desc language="en-US">Added items detail adjudication</desc>
                                <fhir fid="ClaimResponse.addItem.detail.subDetail.adjudication" definition="The adjudication results."/>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Header-level adjudication</desc>
                    <fhir fid="ClaimResponse.adjudication" definition="The adjudication results which are presented at the header level rather than at the line-item or add-item levels." requirements="Some insurers will receive line-items but provide the adjudication only at a summary or header-level."/>
                </element>
                <element name="total" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Adjudication totals</desc>
                    <fhir fid="ClaimResponse.total" definition="Categorized monetary totals for the adjudication." comment="Totals for amounts submitted, co-pays, benefits payable etc." requirements="To provide the requestor with financial totals by category for the adjudication." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of adjudication information</desc>
                        <fhir fid="ClaimResponse.total.category"
                            definition="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item."
                            comment="For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, etc." requirements="Needed to convey the type of total provided." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Adjudication Value Codes" strength="example" description="The adjudication codes." valueSet="2.16.840.1.113883.4.642.3.596" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication"/>
                        </fhir>
                    </element>
                    <element name="amount" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Financial total for the category</desc>
                        <fhir fid="ClaimResponse.total.amount" definition="Monetary total amount associated with the category." requirements="Needed to convey the total monetary amount." isSummary="true">
                            <type value="Money"/>
                        </fhir>
                    </element>
                </element>
                <element name="payment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Payment Details</desc>
                    <fhir fid="ClaimResponse.payment" definition="Payment details for the adjudication of the claim." requirements="Needed to convey references to the financial instrument that has been used if payment has been made.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Partial or complete payment</desc>
                        <fhir fid="ClaimResponse.payment.type" definition="Whether this represents partial or complete payment of the benefits payable." requirements="To advise the requestor when the insurer believes all payments to have been completed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Payment Type Codes" strength="example" description="The type (partial, complete) of the payment." valueSet="2.16.840.1.113883.4.642.3.616" canonicalUri="http://hl7.org/fhir/ValueSet/ex-paymenttype"/>
                        </fhir>
                    </element>
                    <element name="adjustment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Payment adjustment for non-claim issues</desc>
                        <fhir fid="ClaimResponse.payment.adjustment" definition="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."
                            comment="Insurers will deduct amounts owing from the provider (adjustment), such as a prior overpayment, from the amount owing to the provider (benefits payable) when payment is made to the provider." requirements="To advise the requestor of adjustments applied to the payment.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="adjustmentReason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Explanation for the adjustment</desc>
                        <fhir fid="ClaimResponse.payment.adjustmentReason" definition="Reason for the payment adjustment." requirements="Needed to clarify the monetary adjustment.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Payment Adjustment Reason Codes" strength="example" description="Payment Adjustment reason codes." valueSet="2.16.840.1.113883.4.642.3.600" canonicalUri="http://hl7.org/fhir/ValueSet/payment-adjustment-reason"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Expected date of payment</desc>
                        <fhir fid="ClaimResponse.payment.date" definition="Estimated date the payment will be issued or the actual issue date of payment." requirements="To advise the payee when payment can be expected.">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="amount" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Payable amount after adjustment</desc>
                        <fhir fid="ClaimResponse.payment.amount" definition="Benefits payable less any payment adjustment." requirements="Needed to provide the actual payment amount.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Business identifier for the payment</desc>
                        <fhir fid="ClaimResponse.payment.identifier" definition="Issuer's unique identifier for the payment instrument." comment="For example: EFT number or check number." requirements="Enable the receiver to reconcile when payment received.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                </element>
                <element name="fundsReserve" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Funds reserved status</desc>
                    <fhir fid="ClaimResponse.fundsReserve" definition="A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom." comment="Fund would be release by a future claim quoting the preAuthRef of this response. Examples of values include: provider, patient, none."
                        requirements="Needed to advise the submitting provider on whether the rquest for reservation of funds has been honored.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FundsReserve" strength="example" description="For whom funds are to be reserved: (Patient, Provider, None)." valueSet="2.16.840.1.113883.4.642.3.33" canonicalUri="http://hl7.org/fhir/ValueSet/fundsreserve"/>
                    </fhir>
                </element>
                <element name="formCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed form identifier</desc>
                    <fhir fid="ClaimResponse.formCode" definition="A code for the form to be used for printing the content." comment="May be needed to identify specific jurisdictional forms." requirements="Needed to specify the specific form used for producing output for this response.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Forms" strength="example" description="The forms codes." valueSet="2.16.840.1.113883.4.642.3.37" canonicalUri="http://hl7.org/fhir/ValueSet/forms"/>
                    </fhir>
                </element>
                <element name="form" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed reference or actual form</desc>
                    <fhir fid="ClaimResponse.form" definition="The actual form, by reference or inclusion, for printing the content or an EOB." comment="Needed to permit insurers to include the actual form." requirements="Needed to include the specific form used for producing output for this response.">
                        <type value="Attachment"/>
                    </fhir>
                </element>
                <element name="processNote" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Note concerning adjudication</desc>
                    <fhir fid="ClaimResponse.processNote" definition="A note that describes or explains adjudication results in a human readable form." requirements="Provides the insurer specific textual explanations associated with the processing.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="number" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Note instance identifier</desc>
                        <fhir fid="ClaimResponse.processNote.number" definition="A number to uniquely identify a note entry." requirements="Necessary to provide a mechanism to link from adjudications.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">display | print | printoper</desc>
                        <fhir fid="ClaimResponse.processNote.type" definition="The business purpose of the note text." requirements="To convey the expectation for when the text is used.">
                            <type value="code"/>
                            <binding displayName="NoteType" strength="required" description="The presentation types of notes." valueSet="2.16.840.1.113883.4.642.3.15" canonicalUri="http://hl7.org/fhir/ValueSet/note-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Note explanatory text</desc>
                        <fhir fid="ClaimResponse.processNote.text" definition="The explanation or description associated with the processing." requirements="Required to provide human readable explanation.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Language of the text</desc>
                        <fhir fid="ClaimResponse.processNote.language" definition="A code to define the language used in the text of the note." comment="Only required if the language is different from the resource language." requirements="Note text may vary from the resource defined language.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                        </fhir>
                    </element>
                </element>
                <element name="communicationRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request for additional information</desc>
                    <fhir fid="ClaimResponse.communicationRequest" definition="Request for additional supporting or authorizing information." comment="For example: professional reports, documents, images, clinical resources, or accident reports." requirements="Need to communicate insurer request for additional information required to support the adjudication.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CommunicationRequest"/>
                        </type>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient insurance information</desc>
                    <fhir fid="ClaimResponse.insurance" definition="Financial instruments for reimbursement for the health care products and services specified on the claim."
                        comment="All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim."
                        requirements="At least one insurer is required for a claim to be a claim.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="Coverage"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance instance identifier</desc>
                        <fhir fid="ClaimResponse.insurance.sequence" definition="A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order." requirements="To maintain order of the coverages.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="focal" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Coverage to be used for adjudication</desc>
                        <fhir fid="ClaimResponse.insurance.focal" definition="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                            comment="A patient may (will) have multiple insurance policies which provide reimbursement for healthcare services and products. For example a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for adjudicating this claim. Other claims would be created to request adjudication against the other listed policies."
                            requirements="To identify which coverage in the list is being used to adjudicate this claim.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance information</desc>
                        <fhir fid="ClaimResponse.insurance.coverage" definition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
                            requirements="Required to allow the adjudicator to locate the correct policy and history within their information system.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="businessArrangement" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional provider contract number</desc>
                        <fhir fid="ClaimResponse.insurance.businessArrangement" definition="A business agreement number established between the provider and the insurer for special business processing purposes." requirements="Providers may have multiple business arrangements with a given insurer and must supply the specific contract number for adjudication.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="claimResponse" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Adjudication results</desc>
                        <fhir fid="ClaimResponse.insurance.claimResponse" definition="The result of the adjudication of the line items for the Coverage specified in this insurance." comment="Must not be specified when 'focal=true' for this insurance."
                            requirements="An insurer need the adjudication results from prior insurers to determine the outstanding balance remaining by item for the items in the curent claim.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="error" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Processing errors</desc>
                    <fhir fid="ClaimResponse.error" definition="Errors encountered during the processing of the adjudication." comment="If the request contains errors then an error element should be provided and no adjudication related sections (item, addItem, or payment) should be present." requirements="Need to communicate processing issues to the requestor.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="itemSequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Item sequence number</desc>
                        <fhir fid="ClaimResponse.error.itemSequence" definition="The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure." requirements="Provides references to the claim items.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="detailSequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Detail sequence number</desc>
                        <fhir fid="ClaimResponse.error.detailSequence" definition="The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure." requirements="Provides references to the claim details within the claim item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="subDetailSequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Subdetail sequence number</desc>
                        <fhir fid="ClaimResponse.error.subDetailSequence" definition="The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure." requirements="Provides references to the claim sub-details within the claim detail.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Error code detailing processing issues</desc>
                        <fhir fid="ClaimResponse.error.code" definition="An error code, from a specified code system, which details why the claim could not be adjudicated." requirements="Required to convey processing errors.">
                            <type value="CodeableConcept"/>
                            <binding displayName="AdjudicationError" strength="example" description="The adjudication error codes." valueSet="2.16.840.1.113883.4.642.3.39" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication-error"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.22" name="ClinicalImpression" displayName="ClinicalImpression" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ClinicalImpression">
            <desc language="en-US">A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called
                "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ClinicalImpression" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ClinicalImpression" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A clinical assessment performed when planning treatments and management strategies for a patient</desc>
                <fhir fid="ClinicalImpression"
                    definition="A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called &#34;ClinicalImpression&#34; rather than &#34;ClinicalAssessment&#34; to avoid confusion with the recording of assessment tools such as Apgar score.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="Partial mapping for problem evaluation"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="ClinicalImpression.identifier" definition="Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the clinical impression as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PID-3"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">in-progress | completed | entered-in-error</desc>
                    <fhir fid="ClinicalImpression.status" definition="Identifies the workflow status of the assessment." comment="This element is labeled as a modifier because the status contains the code entered-in-error that marks the clinical impression as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Clinical Impression Status" strength="required" description="The workflow state of a clinical impression." valueSet="2.16.840.1.113883.4.642.3.1046" canonicalUri="http://hl7.org/fhir/ValueSet/clinicalimpression-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="PRB-14"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="ClinicalImpression.statusReason" definition="Captures the reason for the current state of the ClinicalImpression."
                        comment="This is generally only used for &#34;exception&#34; statuses such as &#34;not-done&#34;, &#34;suspended&#34; or &#34;cancelled&#34;.&#xA;&#xA;[distinct reason codes for different statuses can be enforced using invariants if they are universal bindings].">
                        <type value="CodeableConcept"/>
                        <binding displayName="ClinicalImpressionStatusReason" strength="example" description="Codes identifying the reason for the current state of a clinical impression."/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of assessment performed</desc>
                    <fhir fid="ClinicalImpression.code" definition="Categorizes the type of clinical assessment performed." comment="This is present as a place-holder only and may be removed based on feedback/work group opinion." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ClinicalImpressionCode" strength="example" description="Identifies categories of clinical impressions.  This is a place-holder only.  It may be removed."/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why/how the assessment was performed</desc>
                    <fhir fid="ClinicalImpression.description" definition="A summary of the context and/or cause of the assessment - why / where it was performed, and what patient events/status prompted it." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Patient or group assessed</desc>
                    <fhir fid="ClinicalImpression.subject" definition="The patient or group of individuals assessed as part of this record." requirements="Group is typically for veterinary and/or public health purposes." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="ClinicalImpression.encounter" definition="The Encounter during which this ClinicalImpression was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <choice name="effective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time of assessment</desc>
                    <fhir fid="ClinicalImpression.effective[x]" definition="The point in time or period over which the subject was assessed." comment="This SHOULD be accurate to at least the minute, though some assessments only have a known date." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="PRB-2"/>
                    </fhir>
                    <element name="effectiveDateTime">
                        <fhir fid="ClinicalImpression.effectiveDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="effectivePeriod">
                        <fhir fid="ClinicalImpression.effectivePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the assessment was documented</desc>
                    <fhir fid="ClinicalImpression.date" definition="Indicates when the documentation of the assessment was complete." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="assessor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The clinician performing the assessment</desc>
                    <fhir fid="ClinicalImpression.assessor" definition="The clinician performing the assessment." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ROL-4"/>
                    </fhir>
                </element>
                <element name="previous" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reference to last assessment</desc>
                    <fhir fid="ClinicalImpression.previous" definition="A reference to the last assessment that was conducted on this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes."
                        comment="It is always likely that multiple previous assessments exist for a patient. The point of quoting a previous assessment is that this assessment is relative to it (see resolved).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClinicalImpression"/>
                        </type>
                    </fhir>
                </element>
                <element name="problem" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Relevant impressions of patient state</desc>
                    <fhir fid="ClinicalImpression.problem" definition="A list of the relevant problems/conditions for a patient." comment="e.g. The patient is a pregnant, has congestive heart failure, has an ‎Adenocarcinoma, and is allergic to penicillin." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="PRB-3 / IAM-7"/>
                    </fhir>
                </element>
                <element name="investigation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">One or more sets of investigations (signs, symptoms, etc.)</desc>
                    <fhir fid="ClinicalImpression.investigation" definition="One or more sets of investigations (signs, symptoms, etc.). The actual grouping of investigations varies greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A name/code for the set</desc>
                        <fhir fid="ClinicalImpression.investigation.code" definition="A name/code for the group (&#34;set&#34;) of investigations. Typically, this will be something like &#34;signs&#34;, &#34;symptoms&#34;, &#34;clinical&#34;, &#34;diagnostic&#34;, but the list is not constrained, and others such groups such as (exposure|family|travel|nutritional) history may be used.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Investigation Type" strength="example" description="A name/code for a set of investigations." valueSet="2.16.840.1.113883.4.642.3.157" canonicalUri="http://hl7.org/fhir/ValueSet/investigation-sets"/>
                        </fhir>
                    </element>
                    <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Record of a specific investigation</desc>
                        <fhir fid="ClinicalImpression.investigation.item" definition="A record of a specific investigation that was undertaken." comment="Most investigations are observations of one kind or another but some other specific types of data collection resources can also be used.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RiskAssessment"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            </type>
                            <mapping identity="v2" map="OBX-21"/>
                        </fhir>
                    </element>
                </element>
                <element name="protocol" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical Protocol followed</desc>
                    <fhir fid="ClinicalImpression.protocol" definition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.">
                        <type value="uri"/>
                    </fhir>
                </element>
                <element name="summary" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Summary of the assessment</desc>
                    <fhir fid="ClinicalImpression.summary" definition="A text summary of the investigations and the diagnosis.">
                        <type value="string"/>
                        <mapping identity="v2" map="OBX"/>
                    </fhir>
                </element>
                <element name="finding" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Possible or likely findings and diagnoses</desc>
                    <fhir fid="ClinicalImpression.finding" definition="Specific findings or diagnoses that were considered likely or relevant to ongoing treatment.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="itemCodeableConcept" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What was found</desc>
                        <fhir fid="ClinicalImpression.finding.itemCodeableConcept" definition="Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Identification of the Condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                            <mapping identity="v2" map="OBX"/>
                        </fhir>
                    </element>
                    <element name="itemReference" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What was found</desc>
                        <fhir fid="ClinicalImpression.finding.itemReference" definition="Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            </type>
                            <mapping identity="v2" map="OBX"/>
                        </fhir>
                    </element>
                    <element name="basis" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Which investigations support finding</desc>
                        <fhir fid="ClinicalImpression.finding.basis" definition="Which investigations support finding or diagnosis.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="prognosisCodeableConcept" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Estimate of likely outcome</desc>
                    <fhir fid="ClinicalImpression.prognosisCodeableConcept" definition="Estimate of likely outcome.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Clinical Impression Prognosis" strength="example" description="Prognosis or outlook findings." valueSet="2.16.840.1.113883.4.642.3.160" canonicalUri="http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis"/>
                        <mapping identity="v2" map="PRB-22"/>
                    </fhir>
                </element>
                <element name="prognosisReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">RiskAssessment expressing likely outcome</desc>
                    <fhir fid="ClinicalImpression.prognosisReference" definition="RiskAssessment expressing likely outcome.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RiskAssessment"/>
                        </type>
                    </fhir>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information supporting the clinical impression</desc>
                    <fhir fid="ClinicalImpression.supportingInfo" definition="Information supporting the clinical impression.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the ClinicalImpression</desc>
                    <fhir fid="ClinicalImpression.note" definition="Commentary about the impression, typically recorded after the impression itself was made, though supplemental notes by the original author could also appear." comment="Don't use this element for content that should more properly appear as one of the specific elements of the impression.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.23" name="CodeSystem" displayName="CodeSystem" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CodeSystem">
            <desc language="en-US">The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CodeSystem" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="CodeSystem" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Declares the existence of and describes a code system or code system supplement</desc>
                <fhir fid="CodeSystem" definition="The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.">
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="csd-1" severity="error" human="Within a code system definition, all the codes SHALL be unique" expression="concept.code.combine($this.descendants().concept.code).isDistinct()" xpath="count(distinct-values(descendant::f:concept/f:code/@value))=count(descendant::f:concept)" source=""/>
                    <constraint key="csd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)</desc>
                    <fhir fid="CodeSystem.url"
                        definition="An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the code system to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the code system (business identifier)</desc>
                    <fhir fid="CodeSystem.identifier" definition="A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this code system outside of FHIR, where it is not possible to use the logical URI.  Note that HL7 defines at least three identifiers for many of its code systems - the FHIR canonical URL, the OID and the V2 Table 0396 mnemonic code."
                        requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the code system (Coding.version)</desc>
                    <fhir fid="CodeSystem.version"
                        definition="The identifier that is used to identify this version of the code system when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the code system author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. This is used in [Coding](datatypes.html#Coding).version."
                        comment="There may be different code system instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the code system with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this code system (computer friendly)</desc>
                    <fhir fid="CodeSystem.name" definition="A natural language name identifying the code system. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this code system (human friendly)</desc>
                    <fhir fid="CodeSystem.title" definition="A short, descriptive, user-friendly title for the code system." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="CodeSystem.status" definition="The date (and optionally time) when the code system resource was created or revised." comment="Allows filtering of code systems that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="CodeSystem.experimental" definition="A Boolean value to indicate that this code system is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of code systems that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level code system." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="CodeSystem.date" definition="The date  (and optionally time) when the code system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the code system changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the code system. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="CodeSystem.publisher" definition="The name of the organization or individual that published the code system."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the code system is the organization or individual primarily responsible for the maintenance and upkeep of the code system. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the code system. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the code system.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="CodeSystem.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the code system</desc>
                    <fhir fid="CodeSystem.description" definition="A free text natural language description of the code system from a consumer's perspective."
                        comment="This description can be used to capture details such as why the code system was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the code system as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the code system is presumed to be the predominant language in the place the code system was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="CodeSystem.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate code system instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for code system (if applicable)</desc>
                    <fhir fid="CodeSystem.jurisdiction" definition="A legal or geographic region in which the code system is intended to be used." comment="It may be possible for the code system to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this code system is defined</desc>
                    <fhir fid="CodeSystem.purpose" definition="Explanation of why this code system is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the code system. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this code system.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="CodeSystem.copyright" definition="A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system."
                        comment="... Sometimes, the copyright differs between the code system and the codes that are included. The copyright statement should clearly differentiate between these when required." requirements="Consumers must be able to determine any legal restrictions on the use of the code system and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="caseSensitive" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If code comparison is case sensitive</desc>
                    <fhir fid="CodeSystem.caseSensitive" definition="If code comparison is case sensitive when codes within this system are compared to each other."
                        comment="If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="valueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical reference to the value set with entire code system</desc>
                    <fhir fid="CodeSystem.valueSet" definition="Canonical reference to the value set that contains the entire code system." comment="The definition of the value set SHALL include all codes from this code system and only codes from this code system, and it SHALL be immutable." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                    </fhir>
                </element>
                <element name="hierarchyMeaning" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">grouped-by | is-a | part-of | classified-with</desc>
                    <fhir fid="CodeSystem.hierarchyMeaning" definition="The meaning of the hierarchy of concepts as represented in this resource." comment="Note that other representations might have a different hierarchy or none at all, and represent the information using properties." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CodeSystemHierarchyMeaning" strength="required" description="The meaning of the hierarchy of concepts in a code system." valueSet="2.16.840.1.113883.4.642.3.784" canonicalUri="http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning|4.0.1"/>
                    </fhir>
                </element>
                <element name="compositional" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If code system defines a compositional grammar</desc>
                    <fhir fid="CodeSystem.compositional" definition="The code system defines a compositional (post-coordination) grammar." comment="Note that the code system resource does not define what the compositional grammar is, only whether or not there is one." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="versionNeeded" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If definitions are not stable</desc>
                    <fhir fid="CodeSystem.versionNeeded" definition="This flag is used to signify that the code system does not commit to concept permanence across versions. If true, a version must be specified when referencing this code system."
                        comment="Best practice is that code systems do not redefine concepts, or that if concepts are redefined, a new code system definition is created. But this is not always possible, so some code systems may be defined as 'versionNeeded'.&#xA;&#xA;Most code systems occasionally refine the displays defined for concepts between versions. Contexts in which the concept display values are validated may require that the version be specified for some code systems irrespective of the value of this property."
                        isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="content" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">not-present | example | fragment | complete | supplement</desc>
                    <fhir fid="CodeSystem.content" definition="The extent of the content of the code system (the concepts and codes it defines) are represented in this resource instance." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CodeSystemContentMode" strength="required" description="The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource." valueSet="2.16.840.1.113883.4.642.3.782" canonicalUri="http://hl7.org/fhir/ValueSet/codesystem-content-mode|4.0.1"/>
                    </fhir>
                </element>
                <element name="supplements" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical URL of Code System this adds designations and properties to</desc>
                    <fhir fid="CodeSystem.supplements" definition="The canonical URL of the code system that this code system supplement is adding designations and properties to." comment="The most common use of a code system supplement is to add additional language support." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CodeSystem"/>
                        </type>
                    </fhir>
                </element>
                <element name="count" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Total concepts in the code system</desc>
                    <fhir fid="CodeSystem.count" definition="The total number of concepts defined by the code system. Where the code system has a compositional grammar, the basis of this count is defined by the system steward." comment="The count of concepts defined in this resource cannot be more than this value but may be less for several reasons - see the content element." isSummary="true">
                        <type value="unsignedInt"/>
                    </fhir>
                </element>
                <element name="filter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Filter that can be used in a value set</desc>
                    <fhir fid="CodeSystem.filter" definition="A filter that can be used in a value set compose statement when selecting concepts using a filter."
                        comment="Note that filters defined in code systems usually require custom code on the part of any terminology engine that will make them available for use in value set filters. For this reason, they are generally only seen in high value published terminologies." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Code that identifies the filter</desc>
                        <fhir fid="CodeSystem.filter.code" definition="The code that identifies this filter when it is used as a filter in [ValueSet](valueset.html#).compose.include.filter." isSummary="true">
                            <type value="code"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How or why the filter is used</desc>
                        <fhir fid="CodeSystem.filter.description" definition="A description of how or why the filter is used." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="operator" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists</desc>
                        <fhir fid="CodeSystem.filter.operator" definition="A list of operators that can be used with the filter." isSummary="true">
                            <type value="code"/>
                            <binding displayName="FilterOperator" strength="required" description="The kind of operation to perform as a part of a property based filter." valueSet="2.16.840.1.113883.4.642.3.478" canonicalUri="http://hl7.org/fhir/ValueSet/filter-operator|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">What to use for the value</desc>
                        <fhir fid="CodeSystem.filter.value" definition="A description of what the value for the filter should be." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional information supplied about each concept</desc>
                    <fhir fid="CodeSystem.property" definition="A property defines an additional slot through which additional information can be provided about a concept." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Identifies the property on the concepts, and when referred to in operations</desc>
                        <fhir fid="CodeSystem.property.code" definition="A code that is used to identify the property. The code is used internally (in CodeSystem.concept.property.code) and also externally, such as in property filters." isSummary="true">
                            <type value="code"/>
                        </fhir>
                    </element>
                    <element name="uri" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Formal identifier for the property</desc>
                        <fhir fid="CodeSystem.property.uri" definition="Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system." isSummary="true">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Why the property is defined, and/or what it conveys</desc>
                        <fhir fid="CodeSystem.property.description" definition="A description of the property- why it is defined, and how its value might be used." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">code | Coding | string | integer | boolean | dateTime | decimal</desc>
                        <fhir fid="CodeSystem.property.type" definition="The type of the property value. Properties of type &#34;code&#34; contain a code defined by the code system (e.g. a reference to another defined concept)." isSummary="true">
                            <type value="code"/>
                            <binding displayName="PropertyType" strength="required" description="The type of a property value." valueSet="2.16.840.1.113883.4.642.3.780" canonicalUri="http://hl7.org/fhir/ValueSet/concept-property-type|4.0.1"/>
                        </fhir>
                    </element>
                </element>
                <element name="concept" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Concepts in the code system</desc>
                    <fhir fid="CodeSystem.concept" definition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meanings of the hierarchical relationships are." comment="If this is empty, it means that the code system resource does not represent the content of the code system.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Code that identifies concept</desc>
                        <fhir fid="CodeSystem.concept.code" definition="A code - a text symbol - that uniquely identifies the concept within the code system.">
                            <type value="code"/>
                        </fhir>
                    </element>
                    <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Text to display to the user</desc>
                        <fhir fid="CodeSystem.concept.display" definition="A human readable string that is the recommended default way to present this concept to a user.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Formal definition</desc>
                        <fhir fid="CodeSystem.concept.definition" definition="The formal definition of the concept. The code system resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="designation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Additional representations for the concept</desc>
                        <fhir fid="CodeSystem.concept.designation" definition="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc."
                            comment="Concepts have both a ```display``` and an array of ```designation```. The display is equivalent to a special designation with an implied ```designation.use``` of &#34;primary code&#34; and a language equal to the [Resource Language](resource.html#language)."
                            requirements="Many concept definition systems support multiple representations, in multiple languages, and for multiple purposes.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Human language of the designation</desc>
                            <fhir fid="CodeSystem.concept.designation.language" definition="The language this designation is defined for." comment="In the absence of a language, the resource language applies.">
                                <type value="code"/>
                                <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                            </fhir>
                        </element>
                        <element name="use" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Details how this designation would be used</desc>
                            <fhir fid="CodeSystem.concept.designation.use" definition="A code that details how this designation would be used." comment="If no use is provided, the designation can be assumed to be suitable for general display to a human user.">
                                <type value="Coding"/>
                                <binding displayName="Designation Use" strength="extensible" description="Details of how a designation would be used." valueSet="2.16.840.1.113883.4.642.3.264" canonicalUri="http://hl7.org/fhir/ValueSet/designation-use"/>
                            </fhir>
                        </element>
                        <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The text value for this designation</desc>
                            <fhir fid="CodeSystem.concept.designation.value" definition="The text value for this designation.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Property value for the concept</desc>
                        <fhir fid="CodeSystem.concept.property" definition="A property value for this concept.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Reference to CodeSystem.property.code</desc>
                            <fhir fid="CodeSystem.concept.property.code" definition="A code that is a reference to CodeSystem.property.code.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Value of the property for this concept</desc>
                            <fhir fid="CodeSystem.concept.property.value[x]" definition="The value of this property.">
                                <type value="code"/>
                                <type value="Coding"/>
                                <type value="string"/>
                                <type value="integer"/>
                                <type value="boolean"/>
                                <type value="dateTime"/>
                                <type value="decimal"/>
                            </fhir>
                            <element name="valueCode">
                                <fhir fid="CodeSystem.concept.property.valueCode">
                                    <type value="code"/>
                                </fhir>
                            </element>
                            <element name="valueCoding">
                                <fhir fid="CodeSystem.concept.property.valueCoding">
                                    <type value="Coding"/>
                                </fhir>
                            </element>
                            <element name="valueString">
                                <fhir fid="CodeSystem.concept.property.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueInteger">
                                <fhir fid="CodeSystem.concept.property.valueInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="valueBoolean">
                                <fhir fid="CodeSystem.concept.property.valueBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="valueDateTime">
                                <fhir fid="CodeSystem.concept.property.valueDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="valueDecimal">
                                <fhir fid="CodeSystem.concept.property.valueDecimal">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="concept" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Child Concepts (is-a/contains/categorizes)</desc>
                        <fhir fid="CodeSystem.concept.concept" definition="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) - see hierarchyMeaning."/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.24" name="Communication" displayName="Communication" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Communication">
            <desc language="en-US">An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Communication" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Communication" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A record of information transmitted from a sender to a receiver</desc>
                <fhir fid="Communication" definition="An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier</desc>
                    <fhir fid="Communication.identifier" definition="Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the communication as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="Communication.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                        </type>
                        <mapping identity="workflow" map="Event.instantiatesCanonical"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="Communication.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Communication." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiatesUri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request fulfilled by this communication</desc>
                    <fhir fid="Communication.basedOn" definition="An order, proposal or plan fulfilled in whole or in part by this Communication." comment="This must point to some sort of a 'Request' resource, such as CarePlan, CommunicationRequest, ServiceRequest, MedicationRequest, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of this action</desc>
                    <fhir fid="Communication.partOf" definition="Part of this action." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                    </fhir>
                </element>
                <element name="inResponseTo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reply to</desc>
                    <fhir fid="Communication.inResponseTo" definition="Prior communication that this communication is in response to.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Communication"/>
                        </type>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</desc>
                    <fhir fid="Communication.status" definition="The status of the transmission." comment="This element is labeled as a modifier because the status contains the codes aborted and entered-in-error that mark the communication as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EventStatus" strength="required" description="The status of the communication." valueSet="2.16.840.1.113883.4.642.3.109" canonicalUri="http://hl7.org/fhir/ValueSet/event-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="Communication.statusReason" definition="Captures the reason for the current state of the Communication." comment="This is generally only used for &#34;exception&#34; statuses such as &#34;not-done&#34;, &#34;suspended&#34; or &#34;aborted&#34;. The reason for performing the event at all is captured in reasonCode, not here." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="CommunicationNotDoneReason" strength="example" description="Codes for the reason why a communication did not happen." valueSet="2.16.840.1.113883.4.642.3.174" canonicalUri="http://hl7.org/fhir/ValueSet/communication-not-done-reason"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message category</desc>
                    <fhir fid="Communication.category" definition="The type of message conveyed such as alert, notification, reminder, instruction, etc." comment="There may be multiple axes of categorization and one communication may serve multiple purposes.">
                        <type value="CodeableConcept"/>
                        <binding displayName="CommunicationCategory" strength="example" description="Codes for general categories of communications such as alerts, instructions, etc." valueSet="2.16.840.1.113883.4.642.3.172" canonicalUri="http://hl7.org/fhir/ValueSet/communication-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="Communication.priority" definition="Characterizes how quickly the planned or in progress communication must be addressed. Includes concepts such as stat, urgent, routine." comment="Used to prioritize workflow (such as which communication to read first) when the communication is planned or in progress." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Codes indicating the relative importance of a communication." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                    </fhir>
                </element>
                <element name="medium" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A channel of communication</desc>
                    <fhir fid="Communication.medium" definition="A channel that was used for this communication (e.g. email, fax).">
                        <type value="CodeableConcept"/>
                        <binding displayName="v3 Code System ParticipationMode" strength="example" description="Codes for communication mediums such as phone, fax, email, in person, etc." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ParticipationMode"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Focus of message</desc>
                    <fhir fid="Communication.subject" definition="The patient or group that was the focus of this communication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of the purpose/content</desc>
                    <fhir fid="Communication.topic" definition="Description of the purpose/content, similar to a subject line in an email." comment="Communication.topic.text can be used without any codings.">
                        <type value="CodeableConcept"/>
                        <binding displayName="CommunicationTopic" strength="example" description="Codes describing the purpose or content of the communication." valueSet="2.16.840.1.113883.4.642.3.983" canonicalUri="http://hl7.org/fhir/ValueSet/communication-topic"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="about" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Resources that pertain to this communication</desc>
                    <fhir fid="Communication.about" definition="Other resources that pertain to this communication and to which this communication should be associated." comment="Don't use Communication.about element when a more specific element exists, such as basedOn or reasonReference.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="Communication.encounter" definition="The Encounter during which this Communication was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="sent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When sent</desc>
                    <fhir fid="Communication.sent" definition="The time when this communication was sent.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x] {Invariant: maps to period.start}"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="received" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When received</desc>
                    <fhir fid="Communication.received" definition="The time when this communication arrived at the destination.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x] {Invariant: maps to period.end}"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message recipient</desc>
                    <fhir fid="Communication.recipient"
                        definition="The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="sender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Message sender</desc>
                    <fhir fid="Communication.sender" definition="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Indication for message</desc>
                    <fhir fid="Communication.reasonCode" definition="The reason or justification for the communication." comment="Textual reasons can be captured using reasonCode.text." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Codes for describing reasons for the occurrence of a communication." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was communication done?</desc>
                    <fhir fid="Communication.reasonReference" definition="Indicates another resource whose existence justifies this communication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="payload" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message payload</desc>
                    <fhir fid="Communication.payload" definition="Text, attachment(s), or resource(s) that was communicated to the recipient.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="content[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Message part content</desc>
                        <fhir fid="Communication.payload.content[x]" definition="A communicated content (or for multi-part communications, one portion of the communication).">
                            <type value="string"/>
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                        <element name="contentString">
                            <fhir fid="Communication.payload.contentString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="contentAttachment">
                            <fhir fid="Communication.payload.contentAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="contentReference">
                            <fhir fid="Communication.payload.contentReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the communication</desc>
                    <fhir fid="Communication.note" definition="Additional notes or commentary about the communication by the sender, receiver or other interested parties.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.25" name="CommunicationRequest" displayName="CommunicationRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CommunicationRequest">
            <desc language="en-US">A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CommunicationRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="CommunicationRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A request for information to be sent to a receiver</desc>
                <fhir fid="CommunicationRequest" definition="A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.">
                    <mapping identity="workflow" map="Request"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier</desc>
                    <fhir fid="CommunicationRequest.identifier" definition="Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the communication request as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills plan or proposal</desc>
                    <fhir fid="CommunicationRequest.basedOn" definition="A plan or proposal that is fulfilled in whole or in part by this request." requirements="Allows tracing of authorization for the request and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request(s) replaced by this request</desc>
                    <fhir fid="CommunicationRequest.replaces" definition="Completed or terminated request(s) whose function is taken by this new request." comment="The replacement could be because the initial request was immediately rejected (due to an issue) or because the previous request was completed, but the need for the action described by the request remains ongoing."
                        requirements="Allows tracing the continuation of a therapy or administrative process instantiated through multiple requests." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CommunicationRequest"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RPLC].target"/>
                    </fhir>
                </element>
                <element name="groupIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Composite request this is part of</desc>
                    <fhir fid="CommunicationRequest.groupIdentifier" definition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form."
                        comment="Requests are linked either by a &#34;basedOn&#34; relationship (i.e. one request is fulfilling another) or by having a common requisition.  Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[moodCode=INT].identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="CommunicationRequest.status" definition="The status of the proposal or order." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="The status of the communication request." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="CommunicationRequest.statusReason" definition="Captures the reason for the current state of the CommunicationRequest."
                        comment="This is generally only used for &#34;exception&#34; statuses such as &#34;suspended&#34; or &#34;cancelled&#34;.  The reason why the CommunicationRequest was created at all is captured in reasonCode, not here.  [distinct reason codes for different statuses can be enforced using invariants if they are universal bindings].">
                        <type value="CodeableConcept"/>
                        <binding displayName="CommunicationRequestStatusReason" strength="example" description="Codes identifying the reason for the current state of a request."/>
                        <mapping identity="workflow" map="Request.statusReason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message category</desc>
                    <fhir fid="CommunicationRequest.category" definition="The type of message to be sent such as alert, notification, reminder, instruction, etc." comment="There may be multiple axes of categorization and one communication request may serve multiple purposes.">
                        <type value="CodeableConcept"/>
                        <binding displayName="CommunicationCategory" strength="example" description="Codes for general categories of communications such as alerts, instruction, etc." valueSet="2.16.840.1.113883.4.642.3.172" canonicalUri="http://hl7.org/fhir/ValueSet/communication-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="CommunicationRequest.priority" definition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Codes indicating the relative importance of a communication request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                    </fhir>
                </element>
                <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">True if request is prohibiting action</desc>
                    <fhir fid="CommunicationRequest.doNotPerform" definition="If true indicates that the CommunicationRequest is asking for the specified action to *not* occur." comment="The attributes provided with the request qualify what is not to be done." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Request.doNotPerform"/>
                    </fhir>
                </element>
                <element name="medium" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A channel of communication</desc>
                    <fhir fid="CommunicationRequest.medium" definition="A channel that was used for this communication (e.g. email, fax).">
                        <type value="CodeableConcept"/>
                        <binding displayName="v3 Code System ParticipationMode" strength="example" description="Codes for communication mediums such as phone, fax, email, in person, etc." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ParticipationMode"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Focus of message</desc>
                    <fhir fid="CommunicationRequest.subject" definition="The patient or group that is the focus of this communication request.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="about" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Resources that pertain to this communication request</desc>
                    <fhir fid="CommunicationRequest.about" definition="Other resources that pertain to this communication request and to which this communication request should be associated." comment="Don't use CommunicationRequest.about element when a more specific element exists, such as basedOn, reasonReference, or replaces.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="CommunicationRequest.encounter" definition="The Encounter during which this CommunicationRequest was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="payload" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message payload</desc>
                    <fhir fid="CommunicationRequest.payload" definition="Text, attachment(s), or resource(s) to be communicated to the recipient.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="content[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Message part content</desc>
                        <fhir fid="CommunicationRequest.payload.content[x]" definition="The communicated content (or for multi-part communications, one portion of the communication).">
                            <type value="string"/>
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="workflow" map="Request.note"/>
                        </fhir>
                        <element name="contentString">
                            <fhir fid="CommunicationRequest.payload.contentString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="contentAttachment">
                            <fhir fid="CommunicationRequest.payload.contentAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="contentReference">
                            <fhir fid="CommunicationRequest.payload.contentReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When scheduled</desc>
                    <fhir fid="CommunicationRequest.occurrence[x]" definition="The time when this communication is to occur." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="CommunicationRequest.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="CommunicationRequest.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When request transitioned to being actionable</desc>
                    <fhir fid="CommunicationRequest.authoredOn" definition="For draft requests, indicates the date of initial creation.  For requests with other statuses, indicates the date of activation." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/what is requesting service</desc>
                    <fhir fid="CommunicationRequest.requester" definition="The device, individual, or organization who initiated the request and has responsibility for its activation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message recipient</desc>
                    <fhir fid="CommunicationRequest.recipient" definition="The entity (e.g. person, organization, clinical information system, device, group, or care team) which is the intended target of the communication.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="sender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Message sender</desc>
                    <fhir fid="CommunicationRequest.sender" definition="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why is communication needed?</desc>
                    <fhir fid="CommunicationRequest.reasonCode" definition="Describes why the request is being made in coded or textual form." comment="Textual reasons can be captured using reasonCode.text." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v3 Code System ActReason" strength="example" description="Codes for describing reasons for the occurrence of a communication." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActReason"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why is communication needed?</desc>
                    <fhir fid="CommunicationRequest.reasonReference" definition="Indicates another resource whose existence justifies this request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about communication request</desc>
                    <fhir fid="CommunicationRequest.note" definition="Comments made about the request by the requester, sender, recipient, subject or other participants.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.26" name="CompartmentDefinition" displayName="CompartmentDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CompartmentDefinition">
            <desc language="en-US">A compartment definition that defines how resources are accessed on a server.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CompartmentDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="CompartmentDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Compartment Definition for a resource</desc>
                <fhir fid="CompartmentDefinition" definition="A compartment definition that defines how resources are accessed on a server." comment="In FHIR, search is not performed directly on a resource (by XML or JSON path), but on a named parameter that maps into the resource content.">
                    <mapping identity="v2" map="n/a"/>
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="cpd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this compartment definition, represented as a URI (globally unique)</desc>
                    <fhir fid="CompartmentDefinition.url"
                        definition="An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the compartment definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the compartment definition</desc>
                    <fhir fid="CompartmentDefinition.version"
                        definition="The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different compartment definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the compartment definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this compartment definition (computer friendly)</desc>
                    <fhir fid="CompartmentDefinition.name" definition="A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.This is often the same as the code for the parameter, but does not need to be." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="CompartmentDefinition.status" definition="The status of this compartment definition. Enables tracking the life-cycle of the content." comment="Allows filtering of compartment definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="CompartmentDefinition.experimental" definition="A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of compartment definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level compartment definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="CompartmentDefinition.date" definition="The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the compartment definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="CompartmentDefinition.publisher" definition="The name of the organization or individual that published the compartment definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the compartment definition is the organization or individual primarily responsible for the maintenance and upkeep of the compartment definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the compartment definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the compartment definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="CompartmentDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the compartment definition</desc>
                    <fhir fid="CompartmentDefinition.description" definition="A free text natural language description of the compartment definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the compartment definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the compartment definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the compartment definition is presumed to be the predominant language in the place the compartment definition was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="CompartmentDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this compartment definition is defined</desc>
                    <fhir fid="CompartmentDefinition.purpose" definition="Explanation of why this compartment definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the compartment definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this compartment definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Patient | Encounter | RelatedPerson | Practitioner | Device</desc>
                    <fhir fid="CompartmentDefinition.code" definition="Which compartment this definition describes." comment="Only the specification can define the compartments that can exist. Servers can choose to support them." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CompartmentType" strength="required" description="Which type a compartment definition describes." valueSet="2.16.840.1.113883.4.642.3.786" canonicalUri="http://hl7.org/fhir/ValueSet/compartment-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="search" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Whether the search syntax is supported</desc>
                    <fhir fid="CompartmentDefinition.search" definition="Whether the search syntax is supported,." comment="Servers may define and use compartments to manage logical access without implementing the compartment related syntax." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="resource" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">How a resource is related to the compartment</desc>
                    <fhir fid="CompartmentDefinition.resource" definition="Information about how a resource is related to the compartment." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Name of resource type</desc>
                        <fhir fid="CompartmentDefinition.resource.code" definition="The name of a resource supported by the server." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="param" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Search Parameter Name, or chained parameters</desc>
                        <fhir fid="CompartmentDefinition.resource.param" definition="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,." comment="If no search parameters are listed, then the resource is not linked to the compartment." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional documentation about the resource and compartment</desc>
                        <fhir fid="CompartmentDefinition.resource.documentation" definition="Additional documentation about the resource and compartment.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.27" name="Composition" displayName="Composition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Composition">
            <desc language="en-US">A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition
                alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">To support documents, and also to capture the EN13606 notion of an attested commit to the patient EHR, and to allow a set of disparate resources at the information/engineering level to be gathered into a clinical statement.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Composition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="cda" uri="http://hl7.org/v3/cda" name="CDA (R2)"/>
                <mapping identity="fhirdocumentreference" uri="http://hl7.org/fhir/documentreference" name="FHIR DocumentReference"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Composition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A set of resources composed into a single coherent clinical statement with clinical attestation</desc>
                <fhir fid="Composition"
                    definition="A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.)."
                    comment="While the focus of this specification is on patient-specific clinical statements, this resource can also apply to other healthcare-related statements such as study protocol designs, healthcare invoices and other activities that are not necessarily patient-specific or clinical.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Document[classCode=&#34;DOC&#34; and moodCode=&#34;EVN&#34; and isNormalAct()]"/>
                    <mapping identity="cda" map="ClinicalDocument"/>
                    <mapping identity="fhirdocumentreference" map="when described by DocumentReference"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Version-independent identifier for the Composition</desc>
                    <fhir fid="Composition.identifier" definition="A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time." comment="Similar to ClinicalDocument/setId in CDA. See discussion in resource definition for how these relate." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="Document.id / Document.setId"/>
                        <mapping identity="cda" map=".setId"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.masterIdentifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">preliminary | final | amended | entered-in-error</desc>
                    <fhir fid="Composition.status" definition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document."
                        comment="If a composition is marked as withdrawn, the compositions/documents in the series, or data from the composition or document series, should never be displayed to a user without being clearly marked as untrustworthy. The flag &#34;entered-in-error&#34; is why this element is labeled as a modifier of other elements.   &#xA;&#xA;Some reporting work flows require that the original narrative of a final document never be altered; instead, only new narrative can be added. The composition resource has no explicit status for explicitly noting whether this business rule is in effect. This would be handled by an extension if required."
                        requirements="Need to be able to mark interim, amended, or withdrawn compositions or documents." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="CompositionStatus" strength="required" description="The workflow/clinical status of the composition." valueSet="2.16.840.1.113883.4.642.3.241" canonicalUri="http://hl7.org/fhir/ValueSet/composition-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim"
                            map="interim: .completionCode=&#34;IN&#34; &amp; ./statusCode[isNormalDatatype()]=&#34;active&#34;;  final: .completionCode=&#34;AU&#34; &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;complete&#34; and not(./inboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()]/source[subsumesCode(&#34;ActClass#CACT&#34;) and moodCode=&#34;EVN&#34; and domainMember(&#34;ReviseComposition&#34;, code) and isNormalAct()]);  amended: .completionCode=&#34;AU&#34; &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;complete&#34; and ./inboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()]/source[subsumesCode(&#34;ActClass#CACT&#34;) and moodCode=&#34;EVN&#34; and domainMember(&#34;ReviseComposition&#34;, code) and isNormalAct() and statusCode=&#34;completed&#34;];  withdrawn : .completionCode=NI &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;obsolete&#34;"/>
                        <mapping identity="cda" map="n/a"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Kind of composition (LOINC if possible)</desc>
                    <fhir fid="Composition.type" definition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition."
                        comment="For Composition type, LOINC is ubiquitous and strongly endorsed by HL7. Most implementation guides will require a specific LOINC code, or use LOINC as an extensible binding." requirements="Key metadata element describing the composition, used in searching/filtering." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIR Document Type Codes" strength="preferred" description="Type of a composition." valueSet="2.16.840.1.113883.4.642.3.240" canonicalUri="http://hl7.org/fhir/ValueSet/doc-typecodes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="./code"/>
                        <mapping identity="cda" map=".code"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.type"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Categorization of Composition</desc>
                    <fhir fid="Composition.category" definition="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." comment="This is a metadata field from [XDS/MHD](http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD))."
                        requirements="Helps humans to assess whether the composition is of interest when viewing an index of compositions or documents." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Document Class Value Set" strength="example" description="High-level kind of a clinical document at a macro level." valueSet="2.16.840.1.113883.3.88.12.80.46" canonicalUri="http://hl7.org/fhir/ValueSet/document-classcodes"/>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;EVN&#34;].code"/>
                        <mapping identity="cda" map="n/a"/>
                        <mapping identity="fhirdocumentreference" map="DocumenttReference.category"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who and/or what the composition is about</desc>
                    <fhir fid="Composition.subject" definition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." comment="For clinical documents, this is usually the patient."
                        requirements="Essential metadata for searching for the composition. Identifies who and/or what the composition/document is about." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;SBJ&#34;].role[typeCode=&#34;PAT&#34;]"/>
                        <mapping identity="cda" map=".recordTarget"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.subject"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Context of the Composition</desc>
                    <fhir fid="Composition.encounter" definition="Describes the clinical encounter or type of care this documentation is associated with." requirements="Provides context for the composition and supports searching." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map="unique(highest(./outboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()], priorityNumber)/target[moodCode=&#34;EVN&#34; and classCode=(&#34;ENC&#34;, &#34;PCPR&#34;) and isNormalAct])"/>
                        <mapping identity="cda" map=".componentOf.encompassingEncounter"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.context.encounter"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Composition editing time</desc>
                    <fhir fid="Composition.date" definition="The composition editing time, when the composition was last logically changed by the author." comment="The Last Modified Date on the composition may be after the date of the document was attested without being changed."
                        requirements="dateTime is used for tracking, organizing versions and searching. Note that this is the time of *authoring*. When packaged in a document, [Bundle.timestamp](bundle-definitions.html#Bundle.timestamp) is the date of packaging." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime[type=&#34;TS&#34;]"/>
                        <mapping identity="cda" map=".effectiveTime"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.content.attachment.date, DocumentReference.created"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Who and/or what authored the composition</desc>
                    <fhir fid="Composition.author" definition="Identifies who is responsible for the information in the composition, not necessarily who typed it in." requirements="Identifies who is responsible for the content." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;AUT&#34;].role[classCode=&#34;ASSIGNED&#34;]"/>
                        <mapping identity="cda" map=".author.assignedAuthor"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.agent"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Human Readable name/title</desc>
                    <fhir fid="Composition.title" definition="Official human-readable label for the composition."
                        comment="For many compositions, the title is the same as the text or a display name of Composition.type (e.g. a &#34;consultation&#34; or &#34;progress note&#34;). Note that CDA does not make title mandatory, but there are no known cases where it is useful for title to be omitted, so it is mandatory here. Feedback on this requirement is welcome during the trial use period."
                        isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="./title"/>
                        <mapping identity="cda" map=".title"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.description, DocumentReference.content.attachment.title"/>
                    </fhir>
                </element>
                <element name="confidentiality" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">As defined by affinity domain</desc>
                    <fhir fid="Composition.confidentiality" definition="The code specifying the level of confidentiality of the Composition."
                        comment="The exact use of this element, and enforcement and issues related to highly sensitive documents are out of scope for the base specification, and delegated to implementation profiles (see security section).  This element is labeled as a modifier because highly confidential documents must not be treated as if they are not." isSummary="true">
                        <type value="code"/>
                        <binding displayName="V3 Value SetConfidentialityClassification" strength="required" description="Codes specifying the level of confidentiality of the composition." valueSet="2.16.840.1.113883.1.11.10228" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26"/>
                        <mapping identity="rim" map=".confidentialityCode"/>
                        <mapping identity="cda" map=".confidentialityCode"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.securityLabel"/>
                    </fhir>
                </element>
                <element name="attester" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Attests to accuracy of composition</desc>
                    <fhir fid="Composition.attester" definition="A participant who has attested to the accuracy of the composition/document." comment="Only list each attester once." requirements="Identifies responsibility for the accuracy of the composition content.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;AUTHEN&#34;].role[classCode=&#34;ASSIGNED&#34;]"/>
                        <mapping identity="cda" map=".authenticator/.legalAuthenticator"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.authenticator"/>
                    </fhir>
                    <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">personal | professional | legal | official</desc>
                        <fhir fid="Composition.attester.mode" definition="The type of attestation the authenticator offers." requirements="Indicates the level of authority of the attestation.">
                            <type value="code"/>
                            <binding displayName="CompositionAttestationMode" strength="required" description="The way in which a person authenticated a composition." valueSet="2.16.840.1.113883.4.642.3.238" canonicalUri="http://hl7.org/fhir/ValueSet/composition-attestation-mode|4.0.1"/>
                            <mapping identity="rim" map="unique(./modeCode)"/>
                            <mapping identity="cda" map="implied by .authenticator/.legalAuthenticator"/>
                        </fhir>
                    </element>
                    <element name="time" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the composition was attested</desc>
                        <fhir fid="Composition.attester.time" definition="When the composition was attested by the party." requirements="Identifies when the information in the composition was deemed accurate.  (Things may have changed since then.).">
                            <type value="dateTime"/>
                            <mapping identity="rim" map="./time[type=&#34;TS&#34; and isNormalDatatype()]"/>
                            <mapping identity="cda" map=".authenticator.time"/>
                        </fhir>
                    </element>
                    <element name="party" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who attested the composition</desc>
                        <fhir fid="Composition.attester.party" definition="Who attested the composition in the specified way." requirements="Identifies who has taken on the responsibility for accuracy of the composition content.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.witness"/>
                            <mapping identity="rim" map="./role[classCode=&#34;ASSIGNED&#34; and isNormalRole]/player[determinerCode=&#34;INST&#34; and classCode=(&#34;DEV&#34;, &#34;PSN&#34;) and isNormalEntity()] or ./role[classCode=&#34;ASSIGNED&#34; and isNormalRole and not(player)]/scoper[determinerCode=&#34;INST&#34; and classCode=&#34;ORG&#34; and isNormalEntity()]"/>
                            <mapping identity="cda" map=".authenticator.assignedEnttty"/>
                        </fhir>
                    </element>
                </element>
                <element name="custodian" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization which maintains the composition</desc>
                    <fhir fid="Composition.custodian" definition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information."
                        comment="This is useful when documents are derived from a composition - provides guidance for how to get the latest version of the document. This is optional because this is sometimes not known by the authoring system, and can be inferred by context. However, it is important that this information be known when working with a derived document, so providing a custodian is encouraged."
                        requirements="Identifies where to go to find the current version, where to report issues, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=&#34;RCV&#34;].role[classCode=&#34;CUST&#34;].scoper[classCode=&#34;ORG&#34; and determinerCode=&#34;INST&#34;]"/>
                        <mapping identity="cda" map=".custodian.assignedCustodian"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.custodian"/>
                    </fhir>
                </element>
                <element name="relatesTo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Relationships to other compositions/documents</desc>
                    <fhir fid="Composition.relatesTo" definition="Relationships that this composition has with other compositions or documents that already exist." comment="A document is a version specific composition.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship"/>
                        <mapping identity="cda" map=".relatedDocument"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.relatesTo"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">replaces | transforms | signs | appends</desc>
                        <fhir fid="Composition.relatesTo.code" definition="The type of relationship that this composition has with anther composition or document." comment="If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.">
                            <type value="code"/>
                            <binding displayName="DocumentRelationshipType" strength="required" description="The type of relationship between documents." valueSet="2.16.840.1.113883.4.642.3.244" canonicalUri="http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1"/>
                            <mapping identity="rim" map=".outboundRelationship.typeCode"/>
                            <mapping identity="cda" map=".relatedDocument.typeCode"/>
                            <mapping identity="fhirdocumentreference" map="DocumentReference.relatesTo.code"/>
                        </fhir>
                    </element>
                    <choice name="target[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Target of the relationship</desc>
                        <fhir fid="Composition.relatesTo.target[x]" definition="The target composition/document of this relationship.">
                            <type value="Identifier"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                            </type>
                            <mapping identity="rim" map=".target[classCode=&#34;DOC&#34;, moodCode=&#34;EVN&#34;].id"/>
                            <mapping identity="cda" map=".relatedDocument.id"/>
                            <mapping identity="fhirdocumentreference" map="DocumentReference.relatesTo.target"/>
                        </fhir>
                        <element name="targetIdentifier">
                            <fhir fid="Composition.relatesTo.targetIdentifier">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="targetReference">
                            <fhir fid="Composition.relatesTo.targetReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="event" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The clinical service(s) being documented</desc>
                    <fhir fid="Composition.event" definition="The clinical service, such as a colonoscopy or an appendectomy, being documented." comment="The event needs to be consistent with the type element, though can provide further information if desired."
                        requirements="Provides context for the composition and creates a linkage between a resource describing an event and the composition created describing the event." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=&#34;SUBJ&#34;].target[classCode&lt;'ACT']"/>
                        <mapping identity="cda" map=".documentationOf.serviceEvent"/>
                        <mapping identity="fhirdocumentreference" map="DocumentReference.event"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Code(s) that apply to the event being documented</desc>
                        <fhir fid="Composition.event.code" definition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a &#34;History and Physical Report&#34; in which the procedure being documented is necessarily a &#34;History and Physical&#34; act."
                            comment="An event can further specialize the act inherent in the typeCode, such as where it is simply &#34;Procedure Report&#34; and the procedure was a &#34;colonoscopy&#34;. If one or more eventCodes are included, they SHALL NOT conflict with the values inherent in the classCode, practiceSettingCode or typeCode, as such a conflict would create an ambiguous situation. This short list of codes is provided to be used as key words for certain types of queries."
                            isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="v3 Code System ActCode" strength="example" description="This list of codes represents the main clinical acts being documented." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActCode"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="cda" map=".code"/>
                            <mapping identity="fhirdocumentreference" map="DocumentReference.event.code"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The period covered by the documentation</desc>
                        <fhir fid="Composition.event.period" definition="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time." isSummary="true">
                            <type value="Period"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                            <mapping identity="cda" map=".effectiveTime"/>
                            <mapping identity="fhirdocumentreference" map="DocumentReference.event.period"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The event(s) being documented</desc>
                        <fhir fid="Composition.event.detail" definition="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;].target"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                </element>
                <element name="section" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Composition is broken into sections</desc>
                    <fhir fid="Composition.section" definition="The root of the sections that make up the composition.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="./outboundRelationship[typeCode=&#34;COMP&#34; and isNormalActRelationship()]/target[moodCode=&#34;EVN&#34; and classCode=&#34;DOCSECT&#34; and isNormalAct]"/>
                        <mapping identity="cda" map=".component.structuredBody.component.section"/>
                        <constraint key="cmp-1" severity="error" human="A section must contain at least one of text, entries, or sub-sections" expression="text.exists() or entry.exists() or section.exists()" xpath="exists(f:text) or exists(f:entry) or exists(f:section)" source=""/>
                        <constraint key="cmp-2" severity="error" human="A section can only have an emptyReason if it is empty" expression="emptyReason.empty() or entry.empty()" xpath="not(exists(f:emptyReason) and exists(f:entry))" source=""/>
                    </fhir>
                    <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Label for section (e.g. for ToC)</desc>
                        <fhir fid="Composition.section.title" definition="The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents."
                            comment="The title identifies the section for a human reader. The title must be consistent with the narrative of the resource that is the target of the section.content reference. Generally, sections SHOULD have titles, but in some documents, it is unnecessary or inappropriate. Typically, this is where a section has subsections that have their own adequately distinguishing title,  or documents that only have a single section. Most Implementation Guides will make section title to be a required element."
                            requirements="Section headings are often standardized for different types of documents.  They give guidance to humans on how the document is organized.">
                            <type value="string"/>
                            <mapping identity="rim" map="./title"/>
                            <mapping identity="cda" map=".title"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Classification of section (recommended)</desc>
                        <fhir fid="Composition.section.code" definition="A code identifying the kind of content contained within the section. This must be consistent with the section title."
                            comment="The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document.   &#xA;&#xA;If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code."
                            requirements="Provides computable standardized labels to topics within the document.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Document Section Codes" strength="example" description="Classification of a section of a composition/document." valueSet="2.16.840.1.113883.4.642.3.237" canonicalUri="http://hl7.org/fhir/ValueSet/doc-section-codes"/>
                            <mapping identity="rim" map="./code"/>
                            <mapping identity="cda" map=".code"/>
                        </fhir>
                    </element>
                    <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who and/or what authored the section</desc>
                        <fhir fid="Composition.section.author" definition="Identifies who is responsible for the information in this section, not necessarily who typed it in." requirements="Identifies who is responsible for the content.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.author"/>
                            <mapping identity="rim" map=".participation[typeCode=&#34;AUT&#34;].role[classCode=&#34;ASSIGNED&#34;]"/>
                            <mapping identity="cda" map=".author.assignedAuthor"/>
                        </fhir>
                    </element>
                    <element name="focus" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who/what the section is about, when it is not about the subject of composition</desc>
                        <fhir fid="Composition.section.focus"
                            definition="The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources)."
                            comment="Typically, sections in a doument are about the subject of the document, whether that is a  patient, or group of patients, location, or device, or whatever. For some kind of documents, some sections actually contain data about related entities. Typical examples are  a section in a newborn discharge summary concerning the mother, or family history documents, with a section about each family member, though there are many other examples.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="cda" map=".subject? (CDA did not differentiate between subject and focus)"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Text summary of the section, for human interpretation</desc>
                        <fhir fid="Composition.section.text" definition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &#34;clinically safe&#34; for a human to just read the narrative."
                            comment="Document profiles may define what content should be represented in the narrative to ensure clinical safety.">
                            <type value="Narrative"/>
                            <mapping identity="rim" map=".text"/>
                            <mapping identity="cda" map=".text"/>
                        </fhir>
                    </element>
                    <element name="mode" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">working | snapshot | changes</desc>
                        <fhir fid="Composition.section.mode" definition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted."
                            comment="This element is labeled as a modifier because a change list must not be misunderstood as a complete list." requirements="Sections are used in various ways, and it must be known in what way it is safe to use the entries in them.">
                            <type value="code"/>
                            <binding displayName="ListMode" strength="required" description="The processing mode that applies to this section." valueSet="2.16.840.1.113883.4.642.3.318" canonicalUri="http://hl7.org/fhir/ValueSet/list-mode|4.0.1"/>
                            <mapping identity="w5" map="FiveWs.class"/>
                            <mapping identity="rim" map=".outBoundRelationship[typeCode=COMP].target[classCode=OBS&#34;].value"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="orderedBy" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Order of section entries</desc>
                        <fhir fid="Composition.section.orderedBy" definition="Specifies the order applied to the items in the section entries." comment="Applications SHOULD render ordered lists in the order provided, but MAY allow users to re-order based on their own preferences as well. If there is no order specified, the order is unknown, though there may still be some order."
                            requirements="Important for presentation and rendering.  Lists may be sorted to place more important information first or to group related entries.">
                            <type value="CodeableConcept"/>
                            <binding displayName="List Order Codes" strength="preferred" description="What order applies to the items in the entry." valueSet="2.16.840.1.113883.4.642.3.324" canonicalUri="http://hl7.org/fhir/ValueSet/list-order"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].sequenceNumber &gt; 1"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="entry" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A reference to data that supports this section</desc>
                        <fhir fid="Composition.section.entry" definition="A reference to the actual resource from which the narrative in the section is derived." comment="If there are no entries in the list, an emptyReason SHOULD be provided.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP] or  .participation[typeCode=SBJ]"/>
                            <mapping identity="cda" map=".entry"/>
                        </fhir>
                    </element>
                    <element name="emptyReason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Why the section is empty</desc>
                        <fhir fid="Composition.section.emptyReason" definition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason."
                            comment="The various reasons for an empty section make a significant interpretation to its interpretation. Note that this code is for use when the entire section content has been suppressed, and not for when individual items are omitted - implementers may consider using a text note or a flag on an entry in these cases."
                            requirements="Allows capturing things like &#34;none exist&#34; or &#34;not asked&#34; which can be important for most lists.">
                            <type value="CodeableConcept"/>
                            <binding displayName="List Empty Reasons" strength="preferred" description="If a section is empty, why it is empty." valueSet="2.16.840.1.113883.4.642.3.322" canonicalUri="http://hl7.org/fhir/ValueSet/list-empty-reason"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ,code&lt;ListEmptyReason].value[type=CD]"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="section" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Nested Section</desc>
                        <fhir fid="Composition.section.section" definition="A nested sub-section within this section." comment="Nested sections are primarily used to help human readers navigate to particular portions of the document.">
                            <mapping identity="rim" map="./outboundRelationship[typeCode=&#34;COMP&#34; and isNormalActRelationship()]/target[moodCode=&#34;EVN&#34; and classCode=&#34;DOCSECT&#34; and isNormalAct]"/>
                            <mapping identity="cda" map=".component.section"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.28" name="ConceptMap" displayName="ConceptMap" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ConceptMap">
            <desc language="en-US">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ConceptMap" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="ConceptMap" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A map from one set of concepts to one or more other concepts</desc>
                <fhir fid="ConceptMap" definition="A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.">
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="cmd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this concept map, represented as a URI (globally unique)</desc>
                    <fhir fid="ConceptMap.url"
                        definition="An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the concept map to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional identifier for the concept map</desc>
                    <fhir fid="ConceptMap.identifier" definition="A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this concept map outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the concept map</desc>
                    <fhir fid="ConceptMap.version"
                        definition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different concept map instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the concept map with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this concept map (computer friendly)</desc>
                    <fhir fid="ConceptMap.name" definition="A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this concept map (human friendly)</desc>
                    <fhir fid="ConceptMap.title" definition="A short, descriptive, user-friendly title for the concept map." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ConceptMap.status" definition="The status of this concept map. Enables tracking the life-cycle of the content." comment="Allows filtering of concept maps that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ConceptMap.experimental" definition="A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of concept maps that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level concept map." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ConceptMap.date" definition="The date  (and optionally time) when the concept map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the concept map. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ConceptMap.publisher" definition="The name of the organization or individual that published the concept map."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the concept map is the organization or individual primarily responsible for the maintenance and upkeep of the concept map. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the concept map. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the concept map.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ConceptMap.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the concept map</desc>
                    <fhir fid="ConceptMap.description" definition="A free text natural language description of the concept map from a consumer's perspective." comment="The description is not intended to describe the semantics of the concept map. The description should capture its intended use, which is needed for ensuring integrity for its use in models across future changes.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ConceptMap.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for concept map (if applicable)</desc>
                    <fhir fid="ConceptMap.jurisdiction" definition="A legal or geographic region in which the concept map is intended to be used." comment="It may be possible for the concept map to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this concept map is defined</desc>
                    <fhir fid="ConceptMap.purpose" definition="Explanation of why this concept map is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the concept map. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this concept map.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ConceptMap.copyright" definition="A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map."
                        comment="Frequently the copyright differs between the concept map and codes that are included. The copyright statement should clearly differentiate between these when required." requirements="Consumers must be able to determine any legal restrictions on the use of the concept map and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <choice name="source[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The source value set that contains the concepts that are being mapped</desc>
                    <fhir fid="ConceptMap.source[x]" definition="Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings."
                        comment="Should be a version specific reference. URIs SHOULD be absolute. If there is no source or target value set, there is no specified context for the map (not recommended).  The source value set may select codes from either an explicit (standard or local) or implicit code system." isSummary="true">
                        <type value="uri"/>
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                    </fhir>
                    <element name="sourceUri">
                        <fhir fid="ConceptMap.sourceUri">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="sourceCanonical">
                        <fhir fid="ConceptMap.sourceCanonical">
                            <type value="canonical"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="target[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The target value set which provides context for the mappings</desc>
                    <fhir fid="ConceptMap.target[x]" definition="The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made."
                        comment="Should be a version specific reference. URIs SHOULD be absolute. If there is no source or target value set, the is no specified context for the map." isSummary="true">
                        <type value="uri"/>
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                    </fhir>
                    <element name="targetUri">
                        <fhir fid="ConceptMap.targetUri">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="targetCanonical">
                        <fhir fid="ConceptMap.targetCanonical">
                            <type value="canonical"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </fhir>
                    </element>
                </choice>
                <element name="group" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Same source and target systems</desc>
                    <fhir fid="ConceptMap.group" definition="A group of mappings that all have the same source and target system.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Source system where concepts to be mapped are defined</desc>
                        <fhir fid="ConceptMap.group.source" definition="An absolute URI that identifies the source system where the concepts to be mapped are defined." comment="This is not needed if the source value set is specified and it contains concepts from only a single system.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="sourceVersion" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific version of the code system</desc>
                        <fhir fid="ConceptMap.group.sourceVersion" definition="The specific version of the code system, as determined by the code system authority." comment="The specification of a particular code system version may be required for code systems which lack concept permanence.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="target" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Target system that the concepts are to be mapped to</desc>
                        <fhir fid="ConceptMap.group.target" definition="An absolute URI that identifies the target system that the concepts will be mapped to." comment="This is not needed if the target value set is specified and it contains concepts from only a single system. The group target may also be omitted if all of the target element equivalence values are 'unmatched'.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="targetVersion" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific version of the code system</desc>
                        <fhir fid="ConceptMap.group.targetVersion" definition="The specific version of the code system, as determined by the code system authority." comment="The specification of a particular code system version may be required for code systems which lack concept permanence.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="element" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Mappings for a concept from the source set</desc>
                        <fhir fid="ConceptMap.group.element" definition="Mappings for an individual concept in the source to one or more concepts in the target." comment="Generally, the ideal is that there would only be one mapping for each concept in the source value set, but a given concept may be mapped multiple times with different comments or dependencies.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Identifies element being mapped</desc>
                            <fhir fid="ConceptMap.group.element.code" definition="Identity (code or path) or the element/item being mapped.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Display for the code</desc>
                            <fhir fid="ConceptMap.group.element.display" definition="The display for the code. The display is only provided to help editors when editing the concept map." comment="The display is ignored when processing the map.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Concept in target system for element</desc>
                            <fhir fid="ConceptMap.group.element.target" definition="A concept from the target value set that this concept maps to." comment="Ideally there would only be one map, with equal or equivalent mapping. But multiple maps are allowed for several narrower options, or to assert that other concepts are unmatched.">
                                <type value="BackboneElement"/>
                                <constraint key="cmd-1" severity="error" human="If the map is narrower or inexact, there SHALL be some comments" expression="comment.exists() or equivalence.empty() or ((equivalence != 'narrower') and (equivalence != 'inexact'))" xpath="exists(f:comment) or not(exists(f:equivalence)) or ((f:equivalence/@value != 'narrower') and (f:equivalence/@value != 'inexact'))"
                                    source=""/>
                            </fhir>
                            <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Code that identifies the target element</desc>
                                <fhir fid="ConceptMap.group.element.target.code" definition="Identity (code or path) or the element/item that the map refers to.">
                                    <type value="code"/>
                                </fhir>
                            </element>
                            <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Display for the code</desc>
                                <fhir fid="ConceptMap.group.element.target.display" definition="The display for the code. The display is only provided to help editors when editing the concept map." comment="The display is ignored when processing the map.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="equivalence" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">relatedto | equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint</desc>
                                <fhir fid="ConceptMap.group.element.target.equivalence" definition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." comment="This element is labeled as a modifier because it may indicate that a target does not apply."
                                    isModifier="true">
                                    <type value="code"/>
                                    <binding displayName="ConceptMapEquivalence" strength="required" description="The degree of equivalence between concepts." valueSet="2.16.840.1.113883.4.642.3.17" canonicalUri="http://hl7.org/fhir/ValueSet/concept-map-equivalence|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Description of status/issues in mapping</desc>
                                <fhir fid="ConceptMap.group.element.target.comment" definition="A description of status/issues in mapping that conveys additional information not represented in  the structured data.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="dependsOn" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Other elements required for this mapping (from context)</desc>
                                <fhir fid="ConceptMap.group.element.target.dependsOn" definition="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="property" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">Reference to property mapping depends on</desc>
                                    <fhir fid="ConceptMap.group.element.target.dependsOn.property" definition="A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property.">
                                        <type value="uri"/>
                                    </fhir>
                                </element>
                                <element name="system" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">Code System (if necessary)</desc>
                                    <fhir fid="ConceptMap.group.element.target.dependsOn.system" definition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).">
                                        <type value="canonical">
                                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CodeSystem"/>
                                        </type>
                                    </fhir>
                                </element>
                                <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">Value of the referenced element</desc>
                                    <fhir fid="ConceptMap.group.element.target.dependsOn.value" definition="Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">Display for the code (if value is a code)</desc>
                                    <fhir fid="ConceptMap.group.element.target.dependsOn.display" definition="The display for the code. The display is only provided to help editors when editing the concept map." comment="The display is ignored when processing the map.">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                            </element>
                            <element name="product" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Other concepts that this mapping also produces</desc>
                                <fhir fid="ConceptMap.group.element.target.product"
                                    definition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on."/>
                            </element>
                        </element>
                    </element>
                    <element name="unmapped" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What to do when there is no mapping for the source concept</desc>
                        <fhir fid="ConceptMap.group.unmapped" definition="What to do when there is no mapping for the source concept. &#34;Unmapped&#34; does not include codes that are unmatched, and the unmapped element is ignored in a code is specified to have equivalence = unmatched."
                            comment="This only applies if the source code has a system value that matches the system defined for the group.">
                            <type value="BackboneElement"/>
                            <constraint key="cmd-3" severity="error" human="If the mode is 'other-map', a url must be provided" expression="(mode = 'other-map') implies url.exists()" xpath="(f:mode/@value != 'other-map') or exists(f:url)" source=""/>
                            <constraint key="cmd-2" severity="error" human="If the mode is 'fixed', a code must be provided" expression="(mode = 'fixed') implies code.exists()" xpath="(f:mode/@value != 'fixed') or exists(f:code)" source=""/>
                        </fhir>
                        <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">provided | fixed | other-map</desc>
                            <fhir fid="ConceptMap.group.unmapped.mode"
                                definition="Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).">
                                <type value="code"/>
                                <binding displayName="ConceptMapGroupUnmappedMode" strength="required" description="Defines which action to take if there is no match in the group." valueSet="2.16.840.1.113883.4.642.3.480" canonicalUri="http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Fixed code when mode = fixed</desc>
                            <fhir fid="ConceptMap.group.unmapped.code" definition="The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Display for the code</desc>
                            <fhir fid="ConceptMap.group.unmapped.display" definition="The display for the code. The display is only provided to help editors when editing the concept map." comment="The display is ignored when processing the map.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped</desc>
                            <fhir fid="ConceptMap.group.unmapped.url" definition="The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ConceptMap"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.29" name="Condition" displayName="Condition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Condition">
            <desc language="en-US">A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Condition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="sct-concept" uri="http://snomed.info/conceptdomain" name="SNOMED CT Concept Domain Binding"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="sct-attr" uri="http://snomed.org/attributebinding" name="SNOMED CT Attribute Binding"/>
            </fhir>
            <element name="Condition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Detailed information about conditions, problems or diagnoses</desc>
                <fhir fid="Condition" definition="A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="sct-concept"
                        map="&lt; 243796009 |Situation with explicit context| : 246090004 |Associated finding| = ( ( &lt; 404684003 |Clinical finding| MINUS ( &lt;&lt; 420134006 |Propensity to adverse reactions| OR &lt;&lt; 473010000 |Hypersensitivity condition| OR &lt;&lt; 79899007 |Drug interaction| OR &lt;&lt; 69449002 |Drug action| OR &lt;&lt; 441742003 |Evaluation finding| OR &lt;&lt; 307824009 |Administrative status| OR &lt;&lt; 385356007 |Tumor stage finding|)) OR &lt; 272379006 |Event|)"/>
                    <mapping identity="v2" map="PPR message"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN, code=ASSERTION, value&lt;Diagnosis]"/>
                    <constraint key="con-5" severity="error" human="Condition.clinicalStatus SHALL NOT be present if verification Status is entered-in-error" expression="verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty()"
                        xpath="not(exists(f:verificationStatus/f:coding[f:system/@value='http://terminology.hl7.org/CodeSystem/condition-ver-status' and f:code/@value='entered-in-error'])) or not(exists(f:clinicalStatus))" source=""/>
                    <constraint key="con-4" severity="error" human="If condition is abated, then clinicalStatus must be either inactive, resolved, or remission" expression="abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists()"
                        xpath="not(exists(*[starts-with(local-name(.), 'abatement')])) or exists(f:clinicalStatus/f:coding[f:system/@value='http://terminology.hl7.org/CodeSystem/condition-clinical' and f:code/@value=('resolved', 'remission', 'inactive')])" source=""/>
                    <constraint key="con-3" severity="warning" human="Condition.clinicalStatus SHALL be present if verificationStatus is not entered-in-error and category is problem-list-item"
                        expression="clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty()"
                        xpath="exists(f:clinicalStatus) or exists(f:verificationStatus/f:coding/f:code/@value='entered-in-error') or not(exists(category[@value='problem-list-item']))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this condition</desc>
                    <fhir fid="Condition.identifier" definition="Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the condition as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="clinicalStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | recurrence | relapse | inactive | remission | resolved</desc>
                    <fhir fid="Condition.clinicalStatus" definition="The clinical status of the condition." comment="The data type is CodeableConcept because clinicalStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity." isModifier="true"
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition Clinical Status Codes" strength="required" description="The clinical status of the condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.164" canonicalUri="http://hl7.org/fhir/ValueSet/condition-clinical|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="sct-concept" map="&lt; 303105007 |Disease phases|"/>
                        <mapping identity="v2" map="PRB-14"/>
                        <mapping identity="rim" map="Observation ACT&#xA;.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&#34;clinicalStatus&#34;, moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="verificationStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">unconfirmed | provisional | differential | confirmed | refuted | entered-in-error</desc>
                    <fhir fid="Condition.verificationStatus" definition="The verification status to support the clinical status of the condition."
                        comment="verificationStatus is not required.  For example, when a patient has abdominal pain in the ED, there is not likely going to be a verification status.&#xA;The data type is CodeableConcept because verificationStatus has some clinical judgment involved, such that there might need to be more specificity than the required FHIR value set allows. For example, a SNOMED coding might allow for additional specificity."
                        isModifier="true" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ConditionVerificationStatus" strength="required" description="The verification status to support or decline the clinical status of the condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.166" canonicalUri="http://hl7.org/fhir/ValueSet/condition-ver-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="sct-concept" map="&lt; 410514004 |Finding context value|"/>
                        <mapping identity="v2" map="PRB-13"/>
                        <mapping identity="rim" map="Observation ACT&#xA;.inboundRelationship[typeCode=COMP].source[classCode=OBS, code=&#34;verificationStatus&#34;, moodCode=EVN].value"/>
                        <mapping identity="sct-attr" map="408729009"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">problem-list-item | encounter-diagnosis</desc>
                    <fhir fid="Condition.category" definition="A category assigned to the condition." comment="The categorization is often highly contextual and may appear poorly differentiated or not very useful in other contexts.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition Category Codes" strength="extensible" description="A category assigned to the condition." valueSet="2.16.840.1.113883.4.642.3.162" canonicalUri="http://hl7.org/fhir/ValueSet/condition-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="sct-concept" map="&lt; 404684003 |Clinical finding|"/>
                        <mapping identity="v2" map="'problem' if from PRB-3. 'diagnosis' if from DG1 segment in PV1 message"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="severity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subjective severity of condition</desc>
                    <fhir fid="Condition.severity" definition="A subjective assessment of the severity of the condition as evaluated by the clinician." comment="Coding of the severity with a terminology is preferred, where possible.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Diagnosis Severity" strength="preferred" description="A subjective assessment of the severity of the condition as evaluated by the clinician." valueSet="2.16.840.1.113883.4.642.3.168" canonicalUri="http://hl7.org/fhir/ValueSet/condition-severity"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="sct-concept" map="&lt; 272141005 |Severities|"/>
                        <mapping identity="v2" map="PRB-26 / ABS-3"/>
                        <mapping identity="rim" map="Can be pre/post-coordinated into value.  Or ./inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;severity&#34;].value"/>
                        <mapping identity="sct-attr" map="246112005"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identification of the condition, problem or diagnosis</desc>
                    <fhir fid="Condition.code" definition="Identification of the condition, problem or diagnosis." requirements="0..1 to account for primarily narrative only resources." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Identification of the condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="sct-concept"
                            map="code 246090004 |Associated finding| (&lt; 404684003 |Clinical finding| MINUS&#xA;&lt;&lt; 420134006 |Propensity to adverse reactions| MINUS &#xA;&lt;&lt; 473010000 |Hypersensitivity condition| MINUS &#xA;&lt;&lt; 79899007 |Drug interaction| MINUS&#xA;&lt;&lt; 69449002 |Drug action| MINUS &#xA;&lt;&lt; 441742003 |Evaluation finding| MINUS &#xA;&lt;&lt; 307824009 |Administrative status| MINUS &#xA;&lt;&lt; 385356007 |Tumor stage finding|) &#xA;OR &lt; 413350009 |Finding with explicit context|&#xA;OR &lt; 272379006 |Event|"/>
                        <mapping identity="v2" map="PRB-3"/>
                        <mapping identity="rim" map=".value"/>
                        <mapping identity="sct-attr" map="246090004"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Anatomical location, if relevant</desc>
                    <fhir fid="Condition.bodySite" definition="The anatomical location where this condition manifests itself."
                        comment="Only used if not implicit in code found in Condition.code. If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="sct-concept" map="&lt; 442083009  |Anatomical or acquired body structure|"/>
                        <mapping identity="rim" map=".targetBodySiteCode"/>
                        <mapping identity="sct-attr" map="363698007"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who has the condition?</desc>
                    <fhir fid="Condition.subject" definition="Indicates the patient or group who the condition record is associated with." requirements="Group is typically used for veterinary or public health use cases." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="Condition.encounter" definition="The Encounter during which this Condition was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter. This record indicates the encounter this particular record is associated with.  In the case of a &#34;new&#34; diagnosis reflecting ongoing/revised information about the condition, this might be distinct from the first encounter in which the underlying condition was first &#34;known&#34;."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19 (+PV1-54)"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="onset[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Estimated or actual date, date-time, or age</desc>
                    <fhir fid="Condition.onset[x]" definition="Estimated or actual date or date-time  the condition began, in the opinion of the clinician." comment="Age is generally used when the patient reports an age at which the Condition began to occur." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Age"/>
                        <type value="Period"/>
                        <type value="Range"/>
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="v2" map="PRB-16"/>
                        <mapping identity="rim" map=".effectiveTime.low or .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;age at onset&#34;].value"/>
                    </fhir>
                    <element name="onsetDateTime">
                        <fhir fid="Condition.onsetDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="onsetAge">
                        <fhir fid="Condition.onsetAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="onsetPeriod">
                        <fhir fid="Condition.onsetPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="onsetRange">
                        <fhir fid="Condition.onsetRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="onsetString">
                        <fhir fid="Condition.onsetString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="abatement[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When in resolution/remission</desc>
                    <fhir fid="Condition.abatement[x]" definition="The date or estimated date that the condition resolved or went into remission. This is called &#34;abatement&#34; because of the many overloaded connotations associated with &#34;remission&#34; or &#34;resolution&#34; - Conditions are never really resolved, but they can abate."
                        comment="There is no explicit distinction between resolution and remission because in many cases the distinction is not clear. Age is generally used when the patient reports an age at which the Condition abated.  If there is no abatement element, it is unknown whether the condition has resolved or entered remission; applications and users should generally assume that the condition is still valid.  When abatementString exists, it implies the condition is abated.">
                        <type value="dateTime"/>
                        <type value="Age"/>
                        <type value="Period"/>
                        <type value="Range"/>
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime.high or .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;age at remission&#34;].value or .inboundRelationship[typeCode=SUBJ]source[classCode=CONC, moodCode=EVN].status=completed"/>
                    </fhir>
                    <element name="abatementDateTime">
                        <fhir fid="Condition.abatementDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="abatementAge">
                        <fhir fid="Condition.abatementAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="abatementPeriod">
                        <fhir fid="Condition.abatementPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="abatementRange">
                        <fhir fid="Condition.abatementRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="abatementString">
                        <fhir fid="Condition.abatementString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recordedDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date record was first recorded</desc>
                    <fhir fid="Condition.recordedDate" definition="The recordedDate represents when this particular Condition record was created in the system, which is often a system-generated date." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="REL-11"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="recorder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who recorded the condition</desc>
                    <fhir fid="Condition.recorder" definition="Individual who recorded the record and takes responsibility for its content." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="asserter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person who asserts this condition</desc>
                    <fhir fid="Condition.asserter" definition="Individual who is making the condition statement." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="v2" map="REL-7.1 identifier + REL-7.12 type code"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role"/>
                    </fhir>
                </element>
                <element name="stage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Stage/grade, usually assessed formally</desc>
                    <fhir fid="Condition.stage" definition="Clinical stage or grade of a condition. May include formal severity assessments.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="./inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;stage/grade&#34;]"/>
                        <constraint key="con-1" severity="error" human="Stage SHALL have summary or assessment" expression="summary.exists() or assessment.exists()" xpath="exists(f:summary) or exists(f:assessment)" source=""/>
                    </fhir>
                    <element name="summary" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Simple summary (disease specific)</desc>
                        <fhir fid="Condition.stage.summary" definition="A simple summary of the stage such as &#34;Stage 3&#34;. The determination of the stage is disease-specific.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition Stage" strength="example" description="Codes describing condition stages (e.g. Cancer stages)." valueSet="2.16.840.1.113883.4.642.3.170" canonicalUri="http://hl7.org/fhir/ValueSet/condition-stage"/>
                            <mapping identity="sct-concept" map="&lt; 254291000 |Staging and scales|"/>
                            <mapping identity="v2" map="PRB-14"/>
                            <mapping identity="rim" map=".value"/>
                        </fhir>
                    </element>
                    <element name="assessment" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Formal record of assessment</desc>
                        <fhir fid="Condition.stage.assessment" definition="Reference to a formal record of the evidence on which the staging assessment is based.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClinicalImpression"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            </type>
                            <mapping identity="rim" map=".self"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Kind of staging</desc>
                        <fhir fid="Condition.stage.type" definition="The kind of staging, such as pathological or clinical staging.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition Stage Type" strength="example" description="Codes describing the kind of condition staging (e.g. clinical or pathological)." valueSet="2.16.840.1.113883.4.642.3.171" canonicalUri="http://hl7.org/fhir/ValueSet/condition-stage-type"/>
                            <mapping identity="rim" map="./inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;stage type&#34;]"/>
                        </fhir>
                    </element>
                </element>
                <element name="evidence" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting evidence</desc>
                    <fhir fid="Condition.evidence" definition="Supporting evidence / manifestations that are the basis of the Condition's verification status, such as evidence that confirmed or refuted the condition." comment="The evidence may be a simple list of coded symptoms/manifestations, or references to observations or formal assessments, or both.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SPRT].target[classCode=OBS, moodCode=EVN]"/>
                        <constraint key="con-2" severity="error" human="evidence SHALL have code or details" expression="code.exists() or detail.exists()" xpath="exists(f:code) or exists(f:detail)" source=""/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Manifestation/symptom</desc>
                        <fhir fid="Condition.evidence.code" definition="A manifestation or symptom that led to the recording of this condition." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Manifestation and Symptom Codes" strength="example" description="Codes that describe the manifestation or symptoms of a condition." valueSet="2.16.840.1.113883.4.642.3.169" canonicalUri="http://hl7.org/fhir/ValueSet/manifestation-or-symptom"/>
                            <mapping identity="workflow" map="Event.reasonCode"/>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                            <mapping identity="sct-concept" map="&lt; 404684003 |Clinical finding|"/>
                            <mapping identity="rim" map="[code=&#34;diagnosis&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting information found elsewhere</desc>
                        <fhir fid="Condition.evidence.detail" definition="Links to other relevant information, including pathology reports." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                            <mapping identity="rim" map=".self"/>
                        </fhir>
                    </element>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional information about the Condition</desc>
                    <fhir fid="Condition.note" definition="Additional information about the Condition. This is a general notes/comments entry  for description of the Condition, its diagnosis and prognosis.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="NTE child of PRB"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.30" name="Consent" displayName="Consent" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Consent">
            <desc language="en-US">A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Consent" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Consent" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time</desc>
                <fhir fid="Consent" definition="A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time."
                    comment="Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="CON"/>
                    <mapping identity="rim" map="FinancialConsent"/>
                    <constraint key="ppc-4" severity="error" human="IF Scope=adr, there must be a patient" expression="patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()" xpath="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))" source=""/>
                    <constraint key="ppc-5" severity="error" human="IF Scope=treatment, there must be a patient" expression="patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()" xpath="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))" source=""/>
                    <constraint key="ppc-2" severity="error" human="IF Scope=privacy, there must be a patient" expression="patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()" xpath="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))" source=""/>
                    <constraint key="ppc-3" severity="error" human="IF Scope=research, there must be a patient" expression="patient.exists() or scope.coding.where(system='something' and code='research').exists().not()" xpath="exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))" source=""/>
                    <constraint key="ppc-1" severity="error" human="Either a Policy or PolicyRule" expression="policy.exists() or policyRule.exists()" xpath="exists(f:policy) or exists(f:policyRule)" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifier for this record (external references)</desc>
                    <fhir fid="Consent.identifier" definition="Unique identifier for this copy of the Consent Statement." comment="This identifier identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | proposed | active | rejected | inactive | entered-in-error</desc>
                    <fhir fid="Consent.status" definition="Indicates the current state of this consent." comment="This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid." requirements="The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ConsentState" strength="required" description="Indicates the state of the consent." valueSet="2.16.840.1.113883.4.642.3.755" canonicalUri="http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="HL7 Table 0498 - Consent Status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="scope" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Which of the four areas this resource covers (extensible)</desc>
                    <fhir fid="Consent.scope" definition="A selector of the type of consent being presented: ADR, Privacy, Treatment, Research.  This list is now extensible." isModifier="true" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Consent Scope Codes" strength="extensible" description="The four anticipated uses for the Consent Resource." valueSet="2.16.840.1.113883.4.642.3.761" canonicalUri="http://hl7.org/fhir/ValueSet/consent-scope"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Classification of the consent statement - for indexing/retrieval</desc>
                    <fhir fid="Consent.category" definition="A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Consent Category Codes" strength="extensible" description="A classification of the type of consents found in a consent statement." valueSet="2.16.840.1.113883.4.642.3.751" canonicalUri="http://hl7.org/fhir/ValueSet/consent-category"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="HL7 Table 0497 - Consent Type"/>
                        <mapping identity="rim" map="CNTRCT"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who the consent applies to</desc>
                    <fhir fid="Consent.patient" definition="The patient/healthcare consumer to whom this consent applies." comment="Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map="Role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="dateTime" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When this Consent was created or indexed</desc>
                    <fhir fid="Consent.dateTime" definition="When this  Consent was issued / created / indexed." comment="This is not the time of the original consent, but the time that this statement was made or derived." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="Field 13/ Consent Decision Date"/>
                        <mapping identity="rim" map="FinancialConsent effectiveTime"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who is agreeing to the policy and rules</desc>
                    <fhir fid="Consent.performer" definition="Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions."
                        comment="Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="Field 24/ ConsenterID"/>
                    </fhir>
                </element>
                <element name="organization" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Custodian of the consent</desc>
                    <fhir fid="Consent.organization" definition="The organization that manages the consent, and the framework within which it is executed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <choice name="source[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Source from which this consent is taken</desc>
                    <fhir fid="Consent.source[x]" definition="The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document."
                        comment="The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id." isSummary="true">
                        <type value="Attachment"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Consent"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                        </type>
                        <mapping identity="v2" map="Field 19 Informational Material Supplied Indicator"/>
                    </fhir>
                    <element name="sourceAttachment">
                        <fhir fid="Consent.sourceAttachment">
                            <type value="Attachment"/>
                        </fhir>
                    </element>
                    <element name="sourceReference">
                        <fhir fid="Consent.sourceReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Consent"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                        </fhir>
                    </element>
                </choice>
                <element name="policy" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Policies covered by this consent</desc>
                    <fhir fid="Consent.policy" definition="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="authority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Enforcement source for policy</desc>
                        <fhir fid="Consent.policy.authority" definition="Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="uri" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific policy covered by this consent</desc>
                        <fhir fid="Consent.policy.uri" definition="The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law." comment="This element is for discoverability / documentation and does not modify or qualify the policy rules.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                </element>
                <element name="policyRule" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Regulation that this consents to</desc>
                    <fhir fid="Consent.policyRule" definition="A reference to the specific base computable regulation or policy." comment="If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource." requirements="Might be a unique identifier of a policy set in XACML, or other rules engine." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Consent PolicyRule Codes" strength="extensible" description="Regulatory policy examples." valueSet="2.16.840.1.113883.4.642.3.1014" canonicalUri="http://hl7.org/fhir/ValueSet/consent-policy"/>
                    </fhir>
                </element>
                <element name="verification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Consent Verified by patient or family</desc>
                    <fhir fid="Consent.verification" definition="Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="verified" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Has been verified</desc>
                        <fhir fid="Consent.verification.verified" definition="Has the instruction been verified." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="verifiedWith" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Person who verified</desc>
                        <fhir fid="Consent.verification.verifiedWith" definition="Who verified the instruction (Patient, Relative or other Authorized Person).">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="verificationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When consent verified</desc>
                        <fhir fid="Consent.verification.verificationDate" definition="Date verification was collected.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="provision" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Constraints to the base Consent.policyRule</desc>
                    <fhir fid="Consent.provision" definition="An exception to the base policy of this consent. An exception can be an addition or removal of access permissions." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">deny | permit</desc>
                        <fhir fid="Consent.provision.type" definition="Action  to take - permit or deny - when the rule conditions are met.  Not permitted in root rule, required in all nested rules." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ConsentProvisionType" strength="required" description="How a rule statement is applied, such as adding additional consent or removing consent." valueSet="2.16.840.1.113883.4.642.3.757" canonicalUri="http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Timeframe for this rule</desc>
                        <fhir fid="Consent.provision.period" definition="The timeframe in this rule is valid." isSummary="true">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who|what controlled by this rule (or group, by role)</desc>
                        <fhir fid="Consent.provision.actor" definition="Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="role" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">How the actor is involved</desc>
                            <fhir fid="Consent.provision.actor.role" definition="How the individual is involved in the resources content that is described in the exception.">
                                <type value="CodeableConcept"/>
                                <binding displayName="SecurityRoleType" strength="extensible" description="How an actor is involved in the consent considerations." valueSet="2.16.840.1.113883.4.642.3.978" canonicalUri="http://hl7.org/fhir/ValueSet/security-role-type"/>
                            </fhir>
                        </element>
                        <element name="reference" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Resource for the actor (or group, by role)</desc>
                            <fhir fid="Consent.provision.actor.reference" definition="The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                    <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Actions controlled by this rule</desc>
                        <fhir fid="Consent.provision.action" definition="Actions controlled by this Rule." comment="Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Consent Action Codes" strength="example" description="Detailed codes for the consent action." valueSet="2.16.840.1.113883.4.642.3.753" canonicalUri="http://hl7.org/fhir/ValueSet/consent-action"/>
                        </fhir>
                    </element>
                    <element name="securityLabel" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Security Labels that define affected resources</desc>
                        <fhir fid="Consent.provision.securityLabel" definition="A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception."
                            comment="If the consent specifies a security label of &#34;R&#34; then it applies to all resources that are labeled &#34;R&#34; or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="SecurityLabels" strength="extensible" description="Security Labels from the Healthcare Privacy and Security Classification System." valueSet="2.16.840.1.113883.4.642.3.47" canonicalUri="http://hl7.org/fhir/ValueSet/security-labels"/>
                        </fhir>
                    </element>
                    <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Context of activities covered by this rule</desc>
                        <fhir fid="Consent.provision.purpose" definition="The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule." comment="When the purpose of use tag is on the data, access request purpose of use shall not conflict." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="V3 Value SetPurposeOfUse" strength="extensible" description="What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                        </fhir>
                    </element>
                    <element name="class" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">e.g. Resource Type, Profile, CDA, etc.</desc>
                        <fhir fid="Consent.provision.class" definition="The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to."
                            comment="Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="Consent Content Class" strength="extensible" description="The class (type) of information a consent rule covers." valueSet="2.16.840.1.113883.4.642.3.747" canonicalUri="http://hl7.org/fhir/ValueSet/consent-content-class"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">e.g. LOINC or SNOMED CT code, etc. in the content</desc>
                        <fhir fid="Consent.provision.code" definition="If this code is found in an instance, then the rule applies." comment="Typical use of this is a Document code with class = CDA." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Consent Content Codes" strength="example" description="If this code is found in an instance, then the exception applies." valueSet="2.16.840.1.113883.4.642.3.748" canonicalUri="http://hl7.org/fhir/ValueSet/consent-content-code"/>
                        </fhir>
                    </element>
                    <element name="dataPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Timeframe for data controlled by this rule</desc>
                        <fhir fid="Consent.provision.dataPeriod" definition="Clinical or Operational Relevant period of time that bounds the data controlled by this rule." comment="This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement." isSummary="true">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="data" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Data controlled by this rule</desc>
                        <fhir fid="Consent.provision.data" definition="The resources controlled by this rule if specific resources are referenced." isSummary="true">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="Role"/>
                        </fhir>
                        <element name="meaning" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">instance | related | dependents | authoredby</desc>
                            <fhir fid="Consent.provision.data.meaning" definition="How the resource reference is interpreted when testing consent restrictions." isSummary="true">
                                <type value="code"/>
                                <binding displayName="ConsentDataMeaning" strength="required" description="How a resource reference is interpreted when testing consent restrictions." valueSet="2.16.840.1.113883.4.642.3.759" canonicalUri="http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="reference" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The actual data reference</desc>
                            <fhir fid="Consent.provision.data.reference" definition="A reference to a specific resource that defines which resources are covered by this consent." isSummary="true">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                    <element name="provision" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Nested Exception Rules</desc>
                        <fhir fid="Consent.provision.provision" definition="Rules which provide exceptions to the base rule or subrules."/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.31" name="Contract" displayName="Contract" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Contract">
            <desc language="en-US">Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Contract" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Contract" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Legal Agreement</desc>
                <fhir fid="Contract" definition="Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="rim" map="FinancialContract"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract number</desc>
                    <fhir fid="Contract.identifier" definition="Unique identifier for this Contract or a derivative that references a Source Contract." requirements="This is the business identifier of the contract content conveyed.  It may be a derivative of the legally binding contract, in which case, the identifier of the basal contract is  contained in the Contract.binding referenced Contract."
                        isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="rim" map="FinancialContract id"/>
                    </fhir>
                </element>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Basal definition</desc>
                    <fhir fid="Contract.url" definition="Canonical identifier for this contract, represented as a URI (globally unique)." comment="Used in a domain that uses a supplied contract repository."
                        requirements="An absolute URI that is used to identify this contract when it is referenced in a specification, model, design, instance or a contract derivative; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this plan definition is (or will be) published.">
                        <type value="uri"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business edition</desc>
                    <fhir fid="Contract.version" definition="An edition identifier used for business purposes to label business significant variants."
                        comment="Note -  This is a business versionId, not a resource version id (see discussion http://build.fhir.org/resource.html#versions) &#xD;Comments - There may be different contract instances that have the same identifier but different versions. The version can be appended to the url in a reference to allow a reference to a particular business version of the plan definition with the format [url]|[version]."
                        requirements="The identifier that is used to identify this version of the contract when it is referenced in a specification, model, design, instance, or contract derivative. This is an arbitrary value managed by the contract author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated</desc>
                    <fhir fid="Contract.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the contract as not currently valid or active." requirements="This is the Contract Business Workflow Status." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Contract Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.743" canonicalUri="http://hl7.org/fhir/ValueSet/contract-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="Act.status"/>
                    </fhir>
                </element>
                <element name="legalState" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Negotiation status</desc>
                    <fhir fid="Contract.legalState" definition="Legal states of the formation of a legal instrument, which is a formally executed written document that can be formally attributed to its author, records and formally expresses a legally enforceable act, process, or contractual duty, obligation, or right, and therefore evidences that act, process, or agreement."
                        requirements="The legal state of a contract follows a prescribed flow as defined by the legal community and these state may be indepenedent of the workflow state.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Resource Legal State codes" strength="extensible" description="Detailed codes for the legal state of a contract." valueSet="2.16.840.1.113883.4.642.3.1206" canonicalUri="http://hl7.org/fhir/ValueSet/contract-legalstate"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Source Contract Definition</desc>
                    <fhir fid="Contract.instantiatesCanonical" definition="The URL pointing to a FHIR-defined Contract Definition that is adhered to in whole or part by this Contract.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                        </type>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">External Contract Definition</desc>
                    <fhir fid="Contract.instantiatesUri" definition="The URL pointing to an externally maintained definition that is adhered to in whole or in part by this Contract.">
                        <type value="uri"/>
                    </fhir>
                </element>
                <element name="contentDerivative" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Content derived from the basal information</desc>
                    <fhir fid="Contract.contentDerivative" definition="The minimal content derived from the basal information source at a specific stage in its lifecycle."
                        requirements="In the context of a contract, the information source of the content derivative shall be the information referenced by the contract.binding.&#xD;The Contract Resource may function simply as the computable representation of the executed contract, which may be the attached to the Contract Resource as the “binding” or as the “friendly” electronic form.  For example, a Contract Resource may be automatically populated with the values expressed in a related QuestionnaireResponse. &#xD;However, the Contract Resource may be considered the legally binding contract if it is the only “executed” form of this contract, and includes the signatures as *The Contract Resource may function as the computable representation of an application or offer in a pre-executed Contract if the grantor has not entered any values.  In this case, it is populated with values in a “legal” form of the application or offer or by the values in an associated Questionnaire.  If the grantor has filled in the legal form or the associated Questionnaire Response, then these values are used to populate a pre-executed Contract Resource.&#xD;If the Contract.topic is considered an application or offer, then the policy is often required to be attached as the “legal” basis for the application to ensure “informed consent” to the contract, and that any discrepancy between the application and the policy are interpreted against the policy.  Implementers should check organizational and jurisdictional policies to determine the relationship among multiple representations of a contract pre- and post-execution.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Content Derivation Codes" strength="example" description="This is an example set of Content Derivative type codes, which represent the minimal content derived from the basal information source." valueSet="2.16.840.1.113883.4.642.3.745" canonicalUri="http://hl7.org/fhir/ValueSet/contract-content-derivative"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim"
                            map="Maps partially to several v3 codes: ActClass: REG (registration) Description: Represents the act of maintaining information about the registration of its associated registered subject. The subject can be either an Act or a Role, and includes subjects such as lab exam definitions, drug protocol definitions, prescriptions, persons, patients, practitioners, and equipment.&#xD;The registration may have a unique identifier - separate from the unique identification of the subject - as well as a core set of related participations and act relationships that characterize the registration event and aid in the disposition of the subject information by a receiving system. Observation: VERIF (Verification) Description: An act which describes the process whereby a 'verifying party' validates either the existence of the Role attested to by some Credential or the actual Vetting act and its details. TRFR (transfer) Description: The act of transferring information without the intent of imparting understanding about a topic to the subject that is the recipient or holder of the transferred information where the participation association must be RCV or HLD. _ActDetectedIssueManagementCode [abstract term] Description: Codes dealing with the management of Detected Issue observations. _ActInformationAccessContextCode [abstract term] Description: Concepts conveying the context in which authorization given under jurisdictional law, by organizational policy, or by a patient consent directive permits the collection, access, use or disclosure of specified patient health information. _ActListCode [abstract term]vDescription: Provides codes associated with ActClass value of LIST (working list). RefusalReasonCode [abstract term] Description:&#xD;Description: Identifies why a request to add (or activate) a record is being refused. Examples include the receiving system not able to match the identifier and find that record in the receiving system, having no permission, or a detected issue exists which precludes the requested action."
                        />
                    </fhir>
                </element>
                <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When this Contract was issued</desc>
                    <fhir fid="Contract.issued" definition="When this  Contract was issued." requirements="The Contract issuance dateTime often precedes the Contract effective dateTime." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="rim"
                            map="Act.availabilityTime.  Definition: A time expression specifying when an Observation, Procedure, or other Act occurs, or, depending on the mood, is supposed to occur, scheduled to occur, etc. The activityTime includes the times of component actions (such as preparation and clean-up). For Procedures and SubstanceAdministrations, the activityTime can provide a needed administrative function by providing a more inclusive time to be anticipated in scheduling. UsageNotes:The activityTime is primarily of administrative rather than clinical use. The clinically relevant time is the effectiveTime. When an observation of a prior symptom is made, the activityTime describes the time the observation is made, as opposed to effectiveTime which is the time the symptom is reported to have occurred. Thus the activityTime may be entirely different from the effectiveTime of the same Act. However, even apart from clinical use cases, designers should first consider effectiveTime as the primary relevant time for an Act. ActivityTime indicates when an Act occurs, not when it is recorded."
                        />
                    </fhir>
                </element>
                <element name="applies" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Effective time</desc>
                    <fhir fid="Contract.applies" definition="Relevant time or time-period when this Contract is applicable." requirements="The dateTime upon which the Contract is binding." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="rim" map="Act.effectiveTime Definition: The clinically or operationally relevant time of an act, exclusive of administrative activity."/>
                    </fhir>
                </element>
                <element name="expirationType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Contract cessation cause</desc>
                    <fhir fid="Contract.expirationType" definition="Event resulting in discontinuation or termination of this Contract instance by one or more parties to the contract.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Resource Expiration Type codes" strength="example" description="Codes for the Cessation of Contracts." valueSet="2.16.840.1.113883.4.642.3.1214" canonicalUri="http://hl7.org/fhir/ValueSet/contract-expiration-type"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract Target Entity</desc>
                    <fhir fid="Contract.subject" definition="The target entity impacted by or of interest to parties to the agreement."
                        comment="The Contract.subject is an entity that has some role with respect to the Contract.topic and Contract.topic.term, which is of focal interest to the parties to the contract and likely impacted in a significant way by the Contract.action/Contract.action.reason and the Contract.term.action/Contract.action.reason. &#xD;In many cases, the Contract.subject is a Contract.signer if the subject is an adult; has a legal interest in the contract; and incompetent to participate in the contract agreement."
                        requirements="The Contract.subject is an entity that has some role with respect to the Contract.topic and Contract.topic.term, which is of focal interest to the parties to the contract and likely impacted in a significant way by the Contract.action/Contract.action.reason and the Contract.term.action/Contract.action.reason.  In many cases, the Contract.subject is a Contract.signer if the subject is an adult; has a legal interest in the contract; and incompetent to participate in the contract agreement."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="rim" map="RoleClass, RoleCode"/>
                    </fhir>
                </element>
                <element name="authority" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Authority under which this Contract has standing</desc>
                    <fhir fid="Contract.authority" definition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies."
                        requirements="The governance framework responsible for ensuring compliance with or enforcement of the contract or policy.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map="Organization Role.  CONCEPT DOMAIN: OrganizationEntityType Description: Further classifies entities of EntityClass ORG."/>
                    </fhir>
                </element>
                <element name="domain" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A sphere of control governed by an authoritative jurisdiction, organization, or person</desc>
                    <fhir fid="Contract.domain" definition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources."
                        requirements="The entities bound by governance to comply with the enforcement of contracts or policies by a recognized authority.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim"
                            map="TERR (territory of authority) Description: Relates a place entity (player) as the region over which the scoper (typically an Organization) has certain authority (jurisdiction). For example, the Calgary Regional Health Authority (scoper) has authority over the territory &#34;Region 4 of Alberta&#34; (player) in matters of health.&#xD;Entity Class = Place? A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place might or might not be constant.&#xD;CONCEPT DOMAIN: TerritoryEntityType Description: A territorial entity that may be cited as the body over which an agency exercises jurisdiction, or which defines a sphere in which a party has a particular responsibility. CONCEPT DOMAIN: OrganizationEntityType&#xD;Description: Further classifies entities of EntityClass ORG."
                        />
                    </fhir>
                </element>
                <element name="site" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific Location</desc>
                    <fhir fid="Contract.site" definition="Sites in which the contract is complied with,  exercised, or in force.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Computer friendly designation</desc>
                    <fhir fid="Contract.name" definition="A natural language name identifying this Contract definition, derivative, or instance in any legal state. Provides additional information about its content. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human Friendly name</desc>
                    <fhir fid="Contract.title" definition="A short, descriptive, user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate Friendly name</desc>
                    <fhir fid="Contract.subtitle" definition="An explanatory or alternate user-friendly title for this Contract definition, derivative, or instance in any legal state.t giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="alias" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Acronym or short name</desc>
                    <fhir fid="Contract.alias" definition="Alternative representation of the title for this Contract definition, derivative, or instance in any legal state., e.g., a domain specific contract number related to legislation.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Source of Contract</desc>
                    <fhir fid="Contract.author" definition="The individual or organization that authored the Contract definition, derivative, or instance in any legal state.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="scope" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Range of Legal Concerns</desc>
                    <fhir fid="Contract.scope" definition="A selector of legal concerns for this Contract definition, derivative, or instance in any legal state.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Resource Scope codes" strength="example" description="Codes for the range of legal concerns." valueSet="2.16.840.1.113883.4.642.3.1216" canonicalUri="http://hl7.org/fhir/ValueSet/contract-scope"/>
                    </fhir>
                </element>
                <choice name="topic[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Focus of contract interest</desc>
                    <fhir fid="Contract.topic[x]" definition="Narrows the range of legal concerns to focus on the achievement of specific contractual objectives."
                        requirements="Requirement:  May be used to focus the topic of a Contract definition, derivative, or instance in any legal state.&#xD;Comment: Contractual areas of concern are very broad. This element supports narrowing the area of concern to more specific term topics within this Contract. Given the wide range of contract topics, implementers need to be cognizant of the business use case for which they are designing a FHIR Contract, and narrowly specify the topic being represented with respect to the Contract.type and any specializing Contract.subtype. The same topic, e.g., an asset such as a good or service, such as a real property, medical supply, insurance, information, a procedure or employment, or a manner of conduct, such adherence to a privacy, trust, or security policy, may be the topic of multiple types of contracts. &#xD;One way to determine the Contract.topic is to answer the question: “What is the overall objective of this legal instrument. The Contract.topic is described with more detail by the terms of the Contract.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                    <element name="topicCodeableConcept">
                        <fhir fid="Contract.topicCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="topicReference">
                        <fhir fid="Contract.topicReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </fhir>
                    </element>
                </choice>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Legal instrument category</desc>
                    <fhir fid="Contract.type" definition="A high-level category for the legal instrument, whether constructed as a Contract definition, derivative, or instance in any legal state.  Provides additional information about its content within the context of the Contract's scope to distinguish the kinds of systems that would be interested in the contract." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Type Codes" strength="example" description="List of overall contract codes." valueSet="2.16.840.1.113883.4.642.3.729" canonicalUri="http://hl7.org/fhir/ValueSet/contract-type"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim"
                            map="Maps to multiple ActClass and ActCode Concept Domains and Code Systems such as the following:   In the ActClass Concept Domain: ActClassPolicy. In the ActCode Concept Domain:   ActContractType, which generalizes ActFinancialContractType, ActCoverageType, ActBillingArrangementType.  ActConsentType, which generalizes ActDataConsentType; ActFinancialParticipationConsentType; ActInformationAccessCode; AdvanceBeneficiaryNoticeType.  ActPolicyType, which generalizes: ActPrivacyPolicyType, ActSensitivityPrivacyPolicyType, ActSecurityPolicyType.  In the ActClass Code System:  CNTRCT (contract) Description: An agreement of obligation between two or more parties that is subject to contractual law and enforcement, lwhich generalizes FCNTRCT (financial contract) and COV (coverage).  POLICY (policy) - Description: A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by one party on: The activity of another party; the behavior of another party; or the manner in which an act is executed. LEAF CONCEPTS: JURISPOL (jurisdictional policy) Description:A mandate, regulation, obligation, requirement, rule, or expectation unilaterally imposed by a jurisdiction on: The activity of another party; the behavior of another party; or the manner in which an act is executed.Examples:A jurisdictional mandate regarding the prescribing and dispensing of a particular medication. A jurisdictional privacy or security regulation dictating the manner in which personal health information is disclosed. A jurisdictional requirement that certain services or health conditions are reported to a monitoring program, e.g., immunizations, methadone treatment, or cancer registries.ORGPOL (organizational policy)Examples:A clinical or research protocols imposed by a payer, a malpractice insurer, or an institution to which a provider must adhere. A mandate imposed by a denominational institution for a provider to provide or withhold certain information from the patient about treatment options.SCOPOL (scope of practice policy)Description:An ethical or clinical obligation, requirement, rule, or expectation imposed or strongly encouraged by organizations that oversee particular clinical domains or provider certification which define the boundaries within which a provider may practice and which may have legal basis or ramifications.Examples:An ethical obligation for a provider to fully inform a patient about all treatment options. An ethical obligation for a provider not to disclose personal health information that meets certain criteria, e.g., where disclosure might result in harm to the patient or another person. The set of health care services which a provider is credentialed or privileged to provide. STDPOL (standard of practice policy) Examples:A payer may require a prescribing provider to adhere to formulary guidelines. An institution may adopt clinical guidelines and protocols and implement these within its electronic health record and decision support systems.  CONS (consent)Description: The Consent class represents informed consents and all similar medico-legal transactions between the patient (or his legal guardian) and the provider. Examples are informed consent for surgical procedures, informed consent for clinical trials, advanced beneficiary notice, against medical advice decline from service, release of information agreement, etc.  The details of consents vary. Often an institution has a number of different consent forms for various purposes, including reminding the physician about the topics to mention. Such forms also include patient education material. In electronic medical record communication, consents thus are information-generating acts on their own and need to be managed similar to medical activities. Thus, Consent is modeled as a special class of Act. The &#34;signatures&#34; to the consent document are represented electronically through Participation instances to the consent object. Typically an informed consent has Participation.typeCode of &#34;performer&#34;, the healthcare provider informing the patient, and &#34;consenter&#34;, the patient or legal guardian. Some consent may associate a witness or a notary public (e.g., living wills, advanced directives). In consents where a healthcare provider is not required (e.g. living will), the performer may be the patient himself or a notary public."
                        />
                    </fhir>
                </element>
                <element name="subType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Subtype within the context of type</desc>
                    <fhir fid="Contract.subType" definition="Sub-category for the Contract that distinguishes the kinds of systems that would be interested in the Contract within the context of the Contract's scope." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Contract Subtype Codes" strength="example" description="Detailed codes within the above." valueSet="2.16.840.1.113883.4.642.3.731" canonicalUri="http://hl7.org/fhir/ValueSet/contract-subtype"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim"
                            map="Examples of Contract or Policy subtypes in ActCodes:_ActCoverageTypeCode Definition: Set of codes indicating the type of insurance policy or program that pays for the cost of benefits provided to covered parties. Generalizes:  _ActInsurancePolicyCode;  _ActInsuranceTypeCode; ActProgramTypeCode.  _ActPolicyType  Description:Types of policies that further specify the ActClassPolicy value set. Generalizes: _ActPrivacyPolicy; _ActPrivacyLaw; _InformationSensitivityPolicy; ActTrustPolicyType;  SecurityPolicy.  _ActInvoiceAdjudicationPaymentGroupCode  Description: Codes representing adjustments to a Payment Advice such as retroactive, clawback, garnishee, etc., e.g. RECOV (recovery) Description: Retroactive adjustment such as fee rate adjustment due to contract negotiations."
                        />
                    </fhir>
                </element>
                <element name="contentDefinition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Contract precursor content</desc>
                    <fhir fid="Contract.contentDefinition" definition="Precusory content developed with a focus and intent of supporting the formation a Contract instance, which may be associated with and transformable into a Contract.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Content structure and use</desc>
                        <fhir fid="Contract.contentDefinition.type" definition="Precusory content structure and use, i.e., a boilerplate, template, application for a contract such as an insurance policy or benefits under a program, e.g., workers compensation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contract Resource Definition Type codes" strength="example" description="Detailed codes for the definition of contracts." valueSet="2.16.840.1.113883.4.642.3.1210" canonicalUri="http://hl7.org/fhir/ValueSet/contract-definition-type"/>
                        </fhir>
                    </element>
                    <element name="subType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Detailed Content Type Definition</desc>
                        <fhir fid="Contract.contentDefinition.subType" definition="Detailed Precusory content type.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contract Resource Definition Subtype codes" strength="example" description="Detailed codes for the additional definition of contracts." valueSet="2.16.840.1.113883.4.642.3.1212" canonicalUri="http://hl7.org/fhir/ValueSet/contract-definition-subtype"/>
                        </fhir>
                    </element>
                    <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Publisher Entity</desc>
                        <fhir fid="Contract.contentDefinition.publisher" definition="The  individual or organization that published the Contract precursor content.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="publicationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When published</desc>
                        <fhir fid="Contract.contentDefinition.publicationDate" definition="The date (and optionally time) when the contract was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the contract changes.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="publicationStatus" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated</desc>
                        <fhir fid="Contract.contentDefinition.publicationStatus" definition="amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated.">
                            <type value="code"/>
                            <binding displayName="Contract Resource Publication Status codes" strength="required" description="Status of the publication of contract content." valueSet="2.16.840.1.113883.4.642.3.1208" canonicalUri="http://hl7.org/fhir/ValueSet/contract-publicationstatus|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Publication Ownership</desc>
                        <fhir fid="Contract.contentDefinition.copyright" definition="A copyright statement relating to Contract precursor content. Copyright statements are generally legal restrictions on the use and publishing of the Contract precursor content.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                </element>
                <element name="term" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract Term List</desc>
                    <fhir fid="Contract.term" definition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="RIM mechanism for grouping or nesting rules, which are likely Acts and Observations."/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contract Term Number</desc>
                        <fhir fid="Contract.term.identifier" definition="Unique identifier for this particular Contract Provision." isSummary="true">
                            <type value="Identifier"/>
                            <mapping identity="workflow" map="Request.identifier"/>
                            <mapping identity="rim" map="Act or Observation identifier."/>
                        </fhir>
                    </element>
                    <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contract Term Issue Date Time</desc>
                        <fhir fid="Contract.term.issued" definition="When this Contract Provision was issued." isSummary="true">
                            <type value="dateTime"/>
                            <mapping identity="workflow" map="Request.authoredOn"/>
                            <mapping identity="w5" map="FiveWs.recorded"/>
                            <mapping identity="rim" map="Act availabilityTime"/>
                        </fhir>
                    </element>
                    <element name="applies" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contract Term Effective Time</desc>
                        <fhir fid="Contract.term.applies" definition="Relevant time or time-period when this Contract Provision is applicable." isSummary="true">
                            <type value="Period"/>
                            <mapping identity="workflow" map="Request.occurrence[x]"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                            <mapping identity="rim" map="Act effectiveTime"/>
                        </fhir>
                    </element>
                    <choice name="topic[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Term Concern</desc>
                        <fhir fid="Contract.term.topic[x]" definition="The entity that the term applies to.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                        <element name="topicCodeableConcept">
                            <fhir fid="Contract.term.topicCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="topicReference">
                            <fhir fid="Contract.term.topicReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contract Term Type or Form</desc>
                        <fhir fid="Contract.term.type" definition="A legal clause or condition contained within a contract that requires one or both parties to perform a particular requirement by some specified time or prevents one or both parties from performing a particular requirement by some specified time.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contract Term Type Codes" strength="example" description="Detailed codes for the types of contract provisions." valueSet="2.16.840.1.113883.4.642.3.733" canonicalUri="http://hl7.org/fhir/ValueSet/contract-term-type"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="See Contract.term mapping."/>
                        </fhir>
                    </element>
                    <element name="subType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contract Term Type specific classification</desc>
                        <fhir fid="Contract.term.subType" definition="A specialized legal clause or condition based on overarching contract type.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contract Term Subtype Codes" strength="example" description="Detailed codes for the subtypes of contract provisions." valueSet="2.16.840.1.113883.4.642.3.735" canonicalUri="http://hl7.org/fhir/ValueSet/contract-term-subtype"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="See Contract.topic mapping."/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Term Statement</desc>
                        <fhir fid="Contract.term.text" definition="Statement of a provision in a policy or a contract." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="securityLabel" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Protection for the Term</desc>
                        <fhir fid="Contract.term.securityLabel" definition="Security labels that protect the handling of information about the term and its elements, which may be specifically identified.."
                            requirements="Requirement -  Within a Contract, a security label may apply to the one to many nested group of terms or to a term, whether inside a group or a singleton.  This security label protects the term and its contained provision elements.  The security label on the entire set of term provision elements may be different from the security labels on a contained offer, asset, valuedItem, or data such as sensitive information, and must be the high water mark of all security labels within the term. Rationale is that a labelled term, which may be disaggregated from the Contract, and must persist the label on the term and on contained elements within other contexts. &#xD;Requirement - If more than one policy dictates a level of confidentiality of the term, then each applicable policy may be represented by a security label specific to its requirements.&#xD;Comment - A Security Label is comprised of 1..1 confidentiality code and 0..* other security label codes (aka &#34;privacy tags&#34;. A Security Label is metadata assigned (aka &#34;tagged&#34;) to Resources and Resource elements, which specify the confidentiality and sensitivity of the Resource or element and their related attributes, the purposes for which tagged items may be collected, access, used or disclosed, any limitation on the type of entities authorized to engage in permitted purposes, and handling instructions that obligate or prohibit certain actions on the tagged items.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="number" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Link to Security Labels</desc>
                            <fhir fid="Contract.term.securityLabel.number" definition="Number used to link this term or term element to the applicable Security Label.">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                        <element name="classification" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Confidentiality Protection</desc>
                            <fhir fid="Contract.term.securityLabel.classification" definition="Security label privacy tag that species the level of confidentiality protection required for this term and/or term elements.">
                                <type value="Coding"/>
                                <binding displayName="Contract Resource Scope codes" strength="example" description="Codes for confidentiality protection." valueSet="2.16.840.1.113883.4.642.3.1218" canonicalUri="http://hl7.org/fhir/ValueSet/contract-security-classification"/>
                            </fhir>
                        </element>
                        <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Applicable Policy</desc>
                            <fhir fid="Contract.term.securityLabel.category" definition="Security label privacy tag that species the applicable privacy and security policies governing this term and/or term elements.">
                                <type value="Coding"/>
                                <binding displayName="Contract Resource Scope codes" strength="example" description="Codes for policy category." valueSet="2.16.840.1.113883.4.642.3.1220" canonicalUri="http://hl7.org/fhir/ValueSet/contract-security-category"/>
                            </fhir>
                        </element>
                        <element name="control" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Handling Instructions</desc>
                            <fhir fid="Contract.term.securityLabel.control" definition="Security label privacy tag that species the manner in which term and/or term elements are to be protected.">
                                <type value="Coding"/>
                                <binding displayName="Contract Resource Security Control codes" strength="example" description="Codes for handling instructions." valueSet="2.16.840.1.113883.4.642.3.1222" canonicalUri="http://hl7.org/fhir/ValueSet/contract-security-control"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="offer" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Context of the Contract term</desc>
                        <fhir fid="Contract.term.offer" definition="The matter of concern in the context of this provision of the agrement.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="Document"/>
                        </fhir>
                        <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Offer business ID</desc>
                            <fhir fid="Contract.term.offer.identifier" definition="Unique identifier for this particular Contract Provision.">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="party" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Offer Recipient</desc>
                            <fhir fid="Contract.term.offer.party" definition="Offer Recipient.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="reference" minimumMultiplicity="1" maximumMultiplicity="*">
                                <desc language="en-US">Referenced entity</desc>
                                <fhir fid="Contract.term.offer.party.reference" definition="Participant in the offer.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="role" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Participant engagement type</desc>
                                <fhir fid="Contract.term.offer.party.role" definition="How the party participates in the offer.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Contract Resource Party Role codes" strength="example" description="Codes for offer participant roles." valueSet="2.16.840.1.113883.4.642.3.1224" canonicalUri="http://hl7.org/fhir/ValueSet/contract-party-role"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="topic" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Negotiable offer asset</desc>
                            <fhir fid="Contract.term.offer.topic" definition="The owner of an asset has the residual control rights over the asset: the right to decide all usages of the asset in any way not inconsistent with a prior contract, custom, or law (Hart, 1995, p. 30)."
                                comment="The Contract.topic may be an application for or offer of a policy or service (e.g., uri to a consent directive form or a health insurance policy), which becomes the Contract once accepted by both the grantor and grantee. &#xD;The Contract Resource may function simply as the computable representation of the executed contract, which may be the attached to the Contract Resource as the “binding” or as the “friendly” electronic form.  For example, a Contract Resource may be automatically populated with the values expressed in a related QuestionnaireResponse. &#xD;However, the Contract Resource may be considered the legally binding contract if it is the only “executed” form of this contract, and includes the signatures as *The Contract Resource may function as the computable representation of an application or offer in a pre-executed Contract if the grantor has not entered any values.  In this case, it is populated with values in a “legal” form of the application or offer or by the values in an associated Questionnaire.  If the grantor has filled in the legal form or the associated Questionnaire Response, then these values are used to populate a pre-executed Contract Resource.&#xD;If the Contract.topic is considered an application or offer, then the policy is often required to be attached as the “legal” basis for the application to ensure “informed consent” to the contract, and that any discrepancy between the application and the policy are interpreted against the policy.  Implementers should check organizational and jurisdictional policies to determine the relationship among multiple representations of a contract pre- and post-execution."
                                requirements="In the context of a contract, the topic is the matter under consideration in regards to which specific rights, privileges, obligations, restrictions, and prohibitions are binding on any grantor and grantee parties upon the execution of the contract. &#xD;Given the wide range of contract topics, implementers need to be cognizant of the business use case for which they are designing a FHIR Contract, and narrowly specify the topic being represented with respect to the Contract.type and any specializing Contract.subtype. &#xD;The same topic, e.g., an asset such as a good or service, such as a real property, medical supply, insurance, information, a procedure or employment, or a manner of conduct, such adherence to a privacy, trust, or security policy, may be the topic of multiple types of contracts. &#xD;One way to determine the Contract.topic is to answer the question: “What is the object of negotiation?”&#xD;Answer: The Contract.topic, which may be described with more detail in the [0..*]Contract.valuedItem @ [0..1] Contract.valuedItem.entity[x] Definition: Specific type of Contract Valued Item that may be priced. CodeableConcept|Reference(Any)&#xD;Contract.topic is “the what” that a grantor is exchanging with a grantee in return for some benefit. &#xD;Contract.topic is “the what” to which any Contract.action is being applied for any stipulated Contract.action.reason. &#xD;AContract.topic is “the what” governed by the execution of the contract to which any party’s rights, privileges, obligations, restrictions, and prohibitions apply."
                                isSummary="true">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                                <mapping identity="workflow" map="Event.context"/>
                                <mapping identity="rim"
                                    map="Includes many ActClass, ActCode, RoleClass, RoleCode, EntityClass, EntityCode, ParticipationType codes from HL7 concept domains and code systems. For example, RoleCode: HLD (held entity) Description: Entity that is currently in the possession of a holder (scoper), who holds, or uses it, usually based on some agreement with the owner. MANU (manufactured product) Description: Scoped by the manufacturer. OWN (owned entity) Description: An Entity (player) for which someone (scoper) is granted by law the right to call the material (player) his own. This entitles the scoper to make decisions about the disposition of that material. WRTE (warranted product) Description:&#xD;A role a product plays when a guarantee is given to the purchaser by the seller (scoping entity) stating that the product is reliable and free from known defects and that the seller will repair or replace defective parts within a given time limit and under certain conditions."
                                />
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Contract Offer Type or Form</desc>
                            <fhir fid="Contract.term.offer.type" definition="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Term Type Codes" strength="example" description="Detailed codes for the types of contract provisions." valueSet="2.16.840.1.113883.4.642.3.733" canonicalUri="http://hl7.org/fhir/ValueSet/contract-term-type"/>
                                <mapping identity="w5" map="FiveWs.what[x]"/>
                                <mapping identity="rim" map="See Contract.term mapping."/>
                            </fhir>
                        </element>
                        <element name="decision" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Accepting party choice</desc>
                            <fhir fid="Contract.term.offer.decision" definition="Type of choice made by accepting party with respect to an offer made by an offeror/ grantee."
                                requirements="In some policy or contract contexts, the &#34;offer&#34; is made by an offeror wishing to be the &#34;grantee&#34; of the offer topic by the grantor.  From this perspective, the grantor is the &#34;offeree&#34;.">
                                <type value="CodeableConcept"/>
                                <binding displayName="V3 Value SetActConsentDirective" strength="extensible" description="The type of decision made by a grantor with respect to an offer made by a grantee." valueSet="2.16.840.1.113883.1.11.20425" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActConsentDirective"/>
                                <mapping identity="w5" map="FiveWs.what[x]"/>
                                <mapping identity="rim"
                                    map="ActCode: _ActConsentDirective [abstract term] Description: Specifies the type of agreement between one or more grantor and grantee in which rights and obligations related to one or more shared items of interest are allocated. Usage Note: Such agreements may be considered &#34;consent directives&#34; or &#34;contracts&#34; depending on the context, and are considered closely related or synonymous from a legal perspective."
                                />
                            </fhir>
                        </element>
                        <element name="decisionMode" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">How decision is conveyed</desc>
                            <fhir fid="Contract.term.offer.decisionMode" definition="How the decision about a Contract was conveyed.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Decision Mode codes" strength="example" description="Codes for conveying a decision." valueSet="2.16.840.1.113883.4.642.3.1291" canonicalUri="http://hl7.org/fhir/ValueSet/contract-decision-mode"/>
                            </fhir>
                        </element>
                        <element name="answer" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Response to offer text</desc>
                            <fhir fid="Contract.term.offer.answer" definition="Response to offer text.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">The actual answer response</desc>
                                <fhir fid="Contract.term.offer.answer.value[x]" definition="Response to an offer clause or question text,  which enables selection of values to be agreed to, e.g., the period of participation, the date of occupancy of a rental, warrently duration, or whether biospecimen may be used for further research.">
                                    <type value="boolean"/>
                                    <type value="decimal"/>
                                    <type value="integer"/>
                                    <type value="date"/>
                                    <type value="dateTime"/>
                                    <type value="time"/>
                                    <type value="string"/>
                                    <type value="uri"/>
                                    <type value="Attachment"/>
                                    <type value="Coding"/>
                                    <type value="Quantity"/>
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                    </type>
                                </fhir>
                                <element name="valueBoolean">
                                    <fhir fid="Contract.term.offer.answer.valueBoolean">
                                        <type value="boolean"/>
                                    </fhir>
                                </element>
                                <element name="valueDecimal">
                                    <fhir fid="Contract.term.offer.answer.valueDecimal">
                                        <type value="decimal"/>
                                    </fhir>
                                </element>
                                <element name="valueInteger">
                                    <fhir fid="Contract.term.offer.answer.valueInteger">
                                        <type value="integer"/>
                                    </fhir>
                                </element>
                                <element name="valueDate">
                                    <fhir fid="Contract.term.offer.answer.valueDate">
                                        <type value="date"/>
                                    </fhir>
                                </element>
                                <element name="valueDateTime">
                                    <fhir fid="Contract.term.offer.answer.valueDateTime">
                                        <type value="dateTime"/>
                                    </fhir>
                                </element>
                                <element name="valueTime">
                                    <fhir fid="Contract.term.offer.answer.valueTime">
                                        <type value="time"/>
                                    </fhir>
                                </element>
                                <element name="valueString">
                                    <fhir fid="Contract.term.offer.answer.valueString">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="valueUri">
                                    <fhir fid="Contract.term.offer.answer.valueUri">
                                        <type value="uri"/>
                                    </fhir>
                                </element>
                                <element name="valueAttachment">
                                    <fhir fid="Contract.term.offer.answer.valueAttachment">
                                        <type value="Attachment"/>
                                    </fhir>
                                </element>
                                <element name="valueCoding">
                                    <fhir fid="Contract.term.offer.answer.valueCoding">
                                        <type value="Coding"/>
                                    </fhir>
                                </element>
                                <element name="valueQuantity">
                                    <fhir fid="Contract.term.offer.answer.valueQuantity">
                                        <type value="Quantity"/>
                                    </fhir>
                                </element>
                                <element name="valueReference">
                                    <fhir fid="Contract.term.offer.answer.valueReference">
                                        <type value="Reference"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                    </fhir>
                                </element>
                            </choice>
                        </element>
                        <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Human readable offer text</desc>
                            <fhir fid="Contract.term.offer.text" definition="Human readable form of this Contract Offer.">
                                <type value="string"/>
                                <mapping identity="rim" map="Document.text"/>
                            </fhir>
                        </element>
                        <element name="linkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to text</desc>
                            <fhir fid="Contract.term.offer.linkId" definition="The id of the clause or question text of the offer in the referenced questionnaire/response.">
                                <type value="string"/>
                                <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target[classCode=OBS, moodCode=DEFN].id"/>
                            </fhir>
                        </element>
                        <element name="securityLabelNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Offer restriction numbers</desc>
                            <fhir fid="Contract.term.offer.securityLabelNumber" definition="Security labels that protects the offer.">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="asset" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Contract Term Asset List</desc>
                        <fhir fid="Contract.term.asset" definition="Contract Term Asset List.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="FinancialContract.paymentTermsCode"/>
                        </fhir>
                        <element name="scope" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Range of asset</desc>
                            <fhir fid="Contract.term.asset.scope" definition="Differentiates the kind of the asset .">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Asset Scope codes" strength="example" description="Codes for scoping an asset." valueSet="2.16.840.1.113883.4.642.3.1293" canonicalUri="http://hl7.org/fhir/ValueSet/contract-assetscope"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Asset category</desc>
                            <fhir fid="Contract.term.asset.type" definition="Target entity type about which the term may be concerned.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Asset Type codes" strength="example" description="Condes for the type of an asset." valueSet="2.16.840.1.113883.4.642.3.1299" canonicalUri="http://hl7.org/fhir/ValueSet/contract-assettype"/>
                            </fhir>
                        </element>
                        <element name="typeReference" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Associated entities</desc>
                            <fhir fid="Contract.term.asset.typeReference" definition="Associated entities.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="subtype" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Asset sub-category</desc>
                            <fhir fid="Contract.term.asset.subtype" definition="May be a subtype or part of an offered asset.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Asset Sub-Type codes" strength="example" description="Condes for the sub-type of an asset." valueSet="2.16.840.1.113883.4.642.3.1301" canonicalUri="http://hl7.org/fhir/ValueSet/contract-assetsubtype"/>
                            </fhir>
                        </element>
                        <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Kinship of the asset</desc>
                            <fhir fid="Contract.term.asset.relationship" definition="Specifies the applicability of the term to an asset resource instance, and instances it refers to orinstances that refer to it, and/or are owned by the offeree.">
                                <type value="Coding"/>
                                <binding displayName="Consent Content Class" strength="extensible" description="The class (type) of information a consent rule covers." valueSet="2.16.840.1.113883.4.642.3.747" canonicalUri="http://hl7.org/fhir/ValueSet/consent-content-class"/>
                                <mapping identity="rim" map="FinancialContract.code"/>
                            </fhir>
                        </element>
                        <element name="context" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Circumstance of the asset</desc>
                            <fhir fid="Contract.term.asset.context" definition="Circumstance of the asset.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Creator,custodian or owner</desc>
                                <fhir fid="Contract.term.asset.context.reference" definition="Asset context reference may include the creator, custodian, or owning Person or Organization (e.g., bank, repository),  location held, e.g., building,  jurisdiction.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Codeable asset context</desc>
                                <fhir fid="Contract.term.asset.context.code" definition="Coded representation of the context generally or of the Referenced entity, such as the asset holder type or location.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Contract Resource Asset Context codes" strength="example" description="Codes for the context of the asset." valueSet="2.16.840.1.113883.4.642.3.1297" canonicalUri="http://hl7.org/fhir/ValueSet/contract-assetcontext"/>
                                </fhir>
                            </element>
                            <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Context description</desc>
                                <fhir fid="Contract.term.asset.context.text" definition="Context description.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="condition" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Quality desctiption of asset</desc>
                            <fhir fid="Contract.term.asset.condition" definition="Description of the quality and completeness of the asset that imay be a factor in its valuation.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="periodType" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Asset availability types</desc>
                            <fhir fid="Contract.term.asset.periodType" definition="Type of Asset availability for use or ownership.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Asset Availiability codes" strength="example" description="Codes for asset availability." valueSet="2.16.840.1.113883.4.642.3.1295" canonicalUri="http://hl7.org/fhir/ValueSet/asset-availability"/>
                                <mapping identity="rim" map="FinancialContract.code"/>
                            </fhir>
                        </element>
                        <element name="period" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Time period of the asset</desc>
                            <fhir fid="Contract.term.asset.period" definition="Asset relevant contractual time period.">
                                <type value="Period"/>
                                <mapping identity="rim" map="FinancialContract.activityTime"/>
                            </fhir>
                        </element>
                        <element name="usePeriod" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Time period</desc>
                            <fhir fid="Contract.term.asset.usePeriod" definition="Time period of asset use.">
                                <type value="Period"/>
                                <mapping identity="rim" map="FinancialContract.effectiveTime"/>
                            </fhir>
                        </element>
                        <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Asset clause or question text</desc>
                            <fhir fid="Contract.term.asset.text" definition="Clause or question text (Prose Object) concerning the asset in a linked form, such as a QuestionnaireResponse used in the formation of the contract.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="linkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to asset text</desc>
                            <fhir fid="Contract.term.asset.linkId" definition="Id [identifier??] of the clause or question text about the asset in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="answer" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Response to assets</desc>
                            <fhir fid="Contract.term.asset.answer" definition="Response to assets."/>
                        </element>
                        <element name="securityLabelNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Asset restriction numbers</desc>
                            <fhir fid="Contract.term.asset.securityLabelNumber" definition="Security labels that protects the asset.">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                        <element name="valuedItem" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Contract Valued Item List</desc>
                            <fhir fid="Contract.term.asset.valuedItem" definition="Contract Valued Item List.">
                                <type value="BackboneElement"/>
                                <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem classCode INVE"/>
                            </fhir>
                            <choice name="entity[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item Type</desc>
                                <fhir fid="Contract.term.asset.valuedItem.entity[x]" definition="Specific type of Contract Valued Item that may be priced.">
                                    <type value="CodeableConcept"/>
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                    </type>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem code"/>
                                </fhir>
                                <element name="entityCodeableConcept">
                                    <fhir fid="Contract.term.asset.valuedItem.entityCodeableConcept">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="entityReference">
                                    <fhir fid="Contract.term.asset.valuedItem.entityReference">
                                        <type value="Reference"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                    </fhir>
                                </element>
                            </choice>
                            <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item Number</desc>
                                <fhir fid="Contract.term.asset.valuedItem.identifier" definition="Identifies a Contract Valued Item instance.">
                                    <type value="Identifier"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem id"/>
                                </fhir>
                            </element>
                            <element name="effectiveTime" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item Effective Tiem</desc>
                                <fhir fid="Contract.term.asset.valuedItem.effectiveTime" definition="Indicates the time during which this Contract ValuedItem information is effective.">
                                    <type value="dateTime"/>
                                    <mapping identity="w5" map="FiveWs.done[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem effectiveTime"/>
                                </fhir>
                            </element>
                            <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Count of Contract Valued Items</desc>
                                <fhir fid="Contract.term.asset.valuedItem.quantity" definition="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.">
                                    <type value="Quantity"/>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem unitQuantity"/>
                                </fhir>
                            </element>
                            <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item fee, charge, or cost</desc>
                                <fhir fid="Contract.term.asset.valuedItem.unitPrice" definition="A Contract Valued Item unit valuation measure.">
                                    <type value="Money"/>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem unitPriceAmt"/>
                                </fhir>
                            </element>
                            <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item Price Scaling Factor</desc>
                                <fhir fid="Contract.term.asset.valuedItem.factor" definition="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.">
                                    <type value="decimal"/>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem factorNumber"/>
                                </fhir>
                            </element>
                            <element name="points" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Contract Valued Item Difficulty Scaling Factor</desc>
                                <fhir fid="Contract.term.asset.valuedItem.points" definition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.">
                                    <type value="decimal"/>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem pointNumber"/>
                                </fhir>
                            </element>
                            <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Total Contract Valued Item Value</desc>
                                <fhir fid="Contract.term.asset.valuedItem.net" definition="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number  * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.">
                                    <type value="Money"/>
                                    <mapping identity="w5" map="FiveWs.what[x]"/>
                                    <mapping identity="rim" map="COCT_RM440000UV09 ValuedItem netAmt"/>
                                </fhir>
                            </element>
                            <element name="payment" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Terms of valuation</desc>
                                <fhir fid="Contract.term.asset.valuedItem.payment" definition="Terms of valuation.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="paymentDate" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">When payment is due</desc>
                                <fhir fid="Contract.term.asset.valuedItem.paymentDate" definition="When payment is due.">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Who will make payment</desc>
                                <fhir fid="Contract.term.asset.valuedItem.responsible" definition="Who will make payment.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Who will receive payment</desc>
                                <fhir fid="Contract.term.asset.valuedItem.recipient" definition="Who will receive payment.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="linkId" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Pointer to specific item</desc>
                                <fhir fid="Contract.term.asset.valuedItem.linkId" definition="Id  of the clause or question text related to the context of this valuedItem in the referenced form or QuestionnaireResponse.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="securityLabelNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Security Labels that define affected terms</desc>
                                <fhir fid="Contract.term.asset.valuedItem.securityLabelNumber" definition="A set of security labels that define which terms are controlled by this condition.">
                                    <type value="unsignedInt"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                    <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Entity being ascribed responsibility</desc>
                        <fhir fid="Contract.term.action" definition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place."
                            comment="Several agents may be associated (i.e. has some responsibility for an activity) with an activity and vice-versa.&#xD;For example, in cases of actions initiated by one user for other users, or in events that involve more than one user, hardware device, software, or system process. However, only one user may be the initiator/requestor for the event."
                            requirements="An agent can be a person, an organization, software, device, or other entities that may be ascribed responsibility.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="Participation"/>
                        </fhir>
                        <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">True if the term prohibits the action</desc>
                            <fhir fid="Contract.term.action.doNotPerform" definition="True if the term prohibits the  action." isModifier="true">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type or form of the action</desc>
                            <fhir fid="Contract.term.action.type" definition="Activity or service obligation to be done or not done, performed or not performed, effectuated or not by this Contract term.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Action Codes" strength="example" description="Detailed codes for the contract action." valueSet="2.16.840.1.113883.4.642.3.739" canonicalUri="http://hl7.org/fhir/ValueSet/contract-action"/>
                                <mapping identity="workflow" map="Request.performer"/>
                                <mapping identity="rim" map="RIM Role, Participation Type classes"/>
                            </fhir>
                        </element>
                        <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Entity of the action</desc>
                            <fhir fid="Contract.term.action.subject" definition="Entity of the action.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="reference" minimumMultiplicity="1" maximumMultiplicity="*">
                                <desc language="en-US">Entity of the action</desc>
                                <fhir fid="Contract.term.action.subject.reference" definition="The entity the action is performed or not performed on or for.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Role type of the agent</desc>
                                <fhir fid="Contract.term.action.subject.role" definition="Role type of agent assigned roles in this Contract.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Contract Actor Role Codes" strength="example" description="Detailed codes for the contract actor role." valueSet="2.16.840.1.113883.4.642.3.741" canonicalUri="http://hl7.org/fhir/ValueSet/contract-actorrole"/>
                                    <mapping identity="rim" map="RoleClass, RoleCode, ParticipationType, ParticipationFunction codes"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Purpose for the Contract Term Action</desc>
                            <fhir fid="Contract.term.action.intent" definition="Reason or purpose for the action stipulated by this Contract Provision.">
                                <type value="CodeableConcept"/>
                                <binding displayName="V3 Value SetPurposeOfUse" strength="example" description="Detailed codes for the contract action reason." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                                <mapping identity="workflow" map="Request.reasonCode"/>
                                <mapping identity="w5" map="FiveWs.why[x]"/>
                                <mapping identity="rim"
                                    map="Examples from ActReason Concept Domains: ActCoverageReason Description:Codes used to specify reasons or criteria relating to coverage provided under a policy or program. May be used to convey reasons pertaining to coverage contractual provisions, including criteria for eligibility, coverage limitations, coverage maximums, or financial participation required of covered parties. ActInformationPrivacyReason Description: The rationale or purpose for an act relating to the management of personal information, such as disclosing personal tax information for the purpose of complying with a court order. ClinicalResearchObservationReason Definition: Specifies the reason that a test was performed or observation collected in a clinical research study. SafetyInvestigationReportReasonType Description: Possible reasons generating a report providing information developed during the investigation of an adverse event or a product problem. ControlActReason Description: Indicates the motivation, cause or rationale of an Act which results in a trigger event.  NonPerformanceReasonCode Description: The reason the action was not performed, e.g. why the medication was not taken. If an action was not performed, it is often clinically important to know why the action was not taken. RefusalReasonCode Description: Identifies why a request to add (or activate) a record is being refused. Examples include the receiving system not able to match the identifier and find that record in the receiving system, having no permission, or a detected issue exists which precludes the requested action.&#xD;&#xD;&#xD;&#xD;&#xD;&#xD;&#xD;&#xD;Examples from HL7 ActReason Code System: QUALIMP (quality improvement) Description:Operational activities conducted for the purposes of improving the quality of an activity, product, or service. _PatientProfileQueryReasonCode Description: A collection of concepts identifying why the patient's profile is being queried. _ActInformationManagementReason Description:The rationale or purpose for an act relating to information management, such as archiving information for the purpose of complying with an enterprise data retention policy. _ActInvalidReason (ActInvalidReason) Description: Types of reasons why a substance is invalid for use. _NonPerformanceReasonCode Description: The reason the action wasn't performed, e.g. why the medication was not taken. If an action wasn&#34;t performed, it is often clinically important to know why the action wasn&#34;t taken."
                                />
                            </fhir>
                        </element>
                        <element name="linkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to specific item</desc>
                            <fhir fid="Contract.term.action.linkId" definition="Id [identifier??] of the clause or question text related to this action in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">State of the action</desc>
                            <fhir fid="Contract.term.action.status" definition="Current state of the term action.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Contract Resource Action Status codes" strength="example" description="Codes for the status of an term action." valueSet="2.16.840.1.113883.4.642.3.1303" canonicalUri="http://hl7.org/fhir/ValueSet/contract-actionstatus"/>
                            </fhir>
                        </element>
                        <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Episode associated with action</desc>
                            <fhir fid="Contract.term.action.context" definition="Encounter or Episode with primary association to specified term activity.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="contextLinkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to specific item</desc>
                            <fhir fid="Contract.term.action.contextLinkId" definition="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">When action happens</desc>
                            <fhir fid="Contract.term.action.occurrence[x]" definition="When action happens.">
                                <type value="dateTime"/>
                                <type value="Period"/>
                                <type value="Timing"/>
                            </fhir>
                            <element name="occurrenceDateTime">
                                <fhir fid="Contract.term.action.occurrenceDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="occurrencePeriod">
                                <fhir fid="Contract.term.action.occurrencePeriod">
                                    <type value="Period"/>
                                </fhir>
                            </element>
                            <element name="occurrenceTiming">
                                <fhir fid="Contract.term.action.occurrenceTiming">
                                    <type value="Timing"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="requester" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Who asked for action</desc>
                            <fhir fid="Contract.term.action.requester" definition="Who or what initiated the action and has responsibility for its activation.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="requesterLinkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to specific item</desc>
                            <fhir fid="Contract.term.action.requesterLinkId" definition="Id [identifier??] of the clause or question text related to the requester of this action in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="performerType" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Kind of service performer</desc>
                            <fhir fid="Contract.term.action.performerType" definition="The type of individual that is desired or required to perform or not perform the action.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Provenance participant type" strength="example" description="Codes for the types of action perfomer." valueSet="2.16.840.1.113883.4.642.3.1003" canonicalUri="http://hl7.org/fhir/ValueSet/provenance-agent-type"/>
                            </fhir>
                        </element>
                        <element name="performerRole" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Competency of the performer</desc>
                            <fhir fid="Contract.term.action.performerRole" definition="The type of role or competency of an individual desired or required to perform or not perform the action.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Provenance participant role" strength="example" description="Codes for the role of the action performer." valueSet="2.16.840.1.113883.4.642.3.1305" canonicalUri="http://hl7.org/fhir/ValueSet/provenance-agent-role"/>
                            </fhir>
                        </element>
                        <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Actor that wil execute (or not) the action</desc>
                            <fhir fid="Contract.term.action.performer" definition="Indicates who or what is being asked to perform (or not perform) the ction.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="performerLinkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to specific item</desc>
                            <fhir fid="Contract.term.action.performerLinkId" definition="Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Why is action (not) needed?</desc>
                            <fhir fid="Contract.term.action.reasonCode" definition="Rationale for the action to be performed or not performed. Describes why the action is permitted or prohibited.">
                                <type value="CodeableConcept"/>
                                <binding displayName="V3 Value SetPurposeOfUse" strength="example" description="Detailed codes for the contract action reason." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                            </fhir>
                        </element>
                        <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Why is action (not) needed?</desc>
                            <fhir fid="Contract.term.action.reasonReference" definition="Indicates another resource whose existence justifies permitting or not permitting this action.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="reason" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Why action is to be performed</desc>
                            <fhir fid="Contract.term.action.reason" definition="Describes why the action is to be performed or not performed in textual form.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="reasonLinkId" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Pointer to specific item</desc>
                            <fhir fid="Contract.term.action.reasonLinkId" definition="Id [identifier??] of the clause or question text related to the reason type or reference of this  action in the referenced form or QuestionnaireResponse.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Comments about the action</desc>
                            <fhir fid="Contract.term.action.note" definition="Comments made about the term action made by the requester, performer, subject or other participants.">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                        <element name="securityLabelNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Action restriction numbers</desc>
                            <fhir fid="Contract.term.action.securityLabelNumber" definition="Security labels that protects the action.">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="group" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Nested Contract Term Group</desc>
                        <fhir fid="Contract.term.group" definition="Nested group of Contract Provisions.">
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="RIM Grouping or Nesting mechanisms"/>
                        </fhir>
                    </element>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Extra Information</desc>
                    <fhir fid="Contract.supportingInfo" definition="Information that may be needed by/relevant to the performer in their execution of this term action.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                </element>
                <element name="relevantHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Key event in Contract History</desc>
                    <fhir fid="Contract.relevantHistory"
                        definition="Links to Provenance records for past versions of this Contract definition, derivative, or instance, which identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the Contract.  The Provence.entity indicates the target that was changed in the update. http://build.fhir.org/provenance-definitions.html#Provenance.entity.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                    </fhir>
                </element>
                <element name="signer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract Signatory</desc>
                    <fhir fid="Contract.signer" definition="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness."
                        comment="Signers who are principal parties to the contract are bound by the Contract.activity related to the Contract.topic, and the Contract.term(s), which either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions, action reason, or agents with respect to some or all of the topic.&#xD;For example, specifying how policies or obligations shall constrain actions and action reasons permitted or denied on all or a subset of the Contract.topic (e.g., all or a portion of property being transferred by the contract), agents (e.g., who can resell, assign interests, or alter the property being transferred by the contract), actions, and action reasons; or with respect to Contract.terms, stipulating, extending, or limiting the Contract.period of applicability or valuation of items under consideration."
                        requirements="The Contract.signer applies a signature to the Contract.binding referenced resource, which is the documentation that is the legal &#34;source of truth&#34;. The Contract.signer may delegate, such as a legally recognized personal representative, or have a delegate assigned e.g., by a court of law, to actually sign the Contract, such as a trustee in the case of incompetence.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="Participation"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Contract Signatory Role</desc>
                        <fhir fid="Contract.signer.type" definition="Role of this Contract signer, e.g. notary, grantee.">
                            <type value="Coding"/>
                            <binding displayName="Contract Signer Type Codes" strength="preferred" description="List of parties who may be signing." valueSet="2.16.840.1.113883.4.642.3.737" canonicalUri="http://hl7.org/fhir/ValueSet/contract-signer-type"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="rim" map="RoleClass, RoleCode, ParticipationType, ParticipationFunction class codes."/>
                        </fhir>
                    </element>
                    <element name="party" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Contract Signatory Party</desc>
                        <fhir fid="Contract.signer.party" definition="Party which is a signator to this Contract.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="workflow" map="Request.requester"/>
                            <mapping identity="w5" map="FiveWs.author"/>
                            <mapping identity="rim" map="Role Class"/>
                        </fhir>
                    </element>
                    <element name="signature" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Contract Documentation Signature</desc>
                        <fhir fid="Contract.signer.signature" definition="Legally binding Contract DSIG signature contents in Base64.">
                            <type value="Signature"/>
                            <mapping identity="w5" map="FiveWs.author"/>
                            <mapping identity="rim"
                                map="Participation.signatureCode :: CD (0..1) Definition: Whether the participant has attested participation through a signature, or whether such a signature is needed. Examples: A surgical Procedure act object (representing a procedure report) requires a signature of the performing and responsible surgeon, and possibly other participants; The participant intends to provide a signature.  Participation.signatureText :: ED (0..1) Definition: A textual or multimedia depiction of the signature by which the participant endorses and accepts responsibility for his or her participation in the Act as specified in the Participation.typeCode. UsageNotes: The signature can be represented either inline or by reference according to the ED data type. Typical cases are &#xD;1) Paper-based signatures: the ED data type may refer to a document or other resource that can be retrieved through an electronic interface to a hardcopy archive. 2) Electronic signature: this attribute can represent virtually any electronic signature scheme. 3) Digital signature: this attribute can represent digital signatures by reference to a signature data block that is constructed in accordance to a digital signature standard, such as XML-DSIG, PKCS#7, PGP, etc. Examples: 1) An &#34;author&#34; participant assumes accountability for the truth of the Act statement to the best of his knowledge. 2) An information recipient only attests to the fact that he or she has received the information."
                            />
                        </fhir>
                    </element>
                </element>
                <element name="friendly" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract Friendly Language</desc>
                    <fhir fid="Contract.friendly"
                        definition="The &#34;patient friendly language&#34; versionof the Contract in whole or in parts. &#34;Patient friendly language&#34; means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="LanguageCommunication"/>
                    </fhir>
                    <choice name="content[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Easily comprehended representation of this Contract</desc>
                        <fhir fid="Contract.friendly.content[x]" definition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.">
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="Act.text Definition: A renderable textual or multimedia description (or reference to a description) of the complete information which would reasonably be expected to be displayed to a human reader conveyed by the Act."/>
                        </fhir>
                        <element name="contentAttachment">
                            <fhir fid="Contract.friendly.contentAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="contentReference">
                            <fhir fid="Contract.friendly.contentReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="legal" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract Legal Language</desc>
                    <fhir fid="Contract.legal" definition="List of Legal expressions or representations of this Contract.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="LanguageCommunication"/>
                    </fhir>
                    <choice name="content[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Contract Legal Text</desc>
                        <fhir fid="Contract.legal.content[x]" definition="Contract legal text in human renderable form.">
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="Example: Act.text of an Act coded as with ActPrivacyLaw, ActPolicy code"/>
                        </fhir>
                        <element name="contentAttachment">
                            <fhir fid="Contract.legal.contentAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="contentReference">
                            <fhir fid="Contract.legal.contentReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="rule" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Computable Contract Language</desc>
                    <fhir fid="Contract.rule" definition="List of Computable Policy Rule Language Representations of this Contract.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="LanguageCommunication"/>
                    </fhir>
                    <choice name="content[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Computable Contract Rules</desc>
                        <fhir fid="Contract.rule.content[x]" definition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).">
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim"
                                map="Computable Policy Consent [Observation: templateId 2.16.840.1.113883.3.445.16] This template is used to represent an alternative representation of the Privacy Consent Directive (e.g.,ODRL, XrML, XACML) as a computer-readable set of rules. An implementation may use any appropriate representations of the privacy consent in addition to the &#34;ConsentDirectiveStructuredDefinition&#34; which uses the Clinical Template structure to express the elements of a consent directive in an interoperable way.&#xD;1. SHALL contain exactly one [1..1] templateId ( CONF-CD-16 ) such that it&#xD;a. SHALL contain exactly one [1..1] @root=&#34;2.16.840.1.113883.3.445.16&#34;&#xD;2. SHALL contain exactly one [1..1] @moodCode=&#34;DEF&#34; (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:14912)&#xD;3. SHALL contain exactly one [1..1] code (CONF:9139)/@code=&#34;57016-8&#34; Privacy Policy Acknowledgement Document (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:9138)&#xD;It specifies the LOINC code corresponding to &#34;Privacy Policy Acknowledgement Document&#34;, it is fixed at this value.&#xD;4. SHOULD contain zero or more [0..*] value with @xsi:type=&#34;ANY&#34; (CONF:9140) The value contains the computable representation of the policy. This may be a standard-based access control or attribute control based policy (See&#xD;&#34;References&#34;). Computable Policy Consent example&#xD;&lt;!-- Sample computable policy language representation --&gt;&#xD;&lt;entryRelationship typeCode=&#34;COMP&#34;&gt;&#xD;&lt;templateId root=&#34;2.16.840.1.113883.3.445.16&#34; /&gt;&#xD;&lt;observationMedia classCode=&#34;OBS&#34; moodCode=&#34;EVN&#34;&gt;&#xD;&lt;value mediaType=&#34;text/xml&#34; representation=&#34;TXT&#34;&gt; ... &lt;/value&gt;&#xD;&lt;/observationMedia&gt;&#xD;&lt;/entryRelationship&gt;"
                            />
                        </fhir>
                        <element name="contentAttachment">
                            <fhir fid="Contract.rule.contentAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="contentReference">
                            <fhir fid="Contract.rule.contentReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <choice name="legallyBinding[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Binding Contract</desc>
                    <fhir fid="Contract.legallyBinding[x]" definition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the &#34;source of truth&#34; and which would be the basis for legal action related to enforcement of this Contract.">
                        <type value="Attachment"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                        </type>
                        <mapping identity="rim"
                            map="DocumentCompletion code system AU (authenticated) Description: A completion status in which a document has been signed manually or electronically by one or more individuals who attest to its accuracy. No explicit determination is made that the assigned individual has performed the authentication. While the standard allows multiple instances of authentication, it would be typical to have a single instance of authentication, usually by the assigned individual."
                        />
                    </fhir>
                    <element name="legallyBindingAttachment">
                        <fhir fid="Contract.legallyBindingAttachment">
                            <type value="Attachment"/>
                        </fhir>
                    </element>
                    <element name="legallyBindingReference">
                        <fhir fid="Contract.legallyBindingReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                        </fhir>
                    </element>
                </choice>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.32" name="Coverage" displayName="Coverage" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Coverage">
            <desc language="en-US">Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Coverage provides a link between covered parties (patients) and the payors of their healthcare costs (both insurance and self-pay).</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Coverage" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="cpha3pharm" uri="http://www.pharmacists.ca/" name="Canadian Pharmacy Associaiton eclaims standard"/>
            </fhir>
            <element name="Coverage" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Insurance or medical plan or a payment agreement</desc>
                <fhir fid="Coverage" definition="Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment." comment="The Coverage resource contains the insurance card level information, which is customary to provide on claims and other communications between providers and insurers.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Coverage"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for the coverage</desc>
                    <fhir fid="Coverage.identifier" definition="A unique identifier assigned to this coverage." comment="The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Certificate number, Personal Health Number or Case ID. May be constructed as the concatenation of the Coverage.SubscriberID and the Coverage.dependant."
                        requirements="Allows coverages to be distinguished and referenced." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="cdanetv4" map="C02"/>
                        <mapping identity="v2" map="IN1-2"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="cpha3pharm" map="C.32, C.33, C.39"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="Coverage.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains the code entered-in-error that marks the coverage as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="Act.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Coverage category such as medical or accident</desc>
                    <fhir fid="Coverage.type" definition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization." requirements="The order of application of coverages is dependent on the types of coverage." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Coverage Type and Self-Pay Codes" strength="preferred" description="The type of insurance: public health, worker compensation; private accident, auto, private health, etc.) or a direct payment by an individual or organization." valueSet="2.16.840.1.113883.4.642.3.520" canonicalUri="http://hl7.org/fhir/ValueSet/coverage-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="IN1-15"/>
                    </fhir>
                </element>
                <element name="policyHolder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Owner of the policy</desc>
                    <fhir fid="Coverage.policyHolder" definition="The party who 'owns' the insurance policy." comment="For example: may be an individual, corporation or the subscriber's employer." requirements="This provides employer information in the case of Worker's Compensation and other policies." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="cdanetv4" map="D01 through D09"/>
                        <mapping identity="v2" map="IN1-16, 18,  19-name of insured, address, date of birth"/>
                        <mapping identity="cpha3pharm" map="C.35"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="subscriber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subscriber to the policy</desc>
                    <fhir fid="Coverage.subscriber" definition="The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due." comment="May be self or a parent in the case of dependants." requirements="This is the party who is entitled to the benfits under the policy." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="cdanetv4" map="D01 through D09"/>
                        <mapping identity="v2" map="IN1-16, 18,  19-name of insured, address, date of birth"/>
                        <mapping identity="cpha3pharm" map="C.35"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="subscriberId" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">ID assigned to the subscriber</desc>
                    <fhir fid="Coverage.subscriberId" definition="The insurer assigned ID for the Subscriber." requirements="The insurer requires this identifier on correspondance and claims (digital and otherwise)." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="cdanetv4" map="D01 through D09"/>
                        <mapping identity="v2" map="IN1-16, 18,  19-name of insured, address, date of birth"/>
                        <mapping identity="cpha3pharm" map="C.35"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="beneficiary" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Plan beneficiary</desc>
                    <fhir fid="Coverage.beneficiary" definition="The party who benefits from the insurance coverage; the patient when products and/or services are provided." requirements="This is the party who receives treatment for which the costs are reimbursed under the coverage." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="cdanetv4" map="D01 through D09"/>
                        <mapping identity="v2" map="IN1-16, 18,  19-name of insured, address, date of birth"/>
                        <mapping identity="cpha3pharm" map="C.35"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="dependent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dependent number</desc>
                    <fhir fid="Coverage.dependent" definition="A unique identifier for a dependent under the coverage." comment="Periodically the member number is constructed from the subscriberId and the dependant number." requirements="For some coverages a single identifier is issued to the Subscriber and then a unique dependent number is issued to each beneficiary." isSummary="true">
                        <type value="string"/>
                        <mapping identity="cdanetv4" map="C17"/>
                        <mapping identity="v2" map="- No exact HL7 v2 equivalent concept seems to exist;"/>
                    </fhir>
                </element>
                <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Beneficiary relationship to the subscriber</desc>
                    <fhir fid="Coverage.relationship" definition="The relationship of beneficiary (patient) to the subscriber." comment="Typically, an individual uses policies which are theirs (relationship='self') before policies owned by others." requirements="To determine relationship between the patient and the subscriber to determine coordination of benefits.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SubscriberPolicyholder Relationship Codes" strength="extensible" description="The relationship between the Subscriber and the Beneficiary (insured/covered party/patient)." valueSet="2.16.840.1.113883.4.642.3.1385" canonicalUri="http://hl7.org/fhir/ValueSet/subscriber-relationship"/>
                        <mapping identity="cdanetv4" map="C03"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Coverage start and end dates</desc>
                    <fhir fid="Coverage.period" definition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." requirements="Some insurers require the submission of the coverage term." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="IN1-12 / IN1-13"/>
                        <mapping identity="rim" map="Act.effectiveTime"/>
                    </fhir>
                </element>
                <element name="payor" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Issuer of the policy</desc>
                    <fhir fid="Coverage.payor" definition="The program or plan underwriter or payor including both insurance and non-insurance agreements, such as patient-pay agreements." comment="May provide multiple identifiers such as insurance company identifier or business identifier (BIN number).&#xA;For selfpay it may provide multiple paying persons and/or organizations."
                        requirements="Need to identify the issuer to target for claim processing and for coordination of benefit processing." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="cdanetv4" map="A05"/>
                        <mapping identity="v2" map="IN1-3"/>
                        <mapping identity="cpha3pharm" map="C.30"/>
                    </fhir>
                </element>
                <element name="class" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional coverage classifications</desc>
                    <fhir fid="Coverage.class" definition="A suite of underwriter specific classifiers." comment="For example may be used to identify a class of coverage or employer group, Policy, Plan." requirements="The codes provided on the health card which identify or confirm the specific policy for the insurer.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of class such as 'group' or 'plan'</desc>
                        <fhir fid="Coverage.class.type" definition="The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan." requirements="The insurer issued label for a specific health card value." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Coverage Class Codes" strength="extensible" description="The policy classifications, eg. Group, Plan, Class, etc." valueSet="2.16.840.1.113883.4.642.3.1009" canonicalUri="http://hl7.org/fhir/ValueSet/coverage-class"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Value associated with the type</desc>
                        <fhir fid="Coverage.class.value" definition="The alphanumeric string value associated with the insurer issued label." comment="For example, the Group or Plan number." requirements="The insurer issued label and value are necessary to identify the specific policy." isSummary="true">
                            <type value="string"/>
                            <mapping identity="cdanetv4" map="C11 (Division,Section)"/>
                            <mapping identity="v2" map="IN1-8"/>
                            <mapping identity="cpha3pharm" map="C.31"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Human readable description of the type and value</desc>
                        <fhir fid="Coverage.class.name" definition="A short description for the class." requirements="Used to provide a meaningful description in correspondence to the patient." isSummary="true">
                            <type value="string"/>
                            <mapping identity="cdanetv4" map="C11 (Division,Section)"/>
                            <mapping identity="v2" map="IN1-8"/>
                            <mapping identity="cpha3pharm" map="C.31"/>
                        </fhir>
                    </element>
                </element>
                <element name="order" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Relative order of the coverage</desc>
                    <fhir fid="Coverage.order" definition="The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care." requirements="Used in managing the coordination of benefits."
                        isSummary="true">
                        <type value="positiveInt"/>
                        <mapping identity="v2" map="- No exact HL7 v2 equivalent concept seems to exist;"/>
                    </fhir>
                </element>
                <element name="network" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Insurer network</desc>
                    <fhir fid="Coverage.network" definition="The insurer-specific identifier for the insurer-defined network of providers to which the beneficiary may seek treatment which will be covered at the 'in-network' rate, otherwise 'out of network' terms and conditions apply." requirements="Used in referral for treatment and in claims processing." isSummary="true">
                        <type value="string"/>
                        <mapping identity="cdanetv4" map="D10"/>
                    </fhir>
                </element>
                <element name="costToBeneficiary" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient payments for services/products</desc>
                    <fhir fid="Coverage.costToBeneficiary" definition="A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been  included on the health card." comment="For example by knowing the patient visit co-pay, the provider can collect the amount prior to undertaking treatment."
                        requirements="Required by providers to manage financial transaction with the patient.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Cost category</desc>
                        <fhir fid="Coverage.costToBeneficiary.type" definition="The category of patient centric costs associated with treatment." comment="For example visit, specialist visits, emergency, inpatient care, etc." requirements="Needed to identify the category associated with the amount for the patient." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Coverage Copay Type Codes" strength="extensible" description="The types of services to which patient copayments are specified." valueSet="2.16.840.1.113883.4.642.3.527" canonicalUri="http://hl7.org/fhir/ValueSet/coverage-copay-type"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The amount or percentage due from the beneficiary</desc>
                        <fhir fid="Coverage.costToBeneficiary.value[x]" definition="The amount due from the patient for the cost category." comment="Amount may be expressed as a percentage of the service/product cost or a fixed amount of currency." requirements="Needed to identify the amount for the patient associated with the category." isSummary="true">
                            <type value="Quantity"/>
                            <type value="Money"/>
                            <mapping identity="cdanetv4" map="C11 (Division,Section)"/>
                            <mapping identity="v2" map="IN1-8"/>
                            <mapping identity="cpha3pharm" map="C.31"/>
                        </fhir>
                        <element name="valueQuantity">
                            <fhir fid="Coverage.costToBeneficiary.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueMoney">
                            <fhir fid="Coverage.costToBeneficiary.valueMoney">
                                <type value="Money"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="exception" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Exceptions for patient payments</desc>
                        <fhir fid="Coverage.costToBeneficiary.exception" definition="A suite of codes indicating exceptions or reductions to patient costs and their effective periods." requirements="Required by providers to manage financial transaction with the patient.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Exception category</desc>
                            <fhir fid="Coverage.costToBeneficiary.exception.type" definition="The code for the specific exception." requirements="Needed to identify the exception associated with the amount for the patient." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="Example Coverage Financial Exception Codes" strength="example" description="The types of exceptions from the part or full value of financial obligations such as copays." valueSet="2.16.840.1.113883.4.642.3.1328" canonicalUri="http://hl7.org/fhir/ValueSet/coverage-financial-exception"/>
                            </fhir>
                        </element>
                        <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The effective period of the exception</desc>
                            <fhir fid="Coverage.costToBeneficiary.exception.period" definition="The timeframe during when the exception is in force." requirements="Needed to identify the applicable timeframe for the exception for the correct calculation of patient costs." isSummary="true">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="subrogation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reimbursement to insurer</desc>
                    <fhir fid="Coverage.subrogation" definition="When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs." comment="Typically, automotive and worker's compensation policies would be flagged with 'subrogation=true' to enable healthcare payors to collect against accident claims."
                        requirements="See definition for when to be used.">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="contract" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contract details</desc>
                    <fhir fid="Coverage.contract" definition="The policy(s) which constitute this insurance coverage." requirements="To reference the legally binding contract between the policy holder and the insurer.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                        </type>
                        <mapping identity="cdanetv4" map="D01 through D09"/>
                        <mapping identity="v2" map="IN1-16, 18,  19"/>
                        <mapping identity="rim" map="n/a"/>
                        <mapping identity="cpha3pharm" map="C.35"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.33" name="CoverageEligibilityRequest" displayName="CoverageEligibilityRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest">
            <desc language="en-US">The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CoverageEligibilityRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="CoverageEligibilityRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">CoverageEligibilityRequest resource</desc>
                <fhir fid="CoverageEligibilityRequest" definition="The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.">
                    <mapping identity="workflow" map="Request"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for coverage eligiblity request</desc>
                    <fhir fid="CoverageEligibilityRequest.identifier" definition="A unique identifier assigned to this coverage eligiblity request." requirements="Allows coverage eligibility requests to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="CoverageEligibilityRequest.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Desired processing priority</desc>
                    <fhir fid="CoverageEligibilityRequest.priority" definition="When the requestor expects the processor to complete processing." requirements="Needed to advise the prossesor on the urgency of the request.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Process Priority Codes" strength="example" description="The timeliness with which processing is required: STAT, normal, Deferred." valueSet="2.16.840.1.113883.4.642.3.552" canonicalUri="http://hl7.org/fhir/ValueSet/process-priority"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">auth-requirements | benefits | discovery | validation</desc>
                    <fhir fid="CoverageEligibilityRequest.purpose"
                        definition="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified."
                        requirements="To indicate the processing actions requested." isSummary="true">
                        <type value="code"/>
                        <binding displayName="EligibilityRequestPurpose" strength="required" description="A code specifying the types of information being requested." valueSet="2.16.840.1.113883.4.642.3.1182" canonicalUri="http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Intended recipient of products and services</desc>
                    <fhir fid="CoverageEligibilityRequest.patient" definition="The party who is the beneficiary of the supplied coverage and for whom eligibility is sought." comment="1..1." requirements="Required to provide context and coverage validation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Estimated date or dates of service</desc>
                    <fhir fid="CoverageEligibilityRequest.serviced[x]" definition="The date or dates when the enclosed suite of services were performed or completed." requirements="Required to provide time context for the request.">
                        <type value="date"/>
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                    <element name="servicedDate">
                        <fhir fid="CoverageEligibilityRequest.servicedDate">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="servicedPeriod">
                        <fhir fid="CoverageEligibilityRequest.servicedPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Creation date</desc>
                    <fhir fid="CoverageEligibilityRequest.created" definition="The date when this resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="enterer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Author</desc>
                    <fhir fid="CoverageEligibilityRequest.enterer" definition="Person who created the request." requirements="Some jurisdictions require the contact information for personnel completing eligibility requests.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="provider" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for the request</desc>
                    <fhir fid="CoverageEligibilityRequest.provider" definition="The provider which is responsible for the request." comment="Typically this field would be 1..1 where this party is responsible for the eligibility request but not necessarily professionally responsible for the provision of the individual products and services listed below."
                        requirements="Needed to identify the requestor.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Coverage issuer</desc>
                    <fhir fid="CoverageEligibilityRequest.insurer" definition="The Insurer who issued the coverage in question and is the recipient of the request." requirements="Need to identify the recipient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.who"/>
                    </fhir>
                </element>
                <element name="facility" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Servicing facility</desc>
                    <fhir fid="CoverageEligibilityRequest.facility" definition="Facility where the services are intended to be provided." requirements="Insurance adjudication can be dependant on where services were delivered.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                    </fhir>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting information</desc>
                    <fhir fid="CoverageEligibilityRequest.supportingInfo" definition="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues." comment="Often there are multiple jurisdiction specific valuesets which are required."
                        requirements="Typically these information codes are required to support the services rendered or the adjudication of the services rendered.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Information instance identifier</desc>
                        <fhir fid="CoverageEligibilityRequest.supportingInfo.sequence" definition="A number to uniquely identify supporting information entries." requirements="Necessary to maintain the order of the supporting information items and provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="information" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Data to be provided</desc>
                        <fhir fid="CoverageEligibilityRequest.supportingInfo.information" definition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data."
                            comment="Could be used to provide references to other resources, document. For example could contain a PDF in an Attachment of the Police Report for an Accident." requirements="To convey the data content to be provided when the information is more than a simple code or period.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="appliesToAll" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Applies to all items</desc>
                        <fhir fid="CoverageEligibilityRequest.supportingInfo.appliesToAll" definition="The supporting materials are applicable for all detail items, product/servce categories and specific billing codes." requirements="Needed to convey that the information is universal to the request.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient insurance information</desc>
                    <fhir fid="CoverageEligibilityRequest.insurance" definition="Financial instruments for reimbursement for the health care products and services."
                        comment="All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim."
                        requirements="There must be at least one coverage for which eligibility is requested.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="focal" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Applicable coverage</desc>
                        <fhir fid="CoverageEligibilityRequest.insurance.focal" definition="A flag to indicate that this Coverage is to be used for evaluation of this request when set to true."
                            comment="A patient may (will) have multiple insurance policies which provide reimburement for healthcare services and products. For example a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for evaluating this request. Other requests would be created to request evaluation against the other listed policies."
                            requirements="To identify which coverage in the list is being used to evaluate this request.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance information</desc>
                        <fhir fid="CoverageEligibilityRequest.insurance.coverage" definition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
                            requirements="Required to allow the adjudicator to locate the correct policy and history within their information system.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="businessArrangement" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional provider contract number</desc>
                        <fhir fid="CoverageEligibilityRequest.insurance.businessArrangement" definition="A business agreement number established between the provider and the insurer for special business processing purposes." requirements="Providers may have multiple business arrangements with a given insurer and must supply the specific contract number for adjudication.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Item to be evaluated for eligibiity</desc>
                    <fhir fid="CoverageEligibilityRequest.item" definition="Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor." requirements="The items to be processed for the request.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="supportingInfoSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable exception or supporting information</desc>
                        <fhir fid="CoverageEligibilityRequest.item.supportingInfoSequence" definition="Exceptions, special conditions and supporting information applicable for this service or product line." requirements="Needed to support or inform the consideration for eligibility.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Benefit classification</desc>
                        <fhir fid="CoverageEligibilityRequest.item.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage." requirements="Needed to convey the category of service or product for which eligibility is sought.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                        </fhir>
                    </element>
                    <element name="productOrService" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Billing, service, product, or drug code</desc>
                        <fhir fid="CoverageEligibilityRequest.item.productOrService" definition="This contains the product, service, drug or other billing code for the item." comment="Code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI)."
                            requirements="Needed to convey the actual service or product for which eligibility is sought.">
                            <type value="CodeableConcept"/>
                            <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                        </fhir>
                    </element>
                    <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Product or service billing modifiers</desc>
                        <fhir fid="CoverageEligibilityRequest.item.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                            requirements="To support provision of the item or to charge an elevated fee.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                        </fhir>
                    </element>
                    <element name="provider" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Perfoming practitioner</desc>
                        <fhir fid="CoverageEligibilityRequest.item.provider" definition="The practitioner who is responsible for the product or service to be rendered to the patient." requirements="Needed to support the evaluation of the eligibility.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                            <mapping identity="workflow" map="Request.requester"/>
                            <mapping identity="w5" map="FiveWs.source"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Count of products or services</desc>
                        <fhir fid="CoverageEligibilityRequest.item.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fee, charge or cost per item</desc>
                        <fhir fid="CoverageEligibilityRequest.item.unitPrice" definition="The amount charged to the patient by the provider for a single unit." requirements="Needed to support the evaluation of the eligibility.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="facility" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Servicing facility</desc>
                        <fhir fid="CoverageEligibilityRequest.item.facility" definition="Facility where the services will be provided." requirements="Needed to support the evaluation of the eligibility.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="diagnosis" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable diagnosis</desc>
                        <fhir fid="CoverageEligibilityRequest.item.diagnosis" definition="Patient diagnosis for which care is sought." requirements="Needed to support the evaluation of the eligibility.">
                            <type value="BackboneElement"/>
                            <mapping identity="v2" map="Request.reasonReference"/>
                        </fhir>
                        <choice name="diagnosis[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Nature of illness or problem</desc>
                            <fhir fid="CoverageEligibilityRequest.item.diagnosis.diagnosis[x]" definition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." requirements="Provides health context for the evaluation of the products and/or services.">
                                <type value="CodeableConcept"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                </type>
                                <binding displayName="ICD-10 Codes" strength="example" description="ICD10 Diagnostic codes." valueSet="2.16.840.1.113883.4.642.3.531" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10"/>
                            </fhir>
                            <element name="diagnosisCodeableConcept">
                                <fhir fid="CoverageEligibilityRequest.item.diagnosis.diagnosisCodeableConcept">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="diagnosisReference">
                                <fhir fid="CoverageEligibilityRequest.item.diagnosis.diagnosisReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Product or service details</desc>
                        <fhir fid="CoverageEligibilityRequest.item.detail" definition="The plan/proposal/order describing the proposed service in detail." requirements="Needed to provide complex service proposal such as a Device or a plan.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.34" name="CoverageEligibilityResponse" displayName="CoverageEligibilityResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse">
            <desc language="en-US">This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="CoverageEligibilityResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="CoverageEligibilityResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">CoverageEligibilityResponse resource</desc>
                <fhir fid="CoverageEligibilityResponse" definition="This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for coverage eligiblity request</desc>
                    <fhir fid="CoverageEligibilityResponse.identifier" definition="A unique identifier assigned to this coverage eligiblity request." requirements="Allows coverage eligibility requests to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="CoverageEligibilityResponse.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">auth-requirements | benefits | discovery | validation</desc>
                    <fhir fid="CoverageEligibilityResponse.purpose"
                        definition="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified."
                        requirements="To indicate the processing actions requested." isSummary="true">
                        <type value="code"/>
                        <binding displayName="EligibilityResponsePurpose" strength="required" description="A code specifying the types of information being requested." valueSet="2.16.840.1.113883.4.642.3.1184" canonicalUri="http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Intended recipient of products and services</desc>
                    <fhir fid="CoverageEligibilityResponse.patient" definition="The party who is the beneficiary of the supplied coverage and for whom eligibility is sought." requirements="Required to provide context and coverage validation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="cdanetv4" map="C06,C07,C08, C05, C04"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Estimated date or dates of service</desc>
                    <fhir fid="CoverageEligibilityResponse.serviced[x]" definition="The date or dates when the enclosed suite of services were performed or completed." requirements="Required to provide time context for the request.">
                        <type value="date"/>
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="cdanetv4" map="F09"/>
                    </fhir>
                    <element name="servicedDate">
                        <fhir fid="CoverageEligibilityResponse.servicedDate">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="servicedPeriod">
                        <fhir fid="CoverageEligibilityResponse.servicedPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Response creation date</desc>
                    <fhir fid="CoverageEligibilityResponse.created" definition="The date this resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="requestor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for the request</desc>
                    <fhir fid="CoverageEligibilityResponse.requestor" definition="The provider which is responsible for the request." comment="Typically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="cdanetv4" map="B01"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Eligibility request reference</desc>
                    <fhir fid="CoverageEligibilityResponse.request" definition="Reference to the original request resource." requirements="Needed to allow the response to be linked to the request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="cdanetv4" map="A02|G01"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">queued | complete | error | partial</desc>
                    <fhir fid="CoverageEligibilityResponse.outcome" definition="The outcome of the request processing."
                        comment="The resource may be used to indicate that: the request has been held (queued) for processing; that it has been processed and errors found (error); that no errors were found and that some of the adjudication has been undertaken (partial) or that all of the adjudication has been undertaken (complete)."
                        requirements="To advise the requestor of an overall processing outcome." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Claim Processing Codes" strength="required" description="The outcome of the processing." valueSet="2.16.840.1.113883.4.642.3.13" canonicalUri="http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="disposition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disposition Message</desc>
                    <fhir fid="CoverageEligibilityResponse.disposition" definition="A human readable description of the status of the adjudication." requirements="Provided for user display.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Coverage issuer</desc>
                    <fhir fid="CoverageEligibilityResponse.insurer" definition="The Insurer who issued the coverage in question and is the author of the response." requirements="Need to identify the author." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient insurance information</desc>
                    <fhir fid="CoverageEligibilityResponse.insurance" definition="Financial instruments for reimbursement for the health care products and services."
                        comment="All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim."
                        requirements="There must be at least one coverage for which eligibility is requested.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance information</desc>
                        <fhir fid="CoverageEligibilityResponse.insurance.coverage" definition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
                            requirements="Required to allow the adjudicator to locate the correct policy and history within their information system." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="inforce" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Coverage inforce indicator</desc>
                        <fhir fid="CoverageEligibilityResponse.insurance.inforce" definition="Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates." requirements="Needed to convey the answer to the eligibility validation request.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="benefitPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the benefits are applicable</desc>
                        <fhir fid="CoverageEligibilityResponse.insurance.benefitPeriod" definition="The term of the benefits documented in this response." requirements="Needed as coverages may be multi-year while benefits tend to be annual therefore a separate expression of the benefit period is needed.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Benefits and authorization details</desc>
                        <fhir fid="CoverageEligibilityResponse.insurance.item" definition="Benefits and optionally current balances, and authorization details by category or service.">
                            <type value="BackboneElement"/>
                            <constraint key="ces-1" severity="error" human="SHALL contain a category or a billcode but not both." expression="category.exists() xor productOrService.exists()" xpath="exists(f:category) or exists(f:productOrService)" source=""/>
                        </fhir>
                        <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Benefit classification</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage." requirements="Needed to convey the category of service or product for which eligibility is sought.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                            </fhir>
                        </element>
                        <element name="productOrService" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Billing, service, product, or drug code</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.productOrService" definition="This contains the product, service, drug or other billing code for the item." comment="Code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI)."
                                requirements="Needed to convey the actual service or product for which eligibility is sought.">
                                <type value="CodeableConcept"/>
                                <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                            </fhir>
                        </element>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Product or service billing modifiers</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                requirements="To support provision of the item or to charge an elevated fee.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                            </fhir>
                        </element>
                        <element name="provider" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Performing practitioner</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.provider" definition="The practitioner who is eligible for the provision of the product or service." requirements="Needed to convey the eligible provider.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                </type>
                                <mapping identity="w5" map="FiveWs.source"/>
                                <mapping identity="cdanetv4" map="B01"/>
                            </fhir>
                        </element>
                        <element name="excluded" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Excluded from the plan</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.excluded" definition="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." requirements="Needed to identify items that are specifically excluded from the coverage.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Short name for the benefit</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.name" definition="A short name or tag for the benefit." comment="For example: MED01, or DENT2." requirements="Required to align with other plan names.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Description of the benefit or services covered</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.description" definition="A richer description of the benefit or services covered." comment="For example 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, Implants and Cosmetic services'." requirements="Needed for human readable reference.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="network" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">In or out of network</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.network" definition="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." requirements="Needed as in or out of network providers are treated differently under the coverage.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Network Type Codes" strength="example" description="Code to classify in or out of network services." valueSet="2.16.840.1.113883.4.642.3.608" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-network"/>
                            </fhir>
                        </element>
                        <element name="unit" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Individual or family</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.unit" definition="Indicates if the benefits apply to an individual or to the family." requirements="Needed for the understanding of the benefits.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Unit Type Codes" strength="example" description="Unit covered/serviced - individual or family." valueSet="2.16.840.1.113883.4.642.3.610" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-unit"/>
                            </fhir>
                        </element>
                        <element name="term" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Annual or lifetime</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.term" definition="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." requirements="Needed for the understanding of the benefits.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Benefit Term Codes" strength="example" description="Coverage unit - annual, lifetime." valueSet="2.16.840.1.113883.4.642.3.612" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-term"/>
                            </fhir>
                        </element>
                        <element name="benefit" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Benefit Summary</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.benefit" definition="Benefits used to date.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Benefit classification</desc>
                                <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.type" definition="Classification of benefit being provided." comment="For example: deductible, visits, benefit amount." requirements="Needed to convey the nature of the benefit.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Benefit Type Codes" strength="example" description="Deductable, visits, co-pay, etc." valueSet="2.16.840.1.113883.4.642.3.606" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-type"/>
                                </fhir>
                            </element>
                            <choice name="allowed[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Benefits allowed</desc>
                                <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.allowed[x]" definition="The quantity of the benefit which is permitted under the coverage." requirements="Needed to convey the benefits offered under the coverage.">
                                    <type value="unsignedInt"/>
                                    <type value="string"/>
                                    <type value="Money"/>
                                </fhir>
                                <element name="allowedUnsignedInt">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.allowedUnsignedInt">
                                        <type value="unsignedInt"/>
                                    </fhir>
                                </element>
                                <element name="allowedString">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.allowedString">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="allowedMoney">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.allowedMoney">
                                        <type value="Money"/>
                                    </fhir>
                                </element>
                            </choice>
                            <choice name="used[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Benefits used</desc>
                                <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.used[x]" definition="The quantity of the benefit which have been consumed to date." requirements="Needed to convey the benefits consumed to date.">
                                    <type value="unsignedInt"/>
                                    <type value="string"/>
                                    <type value="Money"/>
                                </fhir>
                                <element name="usedUnsignedInt">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.usedUnsignedInt">
                                        <type value="unsignedInt"/>
                                    </fhir>
                                </element>
                                <element name="usedString">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.usedString">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="usedMoney">
                                    <fhir fid="CoverageEligibilityResponse.insurance.item.benefit.usedMoney">
                                        <type value="Money"/>
                                    </fhir>
                                </element>
                            </choice>
                        </element>
                        <element name="authorizationRequired" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Authorization required flag</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.authorizationRequired" definition="A boolean flag indicating whether a preauthorization is required prior to actual service delivery." requirements="Needed to convey that preauthorization is required.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="authorizationSupporting" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Type of required supporting materials</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.authorizationSupporting" definition="Codes or comments regarding information or actions associated with the preauthorization." requirements="Needed to inform the provider of collateral materials or actions needed for preauthorization.">
                                <type value="CodeableConcept"/>
                                <binding displayName="CoverageEligibilityResponse Auth Support Codes" strength="example" description="Type of supporting information to provide with a preauthorization." valueSet="2.16.840.1.113883.4.642.3.1393" canonicalUri="http://hl7.org/fhir/ValueSet/coverageeligibilityresponse-ex-auth-support"/>
                            </fhir>
                        </element>
                        <element name="authorizationUrl" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Preauthorization requirements endpoint</desc>
                            <fhir fid="CoverageEligibilityResponse.insurance.item.authorizationUrl" definition="A web location for obtaining requirements or descriptive information regarding the preauthorization." requirements="Needed to enable insurers to advise providers of informative information.">
                                <type value="uri"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="preAuthRef" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Preauthorization reference</desc>
                    <fhir fid="CoverageEligibilityResponse.preAuthRef" definition="A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred." requirements="To provide any preauthorization reference for provider use.">
                        <type value="string"/>
                        <mapping identity="cdanetv4" map="F03"/>
                        <mapping identity="rim" map="23"/>
                    </fhir>
                </element>
                <element name="form" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed form identifier</desc>
                    <fhir fid="CoverageEligibilityResponse.form" definition="A code for the form to be used for printing the content." comment="May be needed to identify specific jurisdictional forms." requirements="Needed to specify the specific form used for producing output for this response.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Forms" strength="example" description="The forms codes." valueSet="2.16.840.1.113883.4.642.3.37" canonicalUri="http://hl7.org/fhir/ValueSet/forms"/>
                        <mapping identity="cdanetv4" map="G42"/>
                    </fhir>
                </element>
                <element name="error" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Processing errors</desc>
                    <fhir fid="CoverageEligibilityResponse.error" definition="Errors encountered during the processing of the request." requirements="Need to communicate processing issues to the requestor.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Error code detailing processing issues</desc>
                        <fhir fid="CoverageEligibilityResponse.error.code" definition="An error code,from a specified code system, which details why the eligibility check could not be performed." requirements="Required to convey processing errors.">
                            <type value="CodeableConcept"/>
                            <binding displayName="AdjudicationError" strength="example" description="The error codes for adjudication processing." valueSet="2.16.840.1.113883.4.642.3.39" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication-error"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.35" name="DetectedIssue" displayName="DetectedIssue" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DetectedIssue">
            <desc language="en-US">Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DetectedIssue" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="DetectedIssue" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Clinical issue with action</desc>
                <fhir fid="DetectedIssue" definition="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="Partial mapping from messages containing the AL1 or IAM segment, such as the ADT^A01, ADT^A08, and ADT^A60."/>
                    <mapping identity="rim" map="Observation[classCode=ALRT, moodCode=EVN)"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique id for the detected issue</desc>
                    <fhir fid="DetectedIssue.identifier" definition="Business identifier associated with the detected issue record." requirements="Allows linking instances of the same detected issue found on different servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="IAM-7"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">registered | preliminary | final | amended +</desc>
                    <fhir fid="DetectedIssue.status" definition="Indicates the status of the detected issue." comment="This element is labeled as a modifier because the status contains the codes cancelled and entered-in-error that mark the issue as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ObservationStatus" strength="required" description="Indicates the status of the identified issue." valueSet="2.16.840.1.113883.4.642.3.400" canonicalUri="http://hl7.org/fhir/ValueSet/observation-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Issue Category, e.g. drug-drug, duplicate therapy, etc.</desc>
                    <fhir fid="DetectedIssue.code" definition="Identifies the general type of issue identified." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Detected Issue Category" strength="preferred" description="Codes identifying the general type of detected issue; e.g. Drug-drug interaction, Timing issue, Duplicate therapy, etc." valueSet="2.16.840.1.113883.4.642.3.204" canonicalUri="http://hl7.org/fhir/ValueSet/detectedissue-category"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="AL1-2 / IAM-9"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="severity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">high | moderate | low</desc>
                    <fhir fid="DetectedIssue.severity" definition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." isSummary="true">
                        <type value="code"/>
                        <binding displayName="DetectedIssueSeverity" strength="required" description="Indicates the potential degree of impact of the identified issue on the patient." valueSet="2.16.840.1.113883.4.642.3.206" canonicalUri="http://hl7.org/fhir/ValueSet/detectedissue-severity|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="AL1-4/ IAR-2"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=SEV].value"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Associated patient</desc>
                    <fhir fid="DetectedIssue.patient" definition="Indicates the patient whose record the detected issue is associated with." requirements="While the subject could be inferred by tracing the subject of the implicated resources, it's useful to have a direct link for query purposes." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <choice name="identified[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When identified</desc>
                    <fhir fid="DetectedIssue.identified[x]" definition="The date or period when the detected issue was initially identified." requirements="No-one can be responsible for mitigation prior to the issue being identified." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="ALI-6 / IAM-11"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="identifiedDateTime">
                        <fhir fid="DetectedIssue.identifiedDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="identifiedPeriod">
                        <fhir fid="DetectedIssue.identifiedPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The provider or device that identified the issue</desc>
                    <fhir fid="DetectedIssue.author" definition="Individual or device responsible for the issue being raised.  For example, a decision support application or a pharmacist conducting a medication review." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="IAM-14 / IAM-16"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role[classCode=ASSIGNED]"/>
                    </fhir>
                </element>
                <element name="implicated" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Problem resource</desc>
                    <fhir fid="DetectedIssue.implicated" definition="Indicates the resource representing the current activity or proposed activity that is potentially problematic." comment="There's an implicit constraint on the number of implicated resources based on DetectedIssue.type; e.g. For drug-drug, there would be more than one.  For timing, there would typically only be one."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SUBJ].target[moodCode=EVN, INT]"/>
                    </fhir>
                </element>
                <element name="evidence" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting evidence</desc>
                    <fhir fid="DetectedIssue.evidence" definition="Supporting evidence or manifestations that provide the basis for identifying the detected issue such as a GuidanceResponse or MeasureReport.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Manifestation</desc>
                        <fhir fid="DetectedIssue.evidence.code" definition="A manifestation that led to the recording of this detected issue.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Manifestation and Symptom Codes" strength="example" description="Codes that describes the types of evidence for a detected issue." valueSet="2.16.840.1.113883.4.642.3.169" canonicalUri="http://hl7.org/fhir/ValueSet/manifestation-or-symptom"/>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting information</desc>
                        <fhir fid="DetectedIssue.evidence.detail" definition="Links to resources that constitute evidence for the detected issue such as a GuidanceResponse or MeasureReport.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                        </fhir>
                    </element>
                </element>
                <element name="detail" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description and context</desc>
                    <fhir fid="DetectedIssue.detail" definition="A textual explanation of the detected issue." comment="Should focus on information not covered elsewhere as discrete data - no need to duplicate the narrative.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="AL1-5 / IAM-8"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Authority for issue</desc>
                    <fhir fid="DetectedIssue.reference" definition="The literature, knowledge-base or similar reference that describes the propensity for the detected issue identified.">
                        <type value="uri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=INST].target[classCode=ALRT, moodCode=DEFN].text.uri"/>
                    </fhir>
                </element>
                <element name="mitigation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Step taken to address</desc>
                    <fhir fid="DetectedIssue.mitigation" definition="Indicates an action that has been taken or is committed to reduce or eliminate the likelihood of the risk identified by the detected issue from manifesting.  Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=MITG].target[classCode=ACT, moodCode=EVN]"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">What mitigation?</desc>
                        <fhir fid="DetectedIssue.mitigation.action" definition="Describes the action that was taken or the observation that was made that reduces/eliminates the risk associated with the identified issue." comment="The &#34;text&#34; component can be used for detail or when no appropriate code exists.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Detected Issue Mitigation Action" strength="preferred" description="Codes describing steps taken to resolve the issue or other circumstances that mitigate the risk associated with the issue; e.g. 'added concurrent therapy', 'prior therapy documented', etc." valueSet="2.16.840.1.113883.4.642.3.205"
                                canonicalUri="http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date committed</desc>
                        <fhir fid="DetectedIssue.mitigation.date" definition="Indicates when the mitigating action was documented." comment="This might not be the same as when the mitigating step was actually taken.">
                            <type value="dateTime"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who is committing?</desc>
                        <fhir fid="DetectedIssue.mitigation.author" definition="Identifies the practitioner who determined the mitigation and takes responsibility for the mitigation step occurring.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                            <mapping identity="rim" map=".participation[typeCode=AUT].role[classCode=ASSIGNED]"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.36" name="Device" displayName="Device" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Device">
            <desc language="en-US">A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Allows institutions to track their devices.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Device" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="udi" uri="http://fda.gov/UDI" name="UDI Mapping"/>
            </fhir>
            <element name="Device" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Item used in healthcare</desc>
                <fhir fid="Device" definition="A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.">
                    <mapping identity="rim" map="Device"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instance identifier</desc>
                    <fhir fid="Device.identifier" definition="Unique instance identifiers assigned to a device by manufacturers other organizations or owners."
                        comment="The barcode string from a barcode present on a device label or package may identify the instance, include names given to the device in local usage, or may identify the type of device. If the identifier identifies the type of device, Device.type element should be used.">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="udi" map="The serial number which is a component of the production identifier (PI), a conditional, variable portion of a UDI.   The identifier.type code should be set to “SNO”(Serial Number) and the system left empty."/>
                    </fhir>
                </element>
                <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The reference to the definition for the device</desc>
                    <fhir fid="Device.definition" definition="The reference to the definition for the device.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="udiCarrier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique Device Identifier (UDI) Barcode string</desc>
                    <fhir fid="Device.udiCarrier" definition="Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold."
                        comment="UDI may identify an unique instance of a device, or it may only identify the type of the device.  See [UDI mappings](device-mappings.html#udi) for a complete mapping of UDI parts to Device." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id and .code"/>
                    </fhir>
                    <element name="deviceIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Mandatory fixed portion of UDI</desc>
                        <fhir fid="Device.udiCarrier.deviceIdentifier" definition="The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device." isSummary="true">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map="Role.id.extension"/>
                            <mapping identity="udi" map="The device identifier (DI), a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device."/>
                        </fhir>
                    </element>
                    <element name="issuer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">UDI Issuing Organization</desc>
                        <fhir fid="Device.udiCarrier.issuer"
                            definition="Organization that is charged with issuing UDIs for devices.  For example, the US FDA issuers include :&#xA;1) GS1: &#xA;http://hl7.org/fhir/NamingSystem/gs1-di, &#xA;2) HIBCC:&#xA;http://hl7.org/fhir/NamingSystem/hibcc-dI, &#xA;3) ICCBBA for blood containers:&#xA;http://hl7.org/fhir/NamingSystem/iccbba-blood-di, &#xA;4) ICCBA for other devices:&#xA;http://hl7.org/fhir/NamingSystem/iccbba-other-di.">
                            <type value="uri"/>
                            <mapping identity="rim" map="Role.id.root"/>
                            <mapping identity="udi"
                                map="All UDIs are to be issued under a system operated by an Jurisdiction-accredited issuing agency.&#xA;GS1 DIs: &#xA; http://hl7.org/fhir/NamingSystem/gs1&#xA;HIBCC DIs:&#xA; http://hl7.org/fhir/NamingSystem/hibcc&#xA;ICCBBA DIs for blood containers:&#xA; http://hl7.org/fhir/NamingSystem/iccbba-blood&#xA;ICCBA DIs for other devices:&#xA; http://hl7.org/fhir/NamingSystem/iccbba-other"
                            />
                        </fhir>
                    </element>
                    <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Regional UDI authority</desc>
                        <fhir fid="Device.udiCarrier.jurisdiction" definition="The identity of the authoritative source for UDI generation within a  jurisdiction.  All UDIs are globally unique within a single namespace with the appropriate repository uri as the system.  For example,  UDIs of devices managed in the U.S. by the FDA, the value is  http://hl7.org/fhir/NamingSystem/fda-udi."
                            requirements="Allows a recipient of a UDI to know which database will contain the UDI-associated metadata.">
                            <type value="uri"/>
                            <mapping identity="rim" map="Role.scoper"/>
                        </fhir>
                    </element>
                    <element name="carrierAIDC" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">UDI Machine Readable Barcode String</desc>
                        <fhir fid="Device.udiCarrier.carrierAIDC"
                            definition="The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - e.g., a barcode or RFID.   Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded."
                            comment="The AIDC form of UDIs should be scanned or otherwise used for the identification of the device whenever possible to minimize errors in records resulting from manual transcriptions. If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label." isSummary="true">
                            <type value="base64Binary"/>
                            <mapping identity="rim" map="Role.id.extension"/>
                            <mapping identity="udi" map="A unique device identifier (UDI) on a device label a form that uses automatic identification and data capture (AIDC) technology."/>
                        </fhir>
                    </element>
                    <element name="carrierHRF" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">UDI Human Readable Barcode String</desc>
                        <fhir fid="Device.udiCarrier.carrierHRF" definition="The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device." comment="If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label." isSummary="true">
                            <type value="string"/>
                            <mapping identity="rim" map="Role.id.extension"/>
                            <mapping identity="udi" map="A unique device identifier (UDI) on a device label in plain text"/>
                        </fhir>
                    </element>
                    <element name="entryType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">barcode | rfid | manual +</desc>
                        <fhir fid="Device.udiCarrier.entryType" definition="A coded entry to indicate how the data was entered." requirements="Supports a way to distinguish hand entered from machine read data.">
                            <type value="code"/>
                            <binding displayName="UDIEntryType" strength="required" description="Codes to identify how UDI data was entered." valueSet="2.16.840.1.113883.4.642.3.211" canonicalUri="http://hl7.org/fhir/ValueSet/udi-entry-type|4.0.1"/>
                            <mapping identity="rim" map="NA"/>
                        </fhir>
                    </element>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error | unknown</desc>
                    <fhir fid="Device.status" definition="Status of the Device availability." comment="This element is labeled as a modifier because the status contains the codes inactive and entered-in-error that mark the device (record)as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="FHIRDeviceStatus" strength="required" description="The availability status of the device." valueSet="2.16.840.1.113883.4.642.3.209" canonicalUri="http://hl7.org/fhir/ValueSet/device-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off</desc>
                    <fhir fid="Device.statusReason" definition="Reason for the dtatus of the Device availability.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIRDeviceStatusReason" strength="extensible" description="The availability status reason of the device." valueSet="2.16.840.1.113883.4.642.3.1081" canonicalUri="http://hl7.org/fhir/ValueSet/device-status-reason"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="distinctIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The distinct identification string</desc>
                    <fhir fid="Device.distinctIdentifier" definition="The distinct identification string as required by regulation for a human cell, tissue, or cellular and tissue-based product." comment="For example, this applies to devices in the United States regulated under *Code of Federal Regulation 21CFR§1271.290(c)*.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".lotNumberText"/>
                        <mapping identity="udi" map="The lot or batch number within which a device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI."/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of device manufacturer</desc>
                    <fhir fid="Device.manufacturer" definition="A name of the manufacturer.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=MANU].scoper.name"/>
                        <mapping identity="udi" map="N/A"/>
                    </fhir>
                </element>
                <element name="manufactureDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date when the device was made</desc>
                    <fhir fid="Device.manufactureDate" definition="The date and time when the device was manufactured.">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".existenceTime.low"/>
                        <mapping identity="udi" map="The date a specific device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI.  For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS].  If hour is present, the minutes and seconds should both be set to “00”."/>
                    </fhir>
                </element>
                <element name="expirationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date and time of expiry of this device (if applicable)</desc>
                    <fhir fid="Device.expirationDate" definition="The date and time beyond which this device is no longer valid or should not be used (if applicable).">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".expirationTime"/>
                        <mapping identity="udi" map="the expiration date of a specific device -  which is a component of the production identifier (PI), a conditional, variable portion of a UDI.  For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS].  If hour is present, the minutes and seconds should both be set to “00”."/>
                    </fhir>
                </element>
                <element name="lotNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Lot number of manufacture</desc>
                    <fhir fid="Device.lotNumber" definition="Lot number assigned by the manufacturer.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".lotNumberText"/>
                        <mapping identity="udi" map="The lot or batch number within which a device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI."/>
                    </fhir>
                </element>
                <element name="serialNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Serial number assigned by the manufacturer</desc>
                    <fhir fid="Device.serialNumber" definition="The serial number assigned by the organization when the device was manufactured." comment="Alphanumeric Maximum 20.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=MANU].id"/>
                    </fhir>
                </element>
                <element name="deviceName" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The name of the device as given by the manufacturer</desc>
                    <fhir fid="Device.deviceName" definition="This represents the manufacturer's name of the device as provided by the device, from a UDI label, or by a person describing the Device.  This typically would be used when a person provides the name(s) or when the device represents one of the names available from DeviceDefinition.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The name of the device</desc>
                        <fhir fid="Device.deviceName.name" definition="The name of the device.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other</desc>
                        <fhir fid="Device.deviceName.type" definition="The type of deviceName.&#xA;UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.">
                            <type value="code"/>
                            <binding displayName="DeviceNameType" strength="required" description="The type of name the device is referred by." valueSet="2.16.840.1.113883.4.642.3.1083" canonicalUri="http://hl7.org/fhir/ValueSet/device-nametype|4.0.1"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map=".playedRole[typeCode=MANU].code"/>
                        </fhir>
                    </element>
                </element>
                <element name="modelNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The model number for the device</desc>
                    <fhir fid="Device.modelNumber" definition="The model number for the device.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".softwareName (included as part)"/>
                    </fhir>
                </element>
                <element name="partNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The part number of the device</desc>
                    <fhir fid="Device.partNumber" definition="The part number of the device." comment="Alphanumeric Maximum 20.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=MANU].id"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The kind or type of device</desc>
                    <fhir fid="Device.type" definition="The kind or type of device.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Device Type" strength="example" description="Codes to identify medical devices." valueSet="2.16.840.1.113883.4.642.3.1376" canonicalUri="http://hl7.org/fhir/ValueSet/device-type"/>
                    </fhir>
                </element>
                <element name="specialization" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication</desc>
                    <fhir fid="Device.specialization" definition="The capabilities supported on a  device, the standards to which the device conforms for a particular purpose, and used for the communication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="systemType" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The standard that is used to operate and communicate</desc>
                        <fhir fid="Device.specialization.systemType" definition="The standard that is used to operate and communicate.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The version of the standard that is used to operate and communicate</desc>
                        <fhir fid="Device.specialization.version" definition="The version of the standard that is used to operate and communicate.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                        </fhir>
                    </element>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The actual design of the device or software version running on the device</desc>
                    <fhir fid="Device.version" definition="The actual design of the device or software version running on the device.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of the device version</desc>
                        <fhir fid="Device.version.type" definition="The type of the device version.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="component" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A single component of the device version</desc>
                        <fhir fid="Device.version.component" definition="A single component of the device version.">
                            <type value="Identifier"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The version text</desc>
                        <fhir fid="Device.version.value" definition="The version text.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties</desc>
                    <fhir fid="Device.property" definition="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Code that specifies the property DeviceDefinitionPropetyCode (Extensible)</desc>
                        <fhir fid="Device.property.type" definition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="valueQuantity" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Property value as a quantity</desc>
                        <fhir fid="Device.property.valueQuantity" definition="Property value as a quantity.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="valueCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Property value as a code, e.g., NTP4 (synced to NTP)</desc>
                        <fhir fid="Device.property.valueCode" definition="Property value as a code, e.g., NTP4 (synced to NTP).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="patient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Patient to whom Device is affixed</desc>
                    <fhir fid="Device.patient" definition="Patient information, If the device is affixed to a person." requirements="If the device is implanted in a patient, then need to associate the device to the patient.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=USED].scoper.playedRole[typeCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="owner" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization responsible for device</desc>
                    <fhir fid="Device.owner" definition="An organization that is responsible for the provision and ongoing maintenance of the device.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".playedRole[typeCode=OWN].scoper"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Details for human/organization for support</desc>
                    <fhir fid="Device.contact" definition="Contact details for an organization or a particular human that is responsible for the device." comment="used for troubleshooting etc.">
                        <type value="ContactPoint"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".scopedRole[typeCode=CON].player"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the device is found</desc>
                    <fhir fid="Device.location" definition="The place where the device can be found." requirements="Device.location can be used to track device location.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=LOCE].scoper"/>
                    </fhir>
                </element>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Network address to contact device</desc>
                    <fhir fid="Device.url" definition="A network address on which the device may be contacted directly." comment="If the device is running a FHIR server, the network address should  be the Base URL from which a conformance statement may be retrieved.">
                        <type value="uri"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Device notes and comments</desc>
                    <fhir fid="Device.note" definition="Descriptive information, usage information or implantation information that is not captured in an existing element.">
                        <type value="Annotation"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="safety" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Safety Characteristics of Device</desc>
                    <fhir fid="Device.safety" definition="Provides additional safety characteristics about a medical device.  For example devices containing latex." isSummary="true">
                        <type value="CodeableConcept"/>
                        <mapping identity="rim" map="NA"/>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The parent device</desc>
                    <fhir fid="Device.parent" definition="The parent device.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.37" name="DeviceDefinition" displayName="DeviceDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DeviceDefinition">
            <desc language="en-US">The characteristics, operational status and capabilities of a medical-related component of a medical device.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DeviceDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="DeviceDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An instance of a medical-related component of a medical device</desc>
                <fhir fid="DeviceDefinition" definition="The characteristics, operational status and capabilities of a medical-related component of a medical device."
                    comment="For the initial scope, this DeviceDefinition resource is only applicable to describe a single node in the containment tree that is produced by the context scanner in any medical device that implements or derives from the ISO/IEEE 11073 standard and that does not represent a metric. Examples for such a node are MDS, VMD, or Channel."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instance identifier</desc>
                    <fhir fid="DeviceDefinition.identifier" definition="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID.">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="udiDeviceIdentifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique Device Identifier (UDI) Barcode string</desc>
                    <fhir fid="DeviceDefinition.udiDeviceIdentifier" definition="Unique device identifier (UDI) assigned to device label or package.  Note that the Device may include multiple udiCarriers as it either may include just the udiCarrier for the jurisdiction it is sold, or for multiple jurisdictions it could have been sold.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="deviceIdentifier" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier</desc>
                        <fhir fid="DeviceDefinition.udiDeviceIdentifier.deviceIdentifier" definition="The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="issuer" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The organization that assigns the identifier algorithm</desc>
                        <fhir fid="DeviceDefinition.udiDeviceIdentifier.issuer" definition="The organization that assigns the identifier algorithm.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="jurisdiction" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The jurisdiction to which the deviceIdentifier applies</desc>
                        <fhir fid="DeviceDefinition.udiDeviceIdentifier.jurisdiction" definition="The jurisdiction to which the deviceIdentifier applies.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                </element>
                <choice name="manufacturer[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of device manufacturer</desc>
                    <fhir fid="DeviceDefinition.manufacturer[x]" definition="A name of the manufacturer.">
                        <type value="string"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".playedRole[typeCode=MANU].scoper.name"/>
                    </fhir>
                    <element name="manufacturerString">
                        <fhir fid="DeviceDefinition.manufacturerString">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="manufacturerReference">
                        <fhir fid="DeviceDefinition.manufacturerReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </fhir>
                    </element>
                </choice>
                <element name="deviceName" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A name given to the device to identify it</desc>
                    <fhir fid="DeviceDefinition.deviceName" definition="A name given to the device to identify it.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The name of the device</desc>
                        <fhir fid="DeviceDefinition.deviceName.name" definition="The name of the device.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other</desc>
                        <fhir fid="DeviceDefinition.deviceName.type" definition="The type of deviceName.&#xA;UDILabelName | UserFriendlyName | PatientReportedName | ManufactureDeviceName | ModelName.">
                            <type value="code"/>
                            <binding displayName="DeviceNameType" strength="required" description="The type of name the device is referred by." valueSet="2.16.840.1.113883.4.642.3.1083" canonicalUri="http://hl7.org/fhir/ValueSet/device-nametype|4.0.1"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="rim" map=".playedRole[typeCode=MANU].code"/>
                        </fhir>
                    </element>
                </element>
                <element name="modelNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The model number for the device</desc>
                    <fhir fid="DeviceDefinition.modelNumber" definition="The model number for the device.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".softwareName (included as part)"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What kind of device or device system this is</desc>
                    <fhir fid="DeviceDefinition.type" definition="What kind of device or device system this is.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIR Device Types" strength="example" description="Type of device e.g. according to official classification." valueSet="2.16.840.1.113883.4.642.3.208" canonicalUri="http://hl7.org/fhir/ValueSet/device-kind"/>
                    </fhir>
                </element>
                <element name="specialization" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication</desc>
                    <fhir fid="DeviceDefinition.specialization" definition="The capabilities supported on a  device, the standards to which the device conforms for a particular purpose, and used for the communication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="systemType" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The standard that is used to operate and communicate</desc>
                        <fhir fid="DeviceDefinition.specialization.systemType" definition="The standard that is used to operate and communicate.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The version of the standard that is used to operate and communicate</desc>
                        <fhir fid="DeviceDefinition.specialization.version" definition="The version of the standard that is used to operate and communicate.">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                        </fhir>
                    </element>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Available versions</desc>
                    <fhir fid="DeviceDefinition.version" definition="The available versions of the device, e.g., software versions.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="safety" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Safety characteristics of the device</desc>
                    <fhir fid="DeviceDefinition.safety" definition="Safety characteristics of the device." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Device safety" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.213" canonicalUri="http://hl7.org/fhir/ValueSet/device-safety"/>
                    </fhir>
                </element>
                <element name="shelfLifeStorage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Shelf Life and storage information</desc>
                    <fhir fid="DeviceDefinition.shelfLifeStorage" definition="Shelf Life and storage information.">
                        <type value="ProductShelfLife"/>
                    </fhir>
                </element>
                <element name="physicalCharacteristics" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dimensions, color etc.</desc>
                    <fhir fid="DeviceDefinition.physicalCharacteristics" definition="Dimensions, color etc.">
                        <type value="ProdCharacteristic"/>
                    </fhir>
                </element>
                <element name="languageCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Language code for the human-readable text strings produced by the device (all supported)</desc>
                    <fhir fid="DeviceDefinition.languageCode" definition="Language code for the human-readable text strings produced by the device (all supported).">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="capability" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Device capabilities</desc>
                    <fhir fid="DeviceDefinition.capability" definition="Device capabilities.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of capability</desc>
                        <fhir fid="DeviceDefinition.capability.type" definition="Type of capability.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Description of capability</desc>
                        <fhir fid="DeviceDefinition.capability.description" definition="Description of capability.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties</desc>
                    <fhir fid="DeviceDefinition.property" definition="The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Code that specifies the property DeviceDefinitionPropetyCode (Extensible)</desc>
                        <fhir fid="DeviceDefinition.property.type" definition="Code that specifies the property DeviceDefinitionPropetyCode (Extensible).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="valueQuantity" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Property value as a quantity</desc>
                        <fhir fid="DeviceDefinition.property.valueQuantity" definition="Property value as a quantity.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="valueCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Property value as a code, e.g., NTP4 (synced to NTP)</desc>
                        <fhir fid="DeviceDefinition.property.valueCode" definition="Property value as a code, e.g., NTP4 (synced to NTP).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="owner" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization responsible for device</desc>
                    <fhir fid="DeviceDefinition.owner" definition="An organization that is responsible for the provision and ongoing maintenance of the device.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".playedRole[typeCode=OWN].scoper"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Details for human/organization for support</desc>
                    <fhir fid="DeviceDefinition.contact" definition="Contact details for an organization or a particular human that is responsible for the device." comment="used for troubleshooting etc.">
                        <type value="ContactPoint"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".scopedRole[typeCode=CON].player"/>
                    </fhir>
                </element>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Network address to contact device</desc>
                    <fhir fid="DeviceDefinition.url" definition="A network address on which the device may be contacted directly." comment="If the device is running a FHIR server, the network address should  be the Base URL from which a conformance statement may be retrieved.">
                        <type value="uri"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="onlineInformation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Access to on-line information</desc>
                    <fhir fid="DeviceDefinition.onlineInformation" definition="Access to on-line information about the device.">
                        <type value="uri"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Device notes and comments</desc>
                    <fhir fid="DeviceDefinition.note" definition="Descriptive information, usage information or implantation information that is not captured in an existing element.">
                        <type value="Annotation"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product)</desc>
                    <fhir fid="DeviceDefinition.quantity" definition="The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product).">
                        <type value="Quantity"/>
                    </fhir>
                </element>
                <element name="parentDevice" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The parent device it can be part of</desc>
                    <fhir fid="DeviceDefinition.parentDevice" definition="The parent device it can be part of." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="material" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A substance used to create the material(s) of which the device is made</desc>
                    <fhir fid="DeviceDefinition.material" definition="A substance used to create the material(s) of which the device is made.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="substance" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The substance</desc>
                        <fhir fid="DeviceDefinition.material.substance" definition="The substance.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="alternate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indicates an alternative material of the device</desc>
                        <fhir fid="DeviceDefinition.material.alternate" definition="Indicates an alternative material of the device.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="allergenicIndicator" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the substance is a known or suspected allergen</desc>
                        <fhir fid="DeviceDefinition.material.allergenicIndicator" definition="Whether the substance is a known or suspected allergen.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.38" name="DeviceMetric" displayName="DeviceMetric" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DeviceMetric">
            <desc language="en-US">Describes a measurement, calculation or setting capability of a medical device.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DeviceMetric" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="DeviceMetric" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Measurement, calculation or setting capability of a medical device</desc>
                <fhir fid="DeviceMetric" definition="Describes a measurement, calculation or setting capability of a medical device." comment="For the initial scope, this DeviceMetric resource is only applicable to describe a single metric node in the containment tree that is produced by the context scanner in any medical device that implements or derives from the ISO/IEEE 11073 standard."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instance identifier</desc>
                    <fhir fid="DeviceMetric.identifier" definition="Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID." comment="For identifiers assigned to a device by the device or gateway software, the `system` element of the identifier should be set to the unique identifier of the device."
                        isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Identity of metric, for example Heart Rate or PEEP Setting</desc>
                    <fhir fid="DeviceMetric.type" definition="Describes the type of the metric. For example: Heart Rate, PEEP Setting, etc." comment="DeviceMetric.type can be referred to either IEEE 11073-10101 or LOINC." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Device Metric and Component Types" strength="preferred" description="Describes the metric type." valueSet="2.16.840.1.113883.4.642.3.645" canonicalUri="http://hl7.org/fhir/ValueSet/devicemetric-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="unit" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Unit of Measure for the Metric</desc>
                    <fhir fid="DeviceMetric.unit" definition="Describes the unit that an observed value determined for this metric will have. For example: Percent, Seconds, etc." comment="DeviceMetric.unit can refer to either UCUM or preferable a RTMMS coding system." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Device Metric and Component Types" strength="preferred" description="Describes the unit of the metric." valueSet="2.16.840.1.113883.4.642.3.645" canonicalUri="http://hl7.org/fhir/ValueSet/devicemetric-type"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the link to the source Device</desc>
                    <fhir fid="DeviceMetric.source" definition="Describes the link to the  Device that this DeviceMetric belongs to and that contains administrative device information such as manufacturer, serial number, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the link to the parent Device</desc>
                    <fhir fid="DeviceMetric.parent"
                        definition="Describes the link to the  Device that this DeviceMetric belongs to and that provide information about the location of this DeviceMetric in the containment structure of the parent Device. An example would be a Device that represents a Channel. This reference can be used by a client application to distinguish DeviceMetrics that have the same type, but should be interpreted based on their containment location."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                    </fhir>
                </element>
                <element name="operationalStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">on | off | standby | entered-in-error</desc>
                    <fhir fid="DeviceMetric.operationalStatus" definition="Indicates current operational state of the device. For example: On, Off, Standby, etc." isSummary="true">
                        <type value="code"/>
                        <binding displayName="DeviceMetricOperationalStatus" strength="required" description="Describes the operational status of the DeviceMetric." valueSet="2.16.840.1.113883.4.642.3.646" canonicalUri="http://hl7.org/fhir/ValueSet/metric-operational-status|4.0.1"/>
                    </fhir>
                </element>
                <element name="color" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">black | red | green | yellow | blue | magenta | cyan | white</desc>
                    <fhir fid="DeviceMetric.color" definition="Describes the color representation for the metric. This is often used to aid clinicians to track and identify parameter types by color. In practice, consider a Patient Monitor that has ECG/HR and Pleth for example; the parameters are displayed in different characteristic colors, such as HR-blue, BP-green, and PR and SpO2- magenta."
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="DeviceMetricColor" strength="required" description="Describes the typical color of representation." valueSet="2.16.840.1.113883.4.642.3.654" canonicalUri="http://hl7.org/fhir/ValueSet/metric-color|4.0.1"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">measurement | setting | calculation | unspecified</desc>
                    <fhir fid="DeviceMetric.category" definition="Indicates the category of the observation generation process. A DeviceMetric can be for example a setting, measurement, or calculation." isSummary="true">
                        <type value="code"/>
                        <binding displayName="DeviceMetricCategory" strength="required" description="Describes the category of the metric." valueSet="2.16.840.1.113883.4.642.3.648" canonicalUri="http://hl7.org/fhir/ValueSet/metric-category|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="measurementPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the measurement repetition time</desc>
                    <fhir fid="DeviceMetric.measurementPeriod"
                        definition="Describes the measurement repetition time. This is not necessarily the same as the update period. The measurement repetition time can range from milliseconds up to hours. An example for a measurement repetition time in the range of milliseconds is the sampling rate of an ECG. An example for a measurement repetition time in the range of hours is a NIBP that is triggered automatically every hour. The update period may be different than the measurement repetition time, if the device does not update the published observed value with the same frequency as it was measured."
                        isSummary="true">
                        <type value="Timing"/>
                    </fhir>
                </element>
                <element name="calibration" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Describes the calibrations that have been performed or that are required to be performed</desc>
                    <fhir fid="DeviceMetric.calibration" definition="Describes the calibrations that have been performed or that are required to be performed." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">unspecified | offset | gain | two-point</desc>
                        <fhir fid="DeviceMetric.calibration.type" definition="Describes the type of the calibration method." isSummary="true">
                            <type value="code"/>
                            <binding displayName="DeviceMetricCalibrationType" strength="required" description="Describes the type of a metric calibration." valueSet="2.16.840.1.113883.4.642.3.650" canonicalUri="http://hl7.org/fhir/ValueSet/metric-calibration-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="state" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">not-calibrated | calibration-required | calibrated | unspecified</desc>
                        <fhir fid="DeviceMetric.calibration.state" definition="Describes the state of the calibration." isSummary="true">
                            <type value="code"/>
                            <binding displayName="DeviceMetricCalibrationState" strength="required" description="Describes the state of a metric calibration." valueSet="2.16.840.1.113883.4.642.3.652" canonicalUri="http://hl7.org/fhir/ValueSet/metric-calibration-state|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="time" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Describes the time last calibration has been performed</desc>
                        <fhir fid="DeviceMetric.calibration.time" definition="Describes the time last calibration has been performed." isSummary="true">
                            <type value="instant"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.39" name="DeviceRequest" displayName="DeviceRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DeviceRequest">
            <desc language="en-US">Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DeviceRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="quick" uri="http://siframework.org/cqf" name="Quality Improvement and Clinical Knowledge (QUICK)"/>
            </fhir>
            <element name="DeviceRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Medical device request</desc>
                <fhir fid="DeviceRequest" definition="Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="v2" map="ORC"/>
                    <mapping identity="rim" map="Act[moodCode&lt;=INT]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Request identifier</desc>
                    <fhir fid="DeviceRequest.identifier" definition="Identifiers assigned to this order by the orderer or by the receiver." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC.2, ORC.3"/>
                        <mapping identity="rim" map=".identifier"/>
                        <mapping identity="quick" map="ClinicalStatement.identifier"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="DeviceRequest.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest."
                        comment="Note: This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="DeviceRequest.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this DeviceRequest." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiatesUri"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What request fulfills</desc>
                    <fhir fid="DeviceRequest.basedOn" definition="Plan/proposal/order fulfilled by this request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="v2" map="ORC.8 (plus others)"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                        <mapping identity="quick" map="Proposal.prnReason.reason"/>
                    </fhir>
                </element>
                <element name="priorRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What request replaces</desc>
                    <fhir fid="DeviceRequest.priorRequest" definition="The request takes the place of the referenced completed or terminated request(s)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                        <mapping identity="v2" map="Handled by message location of ORC (ORC.1=RO or RU)"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RPLC].target"/>
                    </fhir>
                </element>
                <element name="groupIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifier of composite request</desc>
                    <fhir fid="DeviceRequest.groupIdentifier" definition="Composite request this is part of." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                        <mapping identity="v2" map="ORC.4"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[moodCode=INT].identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="DeviceRequest.status" definition="The status of the request." comment="This element is labeled as a modifier because the status contains the codes cancelled and entered-in-error that mark the request as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="Codes representing the status of the request." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="ORC.5"/>
                        <mapping identity="rim" map=".status"/>
                        <mapping identity="quick" map="Action.currentStatus"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="DeviceRequest.intent" definition="Whether the request is a proposal, plan, an original order or a reflex order." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestIntent" strength="required" description="The kind of diagnostic request." valueSet="2.16.840.1.113883.4.642.3.113" canonicalUri="http://hl7.org/fhir/ValueSet/request-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="DeviceRequest.priority" definition="Indicates how quickly the {{title}} should be addressed with respect to other requests." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="TQ1.9"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <choice name="code[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Device requested</desc>
                    <fhir fid="DeviceRequest.code[x]" definition="The details of the device to be used." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIR Device Types" strength="example" description="Codes for devices that can be requested." valueSet="2.16.840.1.113883.4.642.3.208" canonicalUri="http://hl7.org/fhir/ValueSet/device-kind"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="quick" map="DeviceUse.device"/>
                    </fhir>
                    <element name="codeReference">
                        <fhir fid="DeviceRequest.codeReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </fhir>
                    </element>
                    <element name="codeCodeableConcept">
                        <fhir fid="DeviceRequest.codeCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Device details</desc>
                    <fhir fid="DeviceRequest.parameter" definition="Specific parameters for the ordered item.  For example, the prism value for lenses.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="quick" map="DeviceUse.device"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Device detail</desc>
                        <fhir fid="DeviceRequest.parameter.code" definition="A code or string that identifies the device detail being asserted.">
                            <type value="CodeableConcept"/>
                            <binding displayName="ParameterCode" strength="example" description="A code that identifies the device detail."/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="quick" map="DeviceUse.device"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Value of detail</desc>
                        <fhir fid="DeviceRequest.parameter.value[x]" definition="The value of the device detail." comment="Range means device should have a value that falls somewhere within the specified range.">
                            <type value="CodeableConcept"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="boolean"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="quick" map="DeviceUse.device"/>
                        </fhir>
                        <element name="valueCodeableConcept">
                            <fhir fid="DeviceRequest.parameter.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="DeviceRequest.parameter.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="DeviceRequest.parameter.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="DeviceRequest.parameter.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Focus of request</desc>
                    <fhir fid="DeviceRequest.subject" definition="The patient who will use the device." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="Accompanying PID segment"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="quick" map="ClinicalStatement.subject"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter motivating request</desc>
                    <fhir fid="DeviceRequest.encounter" definition="An encounter that provides additional context in which this request is made." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="Accompanying PV1"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                        <mapping identity="quick" map="ClinicalStatement.encounter"/>
                    </fhir>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Desired time or schedule for use</desc>
                    <fhir fid="DeviceRequest.occurrence[x]" definition="The timing schedule for the use of the device. The Schedule data type allows many different expressions, for example. &#34;Every 8 hours&#34;; &#34;Three times a day&#34;; &#34;1/2 an hour before breakfast for 10 days from 23-Dec 2011:&#34;; &#34;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013&#34;." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="v2" map="Accompanying TQ1/TQ2 segments"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                        <mapping identity="quick" map="DeviceUse.applicationSchedule"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="DeviceRequest.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="DeviceRequest.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurrenceTiming">
                        <fhir fid="DeviceRequest.occurrenceTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                </choice>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When recorded</desc>
                    <fhir fid="DeviceRequest.authoredOn" definition="When the request transitioned to being actionable." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="ORC.9"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                        <mapping identity="quick" map="ClinicalStatement.statementDateTime"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/what is requesting diagnostics</desc>
                    <fhir fid="DeviceRequest.requester" definition="The individual who initiated the request and has responsibility for its activation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ORC.12"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="performerType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Filler role</desc>
                    <fhir fid="DeviceRequest.performerType" definition="Desired type of performer for doing the diagnostic testing." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Participant Roles" strength="example" description="Indicates specific responsibility of an individual within the care team, such as &#34;Primary physician&#34;, &#34;Team coordinator&#34;, &#34;Caregiver&#34;, etc." valueSet="2.16.840.1.113883.4.642.3.152" canonicalUri="http://hl7.org/fhir/ValueSet/participant-role"/>
                        <mapping identity="workflow" map="Request.performerType"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=KIND].code"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Requested Filler</desc>
                    <fhir fid="DeviceRequest.performer" definition="The desired performer for doing the diagnostic testing." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coded Reason for request</desc>
                    <fhir fid="DeviceRequest.reasonCode" definition="Reason or justification for the use of this device." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Diagnosis or problem codes justifying the reason for requesting the device." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16"/>
                        <mapping identity="rim" map=".reasonCode"/>
                        <mapping identity="quick" map="Action.indication.reason"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Linked Reason for request</desc>
                    <fhir fid="DeviceRequest.reasonReference" definition="Reason or justification for the use of this device." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated insurance coverage</desc>
                    <fhir fid="DeviceRequest.insurance" definition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                        </type>
                        <mapping identity="workflow" map="Request.insurance"/>
                        <mapping identity="v2" map="IN1/IN2"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COVBY].target"/>
                    </fhir>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional clinical information</desc>
                    <fhir fid="DeviceRequest.supportingInfo" definition="Additional clinical information about the patient that may influence the request fulfilment.  For example, this may include where on the subject's body the device will be used (i.e. the target site)." requirements="Knowing where the device is targeted is important for tracking if multiple sites are possible.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                        <mapping identity="v2" map="Accompanying segments"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=PERT].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Notes or comments</desc>
                    <fhir fid="DeviceRequest.note" definition="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                        <mapping identity="quick" map="ClinicalStatement.additionalText"/>
                    </fhir>
                </element>
                <element name="relevantHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request provenance</desc>
                    <fhir fid="DeviceRequest.relevantHistory" definition="Key events in the history of the request."
                        comment="This might not include provenances for all versions of the request - only those deemed &#34;relevant&#34; or important.&#xD;This SHALL NOT include the Provenance associated with this current version of the resource.  (If that provenance is deemed to be a &#34;relevant&#34; change, it will need to be added as part of a later update.  Until then, it can be queried directly as the Provenance that points to this version using _revinclude&#xD;All Provenances should have some historical version of this Request as their subject.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="workflow" map="Request.relevantHistory"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.40" name="DeviceUseStatement" displayName="DeviceUseStatement" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DeviceUseStatement">
            <desc language="en-US">A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DeviceUseStatement" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="quick" uri="http://siframework.org/cqf" name="Quality Improvement and Clinical Knowledge (QUICK)"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="DeviceUseStatement" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Record of use of a device</desc>
                <fhir fid="DeviceUseStatement" definition="A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="quick" map="DeviceUsePerformanceOccurrence"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifier for this record</desc>
                    <fhir fid="DeviceUseStatement.identifier" definition="An external identifier for this statement such as an IRI." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="quick" map="ClinicalStatement.identifier"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills plan, proposal or order</desc>
                    <fhir fid="DeviceUseStatement.basedOn" definition="A plan, proposal or order that is fulfilled in whole or in part by this DeviceUseStatement." requirements="Allows tracing of authorization for the DeviceUseStatement and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC in proximity to EVN segment"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | completed | entered-in-error +</desc>
                    <fhir fid="DeviceUseStatement.status" definition="A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed."
                        comment="DeviceUseStatment is a statement at a point in time.  The status is only representative at the point when it was asserted.  The value set for contains codes that assert the status of the use  by the patient (for example, stopped or on hold) as well as codes that assert the status of the resource itself (for example, entered in error).&#xD;&#xD;This element is labeled as a modifier because the status contains the codes that mark the statement as not currently valid."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="DeviceUseStatementStatus" strength="required" description="A coded concept indicating the current status of the Device Usage." valueSet="2.16.840.1.113883.4.642.3.214" canonicalUri="http://hl7.org/fhir/ValueSet/device-statement-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                        <mapping identity="quick" map="…status"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Patient using device</desc>
                    <fhir fid="DeviceUseStatement.subject" definition="The patient who used the device." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="quick" map="ClinicalStatement.subject"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="derivedFrom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting information</desc>
                    <fhir fid="DeviceUseStatement.derivedFrom" definition="Allows linking the DeviceUseStatement to the underlying Request, or to other information that supports or is used to derive the DeviceUseStatement."
                        comment="The most common use cases for deriving a DeviceUseStatement comes from creating it from a request or from an observation or a claim. it should be noted that the amount of information that is available varies from the type resource that you derive the DeviceUseStatement from." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Claim"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How often the device was used</desc>
                    <fhir fid="DeviceUseStatement.timing[x]" definition="How often the device was used." isSummary="true">
                        <type value="Timing"/>
                        <type value="Period"/>
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="quick" map="DeviceUse.applicationSchedule"/>
                    </fhir>
                    <element name="timingTiming">
                        <fhir fid="DeviceUseStatement.timingTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                    <element name="timingPeriod">
                        <fhir fid="DeviceUseStatement.timingPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="timingDateTime">
                        <fhir fid="DeviceUseStatement.timingDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recordedOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When statement was recorded</desc>
                    <fhir fid="DeviceUseStatement.recordedOn" definition="The time at which the statement was made/recorded." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="quick" map="ClinicalStatement.statementDateTime"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who made the statement</desc>
                    <fhir fid="DeviceUseStatement.source" definition="Who reported the device was being used by the patient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Reference to device used</desc>
                    <fhir fid="DeviceUseStatement.device" definition="The details of the device used." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="quick" map="DeviceUse.device"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why device was used</desc>
                    <fhir fid="DeviceUseStatement.reasonCode" definition="Reason or justification for the use of the device." isSummary="true">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="quick" map="Action.indication.reason"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was DeviceUseStatement performed?</desc>
                    <fhir fid="DeviceUseStatement.reasonReference" definition="Indicates another resource whose existence justifies this DeviceUseStatement." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.4 or by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Target body site</desc>
                    <fhir fid="DeviceUseStatement.bodySite" definition="Indicates the anotomic location on the subject's body where the device was used ( i.e. the target)."
                        requirements="Knowing where the device is targeted is important for tracking if multiple sites are possible. If more information than just a code is required, use the extension [http://hl7.org/fhir/StructureDefinition/bodySite](null.html)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="rim" map="targetSiteCode"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Addition details (comments, instructions)</desc>
                    <fhir fid="DeviceUseStatement.note" definition="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="quick" map="ClinicalStatement.additionalText"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.41" name="DiagnosticReport" displayName="DiagnosticReport" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DiagnosticReport">
            <desc language="en-US">The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic
                reports.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">To support reporting for any diagnostic report into a clinical data repository.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DiagnosticReport" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="DiagnosticReport" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A Diagnostic report - a combination of request information, atomic results, images, interpretation, as well as formatted reports</desc>
                <fhir fid="DiagnosticReport"
                    definition="The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."
                    comment="This is intended to capture a single report and is not suitable for use in displaying summary information that covers multiple reports.  For example, this resource has not been designed for laboratory cumulative reporting formats nor detailed structured reports for sequencing.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="ORU -&gt; OBR"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier for report</desc>
                    <fhir fid="DiagnosticReport.identifier" definition="Identifiers assigned to this report by the performer or other systems." comment="Usually assigned by the Information System of the diagnostic service provider (filler id)."
                        requirements="Need to know what identifier to use when making queries about this report from the source laboratory, and for linking to the report outside FHIR context." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="OBR-51/ for globally unique filler ID  - OBR-3 , For non-globally unique filler-id the flller/placer number must be combined with the universal service Id -  OBR-2(if present)+OBR-3+OBR-4"/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What was requested</desc>
                    <fhir fid="DiagnosticReport.basedOn" definition="Details concerning a service requested." comment="Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single test result resource. Note that there are also cases where one request leads to multiple reports."
                        requirements="This allows tracing of authorization for the report and tracking whether proposals/recommendations were acted upon.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/NutritionOrder"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC? OBR-2/3?"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">registered | partial | preliminary | final +</desc>
                    <fhir fid="DiagnosticReport.status" definition="The status of the diagnostic report." requirements="Diagnostic services routinely issue provisional/incomplete reports, and sometimes withdraw previously released reports." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="DiagnosticReportStatus" strength="required" description="The status of the diagnostic report." valueSet="2.16.840.1.113883.4.642.3.235" canonicalUri="http://hl7.org/fhir/ValueSet/diagnostic-report-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="OBR-25 (not 1:1 mapping)"/>
                        <mapping identity="rim" map="statusCode  Note: final and amended are distinguished by whether observation is the subject of a ControlAct event of type &#34;revise&#34;"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Service category</desc>
                    <fhir fid="DiagnosticReport.category" definition="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes."
                        comment="Multiple categories are allowed using various categorization schemes.   The level of granularity is defined by the category concepts in the value set. More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in DiagnosticReport.code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Diagnostic Service Section Codes" strength="example" description="Codes for diagnostic service sections." valueSet="2.16.840.1.113883.4.642.3.234" canonicalUri="http://hl7.org/fhir/ValueSet/diagnostic-service-sections"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="OBR-24"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=COMP].source[classCode=LIST, moodCode=EVN, code &lt; LabService].code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name/Code for this diagnostic report</desc>
                    <fhir fid="DiagnosticReport.code" definition="A code or name that describes this diagnostic report." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="LOINC Diagnostic Report Codes" strength="preferred" description="Codes that describe Diagnostic Reports." valueSet="2.16.840.1.113883.4.642.3.233" canonicalUri="http://hl7.org/fhir/ValueSet/report-codes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="OBR-4 (HL7 v2 doesn't provide an easy way to indicate both the ordered test and the performed panel)"/>
                        <mapping identity="rim" map="code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The subject of the report - usually, but not always, the patient</desc>
                    <fhir fid="DiagnosticReport.subject" definition="The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources." requirements="SHALL know the subject context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3 (no HL7 v2 mapping for Group or Device)"/>
                        <mapping identity="rim" map="participation[typeCode=SBJ]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Health care event when test ordered</desc>
                    <fhir fid="DiagnosticReport.encounter" definition="The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about."
                        comment="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter  but still be tied to the context of the encounter  (e.g. pre-admission laboratory tests)." requirements="Links the request to the Encounter context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="effective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Clinically relevant time/time-period for report</desc>
                    <fhir fid="DiagnosticReport.effective[x]" definition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself."
                        comment="If the diagnostic procedure was performed on the patient, this is the time it was performed. If there are specimens, the diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship between the specimens and the diagnostically relevant time is not always automatic."
                        requirements="Need to know where in the patient history to file/present this report." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="OBR-7"/>
                        <mapping identity="rim" map="effectiveTime"/>
                    </fhir>
                    <element name="effectiveDateTime">
                        <fhir fid="DiagnosticReport.effectiveDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="effectivePeriod">
                        <fhir fid="DiagnosticReport.effectivePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">DateTime this version was made</desc>
                    <fhir fid="DiagnosticReport.issued" definition="The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified." comment="May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report."
                        requirements="Clinicians need to be able to check the date that the report was released." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="OBR-22"/>
                        <mapping identity="rim" map="participation[typeCode=VRF or AUT].time"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Responsible Diagnostic Service</desc>
                    <fhir fid="DiagnosticReport.performer" definition="The diagnostic service that is responsible for issuing the report." comment="This is not necessarily the source of the atomic data items or the entity that interpreted the results. It is the entity that takes responsibility for the clinical report."
                        requirements="Need to know whom to contact if there are queries about the results. Also may need to track the source of reports for secondary data analysis." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT-8 (where this PRT-4-Participation = &#34;PO&#34;)"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                    </fhir>
                </element>
                <element name="resultsInterpreter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Primary result interpreter</desc>
                    <fhir fid="DiagnosticReport.resultsInterpreter" definition="The practitioner or organization that is responsible for the report's conclusions and interpretations." comment="Might not be the same entity that takes responsibility for the clinical report."
                        requirements="Need to know whom to contact if there are queries about the results. Also may need to track the source of reports for secondary data analysis." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="OBR-32, PRT-8 (where this PRT-4-Participation = &#34;PI&#34;)"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                    </fhir>
                </element>
                <element name="specimen" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specimens this report is based on</desc>
                    <fhir fid="DiagnosticReport.specimen" definition="Details about the specimens on which this diagnostic report is based." comment="If the specimen is sufficiently specified with a code in the test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per observation or group."
                        requirements="Need to be able to report information about the collected specimens on which the report is based.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                        </type>
                        <mapping identity="v2" map="SPM"/>
                        <mapping identity="rim" map="participation[typeCode=SBJ]"/>
                    </fhir>
                </element>
                <element name="result" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Observations</desc>
                    <fhir fid="DiagnosticReport.result" definition="[Observations](observation.html)  that are part of this diagnostic report." comment="Observations can contain observations." requirements="Need to support individual results, or  groups of results, where the result grouping is arbitrary, but meaningful.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                        </type>
                        <mapping identity="v2" map="OBXs"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=COMP].target"/>
                    </fhir>
                </element>
                <element name="imagingStudy" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reference to full details of imaging associated with the diagnostic report</desc>
                    <fhir fid="DiagnosticReport.imagingStudy" definition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images."
                        comment="ImagingStudy and the image element are somewhat overlapping - typically, the list of image references in the image element will also be found in one of the imaging study resources. However, each caters to different types of displays for different types of purposes. Neither, either, or both may be provided.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/>
                        </type>
                        <mapping identity="rim" map="outboundRelationship[typeCode=COMP].target[classsCode=DGIMG, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="media" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Key images associated with this report</desc>
                    <fhir fid="DiagnosticReport.media" definition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." requirements="Many diagnostic services include images in the report as part of their service." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="OBX?"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=COMP].target"/>
                    </fhir>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Comment about the image (e.g. explanation)</desc>
                        <fhir fid="DiagnosticReport.media.comment" definition="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features."
                            comment="The comment should be displayed with the image. It would be common for the report to include additional discussion of the image contents in other sections such as the conclusion." requirements="The provider of the report should make a comment about each image included in the report.">
                            <type value="string"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="link" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the image source</desc>
                        <fhir fid="DiagnosticReport.media.link" definition="Reference to the image source." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            </type>
                            <mapping identity="rim" map=".value.reference"/>
                        </fhir>
                    </element>
                </element>
                <element name="conclusion" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Clinical conclusion (interpretation) of test results</desc>
                    <fhir fid="DiagnosticReport.conclusion" definition="Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report." requirements="Need to be able to provide a conclusion that is not lost among the basic result data.">
                        <type value="string"/>
                        <mapping identity="v2" map="OBX"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=&#34;SPRT&#34;].source[classCode=OBS, moodCode=EVN, code=LOINC:48767-8].value (type=ST)"/>
                    </fhir>
                </element>
                <element name="conclusionCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Codes for the clinical conclusion of test results</desc>
                    <fhir fid="DiagnosticReport.conclusionCode" definition="One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Diagnosis codes provided as adjuncts to the report." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        <mapping identity="v2" map="OBX"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=SPRT].source[classCode=OBS, moodCode=EVN, code=LOINC:54531-9].value (type=CD)"/>
                    </fhir>
                </element>
                <element name="presentedForm" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Entire report as issued</desc>
                    <fhir fid="DiagnosticReport.presentedForm" definition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." comment="&#34;application/pdf&#34; is recommended as the most reliable and interoperable in this context."
                        requirements="Gives laboratory the ability to provide its own fully formatted report for clinical fidelity.">
                        <type value="Attachment"/>
                        <mapping identity="v2" map="OBX"/>
                        <mapping identity="rim" map="text (type=ED)"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.42" name="DocumentManifest" displayName="DocumentManifest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DocumentManifest">
            <desc language="en-US">A collection of documents compiled for a purpose together with metadata that applies to the collection.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DocumentManifest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="xds" uri="http://ihe.net/xds" name="XDS metadata equivalent"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="DocumentManifest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A list that defines a set of documents</desc>
                <fhir fid="DocumentManifest" definition="A collection of documents compiled for a purpose together with metadata that applies to the collection.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Act[classCode=FOLDER, moodCode=EVN]"/>
                </fhir>
                <element name="masterIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Unique Identifier for the set of documents</desc>
                    <fhir fid="DocumentManifest.masterIdentifier" definition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="id [need a list semantic to indicate order matters]"/>
                        <mapping identity="xds" map="SubmissionSet.uniqueId"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Other identifiers for the manifest</desc>
                    <fhir fid="DocumentManifest.identifier" definition="Other identifiers associated with the document manifest, including version independent  identifiers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="TXA-16-Unique Document File Name?"/>
                        <mapping identity="rim" map=".id / .setId"/>
                        <mapping identity="xds" map="SubmissionSet.entryUUID"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">current | superseded | entered-in-error</desc>
                    <fhir fid="DocumentManifest.status" definition="The status of this document manifest." comment="This element is labeled as a modifier because the status contains the codes that mark the manifest as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="DocumentReferenceStatus" strength="required" description="The status of the document reference." valueSet="2.16.840.1.113883.4.642.3.7" canonicalUri="http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                        <mapping identity="xds" map="SubmissionSet status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of document set</desc>
                    <fhir fid="DocumentManifest.type" definition="The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest."
                        comment="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v3 Code System ActCode" strength="example" description="The activity that caused the DocumentManifest to be created." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActCode"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="xds" map="SubmissionSet.contentTypeCode"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The subject of the set of documents</desc>
                    <fhir fid="DocumentManifest.subject"
                        definition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="xds" map="SubmissionSet.patientId"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When this document manifest created</desc>
                    <fhir fid="DocumentManifest.created" definition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)."
                        comment="Creation time is used for tracking, organizing versions and searching. This is the creation time of the document set, not the documents on which it is based.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                        <mapping identity="xds" map="SubmissionSet.submissionTime"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who and/or what authored the DocumentManifest</desc>
                    <fhir fid="DocumentManifest.author" definition="Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included." comment="Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                        <mapping identity="xds" map="SubmissionSet.author"/>
                    </fhir>
                </element>
                <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended to get notified about this set of documents</desc>
                    <fhir fid="DocumentManifest.recipient" definition="A patient, practitioner, or organization for which this set of documents is intended."
                        comment="How the recipient receives the document set or is notified of it is up to the implementation. This element is just a statement of intent. If the recipient is a person, and it is not known whether the person is a patient or a practitioner, RelatedPerson would be the default choice.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.cause"/>
                        <mapping identity="rim" map=".participation[typeCode=IRCP].role"/>
                        <mapping identity="xds" map="SubmissionSet.intendedRecipient"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The source system/application/software</desc>
                    <fhir fid="DocumentManifest.source" definition="Identifies the source system, application, or software that produced the document manifest.">
                        <type value="uri"/>
                        <mapping identity="rim" map=".participation[typeCode=PFM].time"/>
                        <mapping identity="xds" map="SubmissionSet.sourceId"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human-readable description (title)</desc>
                    <fhir fid="DocumentManifest.description" definition="Human-readable description of the source document. This is sometimes known as the &#34;title&#34;."
                        comment="What the document is about, rather than a terse summary of the document. It is commonly the case that records do not have a title and are collectively referred to by the display name of Record code (e.g. a &#34;consultation&#34; or &#34;progress note&#34;)." requirements="Helps humans to assess whether the document is of interest." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".title"/>
                        <mapping identity="xds" map="SubmissionSet.title"/>
                    </fhir>
                </element>
                <element name="content" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Items in manifest</desc>
                    <fhir fid="DocumentManifest.content" definition="The list of Resources that consist of the parts of this manifest."
                        comment="When used for XDS the intended focus of the DocumentManifest is for the reference to target to be a set of DocumentReference Resources. The reference is to &#34;Any&#34; to support EN 13606 usage, where an extract is DocumentManifest that references  List and Composition resources."
                        requirements="Any Resources are allowed to be grouped in a Manifest. The manifest brings context to the group." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target"/>
                        <mapping identity="xds" map="SubmissionSet DocumentEntry(s)"/>
                    </fhir>
                </element>
                <element name="related" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Related things</desc>
                    <fhir fid="DocumentManifest.related" definition="Related identifiers or resources associated with the DocumentManifest." comment="May be identifiers or resources that caused the DocumentManifest to be created.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifiers of things that are related</desc>
                        <fhir fid="DocumentManifest.related.identifier" definition="Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers." comment="If both identifier and ref elements are present they shall refer to the same thing.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="ref" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Related Resource</desc>
                        <fhir fid="DocumentManifest.related.ref" definition="Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc." comment="If both identifier and ref elements are present they shall refer to the same thing.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.43" name="DocumentReference" displayName="DocumentReference" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DocumentReference">
            <desc language="en-US">A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="DocumentReference" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="fhircomposition" uri="http://hl7.org/fhir/composition" name="FHIR Composition"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="cda" uri="http://hl7.org/v3/cda" name="CDA (R2)"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="xds" uri="http://ihe.net/xds" name="XDS metadata equivalent"/>
            </fhir>
            <element name="DocumentReference" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A reference to a document</desc>
                <fhir fid="DocumentReference"
                    definition="A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text."
                    comment="Usually, this is used for documents other than those defined by FHIR.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="fhircomposition" map="when describing a Composition"/>
                    <mapping identity="rim" map="Document[classCode=&#34;DOC&#34; and moodCode=&#34;EVN&#34;]"/>
                    <mapping identity="cda" map="when describing a CDA"/>
                </fhir>
                <element name="masterIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Master Version Specific Identifier</desc>
                    <fhir fid="DocumentReference.masterIdentifier" definition="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document." comment="CDA Document Id extension and root."
                        requirements="The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form &#34;oid^extension&#34;, where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.)."
                        isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="fhircomposition" map="Composition.identifier"/>
                        <mapping identity="v2" map="TXA-12"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="xds" map="DocumentEntry.uniqueId"/>
                        <mapping identity="cda" map="ClinicalDocument/id"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Other identifiers for the document</desc>
                    <fhir fid="DocumentReference.identifier" definition="Other identifiers associated with the document, including version independent identifiers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="TXA-16?"/>
                        <mapping identity="rim" map=".id / .setId"/>
                        <mapping identity="xds" map="DocumentEntry.entryUUID"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">current | superseded | entered-in-error</desc>
                    <fhir fid="DocumentReference.status" definition="The status of this document reference." comment="This is the status of the DocumentReference object, which might be independent from the docStatus element.&#xA;&#xA;This element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid." isModifier="true"
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="DocumentReferenceStatus" strength="required" description="The status of the document reference." valueSet="2.16.840.1.113883.4.642.3.7" canonicalUri="http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="TXA-19"/>
                        <mapping identity="rim"
                            map="interim: .completionCode=&#34;IN&#34; &amp; ./statusCode[isNormalDatatype()]=&#34;active&#34;;  final: .completionCode=&#34;AU&#34; &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;complete&#34; and not(./inboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()]/source[subsumesCode(&#34;ActClass#CACT&#34;) and moodCode=&#34;EVN&#34; and domainMember(&#34;ReviseDocument&#34;, code) and isNormalAct()]);  amended: .completionCode=&#34;AU&#34; &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;complete&#34; and ./inboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()]/source[subsumesCode(&#34;ActClass#CACT&#34;) and moodCode=&#34;EVN&#34; and domainMember(&#34;ReviseDocument&#34;, code) and isNormalAct() and statusCode=&#34;completed&#34;];  withdrawn : .completionCode=NI &amp;&amp;  ./statusCode[isNormalDatatype()]=&#34;obsolete&#34;"/>
                        <mapping identity="xds" map="DocumentEntry.availabilityStatus"/>
                    </fhir>
                </element>
                <element name="docStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">preliminary | final | amended | entered-in-error</desc>
                    <fhir fid="DocumentReference.docStatus" definition="The status of the underlying document." comment="The document that is pointed to might be in various lifecycle states." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CompositionStatus" strength="required" description="Status of the underlying document." valueSet="2.16.840.1.113883.4.642.3.241" canonicalUri="http://hl7.org/fhir/ValueSet/composition-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="fhircomposition" map="Composition.status"/>
                        <mapping identity="v2" map="TXA-17"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of document (LOINC if possible)</desc>
                    <fhir fid="DocumentReference.type" definition="Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced."
                        comment="Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Document Type Value Set" strength="preferred" description="Precise type of clinical document." valueSet="2.16.840.1.113883.3.88.12.80.47" canonicalUri="http://hl7.org/fhir/ValueSet/c80-doc-typecodes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="fhircomposition" map="Composition.type"/>
                        <mapping identity="v2" map="TXA-2"/>
                        <mapping identity="rim" map="./code"/>
                        <mapping identity="xds" map="DocumentEntry.type"/>
                        <mapping identity="cda" map="ClinicalDocument/code/@code &#xA;&#xA;The typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted."/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Categorization of document</desc>
                    <fhir fid="DocumentReference.category" definition="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type."
                        comment="Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Document Class Value Set" strength="example" description="High-level kind of a clinical document at a macro level." valueSet="2.16.840.1.113883.3.88.12.80.46" canonicalUri="http://hl7.org/fhir/ValueSet/document-classcodes"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="fhircomposition" map="Composition.class"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;EVN&#34;].code"/>
                        <mapping identity="xds" map="DocumentEntry.class"/>
                        <mapping identity="cda" map="Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/what is the subject of the document</desc>
                    <fhir fid="DocumentReference.subject" definition="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="fhircomposition" map="Composition.subject"/>
                        <mapping identity="v2" map="PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;SBJ&#34;].role[typeCode=&#34;PAT&#34;]"/>
                        <mapping identity="xds" map="DocumentEntry.patientId"/>
                        <mapping identity="cda" map="ClinicalDocument/recordTarget/"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When this document reference was created</desc>
                    <fhir fid="DocumentReference.date" definition="When the document reference was created." comment="Referencing/indexing time is used for tracking, organizing versions and searching." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="fhircomposition" map="Composition.date"/>
                        <mapping identity="rim" map=".availabilityTime[type=&#34;TS&#34;]"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who and/or what authored the document</desc>
                    <fhir fid="DocumentReference.author" definition="Identifies who is responsible for adding the information to the document." comment="Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="fhircomposition" map="Composition.author"/>
                        <mapping identity="v2" map="TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;AUT&#34;].role[classCode=&#34;ASSIGNED&#34;]"/>
                        <mapping identity="xds" map="DocumentEntry.author"/>
                        <mapping identity="cda" map="ClinicalDocument/author"/>
                    </fhir>
                </element>
                <element name="authenticator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/what authenticated the document</desc>
                    <fhir fid="DocumentReference.authenticator" definition="Which person or organization authenticates that this document is valid." comment="Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="fhircomposition" map="Composition.attester"/>
                        <mapping identity="v2" map="TXA-10"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;AUTHEN&#34;].role[classCode=&#34;ASSIGNED&#34;]"/>
                        <mapping identity="xds" map="DocumentEntry.legalAuthenticator"/>
                        <mapping identity="cda" map="ClinicalDocument/legalAuthenticator"/>
                    </fhir>
                </element>
                <element name="custodian" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization which maintains the document</desc>
                    <fhir fid="DocumentReference.custodian" definition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document."
                        comment="Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="fhircomposition" map="Composition.custodian"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;RCV&#34;].role[classCode=&#34;CUST&#34;].scoper[classCode=&#34;ORG&#34; and determinerCode=&#34;INST&#34;]"/>
                    </fhir>
                </element>
                <element name="relatesTo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Relationships to other documents</desc>
                    <fhir fid="DocumentReference.relatesTo" definition="Relationships that this document has with other document references that already exist." comment="This element is labeled as a modifier because documents that append to other documents are incomplete on their own." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="fhircomposition" map="Composition.relatesTo"/>
                        <mapping identity="rim" map=".outboundRelationship"/>
                        <mapping identity="xds" map="DocumentEntry Associations"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">replaces | transforms | signs | appends</desc>
                        <fhir fid="DocumentReference.relatesTo.code" definition="The type of relationship that this document has with anther document." comment="If this document appends another document, then the document cannot be fully understood without also accessing the referenced document." isSummary="true">
                            <type value="code"/>
                            <binding displayName="DocumentRelationshipType" strength="required" description="The type of relationship between documents." valueSet="2.16.840.1.113883.4.642.3.244" canonicalUri="http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1"/>
                            <mapping identity="fhircomposition" map="Composition.relatesTo.code"/>
                            <mapping identity="rim" map=".outboundRelationship.typeCode"/>
                            <mapping identity="xds" map="DocumentEntry Associations type"/>
                        </fhir>
                    </element>
                    <element name="target" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Target of the relationship</desc>
                        <fhir fid="DocumentReference.relatesTo.target" definition="The target document of this relationship." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                            <mapping identity="fhircomposition" map="Composition.relatesTo.target"/>
                            <mapping identity="rim" map=".target[classCode=&#34;DOC&#34;, moodCode=&#34;EVN&#34;].id"/>
                            <mapping identity="xds" map="DocumentEntry Associations reference"/>
                        </fhir>
                    </element>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human-readable description</desc>
                    <fhir fid="DocumentReference.description" definition="Human-readable description of the source document." comment="What the document is about,  a terse summary of the document." requirements="Helps humans to assess whether the document is of interest." isSummary="true">
                        <type value="string"/>
                        <mapping identity="v2" map="TXA-25"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;].target.text"/>
                        <mapping identity="xds" map="DocumentEntry.comments"/>
                    </fhir>
                </element>
                <element name="securityLabel" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Document security-tags</desc>
                    <fhir fid="DocumentReference.securityLabel" definition="A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the &#34;reference&#34; to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to."
                        comment="The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce.   &#xA;&#xA;In the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects."
                        requirements="Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SecurityLabels" strength="extensible" description="Security Labels from the Healthcare Privacy and Security Classification System." valueSet="2.16.840.1.113883.4.642.3.47" canonicalUri="http://hl7.org/fhir/ValueSet/security-labels"/>
                        <mapping identity="fhircomposition" map="Composition.confidentiality, Composition.meta.security"/>
                        <mapping identity="v2" map="TXA-18"/>
                        <mapping identity="rim" map=".confidentialityCode"/>
                        <mapping identity="xds" map="DocumentEntry.confidentialityCode"/>
                        <mapping identity="cda" map="ClinicalDocument/confidentialityCode/@code"/>
                    </fhir>
                </element>
                <element name="content" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Document referenced</desc>
                    <fhir fid="DocumentReference.content" definition="The document and format referenced. There may be multiple content element repetitions, each with a different format." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="fhircomposition" map="Bundle(Composition+*)"/>
                        <mapping identity="rim" map="document.text"/>
                    </fhir>
                    <element name="attachment" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Where to access the document</desc>
                        <fhir fid="DocumentReference.content.attachment" definition="The document or URL of the document along with critical metadata to prove content has integrity." isSummary="true">
                            <type value="Attachment"/>
                            <mapping identity="fhircomposition" map="Composition.language, &#xA;Composition.title, &#xA;Composition.date"/>
                            <mapping identity="v2" map="TXA-3 for mime type"/>
                            <mapping identity="rim" map="document.text"/>
                            <mapping identity="xds" map="DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime"/>
                            <mapping identity="cda" map="ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date"/>
                        </fhir>
                    </element>
                    <element name="format" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Format/content rules for the document</desc>
                        <fhir fid="DocumentReference.content.format" definition="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType." comment="Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="DocumentReference Format Code Set" strength="preferred" description="Document Format Codes." valueSet="1.3.6.1.4.1.19376.1.2.7.1" canonicalUri="http://hl7.org/fhir/ValueSet/formatcodes"/>
                            <mapping identity="fhircomposition" map="Composition.meta.profile"/>
                            <mapping identity="rim" map="document.text"/>
                            <mapping identity="xds" map="DocumentEntry.formatCode"/>
                            <mapping identity="cda" map="derived from the IHE Profile or Implementation Guide templateID"/>
                        </fhir>
                    </element>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Clinical context of document</desc>
                    <fhir fid="DocumentReference.context" definition="The clinical context in which the document was prepared." comment="These values are primarily added to help with searching for interesting/relevant documents." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=&#34;SUBJ&#34;].target[classCode&lt;'ACT']"/>
                    </fhir>
                    <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Context of the document content</desc>
                        <fhir fid="DocumentReference.context.encounter" definition="Describes the clinical encounter or type of care that the document content is associated with.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                            </type>
                            <mapping identity="workflow" map="Event.context"/>
                            <mapping identity="w5" map="FiveWs.context"/>
                            <mapping identity="fhircomposition" map="Composition.encounter"/>
                            <mapping identity="rim" map="unique(highest(./outboundRelationship[typeCode=&#34;SUBJ&#34; and isNormalActRelationship()], priorityNumber)/target[moodCode=&#34;EVN&#34; and classCode=(&#34;ENC&#34;, &#34;PCPR&#34;) and isNormalAct])"/>
                        </fhir>
                    </element>
                    <element name="event" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Main clinical acts documented</desc>
                        <fhir fid="DocumentReference.context.event" definition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a &#34;History and Physical Report&#34; in which the procedure being documented is necessarily a &#34;History and Physical&#34; act."
                            comment="An event can further specialize the act inherent in the type, such as  where it is simply &#34;Procedure Report&#34; and the procedure was a &#34;colonoscopy&#34;. If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="v3 Code System ActCode" strength="example" description="This list of codes represents the main clinical acts being documented." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActCode"/>
                            <mapping identity="fhircomposition" map="Composition.event.code"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="xds" map="DocumentEntry.eventCodeList"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time of service that is being documented</desc>
                        <fhir fid="DocumentReference.context.period" definition="The time period over which the service that is described by the document was provided." isSummary="true">
                            <type value="Period"/>
                            <mapping identity="fhircomposition" map="Composition.event.period"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                            <mapping identity="xds" map="DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime"/>
                            <mapping identity="cda" map="ClinicalDocument/documentationOf/&#xA;serviceEvent/effectiveTime/low/&#xA;@value --&gt; ClinicalDocument/documentationOf/&#xA;serviceEvent/effectiveTime/high/&#xA;@value"/>
                        </fhir>
                    </element>
                    <element name="facilityType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Kind of facility where patient was seen</desc>
                        <fhir fid="DocumentReference.context.facilityType" definition="The kind of facility where the patient was seen.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Facility Type Code Value Set" strength="example" description="XDS Facility Type." valueSet="2.16.840.1.113883.3.88.12.80.67" canonicalUri="http://hl7.org/fhir/ValueSet/c80-facilitycodes"/>
                            <mapping identity="fhircomposition" map="usually from a mapping to a local ValueSet"/>
                            <mapping identity="rim" map=".participation[typeCode=&#34;LOC&#34;].role[classCode=&#34;DSDLOC&#34;].code"/>
                            <mapping identity="xds" map="DocumentEntry.healthcareFacilityTypeCode"/>
                            <mapping identity="cda" map="usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code"/>
                        </fhir>
                    </element>
                    <element name="practiceSetting" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional details about where the content was created (e.g. clinical specialty)</desc>
                        <fhir fid="DocumentReference.context.practiceSetting" definition="This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty."
                            comment="This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC."
                            requirements="This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Practice Setting Code Value Set" strength="example" description="Additional details about where the content was created (e.g. clinical specialty)." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                            <mapping identity="fhircomposition" map="usually from a mapping to a local ValueSet"/>
                            <mapping identity="rim" map=".participation[typeCode=&#34;LOC&#34;].role[classCode=&#34;DSDLOC&#34;].code"/>
                            <mapping identity="xds" map="DocumentEntry.practiceSettingCode"/>
                            <mapping identity="cda" map="usually from a mapping to a local ValueSet"/>
                        </fhir>
                    </element>
                    <element name="sourcePatientInfo" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Patient demographics from source</desc>
                        <fhir fid="DocumentReference.context.sourcePatientInfo" definition="The Patient Information as known when the document was published. May be a reference to a version specific, or contained.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            </type>
                            <mapping identity="fhircomposition" map="Composition.subject"/>
                            <mapping identity="rim" map=".participation[typeCode=&#34;SBJ&#34;].role[typeCode=&#34;PAT&#34;]"/>
                            <mapping identity="xds" map="DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId"/>
                            <mapping identity="cda" map="ClinicalDocument/recordTarget/"/>
                        </fhir>
                    </element>
                    <element name="related" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Related identifiers or resources</desc>
                        <fhir fid="DocumentReference.context.related" definition="Related identifiers or resources associated with the DocumentReference." comment="May be identifiers or resources that caused the DocumentReference or referenced Document to be created.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="fhircomposition" map="Composition.event.detail"/>
                            <mapping identity="rim" map="./outboundRelationship[typeCode=&#34;PERT&#34; and isNormalActRelationship()] / target[isNormalAct]"/>
                            <mapping identity="xds" map="DocumentEntry.referenceIdList"/>
                            <mapping identity="cda" map="ClinicalDocument/relatedDocument"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.44" name="DomainResource" displayName="DomainResource" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/DomainResource">
            <desc language="en-US">A resource that includes narrative, extensions, and contained resources.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="true" type="DomainResource" baseDefinition="http://hl7.org/fhir/StructureDefinition/Resource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="DomainResource" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A resource with narrative, extensions, and contained resources</desc>
                <fhir fid="DomainResource" definition="A resource that includes narrative, extensions, and contained resources.">
                    <mapping identity="rim" map="Entity. Role, or Act"/>
                    <constraint key="dom-2" severity="error" human="If the resource is contained in another resource, it SHALL NOT contain nested Resources" expression="contained.contained.empty()" xpath="not(parent::f:contained and f:contained)" source=""/>
                    <constraint key="dom-4" severity="error" human="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" expression="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" xpath="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" source=""/>
                    <constraint key="dom-3" severity="error" human="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource"
                        expression="contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"
                        xpath="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))" source=""/>
                    <constraint key="dom-6" severity="warning" human="A resource should have narrative for robust management" expression="text.`div`.exists()" xpath="exists(f:text/h:div)" source=""/>
                    <constraint key="dom-5" severity="error" human="If a resource is contained in another resource, it SHALL NOT have a security label" expression="contained.meta.security.empty()" xpath="not(exists(f:contained/*/f:meta/f:security))" source=""/>
                </fhir>
                <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Text summary of the resource, for human interpretation</desc>
                    <fhir fid="DomainResource.text"
                        definition="A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &#34;clinically safe&#34; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                        comment="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &#34;text blob&#34; or where text is additionally entered raw or narrated and encoded information is added later.">
                        <type value="Narrative"/>
                        <mapping identity="rim" map="Act.text?"/>
                    </fhir>
                </element>
                <element name="contained" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contained, inline Resources</desc>
                    <fhir fid="DomainResource.contained" definition="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."
                        comment="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.">
                        <type value="Resource"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="extension" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional content defined by implementations</desc>
                    <fhir fid="DomainResource.extension"
                        definition="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."
                        comment="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.">
                        <type value="Extension"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="modifierExtension" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Extensions that cannot be ignored</desc>
                    <fhir fid="DomainResource.modifierExtension"
                        definition="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.&#xA;&#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
                        comment="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."
                        requirements="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension)."
                        isModifier="true">
                        <type value="Extension"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.45" name="EffectEvidenceSynthesis" displayName="EffectEvidenceSynthesis" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EffectEvidenceSynthesis">
            <desc language="en-US">The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EffectEvidenceSynthesis" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="EffectEvidenceSynthesis" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A quantified estimate of effect based on a body of evidence</desc>
                <fhir fid="EffectEvidenceSynthesis" definition="The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="ees-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this effect evidence synthesis, represented as a URI (globally unique)</desc>
                    <fhir fid="EffectEvidenceSynthesis.url"
                        definition="An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the effect evidence synthesis to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the effect evidence synthesis</desc>
                    <fhir fid="EffectEvidenceSynthesis.identifier" definition="A formal identifier that is used to identify this effect evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this effect evidence synthesis outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the effect evidence synthesis</desc>
                    <fhir fid="EffectEvidenceSynthesis.version"
                        definition="The identifier that is used to identify this version of the effect evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the effect evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different effect evidence synthesis instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the effect evidence synthesis with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this effect evidence synthesis (computer friendly)</desc>
                    <fhir fid="EffectEvidenceSynthesis.name" definition="A natural language name identifying the effect evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this effect evidence synthesis (human friendly)</desc>
                    <fhir fid="EffectEvidenceSynthesis.title" definition="A short, descriptive, user-friendly title for the effect evidence synthesis." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="EffectEvidenceSynthesis.status" definition="The status of this effect evidence synthesis. Enables tracking the life-cycle of the content." comment="Allows filtering of effect evidence synthesiss that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="EffectEvidenceSynthesis.date" definition="The date  (and optionally time) when the effect evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the effect evidence synthesis changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the effect evidence synthesis. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="EffectEvidenceSynthesis.publisher" definition="The name of the organization or individual that published the effect evidence synthesis."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the effect evidence synthesis is the organization or individual primarily responsible for the maintenance and upkeep of the effect evidence synthesis. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the effect evidence synthesis. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the effect evidence synthesis.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="EffectEvidenceSynthesis.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the effect evidence synthesis</desc>
                    <fhir fid="EffectEvidenceSynthesis.description" definition="A free text natural language description of the effect evidence synthesis from a consumer's perspective."
                        comment="This description can be used to capture details such as why the effect evidence synthesis was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the effect evidence synthesis as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the effect evidence synthesis is presumed to be the predominant language in the place the effect evidence synthesis was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="EffectEvidenceSynthesis.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="Annotation"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="EffectEvidenceSynthesis.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate effect evidence synthesis instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for effect evidence synthesis (if applicable)</desc>
                    <fhir fid="EffectEvidenceSynthesis.jurisdiction" definition="A legal or geographic region in which the effect evidence synthesis is intended to be used." comment="It may be possible for the effect evidence synthesis to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="EffectEvidenceSynthesis.copyright" definition="A copyright statement relating to the effect evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the effect evidence synthesis."
                        requirements="Consumers must be able to determine any legal restrictions on the use of the effect evidence synthesis and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the effect evidence synthesis was approved by publisher</desc>
                    <fhir fid="EffectEvidenceSynthesis.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the effect evidence synthesis was last reviewed</desc>
                    <fhir fid="EffectEvidenceSynthesis.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the effect evidence synthesis is expected to be used</desc>
                    <fhir fid="EffectEvidenceSynthesis.effectivePeriod" definition="The period during which the effect evidence synthesis content was or is planned to be in active use."
                        comment="The effective period for a effect evidence synthesis  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the effect evidence synthesis are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the EffectEvidenceSynthesis, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="EffectEvidenceSynthesis.topic" definition="Descriptive topics related to the content of the EffectEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching."
                        requirements="Repositories must be able to determine how to categorize the EffectEvidenceSynthesis so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="EffectEvidenceSynthesis.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="EffectEvidenceSynthesis.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="EffectEvidenceSynthesis.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="EffectEvidenceSynthesis.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="EffectEvidenceSynthesis.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="EffectEvidenceSynthesiss must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="synthesisType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of synthesis</desc>
                    <fhir fid="EffectEvidenceSynthesis.synthesisType" definition="Type of synthesis eg meta-analysis.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SynthesisType" strength="extensible" description="Types of combining results from a body of evidence (eg. summary data meta-analysis)." valueSet="2.16.840.1.113883.4.642.3.1347" canonicalUri="http://hl7.org/fhir/ValueSet/synthesis-type"/>
                    </fhir>
                </element>
                <element name="studyType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of study</desc>
                    <fhir fid="EffectEvidenceSynthesis.studyType" definition="Type of study eg randomized trial.">
                        <type value="CodeableConcept"/>
                        <binding displayName="StudyType" strength="extensible" description="Types of research studies (types of research methods)." valueSet="2.16.840.1.113883.4.642.3.1349" canonicalUri="http://hl7.org/fhir/ValueSet/study-type"/>
                    </fhir>
                </element>
                <element name="population" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What population?</desc>
                    <fhir fid="EffectEvidenceSynthesis.population" definition="A reference to a EvidenceVariable resource that defines the population for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposure" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What exposure?</desc>
                    <fhir fid="EffectEvidenceSynthesis.exposure" definition="A reference to a EvidenceVariable resource that defines the exposure for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposureAlternative" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What comparison exposure?</desc>
                    <fhir fid="EffectEvidenceSynthesis.exposureAlternative" definition="A reference to a EvidenceVariable resource that defines the comparison exposure for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What outcome?</desc>
                    <fhir fid="EffectEvidenceSynthesis.outcome" definition="A reference to a EvidenceVariable resomece that defines the outcome for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="sampleSize" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What sample size was involved?</desc>
                    <fhir fid="EffectEvidenceSynthesis.sampleSize" definition="A description of the size of the sample involved in the synthesis.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of sample size</desc>
                        <fhir fid="EffectEvidenceSynthesis.sampleSize.description" definition="Human-readable summary of sample size.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="numberOfStudies" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How many studies?</desc>
                        <fhir fid="EffectEvidenceSynthesis.sampleSize.numberOfStudies" definition="Number of studies included in this evidence synthesis.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="numberOfParticipants" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How many participants?</desc>
                        <fhir fid="EffectEvidenceSynthesis.sampleSize.numberOfParticipants" definition="Number of participants included in this evidence synthesis.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                </element>
                <element name="resultsByExposure" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What was the result per exposure?</desc>
                    <fhir fid="EffectEvidenceSynthesis.resultsByExposure" definition="A description of the results for each exposure considered in the effect estimate.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of results by exposure</desc>
                        <fhir fid="EffectEvidenceSynthesis.resultsByExposure.description" definition="Human-readable summary of results by exposure state.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="exposureState" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">exposure | exposure-alternative</desc>
                        <fhir fid="EffectEvidenceSynthesis.resultsByExposure.exposureState" definition="Whether these results are for the exposure state or alternative exposure state.">
                            <type value="code"/>
                            <binding displayName="ExposureState" strength="required" description="Whether the results by exposure is describing the results for the primary exposure of interest (exposure) or the alternative state (exposureAlternative)." valueSet="2.16.840.1.113883.4.642.3.1351" canonicalUri="http://hl7.org/fhir/ValueSet/exposure-state|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="variantState" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Variant exposure states</desc>
                        <fhir fid="EffectEvidenceSynthesis.resultsByExposure.variantState" definition="Used to define variant exposure states such as low-risk state.">
                            <type value="CodeableConcept"/>
                            <binding displayName="EvidenceVariantState" strength="extensible" description="Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states." valueSet="2.16.840.1.113883.4.642.3.1353" canonicalUri="http://hl7.org/fhir/ValueSet/evidence-variant-state"/>
                        </fhir>
                    </element>
                    <element name="riskEvidenceSynthesis" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Risk evidence synthesis</desc>
                        <fhir fid="EffectEvidenceSynthesis.resultsByExposure.riskEvidenceSynthesis" definition="Reference to a RiskEvidenceSynthesis resource.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RiskEvidenceSynthesis"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="effectEstimate" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What was the estimated effect</desc>
                    <fhir fid="EffectEvidenceSynthesis.effectEstimate" definition="The estimated effect of the exposure variant." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of effect estimate</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.description" definition="Human-readable summary of effect estimate.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of efffect estimate</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.type" definition="Examples include relative risk and mean difference.">
                            <type value="CodeableConcept"/>
                            <binding displayName="EffectEstimateType" strength="extensible" description="Whether the effect estimate is an absolute effect estimate (absolute difference) or a relative effect estimate (relative difference), and the specific type of effect estimate (eg relative risk or median difference)." valueSet="2.16.840.1.113883.4.642.3.1355"
                                canonicalUri="http://hl7.org/fhir/ValueSet/effect-estimate-type"/>
                        </fhir>
                    </element>
                    <element name="variantState" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Variant exposure states</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.variantState" definition="Used to define variant exposure states such as low-risk state.">
                            <type value="CodeableConcept"/>
                            <binding displayName="EvidenceVariantState" strength="extensible" description="Used for results by exposure in variant states such as low-risk, medium-risk and high-risk states." valueSet="2.16.840.1.113883.4.642.3.1353" canonicalUri="http://hl7.org/fhir/ValueSet/evidence-variant-state"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Point estimate</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.value" definition="The point estimate of the effect estimate.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="unitOfMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What unit is the outcome described in?</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.unitOfMeasure" definition="Specifies the UCUM unit for the outcome.">
                            <type value="CodeableConcept"/>
                            <binding displayName="UCUM Codes" strength="required" description="Unified Code for Units of Measure (UCUM)." valueSet="2.16.840.1.113883.4.642.3.912" canonicalUri="http://hl7.org/fhir/ValueSet/ucum-units|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="precisionEstimate" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">How precise the estimate is</desc>
                        <fhir fid="EffectEvidenceSynthesis.effectEstimate.precisionEstimate" definition="A description of the precision of the estimate for the effect.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of precision estimate</desc>
                            <fhir fid="EffectEvidenceSynthesis.effectEstimate.precisionEstimate.type" definition="Examples include confidence interval and interquartile range.">
                                <type value="CodeableConcept"/>
                                <binding displayName="PrecisionEstimateType" strength="extensible" description="Method of reporting variability of estimates, such as confidence intervals, interquartile range or standard deviation." valueSet="2.16.840.1.113883.4.642.3.1357" canonicalUri="http://hl7.org/fhir/ValueSet/precision-estimate-type"/>
                            </fhir>
                        </element>
                        <element name="level" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Level of confidence interval</desc>
                            <fhir fid="EffectEvidenceSynthesis.effectEstimate.precisionEstimate.level" definition="Use 95 for a 95% confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="from" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Lower bound</desc>
                            <fhir fid="EffectEvidenceSynthesis.effectEstimate.precisionEstimate.from" definition="Lower bound of confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="to" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Upper bound</desc>
                            <fhir fid="EffectEvidenceSynthesis.effectEstimate.precisionEstimate.to" definition="Upper bound of confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="certainty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">How certain is the effect</desc>
                    <fhir fid="EffectEvidenceSynthesis.certainty" definition="A description of the certainty of the effect estimate.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="rating" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Certainty rating</desc>
                        <fhir fid="EffectEvidenceSynthesis.certainty.rating" definition="A rating of the certainty of the effect estimate.">
                            <type value="CodeableConcept"/>
                            <binding displayName="QualityOfEvidenceRating" strength="extensible" description="The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence." valueSet="2.16.840.1.113883.4.642.3.1020"
                                canonicalUri="http://hl7.org/fhir/ValueSet/evidence-quality"/>
                        </fhir>
                    </element>
                    <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Used for footnotes or explanatory notes</desc>
                        <fhir fid="EffectEvidenceSynthesis.certainty.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                            <type value="Annotation"/>
                        </fhir>
                    </element>
                    <element name="certaintySubcomponent" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A component that contributes to the overall certainty</desc>
                        <fhir fid="EffectEvidenceSynthesis.certainty.certaintySubcomponent" definition="A description of a component of the overall certainty.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of subcomponent of certainty rating</desc>
                            <fhir fid="EffectEvidenceSynthesis.certainty.certaintySubcomponent.type" definition="Type of subcomponent of certainty rating.">
                                <type value="CodeableConcept"/>
                                <binding displayName="CertaintySubcomponentType" strength="extensible" description="The subcomponent classification of quality of evidence rating systems." valueSet="2.16.840.1.113883.4.642.3.1359" canonicalUri="http://hl7.org/fhir/ValueSet/certainty-subcomponent-type"/>
                            </fhir>
                        </element>
                        <element name="rating" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Subcomponent certainty rating</desc>
                            <fhir fid="EffectEvidenceSynthesis.certainty.certaintySubcomponent.rating" definition="A rating of a subcomponent of rating certainty.">
                                <type value="CodeableConcept"/>
                                <binding displayName="CertaintySubcomponentRating" strength="extensible" description="The quality rating of the subcomponent of a quality of evidence rating." valueSet="2.16.840.1.113883.4.642.3.1361" canonicalUri="http://hl7.org/fhir/ValueSet/certainty-subcomponent-rating"/>
                            </fhir>
                        </element>
                        <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Used for footnotes or explanatory notes</desc>
                            <fhir fid="EffectEvidenceSynthesis.certainty.certaintySubcomponent.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.46" name="Encounter" displayName="Encounter" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Encounter">
            <desc language="en-US">An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Encounter" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Encounter" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An interaction during which services are provided to the patient</desc>
                <fhir fid="Encounter" definition="An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Encounter[@moodCode='EVN']"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifier(s) by which this encounter is known</desc>
                    <fhir fid="Encounter.identifier" definition="Identifier(s) by which this encounter is known." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PV1-19"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">planned | arrived | triaged | in-progress | onleave | finished | cancelled +</desc>
                    <fhir fid="Encounter.status" definition="planned | arrived | triaged | in-progress | onleave | finished | cancelled +." comment="Note that internal business rules will determine the appropriate transitions that may occur between statuses (and also classes)." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EncounterStatus" strength="required" description="Current state of the encounter." valueSet="2.16.840.1.113883.4.642.3.246" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="No clear equivalent in HL7 v2; active/finished could be inferred from PV1-44, PV1-45, PV2-24; inactive could be inferred from PV2-16"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">List of past encounter statuses</desc>
                    <fhir fid="Encounter.statusHistory" definition="The status history permits the encounter resource to contain the status history without needing to read through the historical versions of the resource, or even have the server store them." comment="The current status is always found in the current version of the resource, not the status history.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                    <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">planned | arrived | triaged | in-progress | onleave | finished | cancelled +</desc>
                        <fhir fid="Encounter.statusHistory.status" definition="planned | arrived | triaged | in-progress | onleave | finished | cancelled +.">
                            <type value="code"/>
                            <binding displayName="EncounterStatus" strength="required" description="Current state of the encounter." valueSet="2.16.840.1.113883.4.642.3.246" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-status|4.0.1"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The time that the episode was in the specified status</desc>
                        <fhir fid="Encounter.statusHistory.period" definition="The time that the episode was in the specified status.">
                            <type value="Period"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                </element>
                <element name="class" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Classification of patient encounter</desc>
                    <fhir fid="Encounter.class" definition="Concepts representing classification of patient encounter such as ambulatory (outpatient), inpatient, emergency, home health or others due to local variations." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="V3 Value SetActEncounterCode" strength="extensible" description="Classification of the encounter." valueSet="2.16.840.1.113883.1.11.13955" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActEncounterCode"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="PV1-2"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=LIST].code"/>
                    </fhir>
                </element>
                <element name="classHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">List of past encounter classes</desc>
                    <fhir fid="Encounter.classHistory"
                        definition="The class history permits the tracking of the encounters transitions without needing to go  through the resource history.  This would be used for a case where an admission starts of as an emergency encounter, then transitions into an inpatient scenario. Doing this and not restarting a new encounter ensures that any lab/diagnostic results can more easily follow the patient and not require re-processing and not get lost or cancelled during a kind of discharge from emergency to inpatient.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                    <element name="class" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">inpatient | outpatient | ambulatory | emergency +</desc>
                        <fhir fid="Encounter.classHistory.class" definition="inpatient | outpatient | ambulatory | emergency +.">
                            <type value="Coding"/>
                            <binding displayName="V3 Value SetActEncounterCode" strength="extensible" description="Classification of the encounter." valueSet="2.16.840.1.113883.1.11.13955" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActEncounterCode"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The time that the episode was in the specified class</desc>
                        <fhir fid="Encounter.classHistory.period" definition="The time that the episode was in the specified class.">
                            <type value="Period"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific type of encounter</desc>
                    <fhir fid="Encounter.type" definition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)." comment="Since there are many ways to further classify encounters, this element is 0..*." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Encounter type" strength="example" description="The type of encounter." valueSet="2.16.840.1.113883.4.642.3.248" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="PV1-4 / PV1-18"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="serviceType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Specific type of service</desc>
                    <fhir fid="Encounter.serviceType" definition="Broad categorization of the service that is to be provided (e.g. cardiology)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service type" strength="example" description="Broad categorization of the service that is to be provided." valueSet="2.16.840.1.113883.4.642.3.518" canonicalUri="http://hl7.org/fhir/ValueSet/service-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="v2" map="PV1-10"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Indicates the urgency of the encounter</desc>
                    <fhir fid="Encounter.priority" definition="Indicates the urgency of the encounter.">
                        <type value="CodeableConcept"/>
                        <binding displayName="v3 Code System ActPriority" strength="example" description="Indicates the urgency of the encounter." canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActPriority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="PV2-25"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The patient or group present at the encounter</desc>
                    <fhir fid="Encounter.subject" definition="The patient or group present at the encounter."
                        comment="While the encounter is always about the patient, the patient might not actually be known in all contexts of use, and there may be a group of patients that could be anonymous (such as in a group therapy for Alcoholics Anonymous - where the recording of the encounter could be used for billing on the number of people/staff and not important to the context of the specific patients) or alternately in veterinary care a herd of sheep receiving treatment (where the animals are not individually tracked)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ]/role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="episodeOfCare" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Episode(s) of care that this encounter should be recorded against</desc>
                    <fhir fid="Encounter.episodeOfCare"
                        definition="Where a specific encounter should be classified as a part of a specific episode(s) of care this field should be used. This association can facilitate grouping of related encounters together for a specific purpose, such as government reporting, issue tracking, association via a common problem.  The association is recorded on the encounter as these are typically created after the episode of care and grouped on entry rather than editing the episode of care to append another encounter to it (the episode of care could span years)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-54, PV1-53"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The ServiceRequest that initiated this encounter</desc>
                    <fhir fid="Encounter.basedOn" definition="The request this encounter satisfies (e.g. incoming referral or procedure request).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="rim" map=".reason.ClinicalDocument"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">List of participants involved in the encounter</desc>
                    <fhir fid="Encounter.participant" definition="The list of people responsible for providing the service." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="v2" map="ROL"/>
                        <mapping identity="rim" map=".participation[typeCode=PFM]"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Role of participant in encounter</desc>
                        <fhir fid="Encounter.participant.type" definition="Role of participant in encounter."
                            comment="The participant type indicates how an individual participates in an encounter. It includes non-practitioner participants, and for practitioners this is to describe the action type in the context of this encounter (e.g. Admitting Dr, Attending Dr, Translator, Consulting Dr). This is different to the practitioner roles which are functional roles, derived from terms of employment, education, licensing, etc."
                            isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Participant type" strength="extensible" description="Role of participant in encounter." valueSet="2.16.840.1.113883.4.642.3.250" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-participant-type"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="v2" map="ROL-3 (or maybe PRT-4)"/>
                            <mapping identity="rim" map=".functionCode"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Period of time during the encounter that the participant participated</desc>
                        <fhir fid="Encounter.participant.period" definition="The period of time that the specified participant participated in the encounter. These can overlap or be sub-sets of the overall encounter's period.">
                            <type value="Period"/>
                            <mapping identity="v2" map="ROL-5, ROL-6 (or maybe PRT-5)"/>
                            <mapping identity="rim" map=".time"/>
                        </fhir>
                    </element>
                    <element name="individual" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Persons involved in the encounter other than the patient</desc>
                        <fhir fid="Encounter.participant.individual" definition="Persons involved in the encounter other than the patient." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="v2" map="ROL-4"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                </element>
                <element name="appointment" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The appointment that scheduled this encounter</desc>
                    <fhir fid="Encounter.appointment" definition="The appointment that scheduled this encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Appointment"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="SCH-1 / SCH-2"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=ENC, moodCode=APT]"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The start and end time of the encounter</desc>
                    <fhir fid="Encounter.period" definition="The start and end time of the encounter." comment="If not (yet) known, the end of the Period may be omitted.">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="PV1-44, PV1-45"/>
                        <mapping identity="rim" map=".effectiveTime (low &amp; high)"/>
                    </fhir>
                </element>
                <element name="length" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Quantity of time the encounter lasted (less time absent)</desc>
                    <fhir fid="Encounter.length" definition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." comment="May differ from the time the Encounter.period lasted because of leave of absence.">
                        <type value="Duration"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="v2" map="(PV1-45 less PV1-44) iff ( (PV1-44 not empty) and (PV1-45 not empty) ); units in minutes"/>
                        <mapping identity="rim" map=".lengthOfStayQuantity"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coded reason the encounter takes place</desc>
                    <fhir fid="Encounter.reasonCode" definition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis." comment="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Encounter Reason Codes" strength="preferred" description="Reason why the encounter takes place." valueSet="2.16.840.1.113883.4.642.3.261" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-reason"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason the encounter takes place (reference)</desc>
                    <fhir fid="Encounter.reasonReference" definition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis."
                        comment="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN-4 / PV2-3 (note: PV2-3 is nominally constrained to inpatient admissions; HL7 v2 makes no vocabulary suggestions for PV2-3; would not expect PV2 segment or PV2-3 to be in use in all implementations )"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="diagnosis" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The list of diagnosis relevant to this encounter</desc>
                    <fhir fid="Encounter.diagnosis" definition="The list of diagnosis relevant to this encounter." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON]"/>
                    </fhir>
                    <element name="condition" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The diagnosis or procedure relevant to the encounter</desc>
                        <fhir fid="Encounter.diagnosis.condition" definition="Reason the encounter takes place, as specified using information from another resource. For admissions, this is the admission diagnosis. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure."
                            comment="For systems that need to know which was the primary diagnosis, these will be marked with the standard extension primaryDiagnosis (which is a sequence value rather than a flag, 1 = primary diagnosis)." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            </type>
                            <mapping identity="workflow" map="Event.reasonReference"/>
                            <mapping identity="w5" map="FiveWs.why[x]"/>
                            <mapping identity="v2" map="Resources that would commonly referenced at Encounter.indication would be Condition and/or Procedure. These most closely align with DG1/PRB and PR1 respectively."/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                        </fhir>
                    </element>
                    <element name="use" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)</desc>
                        <fhir fid="Encounter.diagnosis.use" definition="Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …).">
                            <type value="CodeableConcept"/>
                            <binding displayName="DiagnosisRole" strength="preferred" description="The type of diagnosis this condition represents." valueSet="2.16.840.1.113883.4.642.3.49" canonicalUri="http://hl7.org/fhir/ValueSet/diagnosis-role"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="rank" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Ranking of the diagnosis (for each role type)</desc>
                        <fhir fid="Encounter.diagnosis.rank" definition="Ranking of the diagnosis (for each role type).">
                            <type value="positiveInt"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].priority"/>
                        </fhir>
                    </element>
                </element>
                <element name="account" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The set of accounts that may be used for billing for this Encounter</desc>
                    <fhir fid="Encounter.account" definition="The set of accounts that may be used for billing for this Encounter." comment="The billing system may choose to allocate billable items associated with the Encounter to different referenced Accounts based on internal business rules.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Account"/>
                        </type>
                        <mapping identity="rim" map=".pertains.A_Account"/>
                    </fhir>
                </element>
                <element name="hospitalization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details about the admission to a healthcare service</desc>
                    <fhir fid="Encounter.hospitalization" definition="Details about the admission to a healthcare service."
                        comment="An Encounter may cover more than just the inpatient stay. Contexts such as outpatients, community clinics, and aged care facilities are also included.&#xD;&#xD;The duration recorded in the period of this encounter covers the entire scope of this hospitalization record.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                    <element name="preAdmissionIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Pre-admission identifier</desc>
                        <fhir fid="Encounter.hospitalization.preAdmissionIdentifier" definition="Pre-admission identifier.">
                            <type value="Identifier"/>
                            <mapping identity="v2" map="PV1-5"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="origin" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The location/organization from which the patient came before admission</desc>
                        <fhir fid="Encounter.hospitalization.origin" definition="The location/organization from which the patient came before admission.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map=".participation[typeCode=ORG].role"/>
                        </fhir>
                    </element>
                    <element name="admitSource" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">From where patient was admitted (physician referral, transfer)</desc>
                        <fhir fid="Encounter.hospitalization.admitSource" definition="From where patient was admitted (physician referral, transfer).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Admit source" strength="preferred" description="From where the patient was admitted." valueSet="2.16.840.1.113883.4.642.3.257" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-admit-source"/>
                            <mapping identity="v2" map="PV1-14"/>
                            <mapping identity="rim" map=".admissionReferralSourceCode"/>
                        </fhir>
                    </element>
                    <element name="reAdmission" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission</desc>
                        <fhir fid="Encounter.hospitalization.reAdmission" definition="Whether this hospitalization is a readmission and why if known.">
                            <type value="CodeableConcept"/>
                            <binding displayName="v2 RE-ADMISSION INDICATOR" strength="example" description="The reason for re-admission of this hospitalization encounter." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0092"/>
                            <mapping identity="v2" map="PV1-13"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="dietPreference" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Diet preferences reported by the patient</desc>
                        <fhir fid="Encounter.hospitalization.dietPreference" definition="Diet preferences reported by the patient." comment="For example, a patient may request both a dairy-free and nut-free diet preference (not mutually exclusive)."
                            requirements="Used to track patient's diet restrictions and/or preference. For a complete description of the nutrition needs of a patient during their stay, one should use the nutritionOrder resource which links to Encounter.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Diet" strength="example" description="Medical, cultural or ethical food preferences to help with catering requirements." valueSet="2.16.840.1.113883.4.642.3.255" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-diet"/>
                            <mapping identity="v2" map="PV1-38"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=EVN, code=&#34;diet&#34;]"/>
                        </fhir>
                    </element>
                    <element name="specialCourtesy" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Special courtesies (VIP, board member)</desc>
                        <fhir fid="Encounter.hospitalization.specialCourtesy" definition="Special courtesies (VIP, board member).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Special courtesy" strength="preferred" description="Special courtesies." valueSet="2.16.840.1.113883.4.642.3.252" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-special-courtesy"/>
                            <mapping identity="v2" map="PV1-16"/>
                            <mapping identity="rim" map=".specialCourtesiesCode"/>
                        </fhir>
                    </element>
                    <element name="specialArrangement" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Wheelchair, translator, stretcher, etc.</desc>
                        <fhir fid="Encounter.hospitalization.specialArrangement" definition="Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Special arrangements" strength="preferred" description="Special arrangements." valueSet="2.16.840.1.113883.4.642.3.253" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-special-arrangements"/>
                            <mapping identity="v2" map="PV1-15 / OBR-30 / OBR-43"/>
                            <mapping identity="rim" map=".specialArrangementCode"/>
                        </fhir>
                    </element>
                    <element name="destination" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Location/organization to which the patient is discharged</desc>
                        <fhir fid="Encounter.hospitalization.destination" definition="Location/organization to which the patient is discharged.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="v2" map="PV1-37"/>
                            <mapping identity="rim" map=".participation[typeCode=DST]"/>
                        </fhir>
                    </element>
                    <element name="dischargeDisposition" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Category or kind of location after discharge</desc>
                        <fhir fid="Encounter.hospitalization.dischargeDisposition" definition="Category or kind of location after discharge.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Discharge disposition" strength="example" description="Discharge Disposition." valueSet="2.16.840.1.113883.4.642.3.259" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-discharge-disposition"/>
                            <mapping identity="v2" map="PV1-36"/>
                            <mapping identity="rim" map=".dischargeDispositionCode"/>
                        </fhir>
                    </element>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">List of locations where the patient has been</desc>
                    <fhir fid="Encounter.location" definition="List of locations where  the patient has been during this encounter." comment="Virtual encounters can be recorded in the Encounter by specifying a location reference to a location of type &#34;kind&#34; such as &#34;client's home&#34; and an encounter.class = &#34;virtual&#34;.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC]"/>
                    </fhir>
                    <element name="location" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Location the encounter takes place</desc>
                        <fhir fid="Encounter.location.location" definition="The location where the encounter takes place.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <mapping identity="workflow" map="Event.location"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                            <mapping identity="v2" map="PV1-3 / PV1-6 / PV1-11 / PV1-42 / PV1-43"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                    <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">planned | active | reserved | completed</desc>
                        <fhir fid="Encounter.location.status" definition="The status of the participants' presence at the specified location during the period specified. If the participant is no longer at the location, then the period will have an end date/time."
                            comment="When the patient is no longer active at a location, then the period end date is entered, and the status may be changed to completed.">
                            <type value="code"/>
                            <binding displayName="EncounterLocationStatus" strength="required" description="The status of the location." valueSet="2.16.840.1.113883.4.642.3.262" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-location-status|4.0.1"/>
                            <mapping identity="rim" map=".role.statusCode"/>
                        </fhir>
                    </element>
                    <element name="physicalType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The physical type of the location (usually the level in the location hierachy - bed room ward etc.)</desc>
                        <fhir fid="Encounter.location.physicalType" definition="This will be used to specify the required levels (bed/ward/room/etc.) desired to be recorded to simplify either messaging or query."
                            comment="This information is de-normalized from the Location resource to support the easier understanding of the encounter resource and processing in messaging or query.&#xA;&#xA;There may be many levels in the hierachy, and this may only pic specific levels that are required for a specific usage scenario.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Location type" strength="example" description="Physical form of the location." valueSet="2.16.840.1.113883.4.642.3.328" canonicalUri="http://hl7.org/fhir/ValueSet/location-physical-type"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time period during which the patient was present at the location</desc>
                        <fhir fid="Encounter.location.period" definition="Time period during which the patient was present at the location.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".time"/>
                        </fhir>
                    </element>
                </element>
                <element name="serviceProvider" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The organization (facility) responsible for this encounter</desc>
                    <fhir fid="Encounter.serviceProvider"
                        definition="The organization that is primarily responsible for this Encounter's services. This MAY be the same as the organization on the Patient record, however it could be different, such as if the actor performing the services was from an external organization (which may be billed seperately) for an external consultation.  Refer to the example bundle showing an abbreviated set of Encounters for a colonoscopy.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="v2" map="PL.6  &amp; PL.1"/>
                        <mapping identity="rim" map=".particiaption[typeCode=PFM].role"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Another Encounter this encounter is part of</desc>
                    <fhir fid="Encounter.partOf" definition="Another Encounter of which this encounter is a part of (administratively or in time)." comment="This is also used for associating a child's encounter back to the mother's encounter.&#xD;&#xD;Refer to the Notes section in the Patient resource for further details.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=COMP, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.47" name="Endpoint" displayName="Endpoint" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Endpoint">
            <desc language="en-US">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Endpoint" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The technical details of an endpoint that can be used for electronic services</desc>
                <fhir fid="Endpoint" definition="The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.">
                    <mapping identity="rim" map="n/a"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifies this endpoint across multiple systems</desc>
                    <fhir fid="Endpoint.identifier" definition="Identifier for the organization that is used to identify the endpoint across multiple disparate systems." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | suspended | error | off | entered-in-error | test</desc>
                    <fhir fid="Endpoint.status" definition="active | suspended | error | off | test." comment="This element is labeled as a modifier because the status contains codes that mark the endpoint as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EndpointStatus" strength="required" description="The status of the endpoint." valueSet="2.16.840.1.113883.4.642.3.494" canonicalUri="http://hl7.org/fhir/ValueSet/endpoint-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="connectionType" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Protocol/Profile/Standard to be used with this endpoint connection</desc>
                    <fhir fid="Endpoint.connectionType" definition="A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook)." comment="For additional connectivity details for the protocol, extensions will be used at this point, as in the XDS example." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="Endpoint Connection Type" strength="extensible" description="" valueSet="2.16.840.1.113883.4.642.3.498" canonicalUri="http://hl7.org/fhir/ValueSet/endpoint-connection-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A name that this endpoint can be identified by</desc>
                    <fhir fid="Endpoint.name" definition="A friendly name that this endpoint can be referred to with." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that manages this endpoint (might not be the organization that exposes the endpoint)</desc>
                    <fhir fid="Endpoint.managingOrganization" definition="The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data)."
                        comment="This property is not typically used when searching for Endpoint resources for usage. The typical usage is via the reference from an applicable Organization/Location/Practitioner resource, which is where the context is provided. Multiple Locations may reference a single endpoint, and don't have to be within the same organization resource, but most likely within the same organizational hierarchy."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for source (e.g. troubleshooting)</desc>
                    <fhir fid="Endpoint.contact" definition="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.">
                        <type value="ContactPoint"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Interval the endpoint is expected to be operational</desc>
                    <fhir fid="Endpoint.period" definition="The interval during which the endpoint is expected to be operational." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="payloadType" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)</desc>
                    <fhir fid="Endpoint.payloadType" definition="The payload type describes the acceptable content that can be communicated on the endpoint." comment="The payloadFormat describes the serialization format of the data, where the payloadType indicates the specific document/schema that is being transferred; e.g. DischargeSummary or CarePlan." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Endpoint Payload Type" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.496" canonicalUri="http://hl7.org/fhir/ValueSet/endpoint-payload-type"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="payloadMimeType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Mimetype to send. If not specified, the content could be anything (including no payload, if the connectionType defined this)</desc>
                    <fhir fid="Endpoint.payloadMimeType" definition="The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType)."
                        comment="Sending the payload has obvious security consequences. The server is responsible for ensuring that the content is appropriately secured." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The technical base address for connecting to this endpoint</desc>
                    <fhir fid="Endpoint.address" definition="The uri that describes the actual end-point to connect to."
                        comment="For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs)&#xA;&#xA;This address will be to the service base, without any parameters, or sub-services or resources tacked on.&#xA;&#xA;E.g. for a WADO-RS endpoint, the url should be &#34;https://pacs.hospital.org/wado-rs&#34;&#xA;&#xA;and not &#34;https://pacs.hospital.org/wado-rs/studies/1.2.250.1.59.40211.12345678.678910/series/1.2.250.1.59.40211.789001276.14556172.67789/instances/...&#34;."
                        isSummary="true">
                        <type value="url"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="header" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Usage depends on the channel type</desc>
                    <fhir fid="Endpoint.header" definition="Additional headers / information to send as part of the notification." comment="Exactly what these mean depends on the channel type. The can convey additional information to the recipient and/or meet security requirements." isSummary="false">
                        <type value="string"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.48" name="EnrollmentRequest" displayName="EnrollmentRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EnrollmentRequest">
            <desc language="en-US">This resource provides the insurance enrollment details to the insurer regarding a specified coverage.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EnrollmentRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="EnrollmentRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Enroll in coverage</desc>
                <fhir fid="EnrollmentRequest" definition="This resource provides the insurance enrollment details to the insurer regarding a specified coverage.">
                    <mapping identity="workflow" map="Request"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier</desc>
                    <fhir fid="EnrollmentRequest.identifier" definition="The Response business identifier.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="EnrollmentRequest.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the request as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Creation date</desc>
                    <fhir fid="EnrollmentRequest.created" definition="The date when this resource was created.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Target</desc>
                    <fhir fid="EnrollmentRequest.insurer" definition="The Insurer who is target  of the request.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                    </fhir>
                </element>
                <element name="provider" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Responsible practitioner</desc>
                    <fhir fid="EnrollmentRequest.provider" definition="The practitioner who is responsible for the services rendered to the patient.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="cdanetv4" map="B01"/>
                    </fhir>
                </element>
                <element name="candidate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The subject to be enrolled</desc>
                    <fhir fid="EnrollmentRequest.candidate" definition="Patient Resource.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="cdanetv4" map="C06,C07,C08, C05, C04"/>
                    </fhir>
                </element>
                <element name="coverage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Insurance information</desc>
                    <fhir fid="EnrollmentRequest.coverage" definition="Reference to the program or plan identification, underwriter or payor." requirements="Need to identify the issuer to target for processing and for coordination of benefit processing.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                        </type>
                        <mapping identity="workflow" map="Request.insurance"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.49" name="EnrollmentResponse" displayName="EnrollmentResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EnrollmentResponse">
            <desc language="en-US">This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EnrollmentResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="EnrollmentResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">EnrollmentResponse resource</desc>
                <fhir fid="EnrollmentResponse" definition="This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier</desc>
                    <fhir fid="EnrollmentResponse.identifier" definition="The Response business identifier.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="EnrollmentResponse.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the response as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Claim reference</desc>
                    <fhir fid="EnrollmentResponse.request" definition="Original request resource reference.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EnrollmentRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="cdanetv4" map="A02|G01"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">queued | complete | error | partial</desc>
                    <fhir fid="EnrollmentResponse.outcome" definition="Processing status: error, complete.">
                        <type value="code"/>
                        <binding displayName="Claim Processing Codes" strength="required" description="The outcome of the processing." valueSet="2.16.840.1.113883.4.642.3.13" canonicalUri="http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="disposition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disposition Message</desc>
                    <fhir fid="EnrollmentResponse.disposition" definition="A description of the status of the adjudication.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.code"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Creation date</desc>
                    <fhir fid="EnrollmentResponse.created" definition="The date when the enclosed suite of services were performed or completed.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                    </fhir>
                </element>
                <element name="organization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Insurer</desc>
                    <fhir fid="EnrollmentResponse.organization" definition="The Insurer who produced this adjudicated response.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="requestProvider" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Responsible practitioner</desc>
                    <fhir fid="EnrollmentResponse.requestProvider" definition="The practitioner who is responsible for the services rendered to the patient.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="cdanetv4" map="B01"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.50" name="EpisodeOfCare" displayName="EpisodeOfCare" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare">
            <desc language="en-US">An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EpisodeOfCare" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="EpisodeOfCare" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An association of a Patient with an Organization and Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility</desc>
                <fhir fid="EpisodeOfCare" definition="An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="n/a"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier(s) relevant for this EpisodeOfCare</desc>
                    <fhir fid="EpisodeOfCare.identifier" definition="The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">planned | waitlist | active | onhold | finished | cancelled | entered-in-error</desc>
                    <fhir fid="EpisodeOfCare.status" definition="planned | waitlist | active | onhold | finished | cancelled." comment="This element is labeled as a modifier because the status contains codes that mark the episode as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EpisodeOfCareStatus" strength="required" description="The status of the episode of care." valueSet="2.16.840.1.113883.4.642.3.664" canonicalUri="http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="statusHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Past list of status codes (the current status may be included to cover the start date of the status)</desc>
                    <fhir fid="EpisodeOfCare.statusHistory" definition="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">planned | waitlist | active | onhold | finished | cancelled | entered-in-error</desc>
                        <fhir fid="EpisodeOfCare.statusHistory.status" definition="planned | waitlist | active | onhold | finished | cancelled.">
                            <type value="code"/>
                            <binding displayName="EpisodeOfCareStatus" strength="required" description="The status of the episode of care." valueSet="2.16.840.1.113883.4.642.3.664" canonicalUri="http://hl7.org/fhir/ValueSet/episode-of-care-status|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Duration the EpisodeOfCare was in the specified status</desc>
                        <fhir fid="EpisodeOfCare.statusHistory.period" definition="The period during this EpisodeOfCare that the specific status applied.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type/class - e.g. specialist referral, disease management</desc>
                    <fhir fid="EpisodeOfCare.type" definition="A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care." comment="The type can be very important in processing as this could be used in determining if the EpisodeOfCare is relevant to specific government reporting, or other types of classifications." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Episode of care type" strength="example" description="The type of the episode of care." valueSet="2.16.840.1.113883.4.642.3.666" canonicalUri="http://hl7.org/fhir/ValueSet/episodeofcare-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="diagnosis" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The list of diagnosis relevant to this episode of care</desc>
                    <fhir fid="EpisodeOfCare.diagnosis" definition="The list of diagnosis relevant to this episode of care." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="condition" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Conditions/problems/diagnoses this episode of care is for</desc>
                        <fhir fid="EpisodeOfCare.diagnosis.condition" definition="A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            </type>
                            <mapping identity="workflow" map="Event.reasonReference"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)</desc>
                        <fhir fid="EpisodeOfCare.diagnosis.role" definition="Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="DiagnosisRole" strength="preferred" description="The type of diagnosis this condition represents." valueSet="2.16.840.1.113883.4.642.3.49" canonicalUri="http://hl7.org/fhir/ValueSet/diagnosis-role"/>
                        </fhir>
                    </element>
                    <element name="rank" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Ranking of the diagnosis (for each role type)</desc>
                        <fhir fid="EpisodeOfCare.diagnosis.rank" definition="Ranking of the diagnosis (for each role type)." isSummary="true">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The patient who is the focus of this episode of care</desc>
                    <fhir fid="EpisodeOfCare.patient" definition="The patient who is the focus of this episode of care." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that assumes care</desc>
                    <fhir fid="EpisodeOfCare.managingOrganization" definition="The organization that has assumed the specific responsibilities for the specified duration." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Interval during responsibility is assumed</desc>
                    <fhir fid="EpisodeOfCare.period" definition="The interval during which the managing organization assumes the defined responsibility." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                    </fhir>
                </element>
                <element name="referralRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Originating Referral Request(s)</desc>
                    <fhir fid="EpisodeOfCare.referralRequest" definition="Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                    </fhir>
                </element>
                <element name="careManager" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Care manager/care coordinator for the patient</desc>
                    <fhir fid="EpisodeOfCare.careManager" definition="The practitioner that is the care manager/care coordinator for this patient.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                    </fhir>
                </element>
                <element name="team" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Other practitioners facilitating this episode of care</desc>
                    <fhir fid="EpisodeOfCare.team" definition="The list of practitioners that may be facilitating this episode of care for specific purposes.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                    </fhir>
                </element>
                <element name="account" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The set of accounts that may be used for billing for this EpisodeOfCare</desc>
                    <fhir fid="EpisodeOfCare.account" definition="The set of accounts that may be used for billing for this EpisodeOfCare." comment="The billing system may choose to allocate billable items associated with the EpisodeOfCare to different referenced Accounts based on internal business rules.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Account"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.51" name="EventDefinition" displayName="EventDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EventDefinition">
            <desc language="en-US">The EventDefinition resource provides a reusable description of when a particular event can occur.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EventDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="EventDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A description of when an event can occur</desc>
                <fhir fid="EventDefinition" definition="The EventDefinition resource provides a reusable description of when a particular event can occur.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="evd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this event definition, represented as a URI (globally unique)</desc>
                    <fhir fid="EventDefinition.url"
                        definition="An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the event definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the event definition</desc>
                    <fhir fid="EventDefinition.identifier" definition="A formal identifier that is used to identify this event definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this event definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the event definition</desc>
                    <fhir fid="EventDefinition.version"
                        definition="The identifier that is used to identify this version of the event definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the event definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different event definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the event definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this event definition (computer friendly)</desc>
                    <fhir fid="EventDefinition.name" definition="A natural language name identifying the event definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this event definition (human friendly)</desc>
                    <fhir fid="EventDefinition.title" definition="A short, descriptive, user-friendly title for the event definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the event definition</desc>
                    <fhir fid="EventDefinition.subtitle" definition="An explanatory or alternate title for the event definition giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="EventDefinition.status" definition="The status of this event definition. Enables tracking the life-cycle of the content." comment="Allows filtering of event definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="EventDefinition.experimental" definition="A Boolean value to indicate that this event definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of event definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level event definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of individual the event definition is focused on</desc>
                    <fhir fid="EventDefinition.subject[x]" definition="A code or group definition that describes the intended subject of the event definition.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for an event (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                        <mapping identity="workflow" map="Definition.subject"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="EventDefinition.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="EventDefinition.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="EventDefinition.date" definition="The date  (and optionally time) when the event definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the event definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the event definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="EventDefinition.publisher" definition="The name of the organization or individual that published the event definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the event definition is the organization or individual primarily responsible for the maintenance and upkeep of the event definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the event definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the event definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="EventDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the event definition</desc>
                    <fhir fid="EventDefinition.description" definition="A free text natural language description of the event definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the event definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the event definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the event definition is presumed to be the predominant language in the place the event definition was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="EventDefinition.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate event definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for event definition (if applicable)</desc>
                    <fhir fid="EventDefinition.jurisdiction" definition="A legal or geographic region in which the event definition is intended to be used." comment="It may be possible for the event definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this event definition is defined</desc>
                    <fhir fid="EventDefinition.purpose" definition="Explanation of why this event definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the event definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this event definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the event definition</desc>
                    <fhir fid="EventDefinition.usage" definition="A detailed description of how the event definition is used from a clinical perspective.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="EventDefinition.copyright" definition="A copyright statement relating to the event definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the event definition." requirements="Consumers must be able to determine any legal restrictions on the use of the event definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event definition was approved by publisher</desc>
                    <fhir fid="EventDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections." isSummary="true">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event definition was last reviewed</desc>
                    <fhir fid="EventDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant." isSummary="true">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the event definition is expected to be used</desc>
                    <fhir fid="EventDefinition.effectivePeriod" definition="The period during which the event definition content was or is planned to be in active use."
                        comment="The effective period for a event definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the event definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">E.g. Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="EventDefinition.topic" definition="Descriptive topics related to the module. Topics provide a high-level categorization of the module that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the module so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="EventDefinition.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="EventDefinition.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="EventDefinition.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="EventDefinition.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="EventDefinition.relatedArtifact" definition="Related resources such as additional documentation, justification, or bibliographic references." comment="Each related resource is either an attachment, or a reference to another resource, but not both."
                        requirements="Modules must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="trigger" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">"when" the event occurs (multiple = 'or')</desc>
                    <fhir fid="EventDefinition.trigger" definition="The trigger element defines when the event occurs. If more than one trigger condition is specified, the event fires whenever any one of the trigger conditions is met." isSummary="true">
                        <type value="TriggerDefinition"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.52" name="Evidence" displayName="Evidence" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Evidence">
            <desc language="en-US">The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Evidence" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Evidence" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A research context or question</desc>
                <fhir fid="Evidence" definition="The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="evi-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this evidence, represented as a URI (globally unique)</desc>
                    <fhir fid="Evidence.url"
                        definition="An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the evidence to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the evidence</desc>
                    <fhir fid="Evidence.identifier" definition="A formal identifier that is used to identify this evidence when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this evidence outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the evidence</desc>
                    <fhir fid="Evidence.version"
                        definition="The identifier that is used to identify this version of the evidence when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different evidence instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the evidence with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this evidence (computer friendly)</desc>
                    <fhir fid="Evidence.name" definition="A natural language name identifying the evidence. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this evidence (human friendly)</desc>
                    <fhir fid="Evidence.title" definition="A short, descriptive, user-friendly title for the evidence." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="shortTitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Title for use in informal contexts</desc>
                    <fhir fid="Evidence.shortTitle" definition="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary." requirements="Need to be able to reference the content by a short description, but still provide a longer, more formal title for the content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the Evidence</desc>
                    <fhir fid="Evidence.subtitle" definition="An explanatory or alternate title for the Evidence giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="Evidence.status" definition="The status of this evidence. Enables tracking the life-cycle of the content." comment="Allows filtering of evidences that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="Evidence.date" definition="The date  (and optionally time) when the evidence was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the evidence. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="Evidence.publisher" definition="The name of the organization or individual that published the evidence."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the evidence is the organization or individual primarily responsible for the maintenance and upkeep of the evidence. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the evidence. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the evidence.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="Evidence.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the evidence</desc>
                    <fhir fid="Evidence.description" definition="A free text natural language description of the evidence from a consumer's perspective."
                        comment="This description can be used to capture details such as why the evidence was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the evidence as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the evidence is presumed to be the predominant language in the place the evidence was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="Evidence.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="Annotation"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="Evidence.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for evidence (if applicable)</desc>
                    <fhir fid="Evidence.jurisdiction" definition="A legal or geographic region in which the evidence is intended to be used." comment="It may be possible for the evidence to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="Evidence.copyright" definition="A copyright statement relating to the evidence and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence." requirements="Consumers must be able to determine any legal restrictions on the use of the evidence and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence was approved by publisher</desc>
                    <fhir fid="Evidence.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence was last reviewed</desc>
                    <fhir fid="Evidence.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence is expected to be used</desc>
                    <fhir fid="Evidence.effectivePeriod" definition="The period during which the evidence content was or is planned to be in active use." comment="The effective period for a evidence  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the evidence are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the Evidence, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="Evidence.topic" definition="Descriptive topics related to the content of the Evidence. Topics provide a high-level categorization grouping types of Evidences that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the Evidence so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="Evidence.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="Evidence.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="Evidence.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="Evidence.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="Evidence.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="Evidences must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="exposureBackground" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What population?</desc>
                    <fhir fid="Evidence.exposureBackground" definition="A reference to a EvidenceVariable resource that defines the population for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposureVariant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What exposure?</desc>
                    <fhir fid="Evidence.exposureVariant" definition="A reference to a EvidenceVariable resource that defines the exposure for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What outcome?</desc>
                    <fhir fid="Evidence.outcome" definition="A reference to a EvidenceVariable resomece that defines the outcome for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.53" name="EvidenceVariable" displayName="EvidenceVariable" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/EvidenceVariable">
            <desc language="en-US">The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to be able to define and reuse the definition of individual elements of a research question.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="EvidenceVariable" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="EvidenceVariable" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A population, intervention, or exposure definition</desc>
                <fhir fid="EvidenceVariable" definition="The EvidenceVariable resource describes a &#34;PICO&#34; element that knowledge (evidence, assertion, recommendation) is about."
                    comment="PICO stands for Population (the population within which exposures are being compared), Intervention (the conditional state or exposure state being described for its effect on outcomes), Comparison (the alternative conditional state or alternative exposure state being compared against), and Outcome (the result or effect of the intervention in the population).">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="evv-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this evidence variable, represented as a URI (globally unique)</desc>
                    <fhir fid="EvidenceVariable.url"
                        definition="An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the evidence variable to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the evidence variable</desc>
                    <fhir fid="EvidenceVariable.identifier" definition="A formal identifier that is used to identify this evidence variable when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this evidence variable outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the evidence variable</desc>
                    <fhir fid="EvidenceVariable.version"
                        definition="The identifier that is used to identify this version of the evidence variable when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence variable author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different evidence variable instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the evidence variable with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this evidence variable (computer friendly)</desc>
                    <fhir fid="EvidenceVariable.name" definition="A natural language name identifying the evidence variable. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this evidence variable (human friendly)</desc>
                    <fhir fid="EvidenceVariable.title" definition="A short, descriptive, user-friendly title for the evidence variable." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="shortTitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Title for use in informal contexts</desc>
                    <fhir fid="EvidenceVariable.shortTitle" definition="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary." requirements="Need to be able to reference the content by a short description, but still provide a longer, more formal title for the content." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the EvidenceVariable</desc>
                    <fhir fid="EvidenceVariable.subtitle" definition="An explanatory or alternate title for the EvidenceVariable giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="EvidenceVariable.status" definition="The status of this evidence variable. Enables tracking the life-cycle of the content." comment="Allows filtering of evidence variables that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="EvidenceVariable.date" definition="The date  (and optionally time) when the evidence variable was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence variable changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the evidence variable. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="EvidenceVariable.publisher" definition="The name of the organization or individual that published the evidence variable."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the evidence variable is the organization or individual primarily responsible for the maintenance and upkeep of the evidence variable. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the evidence variable. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the evidence variable.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="EvidenceVariable.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the evidence variable</desc>
                    <fhir fid="EvidenceVariable.description" definition="A free text natural language description of the evidence variable from a consumer's perspective."
                        comment="This description can be used to capture details such as why the evidence variable was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the evidence variable as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the evidence variable is presumed to be the predominant language in the place the evidence variable was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="EvidenceVariable.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="Annotation"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="EvidenceVariable.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence variable instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for evidence variable (if applicable)</desc>
                    <fhir fid="EvidenceVariable.jurisdiction" definition="A legal or geographic region in which the evidence variable is intended to be used." comment="It may be possible for the evidence variable to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="EvidenceVariable.copyright" definition="A copyright statement relating to the evidence variable and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence variable." requirements="Consumers must be able to determine any legal restrictions on the use of the evidence variable and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence variable was approved by publisher</desc>
                    <fhir fid="EvidenceVariable.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence variable was last reviewed</desc>
                    <fhir fid="EvidenceVariable.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the evidence variable is expected to be used</desc>
                    <fhir fid="EvidenceVariable.effectivePeriod" definition="The period during which the evidence variable content was or is planned to be in active use."
                        comment="The effective period for a evidence variable  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the evidence variable are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the EvidenceVariable, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="EvidenceVariable.topic" definition="Descriptive topics related to the content of the EvidenceVariable. Topics provide a high-level categorization grouping types of EvidenceVariables that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the EvidenceVariable so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="EvidenceVariable.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="EvidenceVariable.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="EvidenceVariable.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="EvidenceVariable.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="EvidenceVariable.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="EvidenceVariables must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">dichotomous | continuous | descriptive</desc>
                    <fhir fid="EvidenceVariable.type" definition="The type of evidence element, a population, an exposure, or an outcome." isSummary="true">
                        <type value="code"/>
                        <binding displayName="EvidenceVariableType" strength="required" description="The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive)." valueSet="2.16.840.1.113883.4.642.3.1343" canonicalUri="http://hl7.org/fhir/ValueSet/variable-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="characteristic" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">What defines the members of the evidence element</desc>
                    <fhir fid="EvidenceVariable.characteristic" definition="A characteristic that defines the members of the evidence element. Multiple characteristics are applied with &#34;and&#34; semantics."
                        comment="Characteristics can be defined flexibly to accommodate different use cases for membership criteria, ranging from simple codes, all the way to using an expression language to express the criteria." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Natural language description of the characteristic</desc>
                        <fhir fid="EvidenceVariable.characteristic.description" definition="A short, natural language description of the characteristic that could be used to communicate the criteria to an end-user." requirements="Need to be able to describe characteristics in natural language so that end users can understand the criteria.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="definition[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">What code or expression defines members?</desc>
                        <fhir fid="EvidenceVariable.characteristic.definition[x]" definition="Define members of the evidence element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year)."
                            requirements="Need to be able to define members in simple codes when the membership aligns well with terminology, with common criteria such as observations in a value set or lab tests within a year, or with expression language to support criteria that do not fit in the above." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            </type>
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            </type>
                            <type value="CodeableConcept"/>
                            <type value="Expression"/>
                            <type value="DataRequirement"/>
                            <type value="TriggerDefinition"/>
                        </fhir>
                        <element name="definitionReference">
                            <fhir fid="EvidenceVariable.characteristic.definitionReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            </fhir>
                        </element>
                        <element name="definitionCanonical">
                            <fhir fid="EvidenceVariable.characteristic.definitionCanonical">
                                <type value="canonical"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            </fhir>
                        </element>
                        <element name="definitionCodeableConcept">
                            <fhir fid="EvidenceVariable.characteristic.definitionCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="definitionExpression">
                            <fhir fid="EvidenceVariable.characteristic.definitionExpression">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="definitionDataRequirement">
                            <fhir fid="EvidenceVariable.characteristic.definitionDataRequirement">
                                <type value="DataRequirement"/>
                            </fhir>
                        </element>
                        <element name="definitionTriggerDefinition">
                            <fhir fid="EvidenceVariable.characteristic.definitionTriggerDefinition">
                                <type value="TriggerDefinition"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="usageContext" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What code/value pairs define members?</desc>
                        <fhir fid="EvidenceVariable.characteristic.usageContext" definition="Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings." requirements="Need to be able to define members more structurally when more information can be communicated such as age range.">
                            <type value="UsageContext"/>
                        </fhir>
                    </element>
                    <element name="exclude" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the characteristic includes or excludes members</desc>
                        <fhir fid="EvidenceVariable.characteristic.exclude" definition="When true, members with this characteristic are excluded from the element.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <choice name="participantEffective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What time period do participants cover</desc>
                        <fhir fid="EvidenceVariable.characteristic.participantEffective[x]" definition="Indicates what effective period the study covers.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <type value="Duration"/>
                            <type value="Timing"/>
                        </fhir>
                        <element name="participantEffectiveDateTime">
                            <fhir fid="EvidenceVariable.characteristic.participantEffectiveDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="participantEffectivePeriod">
                            <fhir fid="EvidenceVariable.characteristic.participantEffectivePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="participantEffectiveDuration">
                            <fhir fid="EvidenceVariable.characteristic.participantEffectiveDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="participantEffectiveTiming">
                            <fhir fid="EvidenceVariable.characteristic.participantEffectiveTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="timeFromStart" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Observation time from study start</desc>
                        <fhir fid="EvidenceVariable.characteristic.timeFromStart" definition="Indicates duration from the participant's study entry.">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                    <element name="groupMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median</desc>
                        <fhir fid="EvidenceVariable.characteristic.groupMeasure" definition="Indicates how elements are aggregated within the study effective period.">
                            <type value="code"/>
                            <binding displayName="GroupMeasure" strength="required" description="Possible group measure aggregates (E.g. Mean, Median)." valueSet="2.16.840.1.113883.4.642.3.1345" canonicalUri="http://hl7.org/fhir/ValueSet/group-measure|4.0.1"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.54" name="ExampleScenario" displayName="ExampleScenario" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ExampleScenario">
            <desc language="en-US">Example of workflow instance.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ExampleScenario" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ExampleScenario" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Example of workflow instance</desc>
                <fhir fid="ExampleScenario" definition="Example of workflow instance.">
                    <constraint key="esc-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this example scenario, represented as a URI (globally unique)</desc>
                    <fhir fid="ExampleScenario.url"
                        definition="An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the example scenario to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the example scenario</desc>
                    <fhir fid="ExampleScenario.identifier" definition="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this example scenario outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the example scenario</desc>
                    <fhir fid="ExampleScenario.version"
                        definition="The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different example scenario instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the example scenario with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this example scenario (computer friendly)</desc>
                    <fhir fid="ExampleScenario.name" definition="A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ExampleScenario.status" definition="The status of this example scenario. Enables tracking the life-cycle of the content." comment="Allows filtering of example scenarios that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ExampleScenario.experimental" definition="A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of example scenarios that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level example scenario." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ExampleScenario.date" definition="The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition')."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the example scenario. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ExampleScenario.publisher" definition="The name of the organization or individual that published the example scenario."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the example scenario is the organization or individual primarily responsible for the maintenance and upkeep of the example scenario. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the example scenario. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the example scenario.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ExampleScenario.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ExampleScenario.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for example scenario (if applicable)</desc>
                    <fhir fid="ExampleScenario.jurisdiction" definition="A legal or geographic region in which the example scenario is intended to be used." comment="It may be possible for the example scenario to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ExampleScenario.copyright" definition="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario."
                        comment="nullFrequently, the copyright differs between the value set and the codes that are included. The copyright statement should clearly differentiate between these when required." requirements="Consumers must be able to determine any legal restrictions on the use of the example scenario and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The purpose of the example, e.g. to illustrate a scenario</desc>
                    <fhir fid="ExampleScenario.purpose" definition="What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario."
                        comment="This element does not describe the usage of the example scenario. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this example scenario.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="actor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Actor participating in the resource</desc>
                    <fhir fid="ExampleScenario.actor" definition="Actor participating in the resource.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="actorId" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">ID or acronym of the actor</desc>
                        <fhir fid="ExampleScenario.actor.actorId" definition="ID or acronym of actor." comment="should this be called ID or acronym?">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">person | entity</desc>
                        <fhir fid="ExampleScenario.actor.type" definition="The type of actor - person or system.">
                            <type value="code"/>
                            <binding displayName="ExampleScenarioActorType" strength="required" description="The type of actor - system or human." valueSet="2.16.840.1.113883.4.642.3.858" canonicalUri="http://hl7.org/fhir/ValueSet/examplescenario-actor-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The name of the actor as shown in the page</desc>
                        <fhir fid="ExampleScenario.actor.name" definition="The name of the actor as shown in the page." comment="Cardinality: is name and description 1..1?">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The description of the actor</desc>
                        <fhir fid="ExampleScenario.actor.description" definition="The description of the actor." comment="Cardinality: is name and description 1..1?">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                </element>
                <element name="instance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Each resource and each version that is present in the workflow</desc>
                    <fhir fid="ExampleScenario.instance" definition="Each resource and each version that is present in the workflow.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="resourceId" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The id of the resource for referencing</desc>
                        <fhir fid="ExampleScenario.instance.resourceId" definition="The id of the resource for referencing.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="resourceType" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The type of the resource</desc>
                        <fhir fid="ExampleScenario.instance.resourceType" definition="The type of the resource.">
                            <type value="code"/>
                            <binding displayName="ResourceType" strength="required" description="The type of resource." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A short name for the resource instance</desc>
                        <fhir fid="ExampleScenario.instance.name" definition="A short name for the resource instance.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Human-friendly description of the resource instance</desc>
                        <fhir fid="ExampleScenario.instance.description" definition="Human-friendly description of the resource instance.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A specific version of the resource</desc>
                        <fhir fid="ExampleScenario.instance.version" definition="A specific version of the resource.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="versionId" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The identifier of a specific version of a resource</desc>
                            <fhir fid="ExampleScenario.instance.version.versionId" definition="The identifier of a specific version of a resource.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The description of the resource version</desc>
                            <fhir fid="ExampleScenario.instance.version.description" definition="The description of the resource version.">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="containedInstance" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Resources contained in the instance</desc>
                        <fhir fid="ExampleScenario.instance.containedInstance" definition="Resources contained in the instance (e.g. the observations contained in a bundle).">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="resourceId" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Each resource contained in the instance</desc>
                            <fhir fid="ExampleScenario.instance.containedInstance.resourceId" definition="Each resource contained in the instance.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="versionId" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">A specific version of a resource contained in the instance</desc>
                            <fhir fid="ExampleScenario.instance.containedInstance.versionId" definition="A specific version of a resource contained in the instance.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="process" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Each major process - a group of operations</desc>
                    <fhir fid="ExampleScenario.process" definition="Each major process - a group of operations.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="title" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The diagram title of the group of operations</desc>
                        <fhir fid="ExampleScenario.process.title" definition="The diagram title of the group of operations." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A longer description of the group of operations</desc>
                        <fhir fid="ExampleScenario.process.description" definition="A longer description of the group of operations.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="preConditions" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of initial status before the process starts</desc>
                        <fhir fid="ExampleScenario.process.preConditions" definition="Description of initial status before the process starts.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="postConditions" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of final status after the process ends</desc>
                        <fhir fid="ExampleScenario.process.postConditions" definition="Description of final status after the process ends.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                    <element name="step" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Each step of the process</desc>
                        <fhir fid="ExampleScenario.process.step" definition="Each step of the process.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="process" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Nested process</desc>
                            <fhir fid="ExampleScenario.process.step.process" definition="Nested process."/>
                        </element>
                        <element name="pause" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If there is a pause in the flow</desc>
                            <fhir fid="ExampleScenario.process.step.pause" definition="If there is a pause in the flow.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Each interaction or action</desc>
                            <fhir fid="ExampleScenario.process.step.operation" definition="Each interaction or action.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="number" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">The sequential number of the interaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.number" definition="The sequential number of the interaction, e.g. 1.2.5.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The type of operation - CRUD</desc>
                                <fhir fid="ExampleScenario.process.step.operation.type" definition="The type of operation - CRUD.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The human-friendly name of the interaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.name" definition="The human-friendly name of the interaction.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="initiator" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Who starts the transaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.initiator" definition="Who starts the transaction.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="receiver" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Who receives the transaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.receiver" definition="Who receives the transaction.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A comment to be inserted in the diagram</desc>
                                <fhir fid="ExampleScenario.process.step.operation.description" definition="A comment to be inserted in the diagram.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                            <element name="initiatorActive" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Whether the initiator is deactivated right after the transaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.initiatorActive" definition="Whether the initiator is deactivated right after the transaction.">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="receiverActive" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Whether the receiver is deactivated right after the transaction</desc>
                                <fhir fid="ExampleScenario.process.step.operation.receiverActive" definition="Whether the receiver is deactivated right after the transaction.">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Each resource instance used by the initiator</desc>
                                <fhir fid="ExampleScenario.process.step.operation.request" definition="Each resource instance used by the initiator."/>
                            </element>
                            <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Each resource instance used by the responder</desc>
                                <fhir fid="ExampleScenario.process.step.operation.response" definition="Each resource instance used by the responder."/>
                            </element>
                        </element>
                        <element name="alternative" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Alternate non-typical step action</desc>
                            <fhir fid="ExampleScenario.process.step.alternative" definition="Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="title" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Label for alternative</desc>
                                <fhir fid="ExampleScenario.process.step.alternative.title" definition="The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A human-readable description of each option</desc>
                                <fhir fid="ExampleScenario.process.step.alternative.description" definition="A human-readable description of the alternative explaining when the alternative should occur rather than the base step.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                            <element name="step" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">What happens in each alternative option</desc>
                                <fhir fid="ExampleScenario.process.step.alternative.step" definition="What happens in each alternative option."/>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="workflow" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Another nested workflow</desc>
                    <fhir fid="ExampleScenario.workflow" definition="Another nested workflow.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ExampleScenario"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.55" name="ExplanationOfBenefit" displayName="ExplanationOfBenefit" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit">
            <desc language="en-US">This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ExplanationOfBenefit" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ExplanationOfBenefit" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Explanation of Benefit resource</desc>
                <fhir fid="ExplanationOfBenefit" definition="This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for the resource</desc>
                    <fhir fid="ExplanationOfBenefit.identifier" definition="A unique identifier assigned to this explanation of benefit." requirements="Allows EOBs to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="ExplanationOfBenefit.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ExplanationOfBenefitStatus" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.618" canonicalUri="http://hl7.org/fhir/ValueSet/explanationofbenefit-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Category or discipline</desc>
                    <fhir fid="ExplanationOfBenefit.type" definition="The category of claim, e.g. oral, pharmacy, vision, institutional, professional." comment="The majority of jurisdictions use: oral, pharmacy, vision, professional and institutional, or variants on those terms, as the general styles of claims. The valueset is extensible to accommodate other jurisdictional requirements."
                        requirements="Claim type determine the general sets of business rules applied for information requirements and adjudication." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Claim Type Codes" strength="extensible" description="The type or discipline-style of the claim." valueSet="2.16.840.1.113883.4.642.3.558" canonicalUri="http://hl7.org/fhir/ValueSet/claim-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="subType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">More granular claim type</desc>
                    <fhir fid="ExplanationOfBenefit.subType" definition="A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service." comment="This may contain the local bill type codes such as the US UB-04 bill type code."
                        requirements="Some jurisdictions need a finer grained claim type for routing and adjudication.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Example Claim SubType Codes" strength="example" description="A more granular claim typecode." valueSet="2.16.840.1.113883.4.642.3.566" canonicalUri="http://hl7.org/fhir/ValueSet/claim-subtype"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="use" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">claim | preauthorization | predetermination</desc>
                    <fhir fid="ExplanationOfBenefit.use" definition="A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future."
                        requirements="This element is required to understand the nature of the request for adjudication." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Use" strength="required" description="Complete, proposed, exploratory, other." valueSet="2.16.840.1.113883.4.642.3.544" canonicalUri="http://hl7.org/fhir/ValueSet/claim-use|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The recipient of the products and services</desc>
                    <fhir fid="ExplanationOfBenefit.patient" definition="The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for forecast reimbursement is sought."
                        requirements="The patient must be supplied to the insurer so that confirmation of coverage and service history may be considered as part of the authorization and/or adjudiction." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="billablePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Relevant time frame for the claim</desc>
                    <fhir fid="ExplanationOfBenefit.billablePeriod" definition="The period for which charges are being submitted." comment="Typically this would be today or in the past for a claim, and today or in the future for preauthorizations and prodeterminations. Typically line item dates of service should fall within the billing period if one is specified."
                        requirements="A number jurisdictions required the submission of the billing period when submitting claims for example for hospital stays or long-term care." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Response creation date</desc>
                    <fhir fid="ExplanationOfBenefit.created" definition="The date this resource was created." comment="This field is independent of the date of creation of the resource as it may reflect the creation date of a source document prior to digitization. Typically for claims all services must be completed as of this date."
                        requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="enterer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Author of the claim</desc>
                    <fhir fid="ExplanationOfBenefit.enterer" definition="Individual who created the claim, predetermination or preauthorization." requirements="Some jurisdictions require the contact information for personnel completing claims.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.agent"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="insurer" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for reimbursement</desc>
                    <fhir fid="ExplanationOfBenefit.insurer" definition="The party responsible for authorization, adjudication and reimbursement." requirements="To be a valid claim, preauthorization or predetermination there must be a party who is responsible for adjudicating the contents against a policy which provides benefits for the patient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.agent"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="provider" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Party responsible for the claim</desc>
                    <fhir fid="ExplanationOfBenefit.provider" definition="The provider which is responsible for the claim, predetermination or preauthorization." comment="Typically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Desired processing urgency</desc>
                    <fhir fid="ExplanationOfBenefit.priority" definition="The provider-required urgency of processing the request. Typical values include: stat, routine deferred." comment="If a claim processor is unable to complete the processing as per the priority then they should generate and error and not process the request."
                        requirements="The provider may need to indicate their processing requirements so that the processor can indicate if they are unable to comply.">
                        <type value="CodeableConcept"/>
                        <binding displayName="ProcessPriority" strength="example" description="The timeliness with which processing is required: stat, normal, deferred." canonicalUri="http://terminology.hl7.org/CodeSystem/processpriority"/>
                        <mapping identity="v2" map="Request.priority"/>
                    </fhir>
                </element>
                <element name="fundsReserveRequested" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For whom to reserve funds</desc>
                    <fhir fid="ExplanationOfBenefit.fundsReserveRequested" definition="A code to indicate whether and for whom funds are to be reserved for future claims." comment="This field is only used for preauthorizations."
                        requirements="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FundsReserve" strength="example" description="For whom funds are to be reserved: (Patient, Provider, None)." valueSet="2.16.840.1.113883.4.642.3.33" canonicalUri="http://hl7.org/fhir/ValueSet/fundsreserve"/>
                    </fhir>
                </element>
                <element name="fundsReserve" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Funds reserved status</desc>
                    <fhir fid="ExplanationOfBenefit.fundsReserve" definition="A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom." comment="Fund would be release by a future claim quoting the preAuthRef of this response. Examples of values include: provider, patient, none."
                        requirements="Needed to advise the submitting provider on whether the rquest for reservation of funds has been honored.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FundsReserve" strength="example" description="For whom funds are to be reserved: (Patient, Provider, None)." valueSet="2.16.840.1.113883.4.642.3.33" canonicalUri="http://hl7.org/fhir/ValueSet/fundsreserve"/>
                    </fhir>
                </element>
                <element name="related" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Prior or corollary claims</desc>
                    <fhir fid="ExplanationOfBenefit.related" definition="Other claims which are related to this claim such as prior submissions or claims for related services or for the same event." comment="For example,  for the original treatment and follow-up exams." requirements="For workplace or other accidents it is common to relate separate claims arising from the same event.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="claim" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the related claim</desc>
                        <fhir fid="ExplanationOfBenefit.related.claim" definition="Reference to a related claim." requirements="For workplace or other accidents it is common to relate separate claims arising from the same event.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Claim"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How the reference claim is related</desc>
                        <fhir fid="ExplanationOfBenefit.related.relationship" definition="A code to convey how the claims are related." comment="For example, prior claim or umbrella." requirements="Some insurers need a declaration of the type of relationship.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Related Claim Relationship Codes" strength="example" description="Relationship of this claim to a related Claim." valueSet="2.16.840.1.113883.4.642.3.568" canonicalUri="http://hl7.org/fhir/ValueSet/related-claim-relationship"/>
                        </fhir>
                    </element>
                    <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">File or case reference</desc>
                        <fhir fid="ExplanationOfBenefit.related.reference" definition="An alternate organizational reference to the case or file to which this particular claim pertains." comment="For example, Property/Casualty insurer claim number or Workers Compensation case number."
                            requirements="In cases where an event-triggered claim is being submitted to an insurer which requires a reference number to be specified on all exchanges.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                </element>
                <element name="prescription" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Prescription authorizing services or products</desc>
                    <fhir fid="ExplanationOfBenefit.prescription" definition="Prescription to support the dispensing of pharmacy, device or vision products." requirements="Required to authorize the dispensing of controlled substances and devices.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/VisionPrescription"/>
                        </type>
                    </fhir>
                </element>
                <element name="originalPrescription" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Original prescription if superceded by fulfiller</desc>
                    <fhir fid="ExplanationOfBenefit.originalPrescription" definition="Original prescription which has been superseded by this prescription to support the dispensing of pharmacy services, medications or products."
                        comment="For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefor issues a new prescription for an alternate medication which has the same therapeutic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'."
                        requirements="Often required when a fulfiller varies what is fulfilled from that authorized on the original prescription.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                        </type>
                    </fhir>
                </element>
                <element name="payee" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Recipient of benefits payable</desc>
                    <fhir fid="ExplanationOfBenefit.payee" definition="The party to be reimbursed for cost of the products and services according to the terms of the policy." comment="Often providers agree to receive the benefits payable to reduce the near-term costs to the patient. The insurer may decline to pay the provider and may choose to pay the subscriber instead."
                        requirements="The provider needs to specify who they wish to be reimbursed and the claims processor needs express who they will reimburse.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Category of recipient</desc>
                        <fhir fid="ExplanationOfBenefit.payee.type" definition="Type of Party to be reimbursed: Subscriber, provider, other." requirements="Need to know who should receive payment with the most common situations being the Provider (assignment of benefits) or the Subscriber.">
                            <type value="CodeableConcept"/>
                            <binding displayName="PayeeType" strength="example" description="A code for the party to be reimbursed." valueSet="2.16.840.1.113883.4.642.3.31" canonicalUri="http://hl7.org/fhir/ValueSet/payeetype"/>
                        </fhir>
                    </element>
                    <element name="party" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recipient reference</desc>
                        <fhir fid="ExplanationOfBenefit.payee.party" definition="Reference to the individual or organization to whom any payment will be made." comment="Not required if the payee is 'subscriber' or 'provider'." requirements="Need to provide demographics if the payee is not 'subscriber' nor 'provider'.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="referral" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Treatment Referral</desc>
                    <fhir fid="ExplanationOfBenefit.referral" definition="A reference to a referral resource." comment="The referral resource which lists the date, practitioner, reason and other supporting information." requirements="Some insurers require proof of referral to pay for services or to pay specialist rates for services.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.cause"/>
                    </fhir>
                </element>
                <element name="facility" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Servicing Facility</desc>
                    <fhir fid="ExplanationOfBenefit.facility" definition="Facility where the services were provided." requirements="Insurance adjudication can be dependant on where services were delivered.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.location"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                    </fhir>
                </element>
                <element name="claim" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Claim reference</desc>
                    <fhir fid="ExplanationOfBenefit.claim" definition="The business identifier for the instance of the adjudication request: claim predetermination or preauthorization." requirements="To provide a link to the original adjudication request.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Claim"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="claimResponse" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Claim response reference</desc>
                    <fhir fid="ExplanationOfBenefit.claimResponse" definition="The business identifier for the instance of the adjudication response: claim, predetermination or preauthorization response." requirements="To provide a link to the original adjudication response.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                        </type>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">queued | complete | error | partial</desc>
                    <fhir fid="ExplanationOfBenefit.outcome" definition="The outcome of the claim, predetermination, or preauthorization processing."
                        comment="The resource may be used to indicate that: the request has been held (queued) for processing; that it has been processed and errors found (error); that no errors were found and that some of the adjudication has been undertaken (partial) or that all of the adjudication has been undertaken (complete)."
                        requirements="To advise the requestor of an overall processing outcome." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Claim Processing Codes" strength="required" description="The result of the claim processing." valueSet="2.16.840.1.113883.4.642.3.13" canonicalUri="http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="disposition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disposition Message</desc>
                    <fhir fid="ExplanationOfBenefit.disposition" definition="A human readable description of the status of the adjudication." requirements="Provided for user display.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="preAuthRef" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Preauthorization reference</desc>
                    <fhir fid="ExplanationOfBenefit.preAuthRef" definition="Reference from the Insurer which is used in later communications which refers to this adjudication." comment="This value is only present on preauthorization adjudications." requirements="On subsequent claims, the insurer may require the provider to quote this value.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="preAuthRefPeriod" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Preauthorization in-effect period</desc>
                    <fhir fid="ExplanationOfBenefit.preAuthRefPeriod" definition="The timeframe during which the supplied preauthorization reference may be quoted on claims to obtain the adjudication as provided." comment="This value is only present on preauthorization adjudications." requirements="On subsequent claims, the insurer may require the provider to quote this value.">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="careTeam" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Care Team members</desc>
                    <fhir fid="ExplanationOfBenefit.careTeam" definition="The members of the team who provided the products and services." requirements="Common to identify the responsible and supporting practitioners.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Order of care team</desc>
                        <fhir fid="ExplanationOfBenefit.careTeam.sequence" definition="A number to uniquely identify care team entries." requirements="Necessary to maintain the order of the care team and provide a mechanism to link individuals to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="provider" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Practitioner or organization</desc>
                        <fhir fid="ExplanationOfBenefit.careTeam.provider" definition="Member of the team who provided the product or service." requirements="Often a regulatory requirement to specify the responsible provider.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.actor"/>
                        </fhir>
                    </element>
                    <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indicator of the lead practitioner</desc>
                        <fhir fid="ExplanationOfBenefit.careTeam.responsible" definition="The party who is billing and/or responsible for the claimed products or services." comment="Responsible might not be required when there is only a single provider listed." requirements="When multiple parties are present it is required to distinguish the lead or responsible individual.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Function within the team</desc>
                        <fhir fid="ExplanationOfBenefit.careTeam.role" definition="The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team." comment="Role might not be required when there is only a single provider listed." requirements="When multiple parties are present it is required to distinguish the roles performed by each member.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Claim Care Team Role Codes" strength="example" description="The role codes for the care team members." valueSet="2.16.840.1.113883.4.642.3.586" canonicalUri="http://hl7.org/fhir/ValueSet/claim-careteamrole"/>
                        </fhir>
                    </element>
                    <element name="qualification" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Practitioner credential or specialization</desc>
                        <fhir fid="ExplanationOfBenefit.careTeam.qualification" definition="The qualification of the practitioner which is applicable for this service." requirements="Need to specify which qualification a provider is delivering the product or service under.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Provider Qualification Codes" strength="example" description="Provider professional qualifications." valueSet="2.16.840.1.113883.4.642.3.570" canonicalUri="http://hl7.org/fhir/ValueSet/provider-qualification"/>
                        </fhir>
                    </element>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting information</desc>
                    <fhir fid="ExplanationOfBenefit.supportingInfo" definition="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues." comment="Often there are multiple jurisdiction specific valuesets which are required."
                        requirements="Typically these information codes are required to support the services rendered or the adjudication of the services rendered.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Information instance identifier</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.sequence" definition="A number to uniquely identify supporting information entries." requirements="Necessary to maintain the order of the supporting information items and provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Classification of the supplied information</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.category" definition="The general class of the information supplied: information; exception; accident, employment; onset, etc." comment="This may contain a category for the local bill type codes."
                            requirements="Required to group or associate information items with common characteristics. For example: admission information or prior treatments.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Claim Information Category Codes" strength="example" description="The valuset used for additional information category codes." valueSet="2.16.840.1.113883.4.642.3.582" canonicalUri="http://hl7.org/fhir/ValueSet/claim-informationcategory"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of information</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.code" definition="System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought." comment="This may contain the local bill type codes such as the US UB-04 bill type code."
                            requirements="Required to identify the kind of additional information.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Exception Codes" strength="example" description="The valuset used for additional information codes." valueSet="2.16.840.1.113883.4.642.3.580" canonicalUri="http://hl7.org/fhir/ValueSet/claim-exception"/>
                        </fhir>
                    </element>
                    <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When it occurred</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.timing[x]" definition="The date when or period to which this information refers.">
                            <type value="date"/>
                            <type value="Period"/>
                        </fhir>
                        <element name="timingDate">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.timingDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="timingPeriod">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.timingPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Data to be provided</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.value[x]" definition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." comment="Could be used to provide references to other resources, document. For example, could contain a PDF in an Attachment of the Police Report for an Accident."
                            requirements="To convey the data content to be provided when the information is more than a simple code or period.">
                            <type value="boolean"/>
                            <type value="string"/>
                            <type value="Quantity"/>
                            <type value="Attachment"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                        <element name="valueBoolean">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueAttachment">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.valueAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="ExplanationOfBenefit.supportingInfo.valueReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Explanation for the information</desc>
                        <fhir fid="ExplanationOfBenefit.supportingInfo.reason" definition="Provides the reason in the situation where a reason code is required in addition to the content." comment="For example: the reason for the additional stay, or why a tooth is  missing." requirements="Needed when the supporting information has both a date and amount/value and requires explanation.">
                            <type value="Coding"/>
                            <binding displayName="Missing Tooth Reason Codes" strength="example" description="Reason codes for the missing teeth." valueSet="2.16.840.1.113883.4.642.3.534" canonicalUri="http://hl7.org/fhir/ValueSet/missing-tooth-reason"/>
                        </fhir>
                    </element>
                </element>
                <element name="diagnosis" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Pertinent diagnosis information</desc>
                    <fhir fid="ExplanationOfBenefit.diagnosis" definition="Information about diagnoses relevant to the claim items." requirements="Required for the adjudication by provided context for the services and product listed.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Diagnosis instance identifier</desc>
                        <fhir fid="ExplanationOfBenefit.diagnosis.sequence" definition="A number to uniquely identify diagnosis entries." comment="Diagnosis are presented in list order to their expected importance: primary, secondary, etc." requirements="Necessary to maintain the order of the diagnosis items and provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <choice name="diagnosis[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Nature of illness or problem</desc>
                        <fhir fid="ExplanationOfBenefit.diagnosis.diagnosis[x]" definition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." requirements="Provides health context for the evaluation of the products and/or services.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            </type>
                            <binding displayName="ICD-10 Codes" strength="example" description="ICD10 Diagnostic codes." valueSet="2.16.840.1.113883.4.642.3.531" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10"/>
                        </fhir>
                        <element name="diagnosisCodeableConcept">
                            <fhir fid="ExplanationOfBenefit.diagnosis.diagnosisCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="diagnosisReference">
                            <fhir fid="ExplanationOfBenefit.diagnosis.diagnosisReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Timing or nature of the diagnosis</desc>
                        <fhir fid="ExplanationOfBenefit.diagnosis.type" definition="When the condition was observed or the relative ranking." comment="For example: admitting, primary, secondary, discharge." requirements="Often required to capture a particular diagnosis, for example: primary or discharge.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis Type Codes" strength="example" description="The type of the diagnosis: admitting, principal, discharge." valueSet="2.16.840.1.113883.4.642.3.590" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosistype"/>
                        </fhir>
                    </element>
                    <element name="onAdmission" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Present on admission</desc>
                        <fhir fid="ExplanationOfBenefit.diagnosis.onAdmission" definition="Indication of whether the diagnosis was present on admission to a facility." requirements="Many systems need to understand for adjudication if the diagnosis was present a time of admission.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis on Admission Codes" strength="example" description="Present on admission." valueSet="2.16.840.1.113883.4.642.3.1169" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission"/>
                        </fhir>
                    </element>
                    <element name="packageCode" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Package billing code</desc>
                        <fhir fid="ExplanationOfBenefit.diagnosis.packageCode" definition="A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system."
                            comment="For example, DRG (Diagnosis Related Group) or a bundled billing code. A patient may have a diagnosis of a Myocardio-infarction and a DRG for HeartAttack would assigned. The Claim item (and possible subsequent claims) would refer to the DRG for those line items that were for services related to the heart attack event."
                            requirements="Required to relate the current  diagnosis to a package billing code that is then referenced on the individual claim items which are specific to the health condition covered by the package code.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Diagnosis Related Group Codes" strength="example" description="The DRG codes associated with the diagnosis." valueSet="2.16.840.1.113883.4.642.3.588" canonicalUri="http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup"/>
                        </fhir>
                    </element>
                </element>
                <element name="procedure" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical procedures performed</desc>
                    <fhir fid="ExplanationOfBenefit.procedure" definition="Procedures performed on the patient relevant to the billing items with the claim." requirements="The specific clinical invention are sometimes required to be provided to justify billing a greater than customary amount for a service.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Procedure instance identifier</desc>
                        <fhir fid="ExplanationOfBenefit.procedure.sequence" definition="A number to uniquely identify procedure entries." requirements="Necessary to provide a mechanism to link to claim details.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Category of Procedure</desc>
                        <fhir fid="ExplanationOfBenefit.procedure.type" definition="When the condition was observed or the relative ranking." requirements="Often required to capture a particular diagnosis, for example: primary or discharge.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Procedure Type Codes" strength="example" description="Example procedure type codes." valueSet="2.16.840.1.113883.4.642.3.1387" canonicalUri="http://hl7.org/fhir/ValueSet/ex-procedure-type"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the procedure was performed</desc>
                        <fhir fid="ExplanationOfBenefit.procedure.date" definition="Date and optionally time the procedure was performed." requirements="Required for auditing purposes.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <choice name="procedure[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Specific clinical procedure</desc>
                        <fhir fid="ExplanationOfBenefit.procedure.procedure[x]" definition="The code or reference to a Procedure resource which identifies the clinical intervention performed." requirements="This identifies the actual clinical procedure.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            </type>
                            <binding displayName="ICD-10 Procedure Codes" strength="example" description="ICD10 Procedure codes." valueSet="2.16.840.1.113883.4.642.3.574" canonicalUri="http://hl7.org/fhir/ValueSet/icd-10-procedures"/>
                        </fhir>
                        <element name="procedureCodeableConcept">
                            <fhir fid="ExplanationOfBenefit.procedure.procedureCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="procedureReference">
                            <fhir fid="ExplanationOfBenefit.procedure.procedureReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Unique device identifier</desc>
                        <fhir fid="ExplanationOfBenefit.procedure.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="precedence" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Precedence (primary, secondary, etc.)</desc>
                    <fhir fid="ExplanationOfBenefit.precedence" definition="This indicates the relative order of a series of EOBs related to different coverages for the same suite of services." requirements="Needed to coordinate between multiple EOBs for the same suite of services.">
                        <type value="positiveInt"/>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Patient insurance information</desc>
                    <fhir fid="ExplanationOfBenefit.insurance" definition="Financial instruments for reimbursement for the health care products and services specified on the claim."
                        comment="All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'Coverage.subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim."
                        requirements="At least one insurer is required for a claim to be a claim." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="Coverage"/>
                    </fhir>
                    <element name="focal" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Coverage to be used for adjudication</desc>
                        <fhir fid="ExplanationOfBenefit.insurance.focal" definition="A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true."
                            comment="A patient may (will) have multiple insurance policies which provide reimbursement for healthcare services and products. For example, a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for adjudicating this claim. Other claims would be created to request adjudication against the other listed policies."
                            requirements="To identify which coverage in the list is being used to adjudicate this claim." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="coverage" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Insurance information</desc>
                        <fhir fid="ExplanationOfBenefit.insurance.coverage" definition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system."
                            requirements="Required to allow the adjudicator to locate the correct policy and history within their information system." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="preAuthRef" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Prior authorization reference number</desc>
                        <fhir fid="ExplanationOfBenefit.insurance.preAuthRef" definition="Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization."
                            comment="This value is an alphanumeric string that may be provided over the phone, via text, via paper, or within a ClaimResponse resource and is not a FHIR Identifier." requirements="Providers must quote previously issued authorization reference numbers in order to obtain adjudication as previously advised on the Preauthorization.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="accident" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details of the event</desc>
                    <fhir fid="ExplanationOfBenefit.accident" definition="Details of a accident which resulted in injuries which required the products and services listed in the claim."
                        requirements="When healthcare products and services are accident related, benefits may be payable under accident provisions of policies, such as automotive, etc before they are payable under normal health insurance.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the incident occurred</desc>
                        <fhir fid="ExplanationOfBenefit.accident.date" definition="Date of an accident event  related to the products and services contained in the claim." comment="The date of the accident has to precede the dates of the products and services but within a reasonable timeframe." requirements="Required for audit purposes and adjudication.">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The nature of the accident</desc>
                        <fhir fid="ExplanationOfBenefit.accident.type" definition="The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers." requirements="Coverage may be dependant on the type of accident.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetActIncidentCode" strength="extensible" description="Type of accident: work place, auto, etc." valueSet="2.16.840.1.113883.1.11.16508" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActIncidentCode"/>
                        </fhir>
                    </element>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Where the event occurred</desc>
                        <fhir fid="ExplanationOfBenefit.accident.location[x]" definition="The physical location of the accident event." requirements="Required for audit purposes and determination of applicable insurance liability.">
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                        </fhir>
                        <element name="locationAddress">
                            <fhir fid="ExplanationOfBenefit.accident.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="ExplanationOfBenefit.accident.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Product or service provided</desc>
                    <fhir fid="ExplanationOfBenefit.item" definition="A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details." requirements="The items to be processed for adjudication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Item instance identifier</desc>
                        <fhir fid="ExplanationOfBenefit.item.sequence" definition="A number to uniquely identify item entries." requirements="Necessary to provide a mechanism to link to items from within the claim and within the adjudication details of the ClaimResponse.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="careTeamSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable care team members</desc>
                        <fhir fid="ExplanationOfBenefit.item.careTeamSequence" definition="Care team members related to this service or product." requirements="Need to identify the individuals and their roles in the provision of the product or service.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="diagnosisSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable diagnoses</desc>
                        <fhir fid="ExplanationOfBenefit.item.diagnosisSequence" definition="Diagnoses applicable for this service or product." requirements="Need to related the product or service to the associated diagnoses.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="procedureSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable procedures</desc>
                        <fhir fid="ExplanationOfBenefit.item.procedureSequence" definition="Procedures applicable for this service or product." requirements="Need to provide any listed specific procedures to support the product or service being claimed.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="informationSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable exception and supporting information</desc>
                        <fhir fid="ExplanationOfBenefit.item.informationSequence" definition="Exceptions, special conditions and supporting information applicable for this service or product." requirements="Need to reference the supporting information items that relate directly to this product or service.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Revenue or cost center code</desc>
                        <fhir fid="ExplanationOfBenefit.item.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                        </fhir>
                    </element>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Benefit classification</desc>
                        <fhir fid="ExplanationOfBenefit.item.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                            requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision, oral-basic etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                        </fhir>
                    </element>
                    <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Billing, service, product, or drug code</desc>
                        <fhir fid="ExplanationOfBenefit.item.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                            comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                            requirements="Necessary to state what was provided or done.">
                            <type value="CodeableConcept"/>
                            <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                        </fhir>
                    </element>
                    <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Product or service billing modifiers</desc>
                        <fhir fid="ExplanationOfBenefit.item.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                            requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                        </fhir>
                    </element>
                    <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Program the product or service is provided under</desc>
                        <fhir fid="ExplanationOfBenefit.item.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                        </fhir>
                    </element>
                    <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date or dates of service or product delivery</desc>
                        <fhir fid="ExplanationOfBenefit.item.serviced[x]" definition="The date or dates when the service or product was supplied, performed or completed." requirements="Needed to determine whether the  service or product was provided during the term of the insurance coverage.">
                            <type value="date"/>
                            <type value="Period"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                        </fhir>
                        <element name="servicedDate">
                            <fhir fid="ExplanationOfBenefit.item.servicedDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="servicedPeriod">
                            <fhir fid="ExplanationOfBenefit.item.servicedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Place of service or where product was supplied</desc>
                        <fhir fid="ExplanationOfBenefit.item.location[x]" definition="Where the product or service was provided." requirements="The location can alter whether the item was acceptable for insurance purposes or impact the determination of the benefit amount.">
                            <type value="CodeableConcept"/>
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <binding displayName="Example Service Place Codes" strength="example" description="Place where the service is rendered." valueSet="2.16.840.1.113883.4.642.3.564" canonicalUri="http://hl7.org/fhir/ValueSet/service-place"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                        </fhir>
                        <element name="locationCodeableConcept">
                            <fhir fid="ExplanationOfBenefit.item.locationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="locationAddress">
                            <fhir fid="ExplanationOfBenefit.item.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="ExplanationOfBenefit.item.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Count of products or services</desc>
                        <fhir fid="ExplanationOfBenefit.item.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fee, charge or cost per item</desc>
                        <fhir fid="ExplanationOfBenefit.item.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Price scaling factor</desc>
                        <fhir fid="ExplanationOfBenefit.item.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)."
                            requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Total item cost</desc>
                        <fhir fid="ExplanationOfBenefit.item.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Unique device identifier</desc>
                        <fhir fid="ExplanationOfBenefit.item.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Anatomical location</desc>
                        <fhir fid="ExplanationOfBenefit.item.bodySite" definition="Physical service site on the patient (limb, tooth, etc.)." comment="For example: Providing a tooth code, allows an insurer to identify a provider performing a filling on a tooth that was previously removed." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Oral Site Codes" strength="example" description="The code for the teeth, quadrant, sextant and arch." valueSet="2.16.840.1.113883.4.642.3.540" canonicalUri="http://hl7.org/fhir/ValueSet/tooth"/>
                        </fhir>
                    </element>
                    <element name="subSite" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Anatomical sub-location</desc>
                        <fhir fid="ExplanationOfBenefit.item.subSite" definition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Surface Codes" strength="example" description="The code for the tooth surface and surface combinations." valueSet="2.16.840.1.113883.4.642.3.546" canonicalUri="http://hl7.org/fhir/ValueSet/surface"/>
                        </fhir>
                    </element>
                    <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Encounters related to this billed item</desc>
                        <fhir fid="ExplanationOfBenefit.item.encounter" definition="A billed item may include goods or services provided in multiple encounters." requirements="Used in some jurisdictions to link clinical events to claim items.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable note numbers</desc>
                        <fhir fid="ExplanationOfBenefit.item.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Adjudication details</desc>
                        <fhir fid="ExplanationOfBenefit.item.adjudication" definition="If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item."
                            requirements="The adjudication results conveys the insurer's assessment of the item provided in the claim under the terms of the patient's insurance coverage.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of adjudication information</desc>
                            <fhir fid="ExplanationOfBenefit.item.adjudication.category"
                                definition="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in-aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item."
                                comment="For example, codes indicating: Co-Pay, deductible, eligible, benefit, tax, etc." requirements="Needed to enable understanding of the context of the other information in the adjudication.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Adjudication Value Codes" strength="example" description="The adjudication codes." valueSet="2.16.840.1.113883.4.642.3.596" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication"/>
                            </fhir>
                        </element>
                        <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Explanation of adjudication outcome</desc>
                            <fhir fid="ExplanationOfBenefit.item.adjudication.reason" definition="A code supporting the understanding of the adjudication result and explaining variance from expected amount." comment="For example, may indicate that the funds for this benefit type have been exhausted." requirements="To support understanding of variance from adjudication expectations.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Adjudication Reason Codes" strength="example" description="Adjudication reason codes." valueSet="2.16.840.1.113883.4.642.3.598" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication-reason"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Monetary amount</desc>
                            <fhir fid="ExplanationOfBenefit.item.adjudication.amount" definition="Monetary amount associated with the category." comment="For example, amount submitted, eligible amount, co-payment, and benefit payable." requirements="Most adjuciation categories convey a monetary amount.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Non-monitary value</desc>
                            <fhir fid="ExplanationOfBenefit.item.adjudication.value" definition="A non-monetary value associated with the category. Mutually exclusive to the amount element above." comment="For example: eligible percentage or co-payment percentage." requirements="Some adjudication categories convey a percentage or a fixed value.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Additional items</desc>
                        <fhir fid="ExplanationOfBenefit.item.detail" definition="Second-tier of goods and services.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Product or service provided</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.sequence" definition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." requirements="The items to be processed for adjudication.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Revenue or cost center code</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                            </fhir>
                        </element>
                        <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Benefit classification</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include: Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                                requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision, oral-basic etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                            </fhir>
                        </element>
                        <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Billing, service, product, or drug code</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                requirements="Necessary to state what was provided or done.">
                                <type value="CodeableConcept"/>
                                <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                            </fhir>
                        </element>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Service/Product billing modifiers</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                            </fhir>
                        </element>
                        <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Program the product or service is provided under</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Count of products or services</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Fee, charge or cost per item</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Price scaling factor</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Total item cost</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Unique device identifier</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Applicable note numbers</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Detail level adjudication details</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.adjudication" definition="The adjudication results."/>
                        </element>
                        <element name="subDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Additional items</desc>
                            <fhir fid="ExplanationOfBenefit.item.detail.subDetail" definition="Third-tier of goods and services.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="sequence" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Product or service provided</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.sequence" definition="A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items." requirements="The items to be processed for adjudication.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="revenue" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Revenue or cost center code</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.revenue" definition="The type of revenue or cost center providing the product and/or service." requirements="Needed in the processing of institutional claims.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Example Revenue Center Codes" strength="example" description="Codes for the revenue or cost centers supplying the service and/or products." valueSet="2.16.840.1.113883.4.642.3.594" canonicalUri="http://hl7.org/fhir/ValueSet/ex-revenue-center"/>
                                </fhir>
                            </element>
                            <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Benefit classification</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage."
                                    requirements="Needed in the processing of institutional claims as this allows the insurer to determine whether a facial X-Ray is for dental, orthopedic, or facial surgery purposes.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision, oral-basic etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                                </fhir>
                            </element>
                            <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Billing, service, product, or drug code</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                    comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                    requirements="Necessary to state what was provided or done.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                                </fhir>
                            </element>
                            <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Service/Product billing modifiers</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours."
                                    requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                                </fhir>
                            </element>
                            <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Program the product or service is provided under</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program."
                                    requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                                </fhir>
                            </element>
                            <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Count of products or services</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fee, charge or cost per item</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Price scaling factor</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                    comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Total item cost</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied."
                                    requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="udi" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Unique device identifier</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.udi" definition="Unique Device Identifiers associated with this line item." requirements="The UDI code allows the insurer to obtain device level information on the product supplied.">
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    </type>
                                </fhir>
                            </element>
                            <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Applicable note numbers</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Subdetail level adjudication details</desc>
                                <fhir fid="ExplanationOfBenefit.item.detail.subDetail.adjudication" definition="The adjudication results."/>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="addItem" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Insurer added line items</desc>
                    <fhir fid="ExplanationOfBenefit.addItem" definition="The first-tier service adjudications for payor added product or service lines."
                        requirements="Insurers may redefine the provided product or service or may package and/or decompose groups of products and services. The addItems allows the insurer to provide their line item list with linkage to the submitted items/details/sub-details. In a preauthorization the insurer may use the addItem structure to provide additional information on authorized products and services.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="itemSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Item sequence number</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.itemSequence" definition="Claim items which this service line is intended to replace." requirements="Provides references to the claim items.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="detailSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Detail sequence number</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.detailSequence" definition="The sequence number of the details within the claim item which this line is intended to replace." requirements="Provides references to the claim details within the claim item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="subDetailSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Subdetail sequence number</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.subDetailSequence" definition="The sequence number of the sub-details woithin the details within the claim item which this line is intended to replace." requirements="Provides references to the claim sub-details within the claim detail.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="provider" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Authorized providers</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.provider" definition="The providers who are authorized for the services rendered to the patient." requirements="Insurer may provide authorization specifically to a restricted set of providers rather than an open authorization.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.source"/>
                        </fhir>
                    </element>
                    <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Billing, service, product, or drug code</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                            comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                            requirements="Necessary to state what was provided or done.">
                            <type value="CodeableConcept"/>
                            <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                        </fhir>
                    </element>
                    <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Service/Product billing modifiers</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                            requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                        </fhir>
                    </element>
                    <element name="programCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Program the product or service is provided under</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.programCode" definition="Identifies the program under which this may be recovered." comment="For example: Neonatal program, child dental program or drug users recovery program." requirements="Commonly used in in the identification of publicly provided program focused on population segments or disease classifications.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Program Reason Codes" strength="example" description="Program specific reason codes." valueSet="2.16.840.1.113883.4.642.3.576" canonicalUri="http://hl7.org/fhir/ValueSet/ex-program-code"/>
                        </fhir>
                    </element>
                    <choice name="serviced[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date or dates of service or product delivery</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.serviced[x]" definition="The date or dates when the service or product was supplied, performed or completed." requirements="Needed to determine whether the  service or product was provided during the term of the insurance coverage.">
                            <type value="date"/>
                            <type value="Period"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                        </fhir>
                        <element name="servicedDate">
                            <fhir fid="ExplanationOfBenefit.addItem.servicedDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="servicedPeriod">
                            <fhir fid="ExplanationOfBenefit.addItem.servicedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="location[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Place of service or where product was supplied</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.location[x]" definition="Where the product or service was provided." requirements="The location can alter whether the item was acceptable for insurance purposes or impact the determination of the benefit amount.">
                            <type value="CodeableConcept"/>
                            <type value="Address"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                            <binding displayName="Example Service Place Codes" strength="example" description="Place where the service is rendered." valueSet="2.16.840.1.113883.4.642.3.564" canonicalUri="http://hl7.org/fhir/ValueSet/service-place"/>
                            <mapping identity="w5" map="FiveWs.where[x]"/>
                        </fhir>
                        <element name="locationCodeableConcept">
                            <fhir fid="ExplanationOfBenefit.addItem.locationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="locationAddress">
                            <fhir fid="ExplanationOfBenefit.addItem.locationAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="locationReference">
                            <fhir fid="ExplanationOfBenefit.addItem.locationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Count of products or services</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fee, charge or cost per item</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Price scaling factor</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                            comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Total item cost</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Anatomical location</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.bodySite" definition="Physical service site on the patient (limb, tooth, etc.)." comment="For example, providing a tooth code allows an insurer to identify a provider performing a filling on a tooth that was previously removed." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Oral Site Codes" strength="example" description="The code for the teeth, quadrant, sextant and arch." valueSet="2.16.840.1.113883.4.642.3.540" canonicalUri="http://hl7.org/fhir/ValueSet/tooth"/>
                        </fhir>
                    </element>
                    <element name="subSite" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Anatomical sub-location</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.subSite" definition="A region or surface of the bodySite, e.g. limb region or tooth surface(s)." requirements="Allows insurer to validate specific procedures.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Surface Codes" strength="example" description="The code for the tooth surface and surface combinations." valueSet="2.16.840.1.113883.4.642.3.546" canonicalUri="http://hl7.org/fhir/ValueSet/surface"/>
                        </fhir>
                    </element>
                    <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable note numbers</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Added items adjudication</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.adjudication" definition="The adjudication results."/>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Insurer added line items</desc>
                        <fhir fid="ExplanationOfBenefit.addItem.detail" definition="The second-tier service adjudications for payor added services.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Billing, service, product, or drug code</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                requirements="Necessary to state what was provided or done.">
                                <type value="CodeableConcept"/>
                                <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                            </fhir>
                        </element>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Service/Product billing modifiers</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Count of products or services</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Fee, charge or cost per item</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Price scaling factor</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Total item cost</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied."
                                requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Applicable note numbers</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Added items adjudication</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.adjudication" definition="The adjudication results."/>
                        </element>
                        <element name="subDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Insurer added line items</desc>
                            <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail" definition="The third-tier service adjudications for payor added services.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="productOrService" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Billing, service, product, or drug code</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.productOrService" definition="When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item."
                                    comment="If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'."
                                    requirements="Necessary to state what was provided or done.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="USCLS Codes" strength="example" description="Allowable service and product codes." valueSet="2.16.840.1.113883.4.642.3.542" canonicalUri="http://hl7.org/fhir/ValueSet/service-uscls"/>
                                </fhir>
                            </element>
                            <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Service/Product billing modifiers</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.modifier" definition="Item typification or modifiers codes to convey additional context for the product or service." comment="For example, in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or out of office hours."
                                    requirements="To support inclusion of the item for adjudication or to charge an elevated fee.">
                                    <type value="CodeableConcept"/>
                                    <binding displayName="Modifier type Codes" strength="example" description="Item type or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." valueSet="2.16.840.1.113883.4.642.3.536" canonicalUri="http://hl7.org/fhir/ValueSet/claim-modifiers"/>
                                </fhir>
                            </element>
                            <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Count of products or services</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.quantity" definition="The number of repetitions of a service or product." requirements="Required when the product or service code does not convey the quantity provided.">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="unitPrice" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fee, charge or cost per item</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.unitPrice" definition="If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group." requirements="The amount charged to the patient by the provider for a single unit.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Price scaling factor</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.factor" definition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount."
                                    comment="To show a 10% senior's discount, the value entered is: 0.90 (1.00 - 0.10)." requirements="When discounts are provided to a patient (example: Senior's discount) then this must be documented for adjudication.">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="net" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Total item cost</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.net" definition="The quantity times the unit price for an additional service or product or charge." comment="For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied."
                                    requirements="Provides the total amount claimed  for the group (if a grouper) or the line item.">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                            <element name="noteNumber" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Applicable note numbers</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.noteNumber" definition="The numbers associated with notes below which apply to the adjudication of this item." requirements="Provides a condensed manner for associating human readable descriptive explanations for adjudications on the line item.">
                                    <type value="positiveInt"/>
                                </fhir>
                            </element>
                            <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Added items adjudication</desc>
                                <fhir fid="ExplanationOfBenefit.addItem.detail.subDetail.adjudication" definition="The adjudication results."/>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="adjudication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Header-level adjudication</desc>
                    <fhir fid="ExplanationOfBenefit.adjudication" definition="The adjudication results which are presented at the header level rather than at the line-item or add-item levels." requirements="Some insurers will receive line-items but provide the adjudication only at a summary or header-level."/>
                </element>
                <element name="total" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Adjudication totals</desc>
                    <fhir fid="ExplanationOfBenefit.total" definition="Categorized monetary totals for the adjudication." comment="Totals for amounts submitted, co-pays, benefits payable etc." requirements="To provide the requestor with financial totals by category for the adjudication." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of adjudication information</desc>
                        <fhir fid="ExplanationOfBenefit.total.category"
                            definition="A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item."
                            comment="For example, codes indicating: Co-Pay, deductible, eligible, benefit, tax, etc." requirements="Needed to convey the type of total provided." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Adjudication Value Codes" strength="example" description="The adjudication codes." valueSet="2.16.840.1.113883.4.642.3.596" canonicalUri="http://hl7.org/fhir/ValueSet/adjudication"/>
                        </fhir>
                    </element>
                    <element name="amount" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Financial total for the category</desc>
                        <fhir fid="ExplanationOfBenefit.total.amount" definition="Monetary total amount associated with the category." requirements="Needed to convey the total monetary amount." isSummary="true">
                            <type value="Money"/>
                        </fhir>
                    </element>
                </element>
                <element name="payment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Payment Details</desc>
                    <fhir fid="ExplanationOfBenefit.payment" definition="Payment details for the adjudication of the claim." requirements="Needed to convey references to the financial instrument that has been used if payment has been made.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Partial or complete payment</desc>
                        <fhir fid="ExplanationOfBenefit.payment.type" definition="Whether this represents partial or complete payment of the benefits payable." requirements="To advise the requestor when the insurer believes all payments to have been completed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Payment Type Codes" strength="example" description="The type (partial, complete) of the payment." valueSet="2.16.840.1.113883.4.642.3.616" canonicalUri="http://hl7.org/fhir/ValueSet/ex-paymenttype"/>
                        </fhir>
                    </element>
                    <element name="adjustment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Payment adjustment for non-claim issues</desc>
                        <fhir fid="ExplanationOfBenefit.payment.adjustment" definition="Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication."
                            comment="Insurers will deduct amounts owing from the provider (adjustment), such as a prior overpayment, from the amount owing to the provider (benefits payable) when payment is made to the provider." requirements="To advise the requestor of adjustments applied to the payment.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="adjustmentReason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Explanation for the variance</desc>
                        <fhir fid="ExplanationOfBenefit.payment.adjustmentReason" definition="Reason for the payment adjustment." requirements="Needed to clarify the monetary adjustment.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Payment Adjustment Reason Codes" strength="example" description="Payment Adjustment reason codes." valueSet="2.16.840.1.113883.4.642.3.600" canonicalUri="http://hl7.org/fhir/ValueSet/payment-adjustment-reason"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Expected date of payment</desc>
                        <fhir fid="ExplanationOfBenefit.payment.date" definition="Estimated date the payment will be issued or the actual issue date of payment." requirements="To advise the payee when payment can be expected.">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Payable amount after adjustment</desc>
                        <fhir fid="ExplanationOfBenefit.payment.amount" definition="Benefits payable less any payment adjustment." requirements="Needed to provide the actual payment amount.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Business identifier for the payment</desc>
                        <fhir fid="ExplanationOfBenefit.payment.identifier" definition="Issuer's unique identifier for the payment instrument." comment="For example: EFT number or check number." requirements="Enable the receiver to reconcile when payment received.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                </element>
                <element name="formCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed form identifier</desc>
                    <fhir fid="ExplanationOfBenefit.formCode" definition="A code for the form to be used for printing the content." comment="May be needed to identify specific jurisdictional forms." requirements="Needed to specify the specific form used for producing output for this response.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Forms" strength="example" description="The forms codes." valueSet="2.16.840.1.113883.4.642.3.37" canonicalUri="http://hl7.org/fhir/ValueSet/forms"/>
                    </fhir>
                </element>
                <element name="form" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed reference or actual form</desc>
                    <fhir fid="ExplanationOfBenefit.form" definition="The actual form, by reference or inclusion, for printing the content or an EOB." comment="Needed to permit insurers to include the actual form." requirements="Needed to include the specific form used for producing output for this response.">
                        <type value="Attachment"/>
                    </fhir>
                </element>
                <element name="processNote" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Note concerning adjudication</desc>
                    <fhir fid="ExplanationOfBenefit.processNote" definition="A note that describes or explains adjudication results in a human readable form." requirements="Provides the insurer specific textual explanations associated with the processing.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="number" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Note instance identifier</desc>
                        <fhir fid="ExplanationOfBenefit.processNote.number" definition="A number to uniquely identify a note entry." requirements="Necessary to provide a mechanism to link from adjudications.">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">display | print | printoper</desc>
                        <fhir fid="ExplanationOfBenefit.processNote.type" definition="The business purpose of the note text." requirements="To convey the expectation for when the text is used.">
                            <type value="code"/>
                            <binding displayName="NoteType" strength="required" description="The presentation types of notes." valueSet="2.16.840.1.113883.4.642.3.15" canonicalUri="http://hl7.org/fhir/ValueSet/note-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Note explanatory text</desc>
                        <fhir fid="ExplanationOfBenefit.processNote.text" definition="The explanation or description associated with the processing." requirements="Required to provide human readable explanation.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Language of the text</desc>
                        <fhir fid="ExplanationOfBenefit.processNote.language" definition="A code to define the language used in the text of the note." comment="Only required if the language is different from the resource language." requirements="Note text may vary from the resource defined language.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                        </fhir>
                    </element>
                </element>
                <element name="benefitPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the benefits are applicable</desc>
                    <fhir fid="ExplanationOfBenefit.benefitPeriod" definition="The term of the benefits documented in this response." comment="Not applicable when use=claim." requirements="Needed as coverages may be multi-year while benefits tend to be annual therefore a separate expression of the benefit period is needed.">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="benefitBalance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Balance by Benefit Category</desc>
                    <fhir fid="ExplanationOfBenefit.benefitBalance" definition="Balance by Benefit Category.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Benefit classification</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.category" definition="Code to identify the general type of benefits under which products and services are provided." comment="Examples include Medical Care, Periodontics, Renal Dialysis, Vision Coverage." requirements="Needed to convey the category of service or product for which eligibility is sought.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Benefit Category Codes" strength="example" description="Benefit categories such as: oral, medical, vision, oral-basic etc." valueSet="2.16.840.1.113883.4.642.3.1174" canonicalUri="http://hl7.org/fhir/ValueSet/ex-benefitcategory"/>
                        </fhir>
                    </element>
                    <element name="excluded" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Excluded from the plan</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.excluded" definition="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." requirements="Needed to identify items that are specifically excluded from the coverage.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Short name for the benefit</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.name" definition="A short name or tag for the benefit." comment="For example: MED01, or DENT2." requirements="Required to align with other plan names.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of the benefit or services covered</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.description" definition="A richer description of the benefit or services covered." comment="For example, 'DENT2 covers 100% of basic, 50% of major but excludes Ortho, Implants and Cosmetic services'." requirements="Needed for human readable reference.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="network" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">In or out of network</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.network" definition="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." requirements="Needed as in or out of network providers are treated differently under the coverage.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Network Type Codes" strength="example" description="Code to classify in or out of network services." valueSet="2.16.840.1.113883.4.642.3.608" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-network"/>
                        </fhir>
                    </element>
                    <element name="unit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Individual or family</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.unit" definition="Indicates if the benefits apply to an individual or to the family." requirements="Needed for the understanding of the benefits.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Unit Type Codes" strength="example" description="Unit covered/serviced - individual or family." valueSet="2.16.840.1.113883.4.642.3.610" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-unit"/>
                        </fhir>
                    </element>
                    <element name="term" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Annual or lifetime</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.term" definition="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." requirements="Needed for the understanding of the benefits.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Benefit Term Codes" strength="example" description="Coverage unit - annual, lifetime." valueSet="2.16.840.1.113883.4.642.3.612" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-term"/>
                        </fhir>
                    </element>
                    <element name="financial" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Benefit Summary</desc>
                        <fhir fid="ExplanationOfBenefit.benefitBalance.financial" definition="Benefits Used to date.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Benefit classification</desc>
                            <fhir fid="ExplanationOfBenefit.benefitBalance.financial.type" definition="Classification of benefit being provided." comment="For example: deductible, visits, benefit amount." requirements="Needed to convey the nature of the benefit.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Benefit Type Codes" strength="example" description="Deductable, visits, co-pay, etc." valueSet="2.16.840.1.113883.4.642.3.606" canonicalUri="http://hl7.org/fhir/ValueSet/benefit-type"/>
                            </fhir>
                        </element>
                        <choice name="allowed[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Benefits allowed</desc>
                            <fhir fid="ExplanationOfBenefit.benefitBalance.financial.allowed[x]" definition="The quantity of the benefit which is permitted under the coverage." requirements="Needed to convey the benefits offered under the coverage.">
                                <type value="unsignedInt"/>
                                <type value="string"/>
                                <type value="Money"/>
                            </fhir>
                            <element name="allowedUnsignedInt">
                                <fhir fid="ExplanationOfBenefit.benefitBalance.financial.allowedUnsignedInt">
                                    <type value="unsignedInt"/>
                                </fhir>
                            </element>
                            <element name="allowedString">
                                <fhir fid="ExplanationOfBenefit.benefitBalance.financial.allowedString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="allowedMoney">
                                <fhir fid="ExplanationOfBenefit.benefitBalance.financial.allowedMoney">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                        </choice>
                        <choice name="used[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Benefits used</desc>
                            <fhir fid="ExplanationOfBenefit.benefitBalance.financial.used[x]" definition="The quantity of the benefit which have been consumed to date." requirements="Needed to convey the benefits consumed to date.">
                                <type value="unsignedInt"/>
                                <type value="Money"/>
                            </fhir>
                            <element name="usedUnsignedInt">
                                <fhir fid="ExplanationOfBenefit.benefitBalance.financial.usedUnsignedInt">
                                    <type value="unsignedInt"/>
                                </fhir>
                            </element>
                            <element name="usedMoney">
                                <fhir fid="ExplanationOfBenefit.benefitBalance.financial.usedMoney">
                                    <type value="Money"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.56" name="FamilyMemberHistory" displayName="FamilyMemberHistory" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory">
            <desc language="en-US">Significant health conditions for a person related to the patient relevant in the context of care for the patient.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="FamilyMemberHistory" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="FamilyMemberHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Information about patient's relatives, relevant for patient</desc>
                <fhir fid="FamilyMemberHistory" definition="Significant health conditions for a person related to the patient relevant in the context of care for the patient.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="Not in scope for v2"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN]"/>
                    <constraint key="fhs-2" severity="error" human="Can only have estimatedAge if age[x] is present" expression="age.exists() or estimatedAge.empty()" xpath="exists(*[starts-with(local-name(.), 'age')]) or not(exists(f:estimatedAge))" source=""/>
                    <constraint key="fhs-1" severity="error" human="Can have age[x] or born[x], but not both" expression="age.empty() or born.empty()" xpath="not (*[starts-with(local-name(.), 'age')] and *[starts-with(local-name(.), 'birth')])" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Id(s) for this record</desc>
                    <fhir fid="FamilyMemberHistory.identifier" definition="Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the family member history as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="FamilyMemberHistory.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Event.instantiatesCanonical"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="FamilyMemberHistory.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiatesUri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">partial | completed | entered-in-error | health-unknown</desc>
                    <fhir fid="FamilyMemberHistory.status" definition="A code specifying the status of the record of the family history of a specific family member." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="FamilyHistoryStatus" strength="required" description="A code that identifies the status of the family history record." valueSet="2.16.840.1.113883.4.642.3.267" canonicalUri="http://hl7.org/fhir/ValueSet/history-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="dataAbsentReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">subject-unknown | withheld | unable-to-obtain | deferred</desc>
                    <fhir fid="FamilyMemberHistory.dataAbsentReason" definition="Describes why the family member's history is not available." requirements="This is a separate element to allow it to have a distinct binding from reasonCode." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="FamilyHistoryAbsentReason" strength="example" description="Codes describing the reason why a family member's history is not available." valueSet="2.16.840.1.113883.4.642.3.269" canonicalUri="http://hl7.org/fhir/ValueSet/history-absent-reason"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Patient history is about</desc>
                    <fhir fid="FamilyMemberHistory.patient" definition="The person who this history concerns." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map="participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When history was recorded or last updated</desc>
                    <fhir fid="FamilyMemberHistory.date" definition="The date (and possibly time) when the family member history was recorded or last updated." comment="This should be captured even if the same as the date on the List aggregating the full family history." requirements="Allows determination of how current the summary is." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The family member described</desc>
                    <fhir fid="FamilyMemberHistory.name" definition="This will either be a name or a description; e.g. &#34;Aunt Susan&#34;, &#34;my cousin with the red hair&#34;." requirements="Allows greater ease in ensuring the same person is being talked about." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="name"/>
                    </fhir>
                </element>
                <element name="relationship" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Relationship to the subject</desc>
                    <fhir fid="FamilyMemberHistory.relationship" definition="The type of relationship this person has to the patient (father, mother, brother etc.)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetFamilyMember" strength="example" description="The nature of the relationship between the patient and the related person being described in the family member history." valueSet="2.16.840.1.113883.1.11.19579" canonicalUri="http://terminology.hl7.org/ValueSet/v3-FamilyMember"/>
                        <mapping identity="rim" map="code"/>
                    </fhir>
                </element>
                <element name="sex" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">male | female | other | unknown</desc>
                    <fhir fid="FamilyMemberHistory.sex" definition="The birth sex of the family member."
                        comment="This element should ideally reflect whether the individual is genetically male or female.  However, as reported information based on the knowledge of the patient or reporting friend/relative, there may be situations where the reported sex might not be totally accurate.  E.g. 'Aunt Sue' might be XY rather than XX.  Questions soliciting this information should be phrased to encourage capture of genetic sex where known.  However, systems performing analysis should also allow for the possibility of imprecision with this element."
                        requirements="Not all relationship codes imply sex and the relative's sex can be relevant for risk assessments." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="AdministrativeGender" strength="extensible" description="Codes describing the sex assigned at birth as documented on the birth registration." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender"/>
                    </fhir>
                </element>
                <choice name="born[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">(approximate) date of birth</desc>
                    <fhir fid="FamilyMemberHistory.born[x]" definition="The actual or approximate date of birth of the relative." requirements="Allows calculation of the relative's age.">
                        <type value="Period"/>
                        <type value="date"/>
                        <type value="string"/>
                        <mapping identity="rim" map="player[classCode=LIV, determinerCode=INSTANCE]. birthDate (could be URG)"/>
                    </fhir>
                    <element name="bornPeriod">
                        <fhir fid="FamilyMemberHistory.bornPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="bornDate">
                        <fhir fid="FamilyMemberHistory.bornDate">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="bornString">
                        <fhir fid="FamilyMemberHistory.bornString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="age[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">(approximate) age</desc>
                    <fhir fid="FamilyMemberHistory.age[x]" definition="The age of the relative at the time the family member history is recorded." comment="use estimatedAge to indicate whether the age is actual or not." requirements="While age can be calculated from date of birth, sometimes recording age directly is more natural for clinicians." isSummary="true">
                        <type value="Age"/>
                        <type value="Range"/>
                        <type value="string"/>
                        <mapping identity="rim" map="participation[typeCode=SBJ].act[classCode=OBS,moodCode=EVN, code=&#34;age&#34;].value"/>
                    </fhir>
                    <element name="ageAge">
                        <fhir fid="FamilyMemberHistory.ageAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="ageRange">
                        <fhir fid="FamilyMemberHistory.ageRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="ageString">
                        <fhir fid="FamilyMemberHistory.ageString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <element name="estimatedAge" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Age is estimated?</desc>
                    <fhir fid="FamilyMemberHistory.estimatedAge" definition="If true, indicates that the age value specified is an estimated value." comment="This element is labeled as a modifier because the fact that age is estimated can/should change the results of any algorithm that calculates based on the specified age."
                        requirements="Clinicians often prefer to specify an estimaged age rather than an age range." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <choice name="deceased[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dead? How old/when?</desc>
                    <fhir fid="FamilyMemberHistory.deceased[x]" definition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record." isSummary="true">
                        <type value="boolean"/>
                        <type value="Age"/>
                        <type value="Range"/>
                        <type value="date"/>
                        <type value="string"/>
                        <mapping identity="rim" map="player[classCode=LIV, determinerCode=INSTANCE].deceasedInd, deceasedDate (could be URG)  For age, you'd hang an observation off the role"/>
                    </fhir>
                    <element name="deceasedBoolean">
                        <fhir fid="FamilyMemberHistory.deceasedBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="deceasedAge">
                        <fhir fid="FamilyMemberHistory.deceasedAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="deceasedRange">
                        <fhir fid="FamilyMemberHistory.deceasedRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="deceasedDate">
                        <fhir fid="FamilyMemberHistory.deceasedDate">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="deceasedString">
                        <fhir fid="FamilyMemberHistory.deceasedString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was family member history performed?</desc>
                    <fhir fid="FamilyMemberHistory.reasonCode" definition="Describes why the family member history occurred in coded or textual form." comment="Textual reasons can be captured using reasonCode.text." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Codes indicating why the family member history was done." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was family member history performed?</desc>
                    <fhir fid="FamilyMemberHistory.reasonReference" definition="Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">General note about related person</desc>
                    <fhir fid="FamilyMemberHistory.note" definition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=ActCode#ANNGEN].value"/>
                    </fhir>
                </element>
                <element name="condition" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Condition that the related person had</desc>
                    <fhir fid="FamilyMemberHistory.condition" definition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=ActCode#ASSERTION, value&lt;Diagnosis]"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Condition suffered by relation</desc>
                        <fhir fid="FamilyMemberHistory.condition.code" definition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Identification of the Condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                            <mapping identity="rim" map=".value"/>
                        </fhir>
                    </element>
                    <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">deceased | permanent disability | etc.</desc>
                        <fhir fid="FamilyMemberHistory.condition.outcome" definition="Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition Outcome Codes" strength="example" description="The result of the condition for the patient; e.g. death, permanent disability, temporary disability, etc." valueSet="2.16.840.1.113883.4.642.3.967" canonicalUri="http://hl7.org/fhir/ValueSet/condition-outcome"/>
                            <mapping identity="rim" map="outboundRelationship[typeCode=OUTC)].target[classCode=OBS, moodCode=EVN, code=ActCode#ASSERTION].value"/>
                        </fhir>
                    </element>
                    <element name="contributedToDeath" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the condition contributed to the cause of death</desc>
                        <fhir fid="FamilyMemberHistory.condition.contributedToDeath" definition="This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <choice name="onset[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When condition first manifested</desc>
                        <fhir fid="FamilyMemberHistory.condition.onset[x]" definition="Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence." requirements="Age of onset of a condition in relatives is predictive of risk for the patient.">
                            <type value="Age"/>
                            <type value="Range"/>
                            <type value="Period"/>
                            <type value="string"/>
                            <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;Subject Age at measurement&#34;, value&lt;Diagnosis].value[@xsi:typeCode='TS' or 'IVL_TS']  Use originalText for string"/>
                        </fhir>
                        <element name="onsetAge">
                            <fhir fid="FamilyMemberHistory.condition.onsetAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="onsetRange">
                            <fhir fid="FamilyMemberHistory.condition.onsetRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="onsetPeriod">
                            <fhir fid="FamilyMemberHistory.condition.onsetPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="onsetString">
                            <fhir fid="FamilyMemberHistory.condition.onsetString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Extra information about condition</desc>
                        <fhir fid="FamilyMemberHistory.condition.note" definition="An area where general notes can be placed about this specific condition.">
                            <type value="Annotation"/>
                            <mapping identity="rim" map="inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=ActCode#ANNGEN].value"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.57" name="Flag" displayName="Flag" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Flag">
            <desc language="en-US">Prospective warnings of potential issues when providing care to the patient.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Flag" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Flag" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Key information to flag to healthcare providers</desc>
                <fhir fid="Flag" definition="Prospective warnings of potential issues when providing care to the patient.">
                    <mapping identity="rim" map="Observation[classCode=ISSUE, moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="Flag.identifier" definition="Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the flag as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error</desc>
                    <fhir fid="Flag.status" definition="Supports basic workflow." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="FlagStatus" strength="required" description="Indicates whether this flag is active and needs to be displayed to a user, or whether it is no longer needed or was entered in error." valueSet="2.16.840.1.113883.4.642.3.120" canonicalUri="http://hl7.org/fhir/ValueSet/flag-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical, administrative, etc.</desc>
                    <fhir fid="Flag.category" definition="Allows a flag to be divided into different categories like clinical, administrative etc. Intended to be used as a means of filtering which flags are displayed to particular user or in a given context." comment="The value set will often need to be adjusted based on local business rules and usage context." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Flag Category" strength="example" description="A general category for flags for filtering/display purposes." valueSet="2.16.840.1.113883.4.642.3.122" canonicalUri="http://hl7.org/fhir/ValueSet/flag-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Coded or textual message to display to user</desc>
                    <fhir fid="Flag.code" definition="The coded value or textual component of the flag to display to the user." comment="If non-coded, use CodeableConcept.text.  This element should always be included in the narrative." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Flag Code" strength="example" description="Detail codes identifying specific flagged issues." valueSet="2.16.840.1.113883.4.642.3.124" canonicalUri="http://hl7.org/fhir/ValueSet/flag-code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".value"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who/What is flag about?</desc>
                    <fhir fid="Flag.subject" definition="The patient, location, group, organization, or practitioner etc. this is about record this flag is associated with." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT | LOCE | ASSIGNED]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time period when flag is active</desc>
                    <fhir fid="Flag.period" definition="The period of time from the activation of the flag to inactivation of the flag. If the flag is active, the end of the period should be unspecified." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Alert relevant during encounter</desc>
                    <fhir fid="Flag.encounter" definition="This alert is only relevant during the encounter." comment="If both Flag.encounter and Flag.period are valued, then Flag.period.start shall not be before Encounter.period.start and Flag.period.end shall not be after Encounter.period.end." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Flag creator</desc>
                    <fhir fid="Flag.author" definition="The person, organization or device that created the flag." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.58" name="Goal" displayName="Goal" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Goal">
            <desc language="en-US">Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Goal" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Goal" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Describes the intended objective(s) for a patient, group or organization</desc>
                <fhir fid="Goal" definition="Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc." comment="Goal can be achieving a particular change or merely maintaining a current state or even slowing a decline.">
                    <mapping identity="v2" map="GOL.1"/>
                    <mapping identity="rim" map=".outboundRelationship[typeCode&lt;=OBJ]."/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this goal</desc>
                    <fhir fid="Goal.identifier" definition="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        requirements="Allows identification of the goal as it is known by various participating systems and in a way that remains consistent across servers.">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="lifecycleStatus" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected</desc>
                    <fhir fid="Goal.lifecycleStatus" definition="The state of the goal throughout its lifecycle." comment="This element is labeled as a modifier because the lifecycleStatus contains codes that mark the resource as not currently valid." requirements="Allows knowing whether goal needs to be further tracked." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="GoalLifecycleStatus" strength="required" description="Codes that reflect the current state of a goal and whether the goal is still being targeted." valueSet="2.16.840.1.113883.4.642.3.271" canonicalUri="http://hl7.org/fhir/ValueSet/goal-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="GOL-18-goal life cycle status"/>
                        <mapping identity="rim" map=".statusCode in-progress = active (classCode = OBJ) cancelled = aborted"/>
                    </fhir>
                </element>
                <element name="achievementStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable</desc>
                    <fhir fid="Goal.achievementStatus" definition="Describes the progression, or lack thereof, towards the goal against the target." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Goal achievement status" strength="preferred" description="Indicates the progression, or lack thereof, towards the goal against the target." valueSet="2.16.840.1.113883.4.642.3.1374" canonicalUri="http://hl7.org/fhir/ValueSet/goal-achievement"/>
                        <mapping identity="rim" map=".statusCode achieved = complete sustaining = active"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">E.g. Treatment, dietary, behavioral, etc.</desc>
                    <fhir fid="Goal.category" definition="Indicates a category the goal falls within." requirements="Allows goals to be filtered and sorted." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Goal category" strength="example" description="Codes for grouping and sorting goals." valueSet="2.16.840.1.113883.4.642.3.275" canonicalUri="http://hl7.org/fhir/ValueSet/goal-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">high-priority | medium-priority | low-priority</desc>
                    <fhir fid="Goal.priority" definition="Identifies the mutually agreed level of importance associated with reaching/sustaining the goal."
                        comment="Extensions are available to track priorities as established by each participant (i.e. Priority from the patient's perspective, different practitioners' perspectives, family member's perspectives)&#xD;&#xD;The ordinal extension on Coding can be used to convey a numerically comparable ranking to priority.  (Keep in mind that different coding systems may use a &#34;low value=important&#34;."
                        requirements="Used for sorting and presenting goals." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Goal priority" strength="preferred" description="The level of importance associated with a goal." valueSet="2.16.840.1.113883.4.642.3.273" canonicalUri="http://hl7.org/fhir/ValueSet/goal-priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Code or text describing goal</desc>
                    <fhir fid="Goal.description" definition="Human-readable and/or coded description of a specific desired objective of care, such as &#34;control blood pressure&#34; or &#34;negotiate an obstacle course&#34; or &#34;dance with child at wedding&#34;." comment="If no code is available, use CodeableConcept.text."
                        requirements="Without a description of what's trying to be achieved, element has no purpose." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Codes providing the details of a particular goal.  This will generally be system or implementation guide-specific.  In many systems, only the text element will be used." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="GOL-3.2-goal ID.text"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who this goal is intended for</desc>
                    <fhir fid="Goal.subject" definition="Identifies the patient, group or organization for whom the goal is being established." requirements="Subject is optional to support annonymized reporting." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-patient ID list"/>
                        <mapping identity="rim" map=".participation[typeCode=PAT].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <choice name="start[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When goal pursuit begins</desc>
                    <fhir fid="Goal.start[x]" definition="The date or event after which the goal should begin being pursued." requirements="Goals can be established prior to there being an intention to start pursuing them; e.g. Goals for post-surgical recovery established prior to surgery." isSummary="true">
                        <type value="date"/>
                        <type value="CodeableConcept"/>
                        <binding displayName="Goal start event" strength="example" description="Codes describing events that can trigger the initiation of a goal." valueSet="2.16.840.1.113883.4.642.3.279" canonicalUri="http://hl7.org/fhir/ValueSet/goal-start-event"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                    </fhir>
                    <element name="startDate">
                        <fhir fid="Goal.startDate">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="startCodeableConcept">
                        <fhir fid="Goal.startCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Target outcome for the goal</desc>
                    <fhir fid="Goal.target" definition="Indicates what should be done by when." comment="When multiple targets are present for a single goal instance, all targets must be met for the overall goal to be met."
                        requirements="Allows the progress of the goal to be monitored against an observation or due date.  Target is 0..* to support Observations with multiple components, such as blood pressure goals with both a systolic and diastolic target.">
                        <type value="BackboneElement"/>
                        <constraint key="gol-1" severity="error" human="Goal.target.measure is required if Goal.target.detail is populated" expression="(detail.exists() and measure.exists()) or detail.exists().not()" xpath="(exists(f:*[starts-with(local-name(.), 'detail')]) and exists(f:measure)) or not(exists(f:*[starts-with(local-name(.), 'detail')]))" source=""/>
                    </fhir>
                    <element name="measure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The parameter whose value is being tracked</desc>
                        <fhir fid="Goal.target.measure" definition="The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="LOINC Codes" strength="example" description="Codes to identify the value being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level." valueSet="2.16.840.1.113883.4.642.3.396" canonicalUri="http://hl7.org/fhir/ValueSet/observation-codes"/>
                        </fhir>
                    </element>
                    <choice name="detail[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The target value to be achieved</desc>
                        <fhir fid="Goal.target.detail[x]"
                            definition="The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value."
                            comment="A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Goal.target.measure defines a coded value." isSummary="true">
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="CodeableConcept"/>
                            <type value="string"/>
                            <type value="boolean"/>
                            <type value="integer"/>
                            <type value="Ratio"/>
                            <binding displayName="GoalTargetDetail" strength="example" description="Codes to identify the target value of the focus to be achieved to signify the fulfillment of the goal."/>
                        </fhir>
                        <element name="detailQuantity">
                            <fhir fid="Goal.target.detailQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="detailRange">
                            <fhir fid="Goal.target.detailRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="detailCodeableConcept">
                            <fhir fid="Goal.target.detailCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="detailString">
                            <fhir fid="Goal.target.detailString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="detailBoolean">
                            <fhir fid="Goal.target.detailBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="detailInteger">
                            <fhir fid="Goal.target.detailInteger">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="detailRatio">
                            <fhir fid="Goal.target.detailRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="due[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reach goal on or before</desc>
                        <fhir fid="Goal.target.due[x]" definition="Indicates either the date or the duration after start by which the goal should be met." requirements="Identifies when the goal should be evaluated." isSummary="true">
                            <type value="date"/>
                            <type value="Duration"/>
                            <mapping identity="w5" map="FiveWs.done[x]"/>
                        </fhir>
                        <element name="dueDate">
                            <fhir fid="Goal.target.dueDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="dueDuration">
                            <fhir fid="Goal.target.dueDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="statusDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When goal status took effect</desc>
                    <fhir fid="Goal.statusDate" definition="Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc." comment="To see the date for past statuses, query history." isSummary="true">
                        <type value="date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="Goal.statusReason" definition="Captures the reason for the current status." comment="This will typically be captured for statuses such as rejected, on-hold or cancelled, but could be present for others.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="expressedBy" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who's responsible for creating Goal?</desc>
                    <fhir fid="Goal.expressedBy" definition="Indicates whose goal this is - patient goal, practitioner goal, etc." comment="This is the individual responsible for establishing the goal, not necessarily who recorded it.  (For that, use the Provenance resource.)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="addresses" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Issues addressed by this goal</desc>
                    <fhir fid="Goal.addresses" definition="The identified conditions and other health record elements that are intended to be addressed by the goal." requirements="Allows specific goals to explicitly linked to the concerns they're dealing with - makes the goal more understandable.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/NutritionOrder"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RiskAssessment"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SUBJ].target[classCode=CONC]"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments about the goal</desc>
                    <fhir fid="Goal.note" definition="Any comments related to the goal." comment="May be used for progress notes, concerns or other related information that doesn't actually describe the goal itself." requirements="There's a need to capture information about the goal that doesn't actually describe the goal.">
                        <type value="Annotation"/>
                        <mapping identity="v2" map="GOL-16-goal evaluation + NTE?"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="outcomeCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What result was achieved regarding the goal?</desc>
                    <fhir fid="Goal.outcomeCode" definition="Identifies the change (or lack of change) at the point when the status of the goal is assessed." comment="Note that this should not duplicate the goal status." requirements="Outcome tracking is a key aspect of care planning.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Clinical Findings" strength="example" description="The result of the goal; e.g. &#34;25% increase in shoulder mobility&#34;, &#34;Anxiety reduced to moderate levels&#34;.  &#34;15 kg weight loss sustained over 6 months&#34;." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                    </fhir>
                </element>
                <element name="outcomeReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Observation that resulted from goal</desc>
                    <fhir fid="Goal.outcomeReference" definition="Details of what's changed (or not changed)."
                        comment="The goal outcome is independent of the outcome of the related activities.  For example, if the Goal is to achieve a target body weight of 150 lb and a care plan activity is defined to diet, then the care plan’s activity outcome could be calories consumed whereas goal outcome is an observation for the actual body weight measured."
                        requirements="Outcome tracking is a key aspect of care planning.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.59" name="GraphDefinition" displayName="GraphDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/GraphDefinition">
            <desc language="en-US">A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="GraphDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="GraphDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of a graph of resources</desc>
                <fhir fid="GraphDefinition" definition="A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="gdf-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this graph definition, represented as a URI (globally unique)</desc>
                    <fhir fid="GraphDefinition.url"
                        definition="An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the graph definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the graph definition</desc>
                    <fhir fid="GraphDefinition.version"
                        definition="The identifier that is used to identify this version of the graph definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the graph definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different graph definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the graph definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this graph definition (computer friendly)</desc>
                    <fhir fid="GraphDefinition.name" definition="A natural language name identifying the graph definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="GraphDefinition.status" definition="The status of this graph definition. Enables tracking the life-cycle of the content." comment="Allows filtering of graph definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="GraphDefinition.experimental" definition="A Boolean value to indicate that this graph definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of graph definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level graph definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="GraphDefinition.date" definition="The date  (and optionally time) when the graph definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the graph definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the graph definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="GraphDefinition.publisher" definition="The name of the organization or individual that published the graph definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the graph definition is the organization or individual primarily responsible for the maintenance and upkeep of the graph definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the graph definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the graph definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="GraphDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the graph definition</desc>
                    <fhir fid="GraphDefinition.description" definition="A free text natural language description of the graph definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the graph definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the graph definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the graph definition is presumed to be the predominant language in the place the graph definition was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="GraphDefinition.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate graph definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for graph definition (if applicable)</desc>
                    <fhir fid="GraphDefinition.jurisdiction" definition="A legal or geographic region in which the graph definition is intended to be used." comment="It may be possible for the graph definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this graph definition is defined</desc>
                    <fhir fid="GraphDefinition.purpose" definition="Explanation of why this graph definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the graph definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this graph definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="start" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Type of resource at which the graph starts</desc>
                    <fhir fid="GraphDefinition.start" definition="The type of FHIR resource at which instances of this graph start." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                    </fhir>
                </element>
                <element name="profile" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Profile on base resource</desc>
                    <fhir fid="GraphDefinition.profile" definition="The profile that describes the use of the base resource." comment="The code does not include the '$' prefix that is always included in the URL when the operation is invoked.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Links this graph makes rules about</desc>
                    <fhir fid="GraphDefinition.link" definition="Links this graph makes rules about.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="path" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Path in the resource that contains the link</desc>
                        <fhir fid="GraphDefinition.link.path" definition="A FHIR expression that identifies one of FHIR References to other resources." comment="The path expression cannot contain a resolve() function. If there is no path, the link is a reverse lookup, using target.params. If the path is &#34;*&#34; then this means all references in the resource.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="sliceName" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Which slice (if profiled)</desc>
                        <fhir fid="GraphDefinition.link.sliceName" definition="Which slice (if profiled).">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="min" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Minimum occurrences for this link</desc>
                        <fhir fid="GraphDefinition.link.min" definition="Minimum occurrences for this link.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="max" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Maximum occurrences for this link</desc>
                        <fhir fid="GraphDefinition.link.max" definition="Maximum occurrences for this link.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Why this link is specified</desc>
                        <fhir fid="GraphDefinition.link.description" definition="Information about why this link is of interest in this graph definition.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Potential target for the link</desc>
                        <fhir fid="GraphDefinition.link.target" definition="Potential target for the link.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of resource this link refers to</desc>
                            <fhir fid="GraphDefinition.link.target.type" definition="Type of resource this link refers to.">
                                <type value="code"/>
                                <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="params" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Criteria for reverse lookup</desc>
                            <fhir fid="GraphDefinition.link.target.params" definition="A set of parameters to look up." comment="At least one of the parameters must have the value {ref} which identifies the focus resource.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="profile" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Profile for the target resource</desc>
                            <fhir fid="GraphDefinition.link.target.profile" definition="Profile for the target resource.">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="compartment" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Compartment Consistency Rules</desc>
                            <fhir fid="GraphDefinition.link.target.compartment" definition="Compartment Consistency Rules.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="use" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">condition | requirement</desc>
                                <fhir fid="GraphDefinition.link.target.compartment.use" definition="Defines how the compartment rule is used - whether it it is used to test whether resources are subject to the rule, or whether it is a rule that must be followed." comment="All conditional rules are evaluated; if they are true, then the rules are evaluated.">
                                    <type value="code"/>
                                    <binding displayName="GraphCompartmentUse" strength="required" description="Defines how a compartment rule is used." valueSet="2.16.840.1.113883.4.642.3.282" canonicalUri="http://hl7.org/fhir/ValueSet/graph-compartment-use|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Patient | Encounter | RelatedPerson | Practitioner | Device</desc>
                                <fhir fid="GraphDefinition.link.target.compartment.code" definition="Identifies the compartment.">
                                    <type value="code"/>
                                    <binding displayName="CompartmentType" strength="required" description="Identifies a compartment." valueSet="2.16.840.1.113883.4.642.3.786" canonicalUri="http://hl7.org/fhir/ValueSet/compartment-type|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="rule" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">identical | matching | different | custom</desc>
                                <fhir fid="GraphDefinition.link.target.compartment.rule" definition="identical | matching | different | no-rule | custom.">
                                    <type value="code"/>
                                    <binding displayName="GraphCompartmentRule" strength="required" description="How a compartment must be linked." valueSet="2.16.840.1.113883.4.642.3.280" canonicalUri="http://hl7.org/fhir/ValueSet/graph-compartment-rule|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Custom rule, as a FHIRPath expression</desc>
                                <fhir fid="GraphDefinition.link.target.compartment.expression" definition="Custom rule, as a FHIRPath expression.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Documentation for FHIRPath expression</desc>
                                <fhir fid="GraphDefinition.link.target.compartment.description" definition="Documentation for FHIRPath expression.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Additional links from target resource</desc>
                            <fhir fid="GraphDefinition.link.target.link" definition="Additional links from target resource."/>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.60" name="Group" displayName="Group" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Group">
            <desc language="en-US">Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Group" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Group" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Group of multiple entities</desc>
                <fhir fid="Group" definition="Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."
                    comment="If both Group.characteristic and Group.member are present, then the members are the individuals who were found who met the characteristic.  It's possible that there might be other candidate members who meet the characteristic and aren't (yet) in the list.  All members SHALL have the listed characteristics.">
                    <mapping identity="rim" map="Entity[determinerCode=&#34;GRP&#34; or determinerCode=&#34;GRP_KIND&#34;]"/>
                    <constraint key="grp-1" severity="error" human="Can only have members if group is &#34;actual&#34;" expression="member.empty() or (actual = true)" xpath="f:actual/@value=true() or not(exists(f:member))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique id</desc>
                    <fhir fid="Group.identifier" definition="A unique business identifier for this group." requirements="Allows the group to be referenced from external specifications." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="unique(./id[displayable=&#34;true&#34; and scope=&#34;OBJ&#34;])"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this group's record is in active use</desc>
                    <fhir fid="Group.active" definition="Indicates whether the record for the group is available for use or is merely being retained for historical purposes." requirements="Need to be able to mark a group record as not to be used because it was created in error or is otherwise no longer available (e.g. a herd that no longer exists)." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="./statusCode"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">person | animal | practitioner | device | medication | substance</desc>
                    <fhir fid="Group.type" definition="Identifies the broad classification of the kind of resources the group includes." comment="Group members SHALL be of the appropriate resource type (Patient for person or animal; or Practitioner, Device, Medication or Substance for the other types.)." requirements="Identifies what type of resources the group is made up of." isSummary="true">
                        <type value="code"/>
                        <binding displayName="GroupType" strength="required" description="Types of resources that are part of group." valueSet="2.16.840.1.113883.4.642.3.284" canonicalUri="http://hl7.org/fhir/ValueSet/group-type|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="person: ./classCode=&#34;PSN&#34;  animal: ./classCode=&#34;ANM&#34;  device: ./classCode=&#34;DEV&#34;  medication: ./classCode=&#34;MMAT&#34; and ./playedRole[isNormalRole() and classCode=&#34;THER&#34;]  food: ./classCode=&#34;FOOD&#34;"/>
                    </fhir>
                </element>
                <element name="actual" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Descriptive or actual</desc>
                    <fhir fid="Group.actual" definition="If true, indicates that the resource refers to a specific group of real individuals.  If false, the group defines a set of intended individuals."
                        requirements="There are use-cases for groups that define specific collections of individuals, and other groups that define &#34;types&#34; of intended individuals.  The requirements for both kinds of groups are similar, so we use a single resource, distinguished by this flag." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="true: ./determinerCode=&#34;GRP&#34;  false: ./determinerCode=&#34;GRP_KIND&#34;"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of Group members</desc>
                    <fhir fid="Group.code" definition="Provides a specific type of resource the group includes; e.g. &#34;cow&#34;, &#34;syringe&#34;, etc." comment="This would generally be omitted for Person resources." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="GroupKind" strength="example" description="Kind of particular resource; e.g. cow, syringe, lake, etc."/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="./code"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Label for Group</desc>
                    <fhir fid="Group.name" definition="A label assigned to the group for human identification and communication." requirements="Used to identify the group in human communication." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="./name[type=&#34;ST&#34;]"/>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Number of members</desc>
                    <fhir fid="Group.quantity" definition="A count of the number of resource instances that are part of the group." comment="Note that the quantity may be less than the number of members if some of the members are not active." requirements="Group size is a common defining characteristic." isSummary="true">
                        <type value="unsignedInt"/>
                        <mapping identity="rim" map="./quantity"/>
                    </fhir>
                </element>
                <element name="managingEntity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Entity that is the custodian of the Group's definition</desc>
                    <fhir fid="Group.managingEntity" definition="Entity responsible for defining and maintaining Group characteristics and/or registered members." comment="This does not strictly align with ownership of a herd or flock, but may suffice to represent that relationship in simple cases. More complex cases will require an extension." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                    </fhir>
                </element>
                <element name="characteristic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Include / Exclude group members by Trait</desc>
                    <fhir fid="Group.characteristic" definition="Identifies traits whose presence r absence is shared by members of the group." comment="All the identified characteristics must be true for an entity to a member of the group." requirements="Needs to be a generic mechanism for identifying what individuals can be part of a group.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="./playedRole[isNormalRole()]/participation[isNormalParticipation() and typeCode=&#34;SBJ&#34;]/act[isNormalAct and classCode=&#34;OBS&#34; and moodCode=&#34;EVN&#34;]"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Kind of characteristic</desc>
                        <fhir fid="Group.characteristic.code" definition="A code that identifies the kind of trait being asserted." requirements="Need a formal way of identifying the characteristic being described.">
                            <type value="CodeableConcept"/>
                            <binding displayName="GroupCharacteristicKind" strength="example" description="List of characteristics used to describe group members; e.g. gender, age, owner, location, etc."/>
                            <mapping identity="rim" map="./code"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Value held by characteristic</desc>
                        <fhir fid="Group.characteristic.value[x]" definition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group." comment="For Range, it means members of the group have a value that falls somewhere within the specified range." requirements="The value of the characteristic is what determines group membership.">
                            <type value="CodeableConcept"/>
                            <type value="boolean"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="Reference"/>
                            <binding displayName="GroupCharacteristicValue" strength="example" description="Value of descriptive member characteristic; e.g. red, male, pneumonia, Caucasian, etc."/>
                            <mapping identity="rim" map="./value"/>
                        </fhir>
                        <element name="valueCodeableConcept">
                            <fhir fid="Group.characteristic.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="Group.characteristic.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="Group.characteristic.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="Group.characteristic.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="Group.characteristic.valueReference">
                                <type value="Reference"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="exclude" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Group includes or excludes</desc>
                        <fhir fid="Group.characteristic.exclude" definition="If true, indicates the characteristic is one that is NOT held by members of the group." comment="This is labeled as &#34;Is Modifier&#34; because applications cannot wrongly include excluded members as included or vice versa." requirements="Sometimes group membership is determined by characteristics not possessed.">
                            <type value="boolean"/>
                            <mapping identity="rim" map="./valueNegationInd"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Period over which characteristic is tested</desc>
                        <fhir fid="Group.characteristic.period" definition="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
                <element name="member" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who or what is in group</desc>
                    <fhir fid="Group.member" definition="Identifies the resource instances that are members of the group." requirements="Often the only thing of interest about a group is &#34;who's in it&#34;.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="./scopedRole[isNormalRole() and classCode=&#34;MBR&#34;]/player"/>
                    </fhir>
                    <element name="entity" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the group member</desc>
                        <fhir fid="Group.member.entity" definition="A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Period member belonged to the group</desc>
                        <fhir fid="Group.member.period" definition="The period that the member was in the group, if known." requirements="Need to track who was in a group at a  particular time.">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="inactive" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If member is no longer in group</desc>
                        <fhir fid="Group.member.inactive" definition="A flag to indicate that the member is no longer in the group, but previously may have been a member." requirements="Sometimes you don't know when someone stopped being in a group, but not when.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.61" name="GuidanceResponse" displayName="GuidanceResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/GuidanceResponse">
            <desc language="en-US">A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">The GuidanceResponse resource supports recording the results of decision support interactions, reportability determination for public health, as well as the communication of additional data requirements for subsequent interactions.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="GuidanceResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="GuidanceResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The formal response to a guidance request</desc>
                <fhir fid="GuidanceResponse" definition="A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="requestIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The identifier of the request associated with this response, if any</desc>
                    <fhir fid="GuidanceResponse.requestIdentifier" definition="The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.basedOn"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="GuidanceResponse.identifier" definition="Allows a service to provide  unique, business identifiers for the response." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <choice name="module[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What guidance was requested</desc>
                    <fhir fid="GuidanceResponse.module[x]" definition="An identifier, CodeableConcept or canonical reference to the guidance that was requested." isSummary="true">
                        <type value="uri"/>
                        <type value="canonical"/>
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.instantiatesUri | Event.instantiatesCanonical"/>
                    </fhir>
                    <element name="moduleUri">
                        <fhir fid="GuidanceResponse.moduleUri">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="moduleCanonical">
                        <fhir fid="GuidanceResponse.moduleCanonical">
                            <type value="canonical"/>
                        </fhir>
                    </element>
                    <element name="moduleCodeableConcept">
                        <fhir fid="GuidanceResponse.moduleCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">success | data-requested | data-required | in-progress | failure | entered-in-error</desc>
                    <fhir fid="GuidanceResponse.status"
                        definition="The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information."
                        comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="GuidanceResponseStatus" strength="required" description="The status of a guidance response." valueSet="2.16.840.1.113883.4.642.3.817" canonicalUri="http://hl7.org/fhir/ValueSet/guidance-response-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Patient the request was performed for</desc>
                    <fhir fid="GuidanceResponse.subject" definition="The patient for which the request was processed.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter during which the response was returned</desc>
                    <fhir fid="GuidanceResponse.encounter" definition="The encounter during which this response was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official copmletion of an encounter but still be tied to the context of the encounter.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="occurrenceDateTime" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the guidance response was processed</desc>
                    <fhir fid="GuidanceResponse.occurrenceDateTime" definition="Indicates when the guidance response was processed.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Device returning the guidance</desc>
                    <fhir fid="GuidanceResponse.performer" definition="Provides a reference to the device that performed the guidance.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why guidance is needed</desc>
                    <fhir fid="GuidanceResponse.reasonCode" definition="Describes the reason for the guidance response in coded or textual form.">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why guidance is needed</desc>
                    <fhir fid="GuidanceResponse.reasonReference" definition="Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional notes about the response</desc>
                    <fhir fid="GuidanceResponse.note" definition="Provides a mechanism to communicate additional information about the response.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
                <element name="evaluationMessage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Messages resulting from the evaluation of the artifact or artifacts</desc>
                    <fhir fid="GuidanceResponse.evaluationMessage" definition="Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
                        </type>
                    </fhir>
                </element>
                <element name="outputParameters" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The output parameters of the evaluation, if any</desc>
                    <fhir fid="GuidanceResponse.outputParameters"
                        definition="The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Parameters"/>
                        </type>
                    </fhir>
                </element>
                <element name="result" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Proposed actions, if any</desc>
                    <fhir fid="GuidanceResponse.result" definition="The actions, if any, produced by the evaluation of the artifact.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RequestGroup"/>
                        </type>
                    </fhir>
                </element>
                <element name="dataRequirement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional required data</desc>
                    <fhir fid="GuidanceResponse.dataRequirement" definition="If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.">
                        <type value="DataRequirement"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.62" name="HealthcareService" displayName="HealthcareService" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/HealthcareService">
            <desc language="en-US">The details of a healthcare service available at a location.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="HealthcareService" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="HealthcareService" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The details of a healthcare service available at a location</desc>
                <fhir fid="HealthcareService" definition="The details of a healthcare service available at a location.">
                    <mapping identity="rim" map="act[classCode=ACT][moodCode=DEF]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifiers for this item</desc>
                    <fhir fid="HealthcareService.identifier" definition="External identifiers for this item." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this HealthcareService record is in active use</desc>
                    <fhir fid="HealthcareService.active" definition="This flag is used to mark the record to not be used. This is not used when a center is closed for maintenance, or for holidays, the notAvailable period is to be used for this." comment="This element is labeled as a modifier because it may be used to mark that the resource was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="providedBy" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that provides this service</desc>
                    <fhir fid="HealthcareService.providedBy" definition="The organization that provides this healthcare service." comment="This property is recommended to be the same as the Location's managingOrganization, and if not provided should be interpreted as such. If the Location does not have a managing Organization, then this property should be populated." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".scopingRole.Organization"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Broad category of service being performed or delivered</desc>
                    <fhir fid="HealthcareService.category" definition="Identifies the broad category of service being performed or delivered." comment="Selecting a Service Category then determines the list of relevant service types that can be selected in the primary service type." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service category" strength="example" description="A category of the service(s) that could be provided." valueSet="2.16.840.1.113883.4.642.3.516" canonicalUri="http://hl7.org/fhir/ValueSet/service-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of service that may be delivered or performed</desc>
                    <fhir fid="HealthcareService.type" definition="The specific type of service that may be delivered or performed." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service type" strength="example" description="Additional details about where the content was created (e.g. clinical specialty)." valueSet="2.16.840.1.113883.4.642.3.518" canonicalUri="http://hl7.org/fhir/ValueSet/service-type"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=COMP.act[classCode=ACT][moodCode=DEF].code"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specialties handled by the HealthcareService</desc>
                    <fhir fid="HealthcareService.specialty" definition="Collection of specialties handled by the service site. This is more of a medical term." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="A specialty that a healthcare service may provide." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=COMP.act[classCode=ACT][moodCode=DEF].code"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Location(s) where service may be provided</desc>
                    <fhir fid="HealthcareService.location" definition="The location(s) where this healthcare service may be provided." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".location.role[classCode=SDLOC]"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of service as presented to a consumer while searching</desc>
                    <fhir fid="HealthcareService.name" definition="Further description of the service as it would be presented to a consumer while searching." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional description and/or any specific issues not covered elsewhere</desc>
                    <fhir fid="HealthcareService.comment" definition="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName."
                        comment="Would expect that a user would not see this information on a search results, and it would only be available when viewing the complete details of the service." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".location.role[classCode=SDLOC].desc"/>
                    </fhir>
                </element>
                <element name="extraDetails" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Extra details about the service that can't be placed in the other fields</desc>
                    <fhir fid="HealthcareService.extraDetails" definition="Extra details about the service that can't be placed in the other fields.">
                        <type value="markdown"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=COMP.act[classCode=ACT][moodCode=DEF].text"/>
                    </fhir>
                </element>
                <element name="photo" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Facilitates quick identification of the service</desc>
                    <fhir fid="HealthcareService.photo" definition="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." isSummary="true">
                        <type value="Attachment"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=SBJ].observation.value"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contacts related to the healthcare service</desc>
                    <fhir fid="HealthcareService.telecom" definition="List of contacts related to this specific healthcare service." comment="If this is empty, then refer to the location's contacts.">
                        <type value="ContactPoint"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="coverageArea" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Location(s) service is intended for/available to</desc>
                    <fhir fid="HealthcareService.coverageArea" definition="The location(s) that this service is available to (not where the service is provided)."
                        comment="The locations referenced by the coverage area can include both specific locations, including areas, and also conceptual domains too (mode = kind), such as a physical area (tri-state area) and some other attribute (covered by Example Care Organization). These types of Locations are often not managed by any specific organization. This could also include generic locations such as &#34;in-home&#34;.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim" map=".location.role[classCode=SDLOC].subjectOf.A_SpatialCoordinate"/>
                    </fhir>
                </element>
                <element name="serviceProvisionCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Conditions under which service is available/offered</desc>
                    <fhir fid="HealthcareService.serviceProvisionCode" definition="The code(s) that detail the conditions under which the healthcare service is available/offered."
                        comment="The provision means being commissioned by, contractually obliged or financially sourced. Types of costings that may apply to this healthcare service, such if the service may be available for free, some discounts available, or fees apply.">
                        <type value="CodeableConcept"/>
                        <binding displayName="ServiceProvisionConditions" strength="example" description="The code(s) that detail the conditions under which the healthcare service is available/offered." valueSet="2.16.840.1.113883.4.642.3.514" canonicalUri="http://hl7.org/fhir/ValueSet/service-provision-conditions"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=PRCN].observation[moodCode=EVN.CRT]"/>
                    </fhir>
                </element>
                <element name="eligibility" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific eligibility requirements required to use the service</desc>
                    <fhir fid="HealthcareService.eligibility" definition="Does this service have specific eligibility requirements that need to be met in order to use the service?">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Coded value for the eligibility</desc>
                        <fhir fid="HealthcareService.eligibility.code" definition="Coded value for the eligibility.">
                            <type value="CodeableConcept"/>
                            <binding displayName="ServiceEligibility" strength="example" description="Coded values underwhich a specific service is made available."/>
                            <mapping identity="rim" map=".actrelationship[typeCode=PRCN].observation[moodCode=EVN.CRT]"/>
                        </fhir>
                    </element>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Describes the eligibility conditions for the service</desc>
                        <fhir fid="HealthcareService.eligibility.comment" definition="Describes the eligibility conditions for the service."
                            comment="The description of service eligibility should, in general, not exceed one or two paragraphs. It should be sufficient for a prospective consumer to determine if they are likely to be eligible or not. Where eligibility requirements and conditions are complex, it may simply be noted that an eligibility assessment is required. Where eligibility is determined by an outside source, such as an Act of Parliament, this should be noted, preferably with a reference to a commonly available copy of the source document such as a web page.">
                            <type value="markdown"/>
                            <mapping identity="rim" map=".actrelationship[typeCode=PRCN].observation[moodCode=EVN.CRT].text"/>
                        </fhir>
                    </element>
                </element>
                <element name="program" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Programs that this service is applicable to</desc>
                    <fhir fid="HealthcareService.program" definition="Programs that this service is applicable to." comment="Programs are often defined externally to an Organization, commonly by governments; e.g. Home and Community Care Programs, Homeless Program, ….">
                        <type value="CodeableConcept"/>
                        <binding displayName="Program" strength="example" description="Government or local programs that this service applies to." valueSet="2.16.840.1.113883.4.642.3.1383" canonicalUri="http://hl7.org/fhir/ValueSet/program"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=PERT].observation"/>
                    </fhir>
                </element>
                <element name="characteristic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Collection of characteristics (attributes)</desc>
                    <fhir fid="HealthcareService.characteristic" definition="Collection of characteristics (attributes)." comment="These could be such things as is wheelchair accessible.">
                        <type value="CodeableConcept"/>
                        <binding displayName="ServiceCharacteristic" strength="example" description="A custom attribute that could be provided at a service (e.g. Wheelchair accessibiliy)."/>
                        <mapping identity="rim" map=".actrelationship[typeCode=PERT].observation"/>
                    </fhir>
                </element>
                <element name="communication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The language that this service is offered in</desc>
                    <fhir fid="HealthcareService.communication" definition="Some services are specifically made available in multiple languages, this property permits a directory to declare the languages this is offered in. Typically this is only provided where a service operates in communities with mixed languages used."
                        comment="When using this property it indicates that the service is available with this language, it is not derived from the practitioners, and not all are required to use this language, just that this language is available while scheduling.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                    </fhir>
                </element>
                <element name="referralMethod" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Ways that the service accepts referrals</desc>
                    <fhir fid="HealthcareService.referralMethod" definition="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required.">
                        <type value="CodeableConcept"/>
                        <binding displayName="ReferralMethod" strength="example" description="The methods of referral can be used when referring to a specific HealthCareService resource." valueSet="2.16.840.1.113883.4.642.3.510" canonicalUri="http://hl7.org/fhir/ValueSet/service-referral-method"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=PERT].observation"/>
                    </fhir>
                </element>
                <element name="appointmentRequired" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If an appointment is required for access to this service</desc>
                    <fhir fid="HealthcareService.appointmentRequired" definition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service.">
                        <type value="boolean"/>
                        <mapping identity="rim" map=".actrelationship[typeCode=PERT].observation"/>
                    </fhir>
                </element>
                <element name="availableTime" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Times the Service Site is available</desc>
                    <fhir fid="HealthcareService.availableTime" definition="A collection of times that the Service Site is available." comment="More detailed availability information may be provided in associated Schedule/Slot resources.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="daysOfWeek" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">mon | tue | wed | thu | fri | sat | sun</desc>
                        <fhir fid="HealthcareService.availableTime.daysOfWeek" definition="Indicates which days of the week are available between the start and end Times.">
                            <type value="code"/>
                            <binding displayName="DaysOfWeek" strength="required" description="The days of the week." valueSet="2.16.840.1.113883.4.642.3.512" canonicalUri="http://hl7.org/fhir/ValueSet/days-of-week|4.0.1"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="allDay" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Always available? e.g. 24 hour service</desc>
                        <fhir fid="HealthcareService.availableTime.allDay" definition="Is this always available? (hence times are irrelevant) e.g. 24 hour service.">
                            <type value="boolean"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="availableStartTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Opening time of day (ignored if allDay = true)</desc>
                        <fhir fid="HealthcareService.availableTime.availableStartTime" definition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." comment="The time zone is expected to be for where this HealthcareService is provided at.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="availableEndTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Closing time of day (ignored if allDay = true)</desc>
                        <fhir fid="HealthcareService.availableTime.availableEndTime" definition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." comment="The time zone is expected to be for where this HealthcareService is provided at.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="notAvailable" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Not available during this time due to provided reason</desc>
                    <fhir fid="HealthcareService.notAvailable" definition="The HealthcareService is not available during this period of time due to the provided reason.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reason presented to the user explaining why time not available</desc>
                        <fhir fid="HealthcareService.notAvailable.description" definition="The reason that can be presented to the user as to why this time is not available.">
                            <type value="string"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="during" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Service not available from this date</desc>
                        <fhir fid="HealthcareService.notAvailable.during" definition="Service is not available (seasonally or for a public holiday) from this date.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="availabilityExceptions" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of availability exceptions</desc>
                    <fhir fid="HealthcareService.availabilityExceptions" definition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.">
                        <type value="string"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoints providing access to electronic services operated for the healthcare service</desc>
                    <fhir fid="HealthcareService.endpoint" definition="Technical endpoints providing access to services operated for the specific healthcare services defined at this resource.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.63" name="ImagingStudy" displayName="ImagingStudy" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ImagingStudy">
            <desc language="en-US">Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different
                modalities.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ImagingStudy" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="dicom" uri="http://nema.org/dicom" name="DICOM Tag Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="ImagingStudy" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A set of images produced in single study (one or more series of references images)</desc>
                <fhir fid="ImagingStudy"
                    definition="Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Act[classCode=COMPOSITION, moodCode=EVN]"/>
                    <mapping identity="dicom" map="Reference IHE radiology TF vol 2 table 4.14-1"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifiers for the whole study</desc>
                    <fhir fid="ImagingStudy.identifier" definition="Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number." comment="See discussion under [Imaging Study Implementation Notes](imagingstudy.html#notes) for encoding of DICOM Study Instance UID. Accession Number should use ACSN Identifier type."
                        requirements="If one or more series elements are present in the ImagingStudy, then there shall be one DICOM Study UID identifier (see [DICOM PS 3.3 C.7.2](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.2.html)." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id and .inboundRelationship[typeCode=COMP].source[classCode=ACSN, moodCode=EVN].id"/>
                        <mapping identity="dicom" map="StudyInstanceUID (0020,000D) | Accession Number and Issuer (0080,0050)+(0080,0051) | Study ID (0020,0010)"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">registered | available | cancelled | entered-in-error | unknown</desc>
                    <fhir fid="ImagingStudy.status" definition="The current state of the ImagingStudy." comment="Unknown does not represent &#34;other&#34; - one of the defined statuses must apply.  Unknown is used when the authoring system is not sure what the current status is." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ImagingStudyStatus" strength="required" description="The status of the ImagingStudy." valueSet="2.16.840.1.113883.4.642.3.990" canonicalUri="http://hl7.org/fhir/ValueSet/imagingstudy-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="modality" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">All series modality if actual acquisition modalities</desc>
                    <fhir fid="ImagingStudy.modality" definition="A list of all the series.modality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="ImagingModality" strength="extensible" description="Type of acquired data in the instance." canonicalUri="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_29.html"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="dicom" map="(0008,0061)"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who or what is the subject of the study</desc>
                    <fhir fid="ImagingStudy.subject" definition="The subject, typically a patient, of the imaging study." comment="QA phantoms can be recorded with a Device; multiple subjects (such as mice) can be recorded with a Group." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="dicom" map="(0010/*)"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter with which this imaging study is associated</desc>
                    <fhir fid="ImagingStudy.encounter" definition="The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made."
                        comment="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission test)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="started" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the study was started</desc>
                    <fhir fid="ImagingStudy.started" definition="Date and time the study started." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                        <mapping identity="dicom" map="(0008,0020)+(0008,0030)"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request fulfilled</desc>
                    <fhir fid="ImagingStudy.basedOn" definition="A list of the diagnostic requests that resulted in this imaging study being performed." requirements="To support grouped procedures (one imaging study supporting multiple ordered procedures, e.g. chest/abdomen/pelvis CT)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Appointment"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/AppointmentResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Task"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="w5" map="FiveWs.cause"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=DGIMG, moodCode=RQO]"/>
                        <mapping identity="dicom" map="(0032,1064)"/>
                    </fhir>
                </element>
                <element name="referrer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Referring physician</desc>
                    <fhir fid="ImagingStudy.referrer" definition="The requesting/referring physician." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.cause"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=DGIMG, moodCode=RQO].participation[typeCode=AUT].role"/>
                        <mapping identity="dicom" map="(0008,0090)+(0008,0096)"/>
                    </fhir>
                </element>
                <element name="interpreter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who interpreted images</desc>
                    <fhir fid="ImagingStudy.interpreter" definition="Who read the study and interpreted the images or other content." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role"/>
                        <mapping identity="dicom" map="(0008,1060)"/>
                    </fhir>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Study access endpoint</desc>
                    <fhir fid="ImagingStudy.endpoint" definition="The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType."
                        comment="Typical endpoint types include DICOM WADO-RS, which is used to retrieve DICOM instances in native or rendered (e.g., JPG, PNG), formats using a RESTful API; DICOM WADO-URI, which can similarly retrieve native or rendered instances, except using an HTTP query-based approach; DICOM QIDO-RS, which allows RESTful query for DICOM information without retrieving the actual instances; or IHE Invoke Image Display (IID), which provides standard invocation of an imaging web viewer."
                        requirements="Access methods for viewing (e.g., IHE’s IID profile) or retrieving (e.g., DICOM’s WADO-URI and WADO-RS) the study or the study’s series or instances. The study-level baseLocation applies to each series in the study, unless overridden in series by a series-level baseLocation of the same type." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="Not supported"/>
                    </fhir>
                </element>
                <element name="numberOfSeries" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Number of Study Related Series</desc>
                    <fhir fid="ImagingStudy.numberOfSeries" definition="Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present." isSummary="true">
                        <type value="unsignedInt"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP, subsetCode=SUMM].target[classCode=OBSSER, moodCode=EVN].repeatNumber"/>
                        <mapping identity="dicom" map="(0020,1206)"/>
                    </fhir>
                </element>
                <element name="numberOfInstances" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Number of Study Related Instances</desc>
                    <fhir fid="ImagingStudy.numberOfInstances" definition="Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." isSummary="true">
                        <type value="unsignedInt"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP, subsetCode=SUMM].target[classCode=DGIMG, moodCode=EVN].repeatNumber"/>
                        <mapping identity="dicom" map="(0020,1208)"/>
                    </fhir>
                </element>
                <element name="procedureReference" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The performed Procedure reference</desc>
                    <fhir fid="ImagingStudy.procedureReference" definition="The procedure which this ImagingStudy was part of." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=PROC, moodCode=EVN]"/>
                        <mapping identity="dicom" map="(0008,1032)"/>
                    </fhir>
                </element>
                <element name="procedureCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The performed procedure code</desc>
                    <fhir fid="ImagingStudy.procedureCode" definition="The code for the performed procedure type." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ImagingProcedureCode" strength="extensible" description="The performed procedure type." canonicalUri="http://www.rsna.org/RadLex_Playbook.aspx"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=PROC, moodCode=EVN]"/>
                        <mapping identity="dicom" map="(0008,1032)"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where ImagingStudy occurred</desc>
                    <fhir fid="ImagingStudy.location" definition="The principal physical location where the ImagingStudy was performed." requirements="Ties the event to where the records are likely kept and provides context around the event occurrence (e.g. if it occurred inside or outside a dedicated healthcare setting)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.location"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="v2" map="EVN.7"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role"/>
                        <mapping identity="dicom" map="(0008,1040) | (0040,0243)"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the study was requested</desc>
                    <fhir fid="ImagingStudy.reasonCode" definition="Description of clinical condition indicating why the ImagingStudy was requested." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Reason Codes" strength="example" description="The reason for the study." valueSet="2.16.840.1.113883.4.642.3.432" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-reason"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                        <mapping identity="dicom" map="(0040,1002)"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was study performed</desc>
                    <fhir fid="ImagingStudy.reasonReference" definition="Indicates another resource whose existence justifies this Study." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.4 or by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">User-defined comments</desc>
                    <fhir fid="ImagingStudy.note" definition="Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element." isSummary="true">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="rim" map="unknown"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Institution-generated description</desc>
                    <fhir fid="ImagingStudy.description" definition="The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".text"/>
                        <mapping identity="dicom" map="(0008,1030)"/>
                    </fhir>
                </element>
                <element name="series" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Each study has one or more series of instances</desc>
                    <fhir fid="ImagingStudy.series" definition="Each study has one or more series of images or other content." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=OBSSER, moodCode=EVN]"/>
                    </fhir>
                    <element name="uid" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">DICOM Series Instance UID for the series</desc>
                        <fhir fid="ImagingStudy.series.uid" definition="The DICOM Series Instance UID for the series." comment="See [DICOM PS3.3 C.7.3](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html)." requirements="DICOM Series Instance UID." isSummary="true">
                            <type value="id"/>
                            <mapping identity="rim" map=".id"/>
                            <mapping identity="dicom" map="(0020,000E)"/>
                        </fhir>
                    </element>
                    <element name="number" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Numeric identifier of this series</desc>
                        <fhir fid="ImagingStudy.series.number" definition="The numeric identifier of this series in the study." isSummary="true">
                            <type value="unsignedInt"/>
                            <mapping identity="rim" map=".inboundRelationship[type=COMP, source[classCode=COMPOSITION, moodCode=EVN]].sequenceNumber"/>
                            <mapping identity="dicom" map="(0020,0011)"/>
                        </fhir>
                    </element>
                    <element name="modality" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The modality of the instances in the series</desc>
                        <fhir fid="ImagingStudy.series.modality" definition="The modality of this series sequence." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="ImagingModality" strength="extensible" description="Type of acquired data in the instance." canonicalUri="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_29.html"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="dicom" map="(0008,0060)"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A short human readable summary of the series</desc>
                        <fhir fid="ImagingStudy.series.description" definition="A description of the series." isSummary="true">
                            <type value="string"/>
                            <mapping identity="rim" map=".text"/>
                            <mapping identity="dicom" map="(0008,103E)"/>
                        </fhir>
                    </element>
                    <element name="numberOfInstances" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Number of Series Related Instances</desc>
                        <fhir fid="ImagingStudy.series.numberOfInstances" definition="Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." isSummary="true">
                            <type value="unsignedInt"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP, subsetCode=SUMM].target[classCode=DGIMG, moodCode=EVN].repeatNumber"/>
                            <mapping identity="dicom" map="(0020,1209)"/>
                        </fhir>
                    </element>
                    <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Series access endpoint</desc>
                        <fhir fid="ImagingStudy.series.endpoint" definition="The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType."
                            comment="Typical endpoint types include DICOM WADO-RS, which is used to retrieve DICOM instances in native or rendered (e.g., JPG, PNG) formats using a RESTful API; DICOM WADO-URI, which can similarly retrieve native or rendered instances, except using an HTTP query-based approach; and DICOM QIDO-RS, which allows RESTful query for DICOM information without retrieving the actual instances."
                            requirements="Access methods for retrieving (e.g., DICOM’s WADO-URI and WADO-RS) the series or the series’ instances. A baseLocation specified at the series level has precedence over a baseLocation of the same type specified at the study level." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                            </type>
                            <mapping identity="rim" map="Not supported"/>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Body part examined</desc>
                        <fhir fid="ImagingStudy.series.bodySite" definition="The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality."
                            isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                            <mapping identity="rim" map=".targetSiteCode"/>
                            <mapping identity="dicom" map="(0018,0015)"/>
                        </fhir>
                    </element>
                    <element name="laterality" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Body part laterality</desc>
                        <fhir fid="ImagingStudy.series.laterality" definition="The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite." isSummary="true">
                            <type value="Coding"/>
                            <binding displayName="Laterality" strength="example" description="Codes describing body site laterality (left, right, etc.)." valueSet="2.16.840.1.113883.4.642.3.287" canonicalUri="http://hl7.org/fhir/ValueSet/bodysite-laterality"/>
                            <mapping identity="rim" map=".targetSiteCode"/>
                            <mapping identity="dicom" map="(0020,0060)"/>
                        </fhir>
                    </element>
                    <element name="specimen" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specimen imaged</desc>
                        <fhir fid="ImagingStudy.series.specimen" definition="The specimen imaged, e.g., for whole slide imaging of a biopsy." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                            </type>
                            <mapping identity="rim" map="Role[classCode=SPEC]"/>
                            <mapping identity="dicom" map="(0040,0551) + (0040,0562)"/>
                        </fhir>
                    </element>
                    <element name="started" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the series started</desc>
                        <fhir fid="ImagingStudy.series.started" definition="The date and time the series was started." isSummary="true">
                            <type value="dateTime"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                            <mapping identity="dicom" map="(0008,0021) + (0008,0031)"/>
                        </fhir>
                    </element>
                    <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who performed the series</desc>
                        <fhir fid="ImagingStudy.series.performer" definition="Indicates who or what performed the series and how they were involved." comment="If the person who performed the series is not known, their Organization may be recorded. A patient, or related person, may be the performer, e.g. for patient-captured images."
                            requirements="The performer is recorded at the series level, since each series in a study may be performed by a different performer, at different times, and using different devices. A series may be performed by multiple performers." isSummary="true">
                            <type value="BackboneElement"/>
                            <mapping identity="workflow" map="Event.performer"/>
                            <mapping identity="rim" map=".participation[typeCode=PRF].role"/>
                            <mapping identity="dicom" map="(0008, 1050) | (0008, 1052) | (0008, 1070) | (0008, 1072)"/>
                        </fhir>
                        <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of performance</desc>
                            <fhir fid="ImagingStudy.series.performer.function" definition="Distinguishes the type of involvement of the performer in the series." requirements="Allows disambiguation of the types of involvement of different performers." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="ImagingStudy series performer function" strength="extensible" description="The type of involvement of the performer." valueSet="2.16.840.1.113883.4.642.3.989" canonicalUri="http://hl7.org/fhir/ValueSet/series-performer-function"/>
                                <mapping identity="rim" map=".participation[typeCode=PRF].role"/>
                            </fhir>
                        </element>
                        <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Who performed the series</desc>
                            <fhir fid="ImagingStudy.series.performer.actor" definition="Indicates who or what performed the series." isSummary="true">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                </type>
                                <mapping identity="w5" map="FiveWs.actor"/>
                                <mapping identity="v2" map="EVN.5 or by domain"/>
                                <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="instance" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A single SOP instance from the series</desc>
                        <fhir fid="ImagingStudy.series.instance" definition="A single SOP instance within the series, e.g. an image, or presentation state.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=DGIMG, moodCode=EVN]"/>
                        </fhir>
                        <element name="uid" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">DICOM SOP Instance UID</desc>
                            <fhir fid="ImagingStudy.series.instance.uid" definition="The DICOM SOP Instance UID for this image or other DICOM content." comment="See  [DICOM PS3.3 C.12.1](http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.12.html#sect_C.12.1)." requirements="DICOM SOP Instance UID.">
                                <type value="id"/>
                                <mapping identity="rim" map=".id"/>
                                <mapping identity="dicom" map="(0008,0018)"/>
                            </fhir>
                        </element>
                        <element name="sopClass" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">DICOM class type</desc>
                            <fhir fid="ImagingStudy.series.instance.sopClass" definition="DICOM instance  type.">
                                <type value="Coding"/>
                                <binding displayName="sopClass" strength="extensible" description="The sopClass for the instance." canonicalUri="http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_B.5.html#table_B.5-1"/>
                                <mapping identity="rim" map=".inboundRelationship[typeCode=COMP]. source[classCode=OBS, moodCode=EVN, code=&#34;sop class&#34;].value"/>
                                <mapping identity="dicom" map="(0008,0016)"/>
                            </fhir>
                        </element>
                        <element name="number" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The number of this instance in the series</desc>
                            <fhir fid="ImagingStudy.series.instance.number" definition="The number of instance in the series.">
                                <type value="unsignedInt"/>
                                <mapping identity="rim" map=".inboundRelationship[typeCode=COMP, source[classCode=OBSSER, moodCode=EVN]].sequenceNumber"/>
                                <mapping identity="dicom" map="(0020,0013)"/>
                            </fhir>
                        </element>
                        <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Description of instance</desc>
                            <fhir fid="ImagingStudy.series.instance.title" definition="The description of the instance." comment="Particularly for post-acquisition analytic objects, such as SR, presentation states, value mapping, etc.">
                                <type value="string"/>
                                <mapping identity="rim" map=".title"/>
                                <mapping identity="dicom" map="(0008,0008) | (0007,0080) | (0040,A043) + (0008,0104) | (0042,0010)"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.64" name="Immunization" displayName="Immunization" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Immunization">
            <desc language="en-US">Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Immunization" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cda" uri="http://hl7.org/v3/cda" name="CDA (R2)"/>
            </fhir>
            <element name="Immunization" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Immunization event information</desc>
                <fhir fid="Immunization" definition="Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="VXU_V04"/>
                    <mapping identity="rim" map="SubstanceAdministration"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="Immunization.identifier" definition="A unique identifier assigned to this immunization record.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">completed | entered-in-error | not-done</desc>
                    <fhir fid="Immunization.status" definition="Indicates the current status of the immunization event." comment="Will generally be set to show that the immunization has been completed or not done.  This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Immunization Status Codes" strength="required" description="A set of codes indicating the current status of an Immunization." valueSet="2.16.840.1.113883.4.642.3.295" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason not done</desc>
                    <fhir fid="Immunization.statusReason" definition="Indicates the reason the immunization event was not performed." comment="This is generally only used for the status of &#34;not-done&#34;. The reason for performing the immunization event is captured in reasonCode, not here.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Status Reason Codes" strength="example" description="The reason why a vaccine was not administered." valueSet="2.16.840.1.113883.4.642.3.992" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-status-reason"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/>
                    </fhir>
                </element>
                <element name="vaccineCode" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Vaccine product administered</desc>
                    <fhir fid="Immunization.vaccineCode" definition="Vaccine that was administered or was to be administered." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Vaccine Administered Value Set" strength="example" description="The code for vaccine product administered." valueSet="2.16.840.1.113883.3.88.12.80.22" canonicalUri="http://hl7.org/fhir/ValueSet/vaccine-code"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="RXA-5"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/realmCode/code"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who was immunized</desc>
                    <fhir fid="Immunization.patient" definition="The patient who either received or did not receive the immunization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".partipication[ttypeCode=].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter immunization was part of</desc>
                    <fhir fid="Immunization.encounter" definition="The visit or admission or other contact between patient and health care provider the immunization was performed as part of.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19"/>
                        <mapping identity="rim" map="component-&gt;EncounterEvent"/>
                    </fhir>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Vaccine administration date</desc>
                    <fhir fid="Immunization.occurrence[x]" definition="Date vaccine administered or was to be administered."
                        comment="When immunizations are given a specific date and time should always be known.   When immunizations are patient reported, a specific date might not be known.  Although partial dates are allowed, an adult patient might not be able to recall the year a childhood immunization was given. An exact date is always preferable, but the use of the String data type is acceptable when an exact date is not known. A small number of vaccines (e.g. live oral typhoid vaccine) are given as a series of patient self-administered dose over a span of time. In cases like this, often, only the first dose (typically a provider supervised dose) is recorded with the occurrence indicating the date/time of the first dose."
                        isSummary="true">
                        <type value="dateTime"/>
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="RXA-3"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/effectiveTime/value"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="Immunization.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrenceString">
                        <fhir fid="Immunization.occurrenceString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recorded" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the immunization was first captured in the subject's record</desc>
                    <fhir fid="Immunization.recorded" definition="The date the occurrence of the immunization was first captured in the record - potentially significantly after the occurrence of the event." isSummary="false">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="primarySource" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Indicates context the data was recorded in</desc>
                    <fhir fid="Immunization.primarySource" definition="An indication that the content of the record is based on information from the person who administered the vaccine. This reflects the context under which the data was originally recorded." comment="Reflects the “reliability” of the content." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="v2" map="RXA-9"/>
                        <mapping identity="rim" map="immunization.uncertaintycode (if primary source=false, uncertainty=U)"/>
                    </fhir>
                </element>
                <element name="reportOrigin" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Indicates the source of a secondarily reported record</desc>
                    <fhir fid="Immunization.reportOrigin" definition="The source of the data when the report of the immunization event is not based on information from the person who administered the vaccine." comment="Should not be populated if primarySource = True, not required even if primarySource = False.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Origin Codes" strength="example" description="The source of the data for a record which is not from a primary source." valueSet="2.16.840.1.113883.4.642.3.296" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-origin"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="v2" map="RXA-9"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported) .participation[typeCode=INF].role[classCode=LIC] (this syntax for health care professional) .participation[typeCode=INF].role[classCode=PRS] (this syntax for family member)"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where immunization occurred</desc>
                    <fhir fid="Immunization.location" definition="The service delivery location where the vaccine administration occurred.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.location"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="v2" map="RXA-27  (or RXA-11, deprecated as of v2.7)"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].COCT_MT240000UV"/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Vaccine manufacturer</desc>
                    <fhir fid="Immunization.manufacturer" definition="Name of vaccine manufacturer.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="RXA-17"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=ORG]"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacuturerOrganization/name"/>
                    </fhir>
                </element>
                <element name="lotNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Vaccine lot number</desc>
                    <fhir fid="Immunization.lotNumber" definition="Lot number of the  vaccine product.">
                        <type value="string"/>
                        <mapping identity="v2" map="RXA-15"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].id"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/consumable/manfacturedProduct/manufacturedMaterial/lotNumberText"/>
                    </fhir>
                </element>
                <element name="expirationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Vaccine expiration date</desc>
                    <fhir fid="Immunization.expirationDate" definition="Date vaccine batch expires.">
                        <type value="date"/>
                        <mapping identity="v2" map="RXA-16"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"/>
                    </fhir>
                </element>
                <element name="site" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Body site vaccine was administered</desc>
                    <fhir fid="Immunization.site" definition="Body site where vaccine was administered.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Codes for Immunization Site of Administration" strength="example" description="The site at which the vaccine was administered." valueSet="2.16.840.1.113883.4.642.3.288" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-site"/>
                        <mapping identity="v2" map="RXR-2"/>
                        <mapping identity="rim" map="observation.targetSiteCode"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/approachSiteCode/code"/>
                    </fhir>
                </element>
                <element name="route" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How vaccine entered body</desc>
                    <fhir fid="Immunization.route" definition="The path by which the vaccine product is taken into the body.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Route Codes" strength="example" description="The route by which the vaccine was administered." valueSet="2.16.840.1.113883.4.642.3.289" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-route"/>
                        <mapping identity="v2" map="RXR-1"/>
                        <mapping identity="rim" map=".routeCode"/>
                        <mapping identity="cda" map="ClinicalDocument/component/StructuredBody/component/section/entry/substanceAdministration/routeCode/code"/>
                    </fhir>
                </element>
                <element name="doseQuantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Amount of vaccine administered</desc>
                    <fhir fid="Immunization.doseQuantity" definition="The quantity of vaccine product that was administered.">
                        <type value="Quantity"/>
                        <mapping identity="v2" map="RXA-6 / RXA-7"/>
                        <mapping identity="rim" map=".doseQuantity"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who performed event</desc>
                    <fhir fid="Immunization.performer" definition="Indicates who performed the immunization event." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="v2" map="ORC-12 / RXA-10"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                    <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What type of performance was done</desc>
                        <fhir fid="Immunization.performer.function" definition="Describes the type of performance (e.g. ordering provider, administering provider, etc.)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Immunization Function Codes" strength="extensible" description="The role a practitioner or organization plays in the immunization event." valueSet="2.16.840.1.113883.4.642.3.995" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-function"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="rim" map=".participation.functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Individual or organization who was performing</desc>
                        <fhir fid="Immunization.performer.actor" definition="The practitioner or organization who performed the action." comment="When the individual practitioner who performed the action is known, it is best to send." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                    </element>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional immunization notes</desc>
                    <fhir fid="Immunization.note" definition="Extra information about the immunization that is not conveyed by the other attributes." isSummary="true">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = 48767-8"/>
                        <mapping identity="rim" map="note"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why immunization occurred</desc>
                    <fhir fid="Immunization.reasonCode" definition="Reasons why the vaccine was administered.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Reason Codes" strength="example" description="The reason why a vaccine was administered." valueSet="2.16.840.1.113883.4.642.3.290" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-reason"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="rim" map="[actionNegationInd=false].reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why immunization occurred</desc>
                    <fhir fid="Immunization.reasonReference" definition="Condition, Observation or DiagnosticReport that supports why the immunization was administered.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="isSubpotent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dose potency</desc>
                    <fhir fid="Immunization.isSubpotent" definition="Indication if a dose is considered to be subpotent. By default, a dose should be considered to be potent."
                        comment="Typically, the recognition of the dose being sub-potent is retrospective, after the administration (ex. notification of a manufacturer recall after administration). However, in the case of a partial administration (the patient moves unexpectedly and only some of the dose is actually administered), subpotency may be recognized immediately, but it is still important to record the event."
                        isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="v2" map="RXA-20 = PA (partial administration)"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="subpotentReason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason for being subpotent</desc>
                    <fhir fid="Immunization.subpotentReason" definition="Reason why a dose is considered to be subpotent.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Subpotent Reason" strength="example" description="The reason why a dose is considered to be subpotent." valueSet="2.16.840.1.113883.4.642.3.993" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-subpotent-reason"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="education" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Educational material presented to patient</desc>
                    <fhir fid="Immunization.education" definition="Educational material presented to the patient (or guardian) at the time of vaccine administration.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="N/A"/>
                        <constraint key="imm-1" severity="error" human="One of documentType or reference SHALL be present" expression="documentType.exists() or reference.exists()" xpath="exists(f:documentType) or exists(f:reference)" source=""/>
                    </fhir>
                    <element name="documentType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Educational material document identifier</desc>
                        <fhir fid="Immunization.education.documentType" definition="Identifier of the material presented to the patient.">
                            <type value="string"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 69764-9"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="reference" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Educational material reference pointer</desc>
                        <fhir fid="Immunization.education.reference" definition="Reference pointer to the educational material given to the patient if the information was on line.">
                            <type value="uri"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="publicationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Educational material publication date</desc>
                        <fhir fid="Immunization.education.publicationDate" definition="Date the educational material was published.">
                            <type value="dateTime"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 29768-9"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="presentationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Educational material presentation date</desc>
                        <fhir fid="Immunization.education.presentationDate" definition="Date the educational material was given to the patient.">
                            <type value="dateTime"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 29769-7"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                </element>
                <element name="programEligibility" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient eligibility for a vaccination program</desc>
                    <fhir fid="Immunization.programEligibility" definition="Indicates a patient's eligibility for a funding program.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Program Eligibility" strength="example" description="The patient's eligibility for a vaccation program." valueSet="2.16.840.1.113883.4.642.3.291" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-program-eligibility"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = 64994-7"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="fundingSource" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Funding source for the vaccine</desc>
                    <fhir fid="Immunization.fundingSource" definition="Indicates the source of the vaccine actually administered. This may be different than the patient eligibility (e.g. the patient may be eligible for a publically purchased vaccine but due to inventory issues, vaccine purchased with private funds was actually administered).">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Funding Source" strength="example" description="The source of funding used to purchase the vaccine administered." valueSet="2.16.840.1.113883.4.642.3.293" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-funding-source"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="reaction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Details of a reaction that follows immunization</desc>
                    <fhir fid="Immunization.reaction" definition="Categorical data indicating that an adverse event is associated in time to an immunization."
                        comment="A reaction may be an indication of an allergy or intolerance and, if this is determined to be the case, it should be recorded as a new AllergyIntolerance resource instance as most systems will not query against past Immunization.reaction elements.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="OBX-3"/>
                        <mapping identity="rim" map="Observation[classCode=obs].code"/>
                    </fhir>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When reaction started</desc>
                        <fhir fid="Immunization.reaction.date" definition="Date of reaction to the immunization.">
                            <type value="dateTime"/>
                            <mapping identity="v2" map="OBX-14 (ideally this would be reported in an IAM segment, but IAM is not part of the HL7 v2 VXU message - most likely would appear in OBX segments if at all)"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="detail" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional information on reaction</desc>
                        <fhir fid="Immunization.reaction.detail" definition="Details of the reaction.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            </type>
                            <mapping identity="v2" map="OBX-5"/>
                            <mapping identity="rim" map=".value"/>
                        </fhir>
                    </element>
                    <element name="reported" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indicates self-reported reaction</desc>
                        <fhir fid="Immunization.reaction.reported" definition="Self-reported indicator.">
                            <type value="boolean"/>
                            <mapping identity="v2" map="(HL7 v2 doesn't seem to provide for this)"/>
                            <mapping identity="rim" map=".participation[typeCode=INF].role[classCode=PAT] (this syntax for self-reported=true)"/>
                        </fhir>
                    </element>
                </element>
                <element name="protocolApplied" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Protocol followed by the provider</desc>
                    <fhir fid="Immunization.protocolApplied" definition="The protocol (set of recommendations) being followed by the provider who administered the dose.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                    <element name="series" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of vaccine series</desc>
                        <fhir fid="Immunization.protocolApplied.series" definition="One possible path to achieve presumed immunity against a disease - within the context of an authority.">
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="authority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who is responsible for publishing the recommendations</desc>
                        <fhir fid="Immunization.protocolApplied.authority" definition="Indicates the authority who published the protocol (e.g. ACIP) that is being followed.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="targetDisease" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Vaccine preventatable disease being targetted</desc>
                        <fhir fid="Immunization.protocolApplied.targetDisease" definition="The vaccine preventable disease the dose is being administered against.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Immunization Target Disease Codes" strength="example" description="The vaccine preventable disease the dose is being administered for." valueSet="2.16.840.1.113883.4.642.3.1047" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-target-disease"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <choice name="doseNumber[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Dose number within series</desc>
                        <fhir fid="Immunization.protocolApplied.doseNumber[x]" definition="Nominal position in a series." comment="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose).">
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                        <element name="doseNumberPositiveInt">
                            <fhir fid="Immunization.protocolApplied.doseNumberPositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="doseNumberString">
                            <fhir fid="Immunization.protocolApplied.doseNumberString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="seriesDoses[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recommended number of doses for immunity</desc>
                        <fhir fid="Immunization.protocolApplied.seriesDoses[x]" definition="The recommended number of doses to achieve immunity." comment="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose).">
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                        <element name="seriesDosesPositiveInt">
                            <fhir fid="Immunization.protocolApplied.seriesDosesPositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="seriesDosesString">
                            <fhir fid="Immunization.protocolApplied.seriesDosesString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.65" name="ImmunizationEvaluation" displayName="ImmunizationEvaluation" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ImmunizationEvaluation">
            <desc language="en-US">Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those recommendations.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ImmunizationEvaluation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ImmunizationEvaluation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Immunization evaluation information</desc>
                <fhir fid="ImmunizationEvaluation" definition="Describes a comparison of an immunization event against published recommendations to determine if the administration is &#34;valid&#34; in relation to those  recommendations.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="RSP_K11"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="ImmunizationEvaluation.identifier" definition="A unique identifier assigned to this immunization evaluation record.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">completed | entered-in-error</desc>
                    <fhir fid="ImmunizationEvaluation.status" definition="Indicates the current status of the evaluation of the vaccination administration event." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Immunization Evaluation Status Codes" strength="required" description="The status of the evaluation being done." valueSet="2.16.840.1.113883.4.642.3.299" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-evaluation-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who this evaluation is for</desc>
                    <fhir fid="ImmunizationEvaluation.patient" definition="The individual for whom the evaluation is being done." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date evaluation was performed</desc>
                    <fhir fid="ImmunizationEvaluation.date" definition="The date the evaluation of the vaccine administration event was performed.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrenceDateTime"/>
                        <mapping identity="w5" map="FiveWs.init"/>
                        <mapping identity="v2" map="RXA-3"/>
                    </fhir>
                </element>
                <element name="authority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is responsible for publishing the recommendations</desc>
                    <fhir fid="ImmunizationEvaluation.authority" definition="Indicates the authority who published the protocol (e.g. ACIP).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 59779-9 )"/>
                    </fhir>
                </element>
                <element name="targetDisease" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Evaluation target disease</desc>
                    <fhir fid="ImmunizationEvaluation.targetDisease" definition="The vaccine preventable disease the dose is being evaluated against." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Evaluation Target Disease Codes" strength="example" description="The vaccine preventable disease the dose is being evaluated against." valueSet="2.16.840.1.113883.4.642.3.300" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-evaluation-target-disease"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 30956-7 | 38890-0 )"/>
                    </fhir>
                </element>
                <element name="immunizationEvent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Immunization being evaluated</desc>
                    <fhir fid="ImmunizationEvaluation.immunizationEvent" definition="The vaccine administration event being evaluated." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                        </type>
                    </fhir>
                </element>
                <element name="doseStatus" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Status of the dose relative to published recommendations</desc>
                    <fhir fid="ImmunizationEvaluation.doseStatus" definition="Indicates if the dose is valid or not valid with respect to the published recommendations." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Evaluation Dose Status codes" strength="example" description="The status of the administered dose relative to the published recommendations for the target disease." valueSet="2.16.840.1.113883.4.642.3.301" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 59781-5 )"/>
                    </fhir>
                </element>
                <element name="doseStatusReason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason for the dose status</desc>
                    <fhir fid="ImmunizationEvaluation.doseStatusReason" definition="Provides an explanation as to why the vaccine administration event is valid or not relative to the published recommendations.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Immunization Evaluation Dose Status Reason codes" strength="example" description="The reason the dose status was assigned." valueSet="2.16.840.1.113883.4.642.3.303" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status-reason"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 30982-3 )"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Evaluation notes</desc>
                    <fhir fid="ImmunizationEvaluation.description" definition="Additional information about the evaluation.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 48767-8 )"/>
                    </fhir>
                </element>
                <element name="series" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of vaccine series</desc>
                    <fhir fid="ImmunizationEvaluation.series" definition="One possible path to achieve presumed immunity against a disease - within the context of an authority.">
                        <type value="string"/>
                    </fhir>
                </element>
                <choice name="doseNumber[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dose number within series</desc>
                    <fhir fid="ImmunizationEvaluation.doseNumber[x]" definition="Nominal position in a series." comment="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose).">
                        <type value="positiveInt"/>
                        <type value="string"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 30973-2 )"/>
                    </fhir>
                    <element name="doseNumberPositiveInt">
                        <fhir fid="ImmunizationEvaluation.doseNumberPositiveInt">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="doseNumberString">
                        <fhir fid="ImmunizationEvaluation.doseNumberString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="seriesDoses[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Recommended number of doses for immunity</desc>
                    <fhir fid="ImmunizationEvaluation.seriesDoses[x]" definition="The recommended number of doses to achieve immunity." comment="The use of an integer is preferred if known. A string should only be used in cases where an integer is not available (such as when documenting a recurring booster dose).">
                        <type value="positiveInt"/>
                        <type value="string"/>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = ( 59782-3 )"/>
                    </fhir>
                    <element name="seriesDosesPositiveInt">
                        <fhir fid="ImmunizationEvaluation.seriesDosesPositiveInt">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <element name="seriesDosesString">
                        <fhir fid="ImmunizationEvaluation.seriesDosesString">
                            <type value="string"/>
                        </fhir>
                    </element>
                </choice>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.66" name="ImmunizationRecommendation" displayName="ImmunizationRecommendation" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation">
            <desc language="en-US">A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ImmunizationRecommendation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="ImmunizationRecommendation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Guidance or advice relating to an immunization</desc>
                <fhir fid="ImmunizationRecommendation" definition="A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="v2" map="VXU_V04"/>
                    <mapping identity="rim" map="SubstanceAdministration[moodCode=RMD]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="ImmunizationRecommendation.identifier" definition="A unique identifier assigned to this particular recommendation record." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who this profile is for</desc>
                    <fhir fid="ImmunizationRecommendation.patient" definition="The patient the recommendation(s) are for." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".partipication[typeCode=SUBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date recommendation(s) created</desc>
                    <fhir fid="ImmunizationRecommendation.date" definition="The date the immunization recommendation(s) were created." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="v2" map="OBX-15"/>
                        <mapping identity="rim" map=".partipication[typeCode=AUTH].time"/>
                    </fhir>
                </element>
                <element name="authority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is responsible for protocol</desc>
                    <fhir fid="ImmunizationRecommendation.authority" definition="Indicates the authority who published the protocol (e.g. ACIP).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="OBX-5 : OBX-3 = 59779-9"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="recommendation" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Vaccine administration recommendations</desc>
                    <fhir fid="ImmunizationRecommendation.recommendation" definition="Vaccine administration recommendations." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode='COMP'].target[classCode=SBADM, moodCode=RMD]"/>
                        <constraint key="imr-1" severity="error" human="One of vaccineCode or targetDisease SHALL be present" expression="vaccineCode.exists() or targetDisease.exists()" xpath="exists(f:vaccineCode) or exists(f:targetDisease)" source=""/>
                    </fhir>
                    <element name="vaccineCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Vaccine or vaccine group recommendation applies to</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.vaccineCode" definition="Vaccine(s) or vaccine group that pertain to the recommendation." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Vaccine Administered Value Set" strength="example" description="The type of vaccine administered." valueSet="2.16.840.1.113883.3.88.12.80.22" canonicalUri="http://hl7.org/fhir/ValueSet/vaccine-code"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = ( 30956-7 | 38890-0 )"/>
                            <mapping identity="rim" map=".partipication[typeCode=CSM].role[classCode=ADMM].code"/>
                        </fhir>
                    </element>
                    <element name="targetDisease" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Disease to be immunized against</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.targetDisease" definition="The targeted disease for the recommendation." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Immunization Recommendation Target Disease Codes" strength="example" description="The disease that the recommended vaccination targets." valueSet="2.16.840.1.113883.4.642.3.309" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = ( 30956-7 | 38890-0 )"/>
                            <mapping identity="rim" map=".partipication[typeCode=CSM].role[classCode=ADMM].code"/>
                        </fhir>
                    </element>
                    <element name="contraindicatedVaccineCode" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Vaccine which is contraindicated to fulfill the recommendation</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.contraindicatedVaccineCode" definition="Vaccine(s) which should not be used to fulfill the recommendation." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Vaccine Administered Value Set" strength="example" description="The type of vaccine administered." valueSet="2.16.840.1.113883.3.88.12.80.22" canonicalUri="http://hl7.org/fhir/ValueSet/vaccine-code"/>
                        </fhir>
                    </element>
                    <element name="forecastStatus" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Vaccine recommendation status</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.forecastStatus" definition="Indicates the patient status with respect to the path to immunity for the target disease." isModifier="true" isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Immunization Recommendation Status Codes" strength="example" description="The patient's status with respect to a vaccination protocol." valueSet="2.16.840.1.113883.4.642.3.305" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-recommendation-status"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 59783-1"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ] .source[classCode=OBS, moodCode=EVN, code=&#34;Immunization Forecast Status&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="forecastReason" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Vaccine administration status reason</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.forecastReason" definition="The reason for the assigned forecast status." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Immunization Recommendation Reason Codes" strength="example" description="The reason for the patient's status with respect to a vaccination protocol." valueSet="2.16.840.1.113883.4.642.3.307" canonicalUri="http://hl7.org/fhir/ValueSet/immunization-recommendation-reason"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 30982-3"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="dateCriterion" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Dates governing proposed immunization</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.dateCriterion" definition="Vaccine date recommendations.  For example, earliest date to administer, latest date to administer, etc.">
                            <type value="BackboneElement"/>
                            <mapping identity="workflow" map="Request.occurrence[x]"/>
                            <mapping identity="v2" map="OBX-3: 30980-7 = Next dose recommended, 59777-3 = Latest next dose should be given, 59778-1 = Dose is overdue"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode='LIMIT'].target[classCode=OBS, moodCode=EVN, isCriterionInd=true]"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of date</desc>
                            <fhir fid="ImmunizationRecommendation.recommendation.dateCriterion.code" definition="Date classification of recommendation.  For example, earliest date to give, latest date to give, etc.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Immunization Recommendation Date Criterion Codes" strength="example" description="Classifies date criterion with respect to conveying information about a patient's vaccination status (e.g. due date, latest to give date, etc.)." valueSet="2.16.840.1.113883.4.642.3.308"
                                    canonicalUri="http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion"/>
                                <mapping identity="v2" map="OBX-3"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Recommended date</desc>
                            <fhir fid="ImmunizationRecommendation.recommendation.dateCriterion.value" definition="The date whose meaning is specified by dateCriterion.code.">
                                <type value="dateTime"/>
                                <mapping identity="v2" map="OBX-5"/>
                                <mapping identity="rim" map=".value"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Protocol details</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.description" definition="Contains the description about the protocol under which the vaccine was administered.">
                            <type value="string"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 30956-7"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                    <element name="series" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of vaccination series</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.series" definition="One possible path to achieve presumed immunity against a disease - within the context of an authority.">
                            <type value="string"/>
                            <mapping identity="v2" map="RXA-5-administered code"/>
                            <mapping identity="rim" map=".title"/>
                        </fhir>
                    </element>
                    <choice name="doseNumber[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recommended dose number within series</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.doseNumber[x]" definition="Nominal position of the recommended dose in a series (e.g. dose 2 is the next recommended dose)." comment="The use of an integer is prefered if known. A string should only be used in cases where an interger is not available (such as when documenting a recurring booster dose)." isSummary="true">
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 30973-2"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=COMP, .source[classCode=SBADM, moodCode=INT]].sequenceNumber"/>
                        </fhir>
                        <element name="doseNumberPositiveInt">
                            <fhir fid="ImmunizationRecommendation.recommendation.doseNumberPositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="doseNumberString">
                            <fhir fid="ImmunizationRecommendation.recommendation.doseNumberString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="seriesDoses[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recommended number of doses for immunity</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.seriesDoses[x]" definition="The recommended number of doses to achieve immunity." comment="The use of an integer is prefered if known. A string should only be used in cases where an interger is not available (such as when documenting a recurring booster dose).">
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <mapping identity="v2" map="OBX-5 : OBX-3 = 59782-3"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=COMP, .source[classCode=SBADM, moodCode=DEF]].sequenceNumber"/>
                        </fhir>
                        <element name="seriesDosesPositiveInt">
                            <fhir fid="ImmunizationRecommendation.recommendation.seriesDosesPositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="seriesDosesString">
                            <fhir fid="ImmunizationRecommendation.recommendation.seriesDosesString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="supportingImmunization" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Past immunizations supporting recommendation</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.supportingImmunization" definition="Immunization event history and/or evaluation that supports the status and recommendation.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationEvaluation"/>
                            </type>
                            <mapping identity="v2" map="? No clear way to associate in HL7 v2 or IG"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target[classCode=SBADM, moodCode=EVN, code=&#34;immunization&#34;]"/>
                        </fhir>
                    </element>
                    <element name="supportingPatientInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Patient observations supporting recommendation</desc>
                        <fhir fid="ImmunizationRecommendation.recommendation.supportingPatientInformation" definition="Patient Information that supports the status and recommendation.  This includes patient observations, adverse reactions and allergy/intolerance information.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="workflow" map="Request.supportingInfo"/>
                            <mapping identity="v2" map="OBX If OBX is associated with ( RXA : RXA-5-administered code = '998^No vaccine administered^CVX'), could contain the reason the vaccine was not administered"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target[classCode=OBS, moodCode=EVN]"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.67" name="ImplementationGuide" displayName="ImplementationGuide" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ImplementationGuide">
            <desc language="en-US">A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">An implementation guide is able to define default profiles that must apply to any use of a resource, so validation services may need to take one or more implementation guide resources when validating.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ImplementationGuide" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="ImplementationGuide" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A set of rules about how FHIR is used</desc>
                <fhir fid="ImplementationGuide" definition="A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="ig-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                    <constraint key="ig-2" severity="error" human="If a resource has a fhirVersion, it must be oe of the versions defined for the Implementation Guide" expression="definition.resource.fhirVersion.all(%context.fhirVersion contains $this)" xpath="count(for $id in (f:resource/f:fhirVersion) return $id[not(ancestor::f:fhirVersion/@value=$id/@value)])=0" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this implementation guide, represented as a URI (globally unique)</desc>
                    <fhir fid="ImplementationGuide.url"
                        definition="An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the implementation guide to be referenced by a single globally unique identifier. This is required to allow hosting Implementation Guides on multiple different servers, and to allow for the editorial process." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the implementation guide</desc>
                    <fhir fid="ImplementationGuide.version"
                        definition="The identifier that is used to identify this version of the implementation guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the implementation guide author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different implementation guide instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the implementation guide with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this implementation guide (computer friendly)</desc>
                    <fhir fid="ImplementationGuide.name" definition="A natural language name identifying the implementation guide. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this implementation guide (human friendly)</desc>
                    <fhir fid="ImplementationGuide.title" definition="A short, descriptive, user-friendly title for the implementation guide." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ImplementationGuide.status" definition="The status of this implementation guide. Enables tracking the life-cycle of the content." comment="Allows filtering of implementation guides that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ImplementationGuide.experimental" definition="A Boolean value to indicate that this implementation guide is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of implementation guides that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level implementation guide." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ImplementationGuide.date" definition="The date  (and optionally time) when the implementation guide was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the implementation guide. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ImplementationGuide.publisher" definition="The name of the organization or individual that published the implementation guide."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the implementation guide is the organization or individual primarily responsible for the maintenance and upkeep of the implementation guide. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the implementation guide. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the implementation guide.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ImplementationGuide.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the implementation guide</desc>
                    <fhir fid="ImplementationGuide.description" definition="A free text natural language description of the implementation guide from a consumer's perspective."
                        comment="This description can be used to capture details such as why the implementation guide was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the implementation guide as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the implementation guide is presumed to be the predominant language in the place the implementation guide was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ImplementationGuide.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate implementation guide instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for implementation guide (if applicable)</desc>
                    <fhir fid="ImplementationGuide.jurisdiction" definition="A legal or geographic region in which the implementation guide is intended to be used." comment="It may be possible for the implementation guide to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ImplementationGuide.copyright" definition="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the implementation guide." requirements="Consumers must be able to determine any legal restrictions on the use of the implementation guide and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="packageId" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">NPM Package name for IG</desc>
                    <fhir fid="ImplementationGuide.packageId" definition="The NPM package name for this Implementation Guide, used in the NPM package distribution, which is the primary mechanism by which FHIR based tooling manages IG dependencies. This value must be globally unique, and should be assigned with care."
                        comment="Many (if not all) IG publishing tools will require that this element be present. For implementation guides published through HL7 or the FHIR foundation, the FHIR product director assigns package IDs." isSummary="true">
                        <type value="id"/>
                    </fhir>
                </element>
                <element name="license" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">SPDX license code for this IG (or not-open-source)</desc>
                    <fhir fid="ImplementationGuide.license" definition="The license that applies to this Implementation Guide, using an SPDX license code, or 'not-open-source'." isSummary="true">
                        <type value="code"/>
                        <binding displayName="SPDXLicense" strength="required" description="The license that applies to an Implementation Guide (using an SPDX license Identifiers, or 'not-open-source'). The binding is required but new SPDX license Identifiers are allowed to be used (https://spdx.org/licenses/)." valueSet="2.16.840.1.113883.4.642.3.1026"
                            canonicalUri="http://hl7.org/fhir/ValueSet/spdx-license|4.0.1"/>
                    </fhir>
                </element>
                <element name="fhirVersion" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">FHIR Version(s) this Implementation Guide targets</desc>
                    <fhir fid="ImplementationGuide.fhirVersion" definition="The version(s) of the FHIR specification that this ImplementationGuide targets - e.g. describes how to use. The value of this element is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version."
                        comment="Most implementation guides target a single version - e.g. they describe how to use a particular version, and the profiles and examples etc are valid for that version. But some implementation guides describe how to use multiple different versions of FHIR to solve the same problem, or in concert with each other. Typically, the requirement to support multiple versions arises as implementation matures and different implementation communities are stuck at different versions by regulation or market dynamics."
                        isSummary="true">
                        <type value="code"/>
                        <binding displayName="FHIRVersion" strength="required" description="All published FHIR Versions." valueSet="2.16.840.1.113883.4.642.3.1309" canonicalUri="http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1"/>
                    </fhir>
                </element>
                <element name="dependsOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Another Implementation guide this depends on</desc>
                    <fhir fid="ImplementationGuide.dependsOn" definition="Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="uri" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Identity of the IG that this depends on</desc>
                        <fhir fid="ImplementationGuide.dependsOn.uri" definition="A canonical reference to the Implementation guide for the dependency." comment="Usually, A canonical reference to the implementation guide is the same as the master location at which the implementation guide is published." isSummary="true">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImplementationGuide"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="packageId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">NPM Package name for IG this depends on</desc>
                        <fhir fid="ImplementationGuide.dependsOn.packageId" definition="The NPM package name for the Implementation Guide that this IG depends on." isSummary="true">
                            <type value="id"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Version of the IG</desc>
                        <fhir fid="ImplementationGuide.dependsOn.version" definition="The version of the IG that is depended on, when the correct version is required to understand the IG correctly." comment="This follows the syntax of the NPM packaging version field - see [[reference]]." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="global" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Profiles that apply globally</desc>
                    <fhir fid="ImplementationGuide.global" definition="A set of profiles that all resources covered by this implementation guide must conform to." comment="See [Default Profiles](implementationguide.html#default) for a discussion of which resources are 'covered' by an implementation guide." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type this profile applies to</desc>
                        <fhir fid="ImplementationGuide.global.type" definition="The type of resource that all instances must conform to."
                            comment="The type must match that of the profile that is referred to but is made explicit here as a denormalization so that a system processing the implementation guide resource knows which resources the profile applies to even if the profile itself is not available." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="profile" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Profile that all resources must conform to</desc>
                        <fhir fid="ImplementationGuide.global.profile" definition="A reference to the profile that all instances must conform to." isSummary="true">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information needed to build the IG</desc>
                    <fhir fid="ImplementationGuide.definition" definition="The information needed by an IG publisher tool to publish the whole implementation guide." comment="Principally, this consists of information abuot source resource and file locations, and build parameters and templates.">
                        <type value="BackboneElement"/>
                        <constraint key="ig-1" severity="error" human="If a resource has a groupingId, it must refer to a grouping defined in the Implementation Guide" expression="resource.groupingId.all(%context.grouping.id contains $this)" xpath="count(for $id in (f:resource/f:groupingId) return $id[not(ancestor::f:grouping/@id=$id/@value)])=0" source=""/>
                    </fhir>
                    <element name="grouping" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Grouping used to present related resources in the IG</desc>
                        <fhir fid="ImplementationGuide.definition.grouping" definition="A logical group of resources. Logical groups can be used when building pages." comment="Groupings are arbitrary sub-divisions of content. Typically, they are used to help build Table of Contents automatically.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Descriptive name for the package</desc>
                            <fhir fid="ImplementationGuide.definition.grouping.name" definition="The human-readable title to display for the package of resources when rendering the implementation guide.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Human readable text describing the package</desc>
                            <fhir fid="ImplementationGuide.definition.grouping.description" definition="Human readable text describing the package.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="resource" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Resource in the implementation guide</desc>
                        <fhir fid="ImplementationGuide.definition.resource" definition="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="reference" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Location of the resource</desc>
                            <fhir fid="ImplementationGuide.definition.resource.reference" definition="Where this resource is found."
                                comment="Usually this is a relative URL that locates the resource within the implementation guide. If you authoring an implementation guide, and will publish it using the FHIR publication tooling, use a URI that may point to a resource, or to one of various alternative representations (e.g. spreadsheet). The tooling will convert this when it publishes it.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                            </fhir>
                        </element>
                        <element name="fhirVersion" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Versions this applies to (if different to IG)</desc>
                            <fhir fid="ImplementationGuide.definition.resource.fhirVersion" definition="Indicates the FHIR Version(s) this artifact is intended to apply to. If no versions are specified, the resource is assumed to apply to all the versions stated in ImplementationGuide.fhirVersion."
                                comment="The resource SHALL be valid against all the versions it is specified to apply to. If the resource referred to is a StructureDefinition, the fhirVersion stated in the StructureDefinition cannot disagree with the version specified here; the specified versions SHALL include the version specified by the StructureDefinition, and may include additional versions using the [applicable-version](extension-structuredefinition-applicable-version.html) extension.">
                                <type value="code"/>
                                <binding displayName="FHIRVersion" strength="required" description="All published FHIR Versions." valueSet="2.16.840.1.113883.4.642.3.1309" canonicalUri="http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Human Name for the resource</desc>
                            <fhir fid="ImplementationGuide.definition.resource.name" definition="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Reason why included in guide</desc>
                            <fhir fid="ImplementationGuide.definition.resource.description" definition="A description of the reason that a resource has been included in the implementation guide." comment="This is mostly used with examples to explain why it is present (though they can have extensive comments in the examples).">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <choice name="example[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Is an example/What is this an example of?</desc>
                            <fhir fid="ImplementationGuide.definition.resource.example[x]" definition="If true or a reference, indicates the resource is an example instance.  If a reference is present, indicates that the example is an example of the specified profile."
                                comment="Examples: &#xA;&#xA;* StructureDefinition -&gt; Any &#xA;* ValueSet -&gt; expansion &#xA;* OperationDefinition -&gt; Parameters &#xA;* Questionnaire -&gt; QuestionnaireResponse.">
                                <type value="boolean"/>
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </type>
                            </fhir>
                            <element name="exampleBoolean">
                                <fhir fid="ImplementationGuide.definition.resource.exampleBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="exampleCanonical">
                                <fhir fid="ImplementationGuide.definition.resource.exampleCanonical">
                                    <type value="canonical"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="groupingId" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Grouping this is part of</desc>
                            <fhir fid="ImplementationGuide.definition.resource.groupingId" definition="Reference to the id of the grouping this resource appears in." comment="This must correspond to a package.id element within this implementation guide.">
                                <type value="id"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="page" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Page/Section in the Guide</desc>
                        <fhir fid="ImplementationGuide.definition.page" definition="A page / section in the implementation guide. The root page is the implementation guide home page." comment="Pages automatically become sections if they have sub-pages. By convention, the home page is called index.html.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <choice name="name[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Where to find that page</desc>
                            <fhir fid="ImplementationGuide.definition.page.name[x]" definition="The source address for the page." comment="The publishing tool will autogenerate source for list (source = n/a) and inject included implementations for include (source = uri of guide to include).">
                                <type value="url"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Binary"/>
                                </type>
                            </fhir>
                            <element name="nameUrl">
                                <fhir fid="ImplementationGuide.definition.page.nameUrl">
                                    <type value="url"/>
                                </fhir>
                            </element>
                            <element name="nameReference">
                                <fhir fid="ImplementationGuide.definition.page.nameReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Binary"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="title" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Short title shown for navigational assistance</desc>
                            <fhir fid="ImplementationGuide.definition.page.title" definition="A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="generation" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">html | markdown | xml | generated</desc>
                            <fhir fid="ImplementationGuide.definition.page.generation" definition="A code that indicates how the page is generated.">
                                <type value="code"/>
                                <binding displayName="GuidePageGeneration" strength="required" description="A code that indicates how the page is generated." valueSet="2.16.840.1.113883.4.642.3.998" canonicalUri="http://hl7.org/fhir/ValueSet/guide-page-generation|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="page" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Nested Pages / Sections</desc>
                            <fhir fid="ImplementationGuide.definition.page.page" definition="Nested Pages/Sections under this page." comment="The implementation guide breadcrumbs are generated from this structure."/>
                        </element>
                    </element>
                    <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Defines how IG is built by tools</desc>
                        <fhir fid="ImplementationGuide.definition.parameter" definition="Defines how IG is built by tools.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template</desc>
                            <fhir fid="ImplementationGuide.definition.parameter.code" definition="apply | path-resource | path-pages | path-tx-cache | expansion-parameter | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.">
                                <type value="code"/>
                                <binding displayName="GuideParameterCode" strength="required" description="Code of parameter that is input to the guide." valueSet="2.16.840.1.113883.4.642.3.996" canonicalUri="http://hl7.org/fhir/ValueSet/guide-parameter-code|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Value for named type</desc>
                            <fhir fid="ImplementationGuide.definition.parameter.value" definition="Value for named type.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="template" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A template for building resources</desc>
                        <fhir fid="ImplementationGuide.definition.template" definition="A template for building resources.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of template specified</desc>
                            <fhir fid="ImplementationGuide.definition.template.code" definition="Type of template specified.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="source" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The source location for the template</desc>
                            <fhir fid="ImplementationGuide.definition.template.source" definition="The source location for the template.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="scope" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The scope in which the template applies</desc>
                            <fhir fid="ImplementationGuide.definition.template.scope" definition="The scope in which the template applies.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="manifest" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about an assembled IG</desc>
                    <fhir fid="ImplementationGuide.manifest" definition="Information about an assembled implementation guide, created by the publication tooling.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="rendering" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Location of rendered implementation guide</desc>
                        <fhir fid="ImplementationGuide.manifest.rendering" definition="A pointer to official web page, PDF or other rendering of the implementation guide." isSummary="true">
                            <type value="url"/>
                        </fhir>
                    </element>
                    <element name="resource" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Resource in the implementation guide</desc>
                        <fhir fid="ImplementationGuide.manifest.resource" definition="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, capability statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="reference" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Location of the resource</desc>
                            <fhir fid="ImplementationGuide.manifest.resource.reference" definition="Where this resource is found."
                                comment="Usually this is a relative URL that locates the resource within the implementation guide. If you authoring an implementation guide, and will publish it using the FHIR publication tooling, use a URI that may point to a resource, or to one of various alternative representations (e.g. spreadsheet). The tooling will convert this when it publishes it."
                                isSummary="true">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                            </fhir>
                        </element>
                        <choice name="example[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Is an example/What is this an example of?</desc>
                            <fhir fid="ImplementationGuide.manifest.resource.example[x]" definition="If true or a reference, indicates the resource is an example instance.  If a reference is present, indicates that the example is an example of the specified profile."
                                comment="Typically, conformance resources and knowledge resources are directly part of the implementation guide, with their normal meaning, and patient linked resources are usually examples. However this is not always true.">
                                <type value="boolean"/>
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </type>
                            </fhir>
                            <element name="exampleBoolean">
                                <fhir fid="ImplementationGuide.manifest.resource.exampleBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="exampleCanonical">
                                <fhir fid="ImplementationGuide.manifest.resource.exampleCanonical">
                                    <type value="canonical"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="relativePath" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Relative path for page in IG</desc>
                            <fhir fid="ImplementationGuide.manifest.resource.relativePath" definition="The relative path for primary page for this resource within the IG." comment="Appending 'rendering' + &#34;/&#34; + this should resolve to the resource page.">
                                <type value="url"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="page" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">HTML page within the parent IG</desc>
                        <fhir fid="ImplementationGuide.manifest.page" definition="Information about a page within the IG." requirements="Allows validation of hyperlinks from a derived IG to this IG without a local copy of the IG.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">HTML page name</desc>
                            <fhir fid="ImplementationGuide.manifest.page.name" definition="Relative path to the page." comment="Appending 'rendering' + &#34;/&#34; + this should resolve to the page.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Title of the page, for references</desc>
                            <fhir fid="ImplementationGuide.manifest.page.title" definition="Label for the page intended for human display." requirements="Allows generation of labels for markdown-generated hyperlinks.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="anchor" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Anchor available on the page</desc>
                            <fhir fid="ImplementationGuide.manifest.page.anchor" definition="The name of an anchor available on the page." comment="Appending 'rendering' + &#34;/&#34; + page.name + &#34;#&#34; + page.anchor should resolve to the anchor." requirements="Allows validation of hyperlinks from a derived IG to this IG without a local copy of the IG.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="image" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Image within the IG</desc>
                        <fhir fid="ImplementationGuide.manifest.image" definition="Indicates a relative path to an image that exists within the IG." requirements="Allows validation of image links from a derived IG to this IG without a local copy of the IG.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="other" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Additional linkable file in IG</desc>
                        <fhir fid="ImplementationGuide.manifest.other" definition="Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG." requirements="Allows validation of links from a derived IG to this IG without a local copy of the IG.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.68" name="InsurancePlan" displayName="InsurancePlan" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/InsurancePlan">
            <desc language="en-US">Details of a Health Insurance product/plan provided by an organization.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="InsurancePlan" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="InsurancePlan" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Details of a Health Insurance product/plan provided by an organization</desc>
                <fhir fid="InsurancePlan" definition="Details of a Health Insurance product/plan provided by an organization.">
                    <constraint key="ipn-1" severity="error" human="The organization SHALL at least have a name or an idendtifier, and possibly more than one" expression="(identifier.count() + name.count()) &gt; 0" xpath="count(f:identifier | f:name) &gt; 0" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for Product</desc>
                    <fhir fid="InsurancePlan.identifier" definition="Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".scopes[Role](classCode=IDENT)"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="InsurancePlan.status" definition="The current state of the health insurance product." requirements="Need a flag to indicate a record is no longer to be used and should generally be hidden for the user in the UI." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Kind of product</desc>
                    <fhir fid="InsurancePlan.type" definition="The kind of health insurance product." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Insurance plan type" strength="example" description="Used to categorize the product/plan." valueSet="2.16.840.1.113883.4.642.3.870" canonicalUri="http://hl7.org/fhir/ValueSet/insuranceplan-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Official name</desc>
                    <fhir fid="InsurancePlan.name" definition="Official name of the health insurance product as designated by the owner." comment="If the name of the product/plan changes, consider putting the old name in the alias column so that it can still be located through searches." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="alias" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Alternate names</desc>
                    <fhir fid="InsurancePlan.alias" definition="A list of alternate names that the product is known as, or was known as in the past." comment="There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the product/plan."
                        requirements="Over time products/plans go through many changes and can be known by different names.&#xA;&#xA;For searching knowing previous names that the product/plan was known by can be very useful.">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the product is available</desc>
                    <fhir fid="InsurancePlan.period" definition="The period of time that the health insurance product is available.">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="ownedBy" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Plan issuer</desc>
                    <fhir fid="InsurancePlan.ownedBy" definition="The entity that is providing  the health insurance product and underwriting the risk.  This is typically an insurance carriers, other third-party payers, or health plan sponsors comonly referred to as 'payers'." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="administeredBy" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Product administrator</desc>
                    <fhir fid="InsurancePlan.administeredBy" definition="An organization which administer other services such as underwriting, customer service and/or claims processing on behalf of the health insurance product owner." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="coverageArea" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Where product applies</desc>
                    <fhir fid="InsurancePlan.coverageArea" definition="The geographic region in which a health insurance product's benefits apply." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact for the product</desc>
                    <fhir fid="InsurancePlan.contact" definition="The contact for the health insurance product for a certain purpose." comment="Where multiple contacts for the same purpose are provided there is a standard extension that can be used to determine which one is the preferred contact to use." requirements="Need to keep track of assigned contact points within bigger organization.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".contactParty"/>
                    </fhir>
                    <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of contact</desc>
                        <fhir fid="InsurancePlan.contact.purpose" definition="Indicates a purpose for which the contact can be reached." requirements="Need to distinguish between multiple contact persons.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contact entity type" strength="extensible" description="The purpose for which you would contact a contact party." valueSet="2.16.840.1.113883.4.642.3.416" canonicalUri="http://hl7.org/fhir/ValueSet/contactentity-type"/>
                            <mapping identity="rim" map="./type"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A name associated with the contact</desc>
                        <fhir fid="InsurancePlan.contact.name" definition="A name associated with the contact." requirements="Need to be able to track the person by name.">
                            <type value="HumanName"/>
                            <mapping identity="rim" map="./name"/>
                        </fhir>
                    </element>
                    <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Contact details (telephone, email, etc.) for a contact</desc>
                        <fhir fid="InsurancePlan.contact.telecom" definition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." requirements="People have (primary) ways to contact them in some way such as phone, email.">
                            <type value="ContactPoint"/>
                            <mapping identity="rim" map="./telecom"/>
                        </fhir>
                    </element>
                    <element name="address" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Visiting or postal addresses for the contact</desc>
                        <fhir fid="InsurancePlan.contact.address" definition="Visiting or postal addresses for the contact." requirements="May need to keep track of a contact party's address for contacting, billing or reporting requirements.">
                            <type value="Address"/>
                            <mapping identity="rim" map="./addr"/>
                        </fhir>
                    </element>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoint</desc>
                    <fhir fid="InsurancePlan.endpoint" definition="The technical endpoints providing access to services operated for the health insurance product." requirements="Organizations have multiple systems that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="network" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What networks are Included</desc>
                    <fhir fid="InsurancePlan.network" definition="Reference to the network included in the health insurance product." comment="Networks are represented as a hierarchy of organization resources.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="coverage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coverage details</desc>
                    <fhir fid="InsurancePlan.coverage" definition="Details about the coverage offered by the insurance product.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of coverage</desc>
                        <fhir fid="InsurancePlan.coverage.type" definition="Type of coverage  (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug; Short Term; Long Term Care; Hospice; Home Health).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="network" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What networks provide coverage</desc>
                        <fhir fid="InsurancePlan.coverage.network" definition="Reference to the network that providing the type of coverage." comment="Networks are represented as a hierarchy of organization resources.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="benefit" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">List of benefits</desc>
                        <fhir fid="InsurancePlan.coverage.benefit" definition="Specific benefits under this type of coverage.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of benefit</desc>
                            <fhir fid="InsurancePlan.coverage.benefit.type" definition="Type of benefit (primary care; speciality care; inpatient; outpatient).">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="requirement" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Referral requirements</desc>
                            <fhir fid="InsurancePlan.coverage.benefit.requirement" definition="The referral requirements to have access/coverage for this benefit.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="limit" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Benefit limits</desc>
                            <fhir fid="InsurancePlan.coverage.benefit.limit" definition="The specific limits on the benefit.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Maximum value allowed</desc>
                                <fhir fid="InsurancePlan.coverage.benefit.limit.value" definition="The maximum amount of a service item a plan will pay for a covered benefit.  For examples. wellness visits, or eyeglasses." comment="May also be called “eligible expense,” “payment allowance,” or “negotiated rate.”.">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Benefit limit details</desc>
                                <fhir fid="InsurancePlan.coverage.benefit.limit.code" definition="The specific limit on the benefit." comment="Use `CodeableConcept.text` element if the data is free (uncoded) text.">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="plan" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Plan details</desc>
                    <fhir fid="InsurancePlan.plan" definition="Details about an insurance plan.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Business Identifier for Product</desc>
                        <fhir fid="InsurancePlan.plan.identifier" definition="Business identifiers assigned to this health insurance plan which remain constant as the resource is updated and propagates from server to server." isSummary="true">
                            <type value="Identifier"/>
                            <mapping identity="w5" map="FiveWs.identifier"/>
                            <mapping identity="rim" map=".scopes[Role](classCode=IDENT)"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of plan</desc>
                        <fhir fid="InsurancePlan.plan.type" definition="Type of plan. For example, &#34;Platinum&#34; or &#34;High Deductable&#34;.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="coverageArea" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Where product applies</desc>
                        <fhir fid="InsurancePlan.plan.coverageArea" definition="The geographic region in which a health insurance plan's benefits apply." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="network" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What networks provide coverage</desc>
                        <fhir fid="InsurancePlan.plan.network" definition="Reference to the network that providing the type of coverage." comment="Networks are represented as a hierarchy of organization resources.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="generalCost" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Overall costs</desc>
                        <fhir fid="InsurancePlan.plan.generalCost" definition="Overall costs associated with the plan.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of cost</desc>
                            <fhir fid="InsurancePlan.plan.generalCost.type" definition="Type of cost.">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="groupSize" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Number of enrollees</desc>
                            <fhir fid="InsurancePlan.plan.generalCost.groupSize" definition="Number of participants enrolled in the plan.">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="cost" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Cost value</desc>
                            <fhir fid="InsurancePlan.plan.generalCost.cost" definition="Value of the cost.">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Additional cost information</desc>
                            <fhir fid="InsurancePlan.plan.generalCost.comment" definition="Additional information about the general costs associated with this plan.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="specificCost" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specific costs</desc>
                        <fhir fid="InsurancePlan.plan.specificCost" definition="Costs associated with the coverage provided by the product.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="category" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">General category of benefit</desc>
                            <fhir fid="InsurancePlan.plan.specificCost.category" definition="General category of benefit (Medical; Dental; Vision; Drug; Mental Health; Substance Abuse; Hospice, Home Health).">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="benefit" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Benefits list</desc>
                            <fhir fid="InsurancePlan.plan.specificCost.benefit" definition="List of the specific benefits under this category of benefit.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Type of specific benefit</desc>
                                <fhir fid="InsurancePlan.plan.specificCost.benefit.type" definition="Type of specific benefit (preventative; primary care office visit; speciality office visit; hospitalization; emergency room; urgent care).">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="cost" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">List of the costs</desc>
                                <fhir fid="InsurancePlan.plan.specificCost.benefit.cost" definition="List of the costs associated with a specific benefit.">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">Type of cost</desc>
                                    <fhir fid="InsurancePlan.plan.specificCost.benefit.cost.type" definition="Type of cost (copay; individual cap; family cap; coinsurance; deductible).">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="applicability" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">in-network | out-of-network | other</desc>
                                    <fhir fid="InsurancePlan.plan.specificCost.benefit.cost.applicability" definition="Whether the cost applies to in-network or out-of-network providers (in-network; out-of-network; other).">
                                        <type value="CodeableConcept"/>
                                        <binding displayName="Benefit cost applicability" strength="required" description="Whether the cost applies to in-network or out-of-network providers." valueSet="2.16.840.1.113883.4.642.3.0" canonicalUri="http://hl7.org/fhir/ValueSet/insuranceplan-applicability|4.0.1"/>
                                    </fhir>
                                </element>
                                <element name="qualifiers" minimumMultiplicity="0" maximumMultiplicity="*">
                                    <desc language="en-US">Additional information about the cost</desc>
                                    <fhir fid="InsurancePlan.plan.specificCost.benefit.cost.qualifiers" definition="Additional information about the cost, such as information about funding sources (e.g. HSA, HRA, FSA, RRA).">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">The actual cost value</desc>
                                    <fhir fid="InsurancePlan.plan.specificCost.benefit.cost.value" definition="The actual cost value. (some of the costs may be represented as percentages rather than currency, e.g. 10% coinsurance).">
                                        <type value="Quantity"/>
                                    </fhir>
                                </element>
                            </element>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.69" name="Invoice" displayName="Invoice" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Invoice">
            <desc language="en-US">Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Invoice" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
            </fhir>
            <element name="Invoice" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Invoice containing ChargeItems from an Account</desc>
                <fhir fid="Invoice" definition="Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.">
                    <mapping identity="v2" map="FT1"/>
                    <mapping identity="rim" map="Act[moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for item</desc>
                    <fhir fid="Invoice.identifier" definition="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments." requirements="Allows Identification of this Invoice instance." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="FT1.2"/>
                        <mapping identity="rim" map=".identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | issued | balanced | cancelled | entered-in-error</desc>
                    <fhir fid="Invoice.status" definition="The current state of the Invoice." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="InvoiceStatus" strength="required" description="Codes identifying the lifecycle stage of an Invoice." valueSet="2.16.840.1.113883.4.642.3.866" canonicalUri="http://hl7.org/fhir/ValueSet/invoice-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="cancelledReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for cancellation of this Invoice</desc>
                    <fhir fid="Invoice.cancelledReason" definition="In case of Invoice cancellation a reason must be given (entered in error, superseded by corrected invoice etc.)." comment="Derived Profiles may choose to add invariants requiring this field to be populated if either priceOverride or factorOverride have been filled." isSummary="false">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of Invoice</desc>
                    <fhir fid="Invoice.type" definition="Type of Invoice depending on domain, realm an usage (e.g. internal/external, dental, preliminary)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="FT1.7"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Recipient(s) of goods and services</desc>
                    <fhir fid="Invoice.subject" definition="The individual or set of individuals receiving the goods and services billed in this invoice." requirements="Links the event to the Patient context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PAT in proximity to FT1 segment"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Recipient of this invoice</desc>
                    <fhir fid="Invoice.recipient" definition="The individual or Organization responsible for balancing of this invoice." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="v2" map="PV1 in proximity to FT1 segment"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Invoice date / posting date</desc>
                    <fhir fid="Invoice.date" definition="Date/time(s) of when this Invoice was posted." comment="The list of types may be constrained as appropriate for the type of charge item." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Participant in creation of this Invoice</desc>
                    <fhir fid="Invoice.participant" definition="Indicates who or what performed or participated in the charged service." isSummary="false">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="EVN.5 or by domain"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of involvement in creation of this Invoice</desc>
                        <fhir fid="Invoice.participant.role" definition="Describes the type of involvement (e.g. transcriptionist, creator etc.). If the invoice has been created automatically, the Participant may be a billing engine or another kind of device." isSummary="false">
                            <type value="CodeableConcept"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".participation.functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Individual who was involved</desc>
                        <fhir fid="Invoice.participant.actor" definition="The device, practitioner, etc. who performed or participated in the service." isSummary="false">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="v2" map="EVN.5 or by domain"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                    </element>
                </element>
                <element name="issuer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Issuing Organization of Invoice</desc>
                    <fhir fid="Invoice.issuer" definition="The organizationissuing the Invoice." comment="Practitioners and Devices can be associated with multiple organizations. It has to be made clear, on behalf of which Organization the services have been rendered." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".scoper"/>
                    </fhir>
                </element>
                <element name="account" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Account that is being balanced</desc>
                    <fhir fid="Invoice.account" definition="Account which is supposed to be balanced with this Invoice."
                        comment="Systems posting the ChargeItems might not always be able to determine, which accounts the Items need to be places into. It is up to the potprocessing Financial System to apply internal rules to decide based on the Encounter/EpisodeOfCare/Patient/Coverage context and the type of ChargeItem, which Account is appropriate." isSummary="false">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Account"/>
                        </type>
                    </fhir>
                </element>
                <element name="lineItem" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Line items of this Invoice</desc>
                    <fhir fid="Invoice.lineItem" definition="Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource." isSummary="false">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="EVN.5 or by domain"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                    <element name="sequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Sequence number of line item</desc>
                        <fhir fid="Invoice.lineItem.sequence" definition="Sequence in which the items appear on the invoice." isSummary="false">
                            <type value="positiveInt"/>
                        </fhir>
                    </element>
                    <choice name="chargeItem[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to ChargeItem containing details of this line item or an inline billing code</desc>
                        <fhir fid="Invoice.lineItem.chargeItem[x]" definition="The ChargeItem contains information such as the billing code, date, amount etc. If no further details are required for the lineItem, inline billing codes can be added using the CodeableConcept data type instead of the Reference." isSummary="false">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItem"/>
                            </type>
                            <type value="CodeableConcept"/>
                            <mapping identity="v2" map="EVN.5 or by domain"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                        <element name="chargeItemReference">
                            <fhir fid="Invoice.lineItem.chargeItemReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ChargeItem"/>
                            </fhir>
                        </element>
                        <element name="chargeItemCodeableConcept">
                            <fhir fid="Invoice.lineItem.chargeItemCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="priceComponent" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Components of total line item price</desc>
                        <fhir fid="Invoice.lineItem.priceComponent"
                            definition="The price for a ChargeItem may be calculated as a base price with surcharges/deductions that apply in certain conditions. A ChargeItemDefinition resource that defines the prices, factors and conditions that apply to a billing code is currently under development. The priceComponent element can be used to offer transparency to the recipient of the Invoice as to how the prices have been calculated."
                            isSummary="false">
                            <type value="BackboneElement"/>
                            <mapping identity="v2" map="EVN.5 or by domain"/>
                            <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">base | surcharge | deduction | discount | tax | informational</desc>
                            <fhir fid="Invoice.lineItem.priceComponent.type" definition="This code identifies the type of the component." isSummary="false">
                                <type value="code"/>
                                <binding displayName="InvoicePriceComponentType" strength="required" description="Codes indicating the kind of the price component." valueSet="2.16.840.1.113883.4.642.3.868" canonicalUri="http://hl7.org/fhir/ValueSet/invoice-priceComponentType|4.0.1"/>
                                <mapping identity="workflow" map="Event.code"/>
                                <mapping identity="v2" map="FT1.7"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Code identifying the specific component</desc>
                            <fhir fid="Invoice.lineItem.priceComponent.code" definition="A code that identifies the component. Codes may be used to differentiate between kinds of taxes, surcharges, discounts etc." isSummary="false">
                                <type value="CodeableConcept"/>
                                <mapping identity="workflow" map="Event.code"/>
                                <mapping identity="v2" map="FT1.7"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="factor" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Factor used for calculating this component</desc>
                            <fhir fid="Invoice.lineItem.priceComponent.factor" definition="The factor that has been applied on the base price for calculating this component."
                                comment="There is no reason to carry the price in the instance of a ChargeItem unless circumstances require a manual override. The list prices or are usually defined in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                                isSummary="false">
                                <type value="decimal"/>
                                <mapping identity="v2" map="FT1.22"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Monetary amount associated with this component</desc>
                            <fhir fid="Invoice.lineItem.priceComponent.amount" definition="The amount calculated for this component."
                                comment="There is no reason to carry the price in the instance of a ChargeItem unless circumstances require a manual override. The list prices or are usually defined in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                                isSummary="false">
                                <type value="Money"/>
                                <mapping identity="v2" map="FT1.22"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="totalPriceComponent" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Components of Invoice total</desc>
                    <fhir fid="Invoice.totalPriceComponent" definition="The total amount for the Invoice may be calculated as the sum of the line items with surcharges/deductions that apply in certain conditions.  The priceComponent element can be used to offer transparency to the recipient of the Invoice of how the total price was calculated." isSummary="false">
                        <mapping identity="v2" map="EVN.5 or by domain"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="totalNet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Net total of this Invoice</desc>
                    <fhir fid="Invoice.totalNet" definition="Invoice total , taxes excluded."
                        comment="There is no reason to carry the price in the instance of a ChargeItem unless circumstances require a manual override. The list prices or are usually defined in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                        isSummary="true">
                        <type value="Money"/>
                        <mapping identity="v2" map="FT1.22"/>
                    </fhir>
                </element>
                <element name="totalGross" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Gross total of this Invoice</desc>
                    <fhir fid="Invoice.totalGross" definition="Invoice total, tax included."
                        comment="There is no reason to carry the price in the instance of a ChargeItem unless circumstances require a manual override. The list prices or are usually defined in a back catalogue of the billing codes  (see ChargeItem.definition). Derived profiles may require a ChargeItem.overrideReason to be provided if either factor or price are manually overridden."
                        isSummary="true">
                        <type value="Money"/>
                        <mapping identity="v2" map="FT1.22"/>
                    </fhir>
                </element>
                <element name="paymentTerms" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Payment details</desc>
                    <fhir fid="Invoice.paymentTerms" definition="Payment details such as banking details, period of payment, deductibles, methods of payment." comment="Derived Profiles may chose to add invariants requiring this field to be populated if either priceOverride or factorOverride have been filled." isSummary="false">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the invoice</desc>
                    <fhir fid="Invoice.note" definition="Comments made about the invoice by the issuer, subject, or other participants." isSummary="false">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.70" name="Library" displayName="Library" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Library">
            <desc language="en-US">The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Library" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="Library" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Represents a library of quality improvement components</desc>
                <fhir fid="Library" definition="The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.">
                    <mapping identity="rim" map="Act[classCode=GROUPER;moodCode=EVN]"/>
                    <constraint key="lib-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this library, represented as a URI (globally unique)</desc>
                    <fhir fid="Library.url"
                        definition="An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the library to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier[scope=BUSN;reliability=ISS]"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the library</desc>
                    <fhir fid="Library.identifier" definition="A formal identifier that is used to identify this library when it is represented in other formats, or referenced in a specification, model, design or an instance. e.g. CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifacts."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this library outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the library</desc>
                    <fhir fid="Library.version"
                        definition="The identifier that is used to identify this version of the library when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the library author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different library instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the library with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this library (computer friendly)</desc>
                    <fhir fid="Library.name" definition="A natural language name identifying the library. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this library (human friendly)</desc>
                    <fhir fid="Library.title" definition="A short, descriptive, user-friendly title for the library." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                        <mapping identity="rim" map=".title"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the library</desc>
                    <fhir fid="Library.subtitle" definition="An explanatory or alternate title for the library giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="Library.status" definition="The status of this library. Enables tracking the life-cycle of the content." comment="Allows filtering of libraries that are appropriate for use vs. not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="Library.experimental" definition="A Boolean value to indicate that this library is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of librarys that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level library." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">logic-library | model-definition | asset-collection | module-definition</desc>
                    <fhir fid="Library.type" definition="Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="LibraryType" strength="extensible" description="The type of knowledge asset this library contains." valueSet="2.16.840.1.113883.4.642.3.763" canonicalUri="http://hl7.org/fhir/ValueSet/library-type"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of individual the library content is focused on</desc>
                    <fhir fid="Library.subject[x]" definition="A code or group definition that describes the intended subject of the contents of the library.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for a library (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="Library.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="Library.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="Library.date" definition="The date  (and optionally time) when the library was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the library changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the library. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="Library.publisher" definition="The name of the organization or individual that published the library."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the library is the organization or individual primarily responsible for the maintenance and upkeep of the library. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the library. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the library.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="Library.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                        <mapping identity="rim" map=".participation[typeCode=CALLBCK].role"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the library</desc>
                    <fhir fid="Library.description" definition="A free text natural language description of the library from a consumer's perspective."
                        comment="This description can be used to capture details such as why the library was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the library as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the library is presumed to be the predominant language in the place the library was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="Library.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate library instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for library (if applicable)</desc>
                    <fhir fid="Library.jurisdiction" definition="A legal or geographic region in which the library is intended to be used." comment="It may be possible for the library to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this library is defined</desc>
                    <fhir fid="Library.purpose" definition="Explanation of why this library is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the library. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this library.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode.text"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the library</desc>
                    <fhir fid="Library.usage" definition="A detailed description of how the library is used from a clinical perspective.">
                        <type value="string"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="Library.copyright" definition="A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the library." requirements="Consumers must be able to determine any legal restrictions on the use of the library and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the library was approved by publisher</desc>
                    <fhir fid="Library.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;approval&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the library was last reviewed</desc>
                    <fhir fid="Library.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;; subsetCode=&#34;RECENT&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;review&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the library is expected to be used</desc>
                    <fhir fid="Library.effectivePeriod" definition="The period during which the library content was or is planned to be in active use." comment="The effective period for a library  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the library are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">E.g. Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="Library.topic" definition="Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the library so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="Library.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="Library.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="Library.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="Library.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="Library.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="Libraries must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DOC,RSON,PREV, DRIV, USE, COMP] {successor would be PREV w/ inversionInd=true; No support for citation}"/>
                    </fhir>
                </element>
                <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Parameters defined by the library</desc>
                    <fhir fid="Library.parameter" definition="The parameter element defines parameters used by the library.">
                        <type value="ParameterDefinition"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="dataRequirement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What data is referenced by this library</desc>
                    <fhir fid="Library.dataRequirement" definition="Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the library.">
                        <type value="DataRequirement"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="content" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contents of the library, either embedded or referenced</desc>
                    <fhir fid="Library.content" definition="The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the content." isSummary="true">
                        <type value="Attachment"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.71" name="Linkage" displayName="Linkage" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Linkage">
            <desc language="en-US">Identifies two or more records (resource instances) that refer to the same real-world "occurrence".</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Linkage" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Linkage" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Links records for 'same' item</desc>
                <fhir fid="Linkage" definition="Identifies two or more records (resource instances) that refer to the same real-world &#34;occurrence&#34;.">
                    <mapping identity="rim" map="N/A - RIM doesn't know how to do this"/>
                    <constraint key="lnk-1" severity="error" human="Must have at least two items" expression="item.count()&gt;1" xpath="count(f:item)&gt;1" source=""/>
                </fhir>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this linkage assertion is active or not</desc>
                    <fhir fid="Linkage.active" definition="Indicates whether the asserted set of linkages are considered to be &#34;in effect&#34;." comment="If false, any asserted linkages should not be considered current/relevant/applicable." requirements="Need to be able to mark a linkage record as not to be used because it was created in error." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is responsible for linkages</desc>
                    <fhir fid="Linkage.author" definition="Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated." requirements="&#34;Primary&#34; for the same set of linked resources may be different from different user's/organization's perspectives."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="item" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Item to be linked</desc>
                    <fhir fid="Linkage.item" definition="Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">source | alternate | historical</desc>
                        <fhir fid="Linkage.item.type" definition="Distinguishes which item is &#34;source of truth&#34; (if any) and which items are no longer considered to be current representations." isSummary="true">
                            <type value="code"/>
                            <binding displayName="LinkageType" strength="required" description="Used to distinguish different roles a resource can play within a set of linked resources." valueSet="2.16.840.1.113883.4.642.3.314" canonicalUri="http://hl7.org/fhir/ValueSet/linkage-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="resource" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Resource being linked</desc>
                        <fhir fid="Linkage.item.resource" definition="The resource instance being linked as part of the group." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.72" name="List" displayName="List" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/List">
            <desc language="en-US">A list is a curated collection of resources.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="List" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="List" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A list is a curated collection of resources</desc>
                <fhir fid="List" definition="A list is a curated collection of resources.">
                    <mapping identity="rim" map="Act[classCode&lt;ORG,moodCode=EVN]"/>
                    <constraint key="lst-3" severity="error" human="An entry date can only be used if the mode of the list is &#34;working&#34;" expression="mode = 'working' or entry.date.empty()" xpath="(f:mode/@value = 'working') or not(exists(f:entry/f:date))" source=""/>
                    <constraint key="lst-2" severity="error" human="The deleted flag can only be used if the mode of the list is &#34;changes&#34;" expression="mode = 'changes' or entry.deleted.empty()" xpath="(f:mode/@value = 'changes') or not(exists(f:entry/f:deleted))" source=""/>
                    <constraint key="lst-1" severity="error" human="A list can only have an emptyReason if it is empty" expression="emptyReason.empty() or entry.empty()" xpath="not(exists(f:emptyReason) and exists(f:entry))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="List.identifier" definition="Identifier for the List assigned for business purposes outside the context of FHIR.">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">current | retired | entered-in-error</desc>
                    <fhir fid="List.status" definition="Indicates the current state of this list." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ListStatus" strength="required" description="The current state of the list." valueSet="2.16.840.1.113883.4.642.3.326" canonicalUri="http://hl7.org/fhir/ValueSet/list-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status[current=active;retired=obsolete;entered-in-error=nullified]"/>
                    </fhir>
                </element>
                <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">working | snapshot | changes</desc>
                    <fhir fid="List.mode" definition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted."
                        comment="This element is labeled as a modifier because a change list must not be misunderstood as a complete list." requirements="Lists are used in various ways, and it must be known in what way it is safe to use them." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ListMode" strength="required" description="The processing mode that applies to this list." valueSet="2.16.840.1.113883.4.642.3.318" canonicalUri="http://hl7.org/fhir/ValueSet/list-mode|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".outBoundRelationship[typeCode=COMP].target[classCode=OBS&#34;].value"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Descriptive name for the list</desc>
                    <fhir fid="List.title" definition="A label for the list assigned by the author." requirements="Allows customization beyond just the code identifying the kind of list." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".title"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What the purpose of this list is</desc>
                    <fhir fid="List.code" definition="This code defines the purpose of the list - why it was created." comment="If there is no code, the purpose of the list is implied where it is used, such as in a document section using Document.section.code."
                        requirements="Lists often contain subsets of resources rather than an exhaustive list.  The code identifies what type of subset is included." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Example Use Codes for List" strength="example" description="What the purpose of a list is." valueSet="2.16.840.1.113883.4.642.3.316" canonicalUri="http://hl7.org/fhir/ValueSet/list-example-codes"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If all resources have the same subject</desc>
                    <fhir fid="List.subject" definition="The common subject (or patient) of the resources that are in the list if there is one." comment="Some purely arbitrary lists do not have a common subject, so this is optional." requirements="The primary purpose of listing the subject explicitly is to help with finding the right list." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode&lt;SUB].role (and sometimes .player)"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Context in which list created</desc>
                    <fhir fid="List.encounter" definition="The encounter that is the context in which this list was created.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the list was prepared</desc>
                    <fhir fid="List.date" definition="The date that the list was prepared." comment="The actual important date is the date of currency of the resources that were summarized, but it is usually assumed that these are current when the preparation occurs." requirements="Identifies how current the list is which affects relevance." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode&lt;AUT].time[type=TS]"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who and/or what defined the list contents (aka Author)</desc>
                    <fhir fid="List.source" definition="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list." comment="The primary source is the entity that made the decisions what items are in the list. This may be software or user." requirements="Allows follow-up as well as context."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode&lt;AUT].role[classCode=REL].player[classCode=PSN,determinerCode=INST] or .participation[typeCode&lt;AUT].role[classCode=REL].player[classCode=DEV,determinerCode=INST]"/>
                    </fhir>
                </element>
                <element name="orderedBy" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What order the list has</desc>
                    <fhir fid="List.orderedBy" definition="What order applies to the items in the list." comment="Applications SHOULD render ordered lists in the order provided, but MAY allow users to re-order based on their own preferences as well. If there is no order specified, the order is unknown, though there may still be some order."
                        requirements="Important for presentation and rendering.  Lists may be sorted to place more important information first or to group related entries.">
                        <type value="CodeableConcept"/>
                        <binding displayName="List Order Codes" strength="preferred" description="What order applies to the items in a list." valueSet="2.16.840.1.113883.4.642.3.324" canonicalUri="http://hl7.org/fhir/ValueSet/list-order"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].sequenceNumber &gt; 1"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments about the list</desc>
                    <fhir fid="List.note" definition="Comments that apply to the overall list.">
                        <type value="Annotation"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].act.text"/>
                    </fhir>
                </element>
                <element name="entry" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Entries in the list</desc>
                    <fhir fid="List.entry" definition="Entries in this list." comment="If there are no entries in the list, an emptyReason SHOULD be provided.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP] or  .participation[typeCode=SBJ]"/>
                    </fhir>
                    <element name="flag" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Status/Workflow information about this item</desc>
                        <fhir fid="List.entry.flag" definition="The flag allows the system constructing the list to indicate the role and significance of the item in the list."
                            comment="The flag can only be understood in the context of the List.code. If the flag means that the entry has actually been deleted from the list, the deleted element SHALL be true. Deleted can only be used if the List.mode is &#34;changes&#34;."
                            requirements="This field is present to support various clinical uses of lists, such as a discharge summary medication list, where flags specify whether the medication was added, modified, or deleted from the list.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Patient Medicine Change Types" strength="example" description="Codes that provide further information about the reason and meaning of the item in the list." valueSet="2.16.840.1.113883.4.642.3.320" canonicalUri="http://hl7.org/fhir/ValueSet/list-item-flag"/>
                            <mapping identity="rim" map=".outBoundRelationship[typeCode=COMP].target[classCode=OBS&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="deleted" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If this item is actually marked as deleted</desc>
                        <fhir fid="List.entry.deleted" definition="True if this item is marked as deleted in the list."
                            comment="If the flag means that the entry has actually been deleted from the list, the deleted element SHALL be true. Both flag and deleted can only be used if the List.mode is &#34;changes&#34;. A deleted entry should be displayed in narrative as deleted.  This element is labeled as a modifier because it indicates that an item is (to be) no longer in the list."
                            requirements="The flag element may contain codes that an application processing the list does not understand. However there can be no ambiguity if a list item is actually marked as &#34;deleted&#34;." isModifier="true">
                            <type value="boolean"/>
                            <mapping identity="rim" map="added: .updateMode=(&#34;A&#34;,&#34;AR&#34;)  retained: .updateMode=&#34;NC&#34;  updated: .updateMode=&#34;R&#34;  deleted: .updateMode=&#34;D&#34;"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When item added to list</desc>
                        <fhir fid="List.entry.date" definition="When this item was added to the list." requirements="The date may be significant for understanding the meaning of items in a working list.">
                            <type value="dateTime"/>
                            <mapping identity="rim" map=".availabilityTime"/>
                        </fhir>
                    </element>
                    <element name="item" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Actual entry</desc>
                        <fhir fid="List.entry.item" definition="A reference to the actual resource from which data was derived.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="rim" map=".target or .role or .role.entity"/>
                        </fhir>
                    </element>
                </element>
                <element name="emptyReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why list is empty</desc>
                    <fhir fid="List.emptyReason" definition="If the list is empty, why the list is empty."
                        comment="The various reasons for an empty list make a significant interpretation to its interpretation. Note that this code is for use when the entire list has been suppressed, and not for when individual items are omitted - implementers may consider using a text note or a flag on an entry in these cases."
                        requirements="Allows capturing things like &#34;none exist&#34; or &#34;not asked&#34; which can be important for most lists.">
                        <type value="CodeableConcept"/>
                        <binding displayName="List Empty Reasons" strength="preferred" description="If a list is empty, why it is empty." valueSet="2.16.840.1.113883.4.642.3.322" canonicalUri="http://hl7.org/fhir/ValueSet/list-empty-reason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ,code&lt;ListEmptyReason].value[type=CD]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.73" name="Location" displayName="Location" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Location">
            <desc language="en-US">Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Location" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Location" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Details and position information for a physical place</desc>
                <fhir fid="Location" definition="Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.">
                    <mapping identity="rim" map=".Role[classCode=SDLC]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique code or number identifying the location to its users</desc>
                    <fhir fid="Location.identifier" definition="Unique code or number identifying the location to its users." requirements="Organization label locations in registries, need to keep track of those." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | suspended | inactive</desc>
                    <fhir fid="Location.status" definition="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="LocationStatus" strength="required" description="Indicates whether the location is still in use." valueSet="2.16.840.1.113883.4.642.3.332" canonicalUri="http://hl7.org/fhir/ValueSet/location-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="operationalStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The operational status of the location (typically only for a bed/room)</desc>
                    <fhir fid="Location.operationalStatus" definition="The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="v2 BED STATUS" strength="preferred" description="The operational status if the location (where typically a bed/room)." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0116"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the location as used by humans</desc>
                    <fhir fid="Location.name" definition="Name of the location as used by humans. Does not need to be unique." comment="If the name of a location changes, consider putting the old name in the alias column so that it can still be located through searches." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="alias" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A list of alternate names that the location is known as, or was known as, in the past</desc>
                    <fhir fid="Location.alias" definition="A list of alternate names that the location is known as, or was known as, in the past." comment="There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the location."
                        requirements="Over time locations and organizations go through many changes and can be known by different names.&#xA;&#xA;For searching knowing previous names that the location was known by can be very useful.">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional details about the location that could be displayed as further information to identify the location beyond its name</desc>
                    <fhir fid="Location.description" definition="Description of the Location, which helps in finding or referencing the place." requirements="Humans need additional information to verify a correct location has been identified." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".playingEntity[classCode=PLC determinerCode=INSTANCE].desc"/>
                    </fhir>
                </element>
                <element name="mode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">instance | kind</desc>
                    <fhir fid="Location.mode" definition="Indicates whether a resource instance represents a specific location or a class of locations." comment="This is labeled as a modifier because whether or not the location is a class of locations changes how it can be used and understood."
                        requirements="When using a Location resource for scheduling or orders, we need to be able to refer to a class of Locations instead of a specific Location." isSummary="true">
                        <type value="code"/>
                        <binding displayName="LocationMode" strength="required" description="Indicates whether a resource instance represents a specific location or a class of locations." valueSet="2.16.840.1.113883.4.642.3.330" canonicalUri="http://hl7.org/fhir/ValueSet/location-mode|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".playingEntity[classCode=PLC].determinerCode"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of function performed</desc>
                    <fhir fid="Location.type" definition="Indicates the type of function performed at the location." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetServiceDeliveryLocationRoleType" strength="extensible" description="Indicates the type of function performed at the location." valueSet="2.16.840.1.113883.1.11.17660" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details of the location</desc>
                    <fhir fid="Location.telecom" definition="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.">
                        <type value="ContactPoint"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Physical location</desc>
                    <fhir fid="Location.address" definition="Physical location." comment="Additional addresses should be recorded using another instance of the Location resource, or via the Organization." requirements="If locations can be visited, we need to keep track of their address.">
                        <type value="Address"/>
                        <mapping identity="rim" map=".addr"/>
                    </fhir>
                </element>
                <element name="physicalType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Physical form of the location</desc>
                    <fhir fid="Location.physicalType" definition="Physical form of the location, e.g. building, room, vehicle, road." requirements="For purposes of showing relevant locations in queries, we need to categorize locations." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Location type" strength="example" description="Physical form of the location." valueSet="2.16.840.1.113883.4.642.3.328" canonicalUri="http://hl7.org/fhir/ValueSet/location-physical-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".playingEntity [classCode=PLC].code"/>
                    </fhir>
                </element>
                <element name="position" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The absolute geographic location</desc>
                    <fhir fid="Location.position" definition="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." requirements="For mobile applications and automated route-finding knowing the exact location of the Location is required.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".playingEntity [classCode=PLC determinerCode=INSTANCE].positionText"/>
                    </fhir>
                    <element name="longitude" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Longitude with WGS84 datum</desc>
                        <fhir fid="Location.position.longitude" definition="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).">
                            <type value="decimal"/>
                            <mapping identity="rim" map="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)"/>
                        </fhir>
                    </element>
                    <element name="latitude" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Latitude with WGS84 datum</desc>
                        <fhir fid="Location.position.latitude" definition="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).">
                            <type value="decimal"/>
                            <mapping identity="rim" map="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)"/>
                        </fhir>
                    </element>
                    <element name="altitude" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Altitude with WGS84 datum</desc>
                        <fhir fid="Location.position.altitude" definition="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).">
                            <type value="decimal"/>
                            <mapping identity="rim" map="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)"/>
                        </fhir>
                    </element>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization responsible for provisioning and upkeep</desc>
                    <fhir fid="Location.managingOrganization" definition="The organization responsible for the provisioning and upkeep of the location." comment="This can also be used as the part of the organization hierarchy where this location provides services. These services can be defined through the HealthcareService resource." requirements="Need to know who manages the location."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".scopingEntity[classCode=ORG determinerKind=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Another Location this one is physically a part of</desc>
                    <fhir fid="Location.partOf" definition="Another Location of which this Location is physically a part of." requirements="For purposes of location, display and identification, knowing which locations are located within other locations is important.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim" map=".inboundLink[typeCode=PART].source[classCode=SDLC]"/>
                    </fhir>
                </element>
                <element name="hoursOfOperation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What days/times during a week is this location usually open</desc>
                    <fhir fid="Location.hoursOfOperation" definition="What days/times during a week is this location usually open."
                        comment="This type of information is commonly found published in directories and on websites informing customers when the facility is available.&#xA;&#xA;Specific services within the location may have their own hours which could be shorter (or longer) than the locations hours.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="daysOfWeek" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">mon | tue | wed | thu | fri | sat | sun</desc>
                        <fhir fid="Location.hoursOfOperation.daysOfWeek" definition="Indicates which days of the week are available between the start and end Times.">
                            <type value="code"/>
                            <binding displayName="DaysOfWeek" strength="required" description="The days of the week." valueSet="2.16.840.1.113883.4.642.3.512" canonicalUri="http://hl7.org/fhir/ValueSet/days-of-week|4.0.1"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="allDay" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The Location is open all day</desc>
                        <fhir fid="Location.hoursOfOperation.allDay" definition="The Location is open all day.">
                            <type value="boolean"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="openingTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time that the Location opens</desc>
                        <fhir fid="Location.hoursOfOperation.openingTime" definition="Time that the Location opens.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="closingTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time that the Location closes</desc>
                        <fhir fid="Location.hoursOfOperation.closingTime" definition="Time that the Location closes.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="availabilityExceptions" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of availability exceptions</desc>
                    <fhir fid="Location.availabilityExceptions" definition="A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times.">
                        <type value="string"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoints providing access to services operated for the location</desc>
                    <fhir fid="Location.endpoint" definition="Technical endpoints providing access to services operated for the location." requirements="Organizations may have different systems at different locations that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.74" name="Measure" displayName="Measure" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Measure">
            <desc language="en-US">The Measure resource provides the definition of a quality measure.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Measure" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Measure" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A quality measure definition</desc>
                <fhir fid="Measure" definition="The Measure resource provides the definition of a quality measure.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="mea-1" severity="error" human="Stratifier SHALL be either a single criteria or a set of criteria components" expression="group.stratifier.all((code | description | criteria).exists() xor component.exists())" xpath="exists(f:group/stratifier/code) or exists(f:group/stratifier/component)" source=""/>
                    <constraint key="mea-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this measure, represented as a URI (globally unique)</desc>
                    <fhir fid="Measure.url"
                        definition="An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the measure to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the measure</desc>
                    <fhir fid="Measure.identifier" definition="A formal identifier that is used to identify this measure when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this measure outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the measure</desc>
                    <fhir fid="Measure.version"
                        definition="The identifier that is used to identify this version of the measure when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the measure author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different measure instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the measure with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this measure (computer friendly)</desc>
                    <fhir fid="Measure.name" definition="A natural language name identifying the measure. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this measure (human friendly)</desc>
                    <fhir fid="Measure.title" definition="A short, descriptive, user-friendly title for the measure." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the measure</desc>
                    <fhir fid="Measure.subtitle" definition="An explanatory or alternate title for the measure giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="Measure.status" definition="The status of this measure. Enables tracking the life-cycle of the content." comment="Allows filtering of measures that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="Measure.experimental" definition="A Boolean value to indicate that this measure is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of measures that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level measure." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device</desc>
                    <fhir fid="Measure.subject[x]" definition="The intended subjects for the measure. If this element is not provided, a Patient subject is assumed, but the subject of the measure can be anything."
                        comment="The subject of the measure is critical in interpreting the criteria definitions, as the logic in the measures is evaluated with respect to a particular subject. This corresponds roughly to the notion of a Compartment in that it limits what content is available based on its relationship to the subject. In CQL, this corresponds to the context declaration.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for a measure (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="Measure.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="Measure.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="Measure.date" definition="The date  (and optionally time) when the measure was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the measure changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the measure. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="Measure.publisher" definition="The name of the organization or individual that published the measure."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the measure is the organization or individual primarily responsible for the maintenance and upkeep of the measure. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the measure. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the measure.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="Measure.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the measure</desc>
                    <fhir fid="Measure.description" definition="A free text natural language description of the measure from a consumer's perspective."
                        comment="This description can be used to capture details such as why the measure was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the measure as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the measure is presumed to be the predominant language in the place the measure was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="Measure.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate measure instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for measure (if applicable)</desc>
                    <fhir fid="Measure.jurisdiction" definition="A legal or geographic region in which the measure is intended to be used." comment="It may be possible for the measure to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this measure is defined</desc>
                    <fhir fid="Measure.purpose" definition="Explanation of why this measure is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the measure. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this measure.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the measure</desc>
                    <fhir fid="Measure.usage" definition="A detailed description, from a clinical perspective, of how the measure is used.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="Measure.copyright" definition="A copyright statement relating to the measure and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the measure." requirements="Consumers must be able to determine any legal restrictions on the use of the measure and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the measure was approved by publisher</desc>
                    <fhir fid="Measure.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the measure was last reviewed</desc>
                    <fhir fid="Measure.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the measure is expected to be used</desc>
                    <fhir fid="Measure.effectivePeriod" definition="The period during which the measure content was or is planned to be in active use." comment="The effective period for a measure  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the measure are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the measure, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="Measure.topic" definition="Descriptive topics related to the content of the measure. Topics provide a high-level categorization grouping types of measures that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the measure so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="Measure.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="Measure.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="Measure.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="Measure.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="Measure.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="Measures must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="library" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Logic used by the measure</desc>
                    <fhir fid="Measure.library" definition="A reference to a Library resource containing the formal logic used by the measure.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Library"/>
                        </type>
                    </fhir>
                </element>
                <element name="disclaimer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disclaimer for use of the measure or its referenced content</desc>
                    <fhir fid="Measure.disclaimer" definition="Notices and disclaimers regarding the use of the measure or related to intellectual property (such as code systems) referenced by the measure." requirements="Some organizations require that notices and disclosures be included when publishing measures that reference their intellecutal property." isSummary="true">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="scoring" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">proportion | ratio | continuous-variable | cohort</desc>
                    <fhir fid="Measure.scoring" definition="Indicates how the calculation is performed for the measure, including proportion, ratio, continuous-variable, and cohort. The value set is extensible, allowing additional measure scoring types to be represented." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="MeasureScoring" strength="extensible" description="The scoring type of the measure." valueSet="2.16.840.1.113883.4.642.3.767" canonicalUri="http://hl7.org/fhir/ValueSet/measure-scoring"/>
                    </fhir>
                </element>
                <element name="compositeScoring" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">opportunity | all-or-nothing | linear | weighted</desc>
                    <fhir fid="Measure.compositeScoring" definition="If this is a composite measure, the scoring method used to combine the component measures to determine the composite score." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="CompositeMeasureScoring" strength="extensible" description="The composite scoring method of the measure." valueSet="2.16.840.1.113883.4.642.3.773" canonicalUri="http://hl7.org/fhir/ValueSet/composite-measure-scoring"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">process | outcome | structure | patient-reported-outcome | composite</desc>
                    <fhir fid="Measure.type" definition="Indicates whether the measure is used to examine a process, an outcome over time, a patient-reported outcome, or a structure measure such as utilization." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="MeasureType" strength="extensible" description="The type of measure (includes codes from 2.16.840.1.113883.1.11.20368)." valueSet="2.16.840.1.113883.4.642.3.769" canonicalUri="http://hl7.org/fhir/ValueSet/measure-type"/>
                    </fhir>
                </element>
                <element name="riskAdjustment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How risk adjustment is applied for this measure</desc>
                    <fhir fid="Measure.riskAdjustment" definition="A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results."
                        comment="Describes the method of adjusting for clinical severity and conditions present at the start of care that can influence patient outcomes for making valid comparisons of outcome measures across providers. Indicates whether a measure is subject to the statistical process for reducing, removing, or clarifying the influences of confounding factors to allow for more useful comparisons."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="rateAggregation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How is rate aggregation performed for this measure</desc>
                    <fhir fid="Measure.rateAggregation" definition="Describes how to combine the information calculated, based on logic in each of several populations, into one summarized result."
                        comment="The measure rate for an organization or clinician is based upon the entities’ aggregate data and summarizes the performance of the entity over a given time period (e.g., monthly, quarterly, yearly). The aggregated data are derived from the results of a specific measure algorithm and, if appropriate, the application of specific risk adjustment models.  Can also be used to describe how to risk adjust the data based on supplemental data elements described in the eMeasure (e.g., pneumonia hospital measures antibiotic selection in the ICU versus non-ICU and then the roll-up of the two). This could be applied to aggregated cohort measure definitions (e.g., CDC's aggregate reporting for TB at the state level)."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="rationale" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Detailed description of why the measure exists</desc>
                    <fhir fid="Measure.rationale" definition="Provides a succinct statement of the need for the measure. Usually includes statements pertaining to importance criterion: impact, gap in care, and evidence."
                        requirements="Measure developers need to be able to provide a detailed description of the purpose of the measure. This element provides detailed rationale, where the purpose element provides a summary of the rationale." isSummary="true">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="clinicalRecommendationStatement" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Summary of clinical guidelines</desc>
                    <fhir fid="Measure.clinicalRecommendationStatement" definition="Provides a summary of relevant clinical guidelines or other clinical recommendations supporting the measure." isSummary="true">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="improvementNotation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">increase | decrease</desc>
                    <fhir fid="Measure.improvementNotation" definition="Information on whether an increase or decrease in score is the preferred result (e.g., a higher score indicates better quality OR a lower score indicates better quality OR quality is within a range)." requirements="Measure consumers and implementers must be able to determine how to interpret a measure score." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="MeasureImprovementNotation" strength="required" description="Observation values that indicate what change in a measurement value or score is indicative of an improvement in the measured item or scored issue." valueSet="2.16.840.1.113883.4.642.3.1236" canonicalUri="http://hl7.org/fhir/ValueSet/measure-improvement-notation|4.0.1"/>
                    </fhir>
                </element>
                <element name="definition" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Defined terms used in the measure documentation</desc>
                    <fhir fid="Measure.definition" definition="Provides a description of an individual term used within the measure." requirements="Measure developers must be able to provide precise definitions of terms used within measure descriptions and guidance to help communicate the intent of the measure." isSummary="true">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="guidance" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional guidance for implementers</desc>
                    <fhir fid="Measure.guidance" definition="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure."
                        requirements="Measure developers must be able to provide additional guidance for implementers to understand the intent with greater specificity than that provided in the population criteria of the measure. This element provides detailed guidance, where the usage element provides a summary of the guidance." isSummary="true">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="group" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Population criteria group</desc>
                    <fhir fid="Measure.group" definition="A group of population criteria for the measure.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Meaning of the group</desc>
                        <fhir fid="Measure.group.code" definition="Indicates a meaning for the group. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing groups to be correlated across measures.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Summary description</desc>
                        <fhir fid="Measure.group.description" definition="The human readable description of this population group.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Population criteria</desc>
                        <fhir fid="Measure.group.population" definition="A population criteria for the measure.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation</desc>
                            <fhir fid="Measure.group.population.code" definition="The type of population criteria.">
                                <type value="CodeableConcept"/>
                                <binding displayName="MeasurePopulationType" strength="extensible" description="The type of population." valueSet="2.16.840.1.113883.4.642.3.765" canonicalUri="http://hl7.org/fhir/ValueSet/measure-population"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The human readable description of this population criteria</desc>
                            <fhir fid="Measure.group.population.description" definition="The human readable description of this population criteria.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="criteria" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The criteria that defines this population</desc>
                            <fhir fid="Measure.group.population.criteria" definition="An expression that specifies the criteria for the population, typically the name of an expression in a library."
                                comment="In the case of a continuous-variable or ratio measure, this may be the name of a function that calculates the value of the individual observation for each patient or event in the population. For these types of measures, individual observations are reported as observation resources included in the evaluatedResources bundle for each patient. See the MeasureReport resource or the Quality Reporting topic for more information.">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="stratifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Stratifier criteria for the measure</desc>
                        <fhir fid="Measure.group.stratifier" definition="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Meaning of the stratifier</desc>
                            <fhir fid="Measure.group.stratifier.code" definition="Indicates a meaning for the stratifier. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The human readable description of this stratifier</desc>
                            <fhir fid="Measure.group.stratifier.description" definition="The human readable description of this stratifier criteria.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="criteria" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">How the measure should be stratified</desc>
                            <fhir fid="Measure.group.stratifier.criteria" definition="An expression that specifies the criteria for the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="component" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Stratifier criteria component for the measure</desc>
                            <fhir fid="Measure.group.stratifier.component" definition="A component of the stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library or a valid FHIR Resource Path." comment="Stratifiers are defined either as a single criteria, or as a set of component criteria.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Meaning of the stratifier component</desc>
                                <fhir fid="Measure.group.stratifier.component.code" definition="Indicates a meaning for the stratifier component. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing stratifiers to be correlated across measures.">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The human readable description of this stratifier component</desc>
                                <fhir fid="Measure.group.stratifier.component.description" definition="The human readable description of this stratifier criteria component.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="criteria" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Component of how the measure should be stratified</desc>
                                <fhir fid="Measure.group.stratifier.component.criteria" definition="An expression that specifies the criteria for this component of the stratifier. This is typically the name of an expression defined within a referenced library, but it may also be a path to a stratifier element.">
                                    <type value="Expression"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="supplementalData" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What other data should be reported with the measure</desc>
                    <fhir fid="Measure.supplementalData" definition="The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path."
                        comment="Note that supplemental data are reported as observations for each patient and included in the evaluatedResources bundle. See the MeasureReport resource or the Quality Reporting topic for more information.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Meaning of the supplemental data</desc>
                        <fhir fid="Measure.supplementalData.code" definition="Indicates a meaning for the supplemental data. This can be as simple as a unique identifier, or it can establish meaning in a broader context by drawing from a terminology, allowing supplemental data to be correlated across measures.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="usage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">supplemental-data | risk-adjustment-factor</desc>
                        <fhir fid="Measure.supplementalData.usage"
                            definition="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="MeasureDataUsage" strength="extensible" description="The intended usage for supplemental data elements in the measure." valueSet="2.16.840.1.113883.4.642.3.771" canonicalUri="http://hl7.org/fhir/ValueSet/measure-data-usage"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The human readable description of this supplemental data</desc>
                        <fhir fid="Measure.supplementalData.description" definition="The human readable description of this supplemental data.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="criteria" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Expression describing additional data to be reported</desc>
                        <fhir fid="Measure.supplementalData.criteria" definition="The criteria for the supplemental data. This is typically the name of a valid expression defined within a referenced library, but it may also be a path to a specific data element. The criteria defines the data to be returned for this element.">
                            <type value="Expression"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.75" name="MeasureReport" displayName="MeasureReport" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MeasureReport">
            <desc language="en-US">The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MeasureReport" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MeasureReport" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Results of a measure evaluation</desc>
                <fhir fid="MeasureReport" definition="The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.">
                    <constraint key="mrp-2" severity="error" human="Stratifiers SHALL be either a single criteria or a set of criteria components" expression="group.stratifier.stratum.all(value.exists() xor component.exists())" xpath="not(f:kind/@value='data-collection') or not(exists(f:group))" source=""/>
                    <constraint key="mrp-1" severity="error" human="Measure Reports used for data collection SHALL NOT communicate group and score information" expression="(type != 'data-collection') or group.exists().not()" xpath="not(f:kind/@value='data-collection') or not(exists(f:group))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the MeasureReport</desc>
                    <fhir fid="MeasureReport.identifier" definition="A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II data type - e.g. to identify this {{title}} outside of FHIR, where the logical URL is not possible to use." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">complete | pending | error</desc>
                    <fhir fid="MeasureReport.status" definition="The MeasureReport status. No data will be available until the MeasureReport status is complete." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="MeasureReportStatus" strength="required" description="The status of the measure report." valueSet="2.16.840.1.113883.4.642.3.776" canonicalUri="http://hl7.org/fhir/ValueSet/measure-report-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">individual | subject-list | summary | data-collection</desc>
                    <fhir fid="MeasureReport.type"
                        definition="The type of measure report. This may be an individual report, which provides the score for the measure for an individual member of the population; a subject-listing, which returns the list of members that meet the various criteria in the measure; a summary report, which returns a population count for each of the criteria in the measure; or a data-collection, which enables the MeasureReport to be used to exchange the data-of-interest for a quality measure."
                        comment="Data-collection reports are used only to communicate data-of-interest for a measure. They do not necessarily include all the data for a particular subject or population, but they may." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MeasureReportType" strength="required" description="The type of the measure report." valueSet="2.16.840.1.113883.4.642.3.778" canonicalUri="http://hl7.org/fhir/ValueSet/measure-report-type|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="measure" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What measure was calculated</desc>
                    <fhir fid="MeasureReport.measure" definition="A reference to the Measure that was calculated to produce this report." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What individual(s) the report is for</desc>
                    <fhir fid="MeasureReport.subject" definition="Optional subject identifying the individual or individuals the report is for." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the report was generated</desc>
                    <fhir fid="MeasureReport.date" definition="The date this measure report was generated." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="reporter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is reporting the data</desc>
                    <fhir fid="MeasureReport.reporter" definition="The individual, location, or organization that is reporting the data." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What period the report covers</desc>
                    <fhir fid="MeasureReport.period" definition="The reporting period for which the report was calculated." isSummary="true">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="improvementNotation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">increase | decrease</desc>
                    <fhir fid="MeasureReport.improvementNotation" definition="Whether improvement in the measure is noted by an increase or decrease in the measure score."
                        comment="This element is typically defined by the measure, but reproduced here to ensure the measure score can be interpreted. The element is labeled as a modifier because it changes the interpretation of the reported measure score." isModifier="true" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="MeasureImprovementNotation" strength="required" description="Observation values that indicate what change in a measurement value or score is indicative of an improvement in the measured item or scored issue." valueSet="2.16.840.1.113883.4.642.3.1236" canonicalUri="http://hl7.org/fhir/ValueSet/measure-improvement-notation|4.0.1"/>
                    </fhir>
                </element>
                <element name="group" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Measure results for each group</desc>
                    <fhir fid="MeasureReport.group" definition="The results of the calculation, one for each population group in the measure.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Meaning of the group</desc>
                        <fhir fid="MeasureReport.group.code" definition="The meaning of the population group as defined in the measure definition." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The populations in the group</desc>
                        <fhir fid="MeasureReport.group.population" definition="The populations that make up the population group, one for each type of population appropriate for the measure.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation</desc>
                            <fhir fid="MeasureReport.group.population.code" definition="The type of the population." isSummary="true">
                                <type value="CodeableConcept"/>
                                <binding displayName="MeasurePopulationType" strength="extensible" description="The type of population (e.g. initial, numerator, denominator, etc.)." valueSet="2.16.840.1.113883.4.642.3.765" canonicalUri="http://hl7.org/fhir/ValueSet/measure-population"/>
                            </fhir>
                        </element>
                        <element name="count" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Size of the population</desc>
                            <fhir fid="MeasureReport.group.population.count" definition="The number of members of the population.">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="subjectResults" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For subject-list reports, the subject results in this population</desc>
                            <fhir fid="MeasureReport.group.population.subjectResults" definition="This element refers to a List of subject level MeasureReport resources, one for each subject in this population.">
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/List"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                    <element name="measureScore" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What score this group achieved</desc>
                        <fhir fid="MeasureReport.group.measureScore" definition="The measure score for this population group, calculated as appropriate for the measure type and scoring method, and based on the contents of the populations defined in the group." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="stratifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Stratification results</desc>
                        <fhir fid="MeasureReport.group.stratifier" definition="When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">What stratifier of the group</desc>
                            <fhir fid="MeasureReport.group.stratifier.code" definition="The meaning of this stratifier, as defined in the measure definition.">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="stratum" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Stratum results, one for each unique value, or set of values, in the stratifier, or stratifier components</desc>
                            <fhir fid="MeasureReport.group.stratifier.stratum" definition="This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The stratum value, e.g. male</desc>
                                <fhir fid="MeasureReport.group.stratifier.stratum.value" definition="The value for this stratum, expressed as a CodeableConcept. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="component" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Stratifier component values</desc>
                                <fhir fid="MeasureReport.group.stratifier.stratum.component" definition="A stratifier component value.">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">What stratifier component of the group</desc>
                                    <fhir fid="MeasureReport.group.stratifier.stratum.component.code" definition="The code for the stratum component value.">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">The stratum component value, e.g. male</desc>
                                    <fhir fid="MeasureReport.group.stratifier.stratum.component.value" definition="The stratum component value.">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                            </element>
                            <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Population results in this stratum</desc>
                                <fhir fid="MeasureReport.group.stratifier.stratum.population" definition="The populations that make up the stratum, one for each type of population appropriate to the measure.">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-observation</desc>
                                    <fhir fid="MeasureReport.group.stratifier.stratum.population.code" definition="The type of the population.">
                                        <type value="CodeableConcept"/>
                                        <binding displayName="MeasurePopulationType" strength="extensible" description="The type of population (e.g. initial, numerator, denominator, etc.)." valueSet="2.16.840.1.113883.4.642.3.765" canonicalUri="http://hl7.org/fhir/ValueSet/measure-population"/>
                                    </fhir>
                                </element>
                                <element name="count" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">Size of the population</desc>
                                    <fhir fid="MeasureReport.group.stratifier.stratum.population.count" definition="The number of members of the population in this stratum.">
                                        <type value="integer"/>
                                    </fhir>
                                </element>
                                <element name="subjectResults" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">For subject-list reports, the subject results in this population</desc>
                                    <fhir fid="MeasureReport.group.stratifier.stratum.population.subjectResults" definition="This element refers to a List of subject level MeasureReport resources, one for each subject in this population in this stratum.">
                                        <type value="Reference">
                                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/List"/>
                                        </type>
                                    </fhir>
                                </element>
                            </element>
                            <element name="measureScore" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">What score this stratum achieved</desc>
                                <fhir fid="MeasureReport.group.stratifier.stratum.measureScore" definition="The measure score for this stratum, calculated as appropriate for the measure type and scoring method, and based on only the members of this stratum.">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="evaluatedResource" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What data was used to calculate the measure score</desc>
                    <fhir fid="MeasureReport.evaluatedResource" definition="A reference to a Bundle containing the Resources that were used in the calculation of this measure.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.76" name="Media" displayName="Media" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Media">
            <desc language="en-US">A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Media" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="dicom" uri="http://nema.org/dicom" name="DICOM Tag Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="sct-concept" uri="http://snomed.info/conceptdomain" name="SNOMED CT Concept Domain Binding"/>
                <mapping identity="sct-attr" uri="http://snomed.org/attributebinding" name="SNOMED CT Attribute Binding"/>
            </fhir>
            <element name="Media" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference</desc>
                <fhir fid="Media" definition="A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Act[classCode=&#34;DGIMG&#34;, moodCode=&#34;EVN&#34;]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifier(s) for the image</desc>
                    <fhir fid="Media.identifier" definition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." comment="The identifier label and use can be used to determine what kind of identifier it is."
                        isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="dicom" map="0008,0018 | ~0008,0050 | 0020,000D | 0020,000E"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Procedure that caused this media to be created</desc>
                    <fhir fid="Media.basedOn" definition="A procedure that is fulfilled in whole or in part by the creation of this media." requirements="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="Media.partOf" definition="A larger event of which this particular event is a component or step." comment="Not to be used to link an event to an Encounter - use Media.encounter for that.&#xD;&#xD;[The allowed reference resources may be adjusted as appropriate for the event resource]."
                        requirements="E.g. Drug administration as part of a procedure, procedure as part of observation, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</desc>
                    <fhir fid="Media.status" definition="The current state of the {{title}}." comment="A nominal state-transition diagram can be found in the [[event.html#statemachine | Event pattern]] documentation&#xD;&#xD;Unknown does not represent &#34;other&#34; - one of the defined statuses must apply.  Unknown is used when the authoring system is not sure what the current status is."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EventStatus" strength="required" description="Codes identifying the lifecycle stage of an event." valueSet="2.16.840.1.113883.4.642.3.109" canonicalUri="http://hl7.org/fhir/ValueSet/event-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Classification of media as image, video, or audio</desc>
                    <fhir fid="Media.type" definition="A code that classifies whether the media is an image, video or audio recording or some other media category." requirements="Used for filtering what observations are retrieved and displayed." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Media Type" strength="extensible" description="Codes for high level media categories." valueSet="2.16.840.1.113883.4.642.3.1000" canonicalUri="http://hl7.org/fhir/ValueSet/media-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="modality" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The type of acquisition equipment/process</desc>
                    <fhir fid="Media.modality" definition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Media Modality" strength="example" description="Detailed information about the type of the image - its kind, purpose, or the kind of equipment used to generate it." valueSet="2.16.840.1.113883.4.642.3.1001" canonicalUri="http://hl7.org/fhir/ValueSet/media-modality"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;EVN&#34;].code"/>
                        <mapping identity="dicom" map="0008,0060 | 0008,1032"/>
                    </fhir>
                </element>
                <element name="view" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Imaging view, e.g. Lateral or Antero-posterior</desc>
                    <fhir fid="Media.view" definition="The name of the imaging view e.g. Lateral or Antero-posterior (AP)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Media Collection View/Projection" strength="example" description="Imaging view (projection) used when collecting an image." valueSet="2.16.840.1.113883.4.642.3.337" canonicalUri="http://hl7.org/fhir/ValueSet/media-view"/>
                        <mapping identity="rim" map="DiagnosticImage.subjectOrientationCode"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/What this Media is a record of</desc>
                    <fhir fid="Media.subject" definition="Who/What this Media is a record of." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;SUBJ&#34;]???"/>
                        <mapping identity="dicom" map="~0010,0020"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter associated with media</desc>
                    <fhir fid="Media.encounter" definition="The encounter that establishes the context for this media." comment="This will typically be the encounter the media occurred within." requirements="Links the Media to the Encounter context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="created[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When Media was collected</desc>
                    <fhir fid="Media.created[x]" definition="The date and time(s) at which the media was collected." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="createdDateTime">
                        <fhir fid="Media.createdDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="createdPeriod">
                        <fhir fid="Media.createdPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date/Time this version was made available</desc>
                    <fhir fid="Media.issued" definition="The date and time this version of the media was made available to providers, typically after having been reviewed."
                        comment="It may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself.  For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that does not require the new version to be reviewed and verified again."
                        isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)"/>
                        <mapping identity="rim" map="participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="operator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The person who generated the image</desc>
                    <fhir fid="Media.operator" definition="The person who administered the collection of the image." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;PERF&#34;]???"/>
                        <mapping identity="dicom" map="0008,1060?"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why was event performed?</desc>
                    <fhir fid="Media.reasonCode" definition="Describes why the event occurred in coded or textual form." comment="Textual reasons can be captured using reasonCode.text." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Reason Codes" strength="example" description="The reason for the media." valueSet="2.16.840.1.113883.4.642.3.432" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-reason"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Observed body part</desc>
                    <fhir fid="Media.bodySite" definition="Indicates the site on the subject's body where the observation was made (i.e. the target site)."
                        comment="Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   &#xA;&#xA;If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html)."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="sct-concept" map="&lt; 123037004 |Body structure|"/>
                        <mapping identity="rim" map="targetSiteCode"/>
                        <mapping identity="sct-attr" map="718497002 |Inherent location|"/>
                    </fhir>
                </element>
                <element name="deviceName" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the device/manufacturer</desc>
                    <fhir fid="Media.deviceName" definition="The name of the device / manufacturer of the device  that was used to make the recording." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".participation[typeCode=&#34;DEV&#34;].role.player.Entity[classCode=&#34;DEV&#34;].name"/>
                        <mapping identity="dicom" map="0008,0070"/>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Observing Device</desc>
                    <fhir fid="Media.device" definition="The device used to collect the media." comment="An extension should be used if further typing of the device is needed.  Secondary devices used to support collecting a media can be represented using either extension or through the Observation.related element." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceMetric"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="sct-concept" map="&lt; 49062001 |Device|"/>
                        <mapping identity="rim" map="participation[typeCode=DEV]"/>
                        <mapping identity="sct-attr" map="424226004 |Using device|"/>
                    </fhir>
                </element>
                <element name="height" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Height of the image in pixels (photo/video)</desc>
                    <fhir fid="Media.height" definition="Height of the image in pixels (photo/video)." isSummary="true">
                        <type value="positiveInt"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;OBS&#34;, moodCode=&#34;EVN&#34;,code=&#34;&lt;CODE&gt;&#34;].value"/>
                        <mapping identity="dicom" map="0028,0010"/>
                    </fhir>
                </element>
                <element name="width" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Width of the image in pixels (photo/video)</desc>
                    <fhir fid="Media.width" definition="Width of the image in pixels (photo/video)." isSummary="true">
                        <type value="positiveInt"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;OBS&#34;, moodCode=&#34;EVN&#34;,code=&#34;&lt;CODE&gt;&#34;].value"/>
                        <mapping identity="dicom" map="0028,0011"/>
                    </fhir>
                </element>
                <element name="frames" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Number of frames if &gt; 1 (photo)</desc>
                    <fhir fid="Media.frames" definition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required."
                        comment="if the number of frames is not supplied, the value may be unknown. Applications should not assume that there is only one frame unless it is explicitly stated." isSummary="true">
                        <type value="positiveInt"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;OBS&#34;, moodCode=&#34;EVN&#34;,code=&#34;&lt;CODE&gt;&#34;].value"/>
                    </fhir>
                </element>
                <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Length in seconds (audio / video)</desc>
                    <fhir fid="Media.duration" definition="The duration of the recording in seconds - for audio and video." comment="The duration might differ from occurrencePeriod if recording was paused." isSummary="true">
                        <type value="decimal"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;OBS&#34;, moodCode=&#34;EVN&#34;,code=&#34;&lt;CODE&gt;&#34;].value"/>
                        <mapping identity="dicom" map="~0028,0002"/>
                    </fhir>
                </element>
                <element name="content" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Actual Media - reference or data</desc>
                    <fhir fid="Media.content" definition="The actual content of the media - inline or by direct reference to the media source file."
                        comment="Recommended content types: image/jpeg, image/png, image/tiff, video/mpeg, audio/mp4, application/dicom. Application/dicom can contain the transfer syntax as a parameter.  For media that covers a period of time (video/sound), the content.creationTime is the end time. Creation time is used for tracking, organizing versions and searching." isSummary="true">
                        <type value="Attachment"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the media</desc>
                    <fhir fid="Media.note" definition="Comments made about the media by the performer, subject or other participants." comment="Not to be used for observations, conclusions, etc. Instead use an [Observation](observation.html) based on the Media/ImagingStudy resource.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.77" name="Medication" displayName="Medication" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Medication">
            <desc language="en-US">This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Medication" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="script10.6" uri="http://ncpdp.org/SCRIPT10_6" name="Mapping to NCPDP SCRIPT 10.6"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Medication" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of a Medication</desc>
                <fhir fid="Medication" definition="This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.">
                    <mapping identity="script10.6" map="NewRx/MedicationPrescribed&#xD;-or-&#xD;RxFill/MedicationDispensed&#xD;-or-&#xD;RxHistoryResponse/MedicationDispensed&#xD;-or-&#xD;RxHistoryResponse/MedicationPrescribed"/>
                    <mapping identity="rim" map="ManufacturedProduct[classCode=ADMM]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier for this medication</desc>
                    <fhir fid="Medication.identifier" definition="Business identifier for this medication." comment="The serial number could be included as an identifier." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Codes that identify this medication</desc>
                    <fhir fid="Medication.code" definition="A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems."
                        comment="Depending on the context of use, the code that was actually selected by the user (prescriber, dispenser, etc.) will have the coding.userSelected set to true.  As described in the coding datatype: &#34;A coding may be marked as a &#34;userSelected&#34; if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). If a user selected coding exists, it is the preferred choice for performing translations etc. Other codes can only be literal translations to alternative code systems, or codes at a lower level of granularity (e.g. a generic code for a vendor-specific primary one)."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="A coded concept that defines the type of a medication." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="script10.6" map="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode&#xD;&#xD;coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier&#xD;&#xD;coding.display = //element(*,MedicationType)/DrugDescription"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="RXO-1.1-Requested Give Code.code / RXE-2.1-Give Code.code / RXD-2.1-Dispense/Give Code.code / RXG-4.1-Give Code.code /RXA-5.1-Administered Code.code / RXC-2.1 Component Code"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error</desc>
                    <fhir fid="Medication.status" definition="A code to indicate if the medication is in active use."
                        comment="This status is intended to identify if the medication in a local system is in active use within a drug database or inventory.  For example, a pharmacy system may create a new drug file record for a compounded product &#34;ABC Hospital Special Cream&#34; with an active status.  At some point in the future, it may be determined that the drug record was created with an error and the status is changed to &#34;entered in error&#34;.   This status is not intended to specify if a medication is part of a particular formulary.  It is possible that the drug record may be referenced by multiple formularies or catalogues and each of those entries would have a separate status."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication  status  codes" strength="required" description="A coded concept defining if the medication is in active use." valueSet="2.16.840.1.113883.4.642.3.376" canonicalUri="http://hl7.org/fhir/ValueSet/medication-status|4.0.1"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Manufacturer of the item</desc>
                    <fhir fid="Medication.manufacturer" definition="Describes the details of the manufacturer of the medication product.  This is not intended to represent the distributor of a medication product." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"/>
                        <mapping identity="rim" map=".player.scopingRole[typeCode=MANU].scoper"/>
                    </fhir>
                </element>
                <element name="form" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">powder | tablets | capsule +</desc>
                    <fhir fid="Medication.form" definition="Describes the form of the item.  Powder; tablets; capsule." comment="When Medication is referenced from MedicationRequest, this is the ordered form.  When Medication is referenced within MedicationDispense, this is the dispensed form.  When Medication is referenced within MedicationAdministration, this is administered form.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Form Codes" strength="example" description="A coded concept defining the form of a medication." valueSet="2.16.840.1.113883.4.642.3.374" canonicalUri="http://hl7.org/fhir/ValueSet/medication-form-codes"/>
                        <mapping identity="script10.6" map="coding.code =  //element(*,DrugCodedType)/FormCode&#xD;&#xD;coding.system = //element(*,DrugCodedType)/FormSourceCode"/>
                        <mapping identity="v2" map="RXO-5-Requested Dosage Form / RXE-6-Give Dosage Form / RXD-6-Actual Dosage Form / RXG-8-Give Dosage Form / RXA-8-Administered Dosage Form"/>
                        <mapping identity="rim" map=".formCode"/>
                    </fhir>
                </element>
                <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Amount of drug in package</desc>
                    <fhir fid="Medication.amount" definition="Specific amount of the drug in the packaged product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)." isSummary="true">
                        <type value="Ratio"/>
                        <mapping identity="rim" map=".quantity"/>
                    </fhir>
                </element>
                <element name="ingredient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Active or inactive ingredient</desc>
                    <fhir fid="Medication.ingredient" definition="Identifies a particular constituent of interest in the product."
                        comment="The ingredients need not be a complete list.  If an ingredient is not specified, this does not indicate whether an ingredient is present or absent.  If an ingredient is specified it does not mean that all ingredients are specified.  It is possible to specify both inactive and active ingredients.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".scopesRole[typeCode=INGR]"/>
                    </fhir>
                    <choice name="item[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The actual ingredient or content</desc>
                        <fhir fid="Medication.ingredient.item[x]" definition="The actual ingredient - either a substance (simple ingredient) or another medication of a medication." requirements="The ingredient may reference a substance (for example, amoxicillin) or another medication (for example in the case of a compounded product, Glaxal Base).">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            </type>
                            <mapping identity="script10.6" map="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode&#xD;&#xD;coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier&#xD;&#xD;coding.display = //element(*,MedicationType)/DrugDescription"/>
                            <mapping identity="v2" map="RXC-2-Component Code  if medication: RXO-1-Requested Give Code / RXE-2-Give Code / RXD-2-Dispense/Give Code / RXG-4-Give Code / RXA-5-Administered Code"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                        <element name="itemCodeableConcept">
                            <fhir fid="Medication.ingredient.itemCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="itemReference">
                            <fhir fid="Medication.ingredient.itemReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="isActive" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Active ingredient indicator</desc>
                        <fhir fid="Medication.ingredient.isActive" definition="Indication of whether this ingredient affects the therapeutic action of the drug." requirements="True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). &#xD;False indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive).">
                            <type value="boolean"/>
                            <mapping identity="rim" map="NA"/>
                        </fhir>
                    </element>
                    <element name="strength" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quantity of ingredient present</desc>
                        <fhir fid="Medication.ingredient.strength" definition="Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.">
                            <type value="Ratio"/>
                            <mapping identity="script10.6" map="//element(*,DrugCodedType)/Strength"/>
                            <mapping identity="v2"
                                map="RXC-3-Component Amount &amp; RXC-4-Component Units  if medication: RXO-2-Requested Give Amount - Minimum &amp; RXO-4-Requested Give Units / RXO-3-Requested Give Amount - Maximum &amp; RXO-4-Requested Give Units / RXO-11-Requested Dispense Amount &amp; RXO-12-Requested Dispense Units / RXE-3-Give Amount - Minimum &amp; RXE-5-Give Units / RXE-4-Give Amount - Maximum &amp; RXE-5-Give Units / RXE-10-Dispense Amount &amp; RXE-10-Dispense Units"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                </element>
                <element name="batch" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details about packaged medications</desc>
                    <fhir fid="Medication.batch" definition="Information that only applies to packages (not products).">
                        <type value="BackboneElement"/>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="rim" map=".player[classCode=CONT]"/>
                    </fhir>
                    <element name="lotNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifier assigned to batch</desc>
                        <fhir fid="Medication.batch.lotNumber" definition="The assigned lot number of a batch of the specified product.">
                            <type value="string"/>
                            <mapping identity="script10.6" map="no mapping"/>
                            <mapping identity="v2" map="RXA-15 Substance Lot Number / RXG-19 Substance Lot Number"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="expirationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When batch will expire</desc>
                        <fhir fid="Medication.batch.expirationDate" definition="When this specific batch of product will expire.">
                            <type value="dateTime"/>
                            <mapping identity="script10.6" map="no mapping"/>
                            <mapping identity="v2" map="RXA-16 Substance Expiration Date / RXG-20 Substance Expiration Date"/>
                            <mapping identity="rim" map="participation[typeCode=CSM].role[classCode=INST].scopedRole.scoper[classCode=MMAT].expirationTime"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.78" name="MedicationAdministration" displayName="MedicationAdministration" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicationAdministration">
            <desc language="en-US">Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicationAdministration" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="w3c.prov" uri="http://www.w3.org/ns/prov" name="W3C PROV"/>
            </fhir>
            <element name="MedicationAdministration" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Administration of medication to a patient</desc>
                <fhir fid="MedicationAdministration" definition="Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="SubstanceAdministration"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifier</desc>
                    <fhir fid="MedicationAdministration.identifier"
                        definition="Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="instantiates" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates protocol or definition</desc>
                    <fhir fid="MedicationAdministration.instantiates" definition="A protocol, guideline, orderset, or other definition that was adhered to in whole or in part by this event." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiates"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target[classCode=unspecified]"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="MedicationAdministration.partOf" definition="A larger event of which this particular event is a component or step." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP]/target[classCode=SBADM or PROC,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">in-progress | not-done | on-hold | completed | entered-in-error | stopped | unknown</desc>
                    <fhir fid="MedicationAdministration.status" definition="Will generally be set to show that the administration has been completed.  For some long running administrations such as infusions, it is possible for an administration to be started but not completed or it may be paused while some other process is under way."
                        comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication administration  status  codes" strength="required" description="A set of codes indicating the current status of a MedicationAdministration." valueSet="2.16.840.1.113883.4.642.3.340" canonicalUri="http://hl7.org/fhir/ValueSet/medication-admin-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="RXA-20-Completion Status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason administration not performed</desc>
                    <fhir fid="MedicationAdministration.statusReason" definition="A code indicating why the administration was not performed.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Reason Medication Not Given Codes" strength="example" description="A set of codes indicating the reason why the MedicationAdministration is negated." valueSet="2.16.840.1.113883.4.642.3.342" canonicalUri="http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="v2" map="RXA-9-Administration Notes / RXA-18 Substance/Treatment Refusal Reason"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=&#34;reason not given&#34;].value"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of medication usage</desc>
                    <fhir fid="MedicationAdministration.category" definition="Indicates where the medication is expected to be consumed or administered.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication administration  category  codes" strength="preferred" description="A coded concept describing where the medication administered is expected to occur." valueSet="2.16.840.1.113883.4.642.3.347" canonicalUri="http://hl7.org/fhir/ValueSet/medication-admin-category"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&#34;type of medication usage&#34;].value"/>
                    </fhir>
                </element>
                <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What was administered</desc>
                    <fhir fid="MedicationAdministration.medication[x]" definition="Identifies the medication that was administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications."
                        comment="If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the medication resource is recommended.  For example, if you require form or lot number, then you must reference the Medication resource." isSummary="true">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="Codes identifying substance or product that can be administered." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="RXA-5-Administered Code"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=ADMM]"/>
                    </fhir>
                    <element name="medicationCodeableConcept">
                        <fhir fid="MedicationAdministration.medicationCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="medicationReference">
                        <fhir fid="MedicationAdministration.medicationReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </fhir>
                    </element>
                </choice>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who received medication</desc>
                    <fhir fid="MedicationAdministration.subject" definition="The person or animal or group receiving the medication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter or Episode of Care administered as part of</desc>
                    <fhir fid="MedicationAdministration.context" definition="The visit, admission, or other contact between patient and health care provider during which the medication administration was performed.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19-Visit Number"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&#34;type of encounter or episode&#34;]"/>
                    </fhir>
                </element>
                <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional information to support administration</desc>
                    <fhir fid="MedicationAdministration.supportingInformation" definition="Additional information (for example, patient height and weight) that supports the administration of the medication.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]"/>
                    </fhir>
                </element>
                <choice name="effective[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Start and end time of administration</desc>
                    <fhir fid="MedicationAdministration.effective[x]" definition="A specific date/time or interval of time during which the administration took place (or did not take place, when the 'notGiven' attribute is true). For many administrations, such as swallowing a tablet the use of dateTime is more appropriate." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="RXA-3-Date/Time Start of Administration / RXA-4-Date/Time End of Administration"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="effectiveDateTime">
                        <fhir fid="MedicationAdministration.effectiveDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="effectivePeriod">
                        <fhir fid="MedicationAdministration.effectivePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who performed the medication administration and what they did</desc>
                    <fhir fid="MedicationAdministration.performer" definition="Indicates who or what performed the medication administration and how they were involved." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="RXA-10-Administering Provider / PRT-5-Participation Person: PRT-4-Participation='AP' (RXA-10 is deprecated)"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                    </fhir>
                    <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of performance</desc>
                        <fhir fid="MedicationAdministration.performer.function" definition="Distinguishes the type of involvement of the performer in the medication administration.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Medication administration  performer  function  codes" strength="example" description="A code describing the role an individual played in administering the medication." valueSet="2.16.840.1.113883.4.642.3.349" canonicalUri="http://hl7.org/fhir/ValueSet/med-admin-perform-function"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="rim" map="participation[typeCode=PRF].functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Who performed the medication administration</desc>
                        <fhir fid="MedicationAdministration.performer.actor" definition="Indicates who or what performed the medication administration." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason administration performed</desc>
                    <fhir fid="MedicationAdministration.reasonCode" definition="A code indicating why the medication was given.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Reason Medication Given Codes" strength="example" description="A set of codes indicating the reason why the MedicationAdministration was made." valueSet="2.16.840.1.113883.4.642.3.344" canonicalUri="http://hl7.org/fhir/ValueSet/reason-medication-given-codes"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="v2" map="RXE-27 Give Indication"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Condition or observation that supports why the medication was administered</desc>
                    <fhir fid="MedicationAdministration.reasonReference" definition="Condition or observation that supports why the medication was administered." comment="This is a reference to a condition that is the reason for the medication request.  If only a code exists, use reasonCode.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=&#34;reason for use ASSERTION&#34;].value"/>
                        <mapping identity="w3c.prov" map="no mapping"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Request administration performed against</desc>
                    <fhir fid="MedicationAdministration.request" definition="The original request, instruction or authority to perform the administration." comment="This is a reference to the MedicationRequest  where the intent is either order or instance-order.  It should not reference MedicationRequests where the intent is any other value.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC-2-Placer Order Number / ORC-3-Filler Order Number"/>
                        <mapping identity="rim" map="InFullfillmentOf-&gt;SubstanceAdministration"/>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Device used to administer</desc>
                    <fhir fid="MedicationAdministration.device" definition="The device used in administering the medication to the patient.  For example, a particular infusion pump.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="v2" map="PRT-10 Participation Device / RXR-3 Administrative Device"/>
                        <mapping identity="rim" map="device-&gt;Access  OR device-&gt;AssignedDevice"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the administration</desc>
                    <fhir fid="MedicationAdministration.note" definition="Extra information about the medication administration that is not conveyed by the other attributes.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="dosage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details of how medication was taken</desc>
                    <fhir fid="MedicationAdministration.dosage" definition="Describes the medication dosage information details e.g. dose, rate, site, route, etc.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="component-&gt;SubstanceAdministrationEvent"/>
                        <constraint key="mad-1" severity="error" human="SHALL have at least one of dosage.dose or dosage.rate[x]" expression="dose.exists() or rate.exists()" xpath="exists(f:dose) or exists(f:*[starts-with(local-name(.), 'rate')])" source=""/>
                    </fhir>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Free text dosage instructions e.g. SIG</desc>
                        <fhir fid="MedicationAdministration.dosage.text" definition="Free text dosage can be used for cases where the dosage administered is too complex to code. When coded dosage is present, the free text dosage may still be present for display to humans.&#xD;&#xD;The dosage instructions should reflect the dosage of the medication that was administered.">
                            <type value="string"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                    <element name="site" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Body site administered to</desc>
                        <fhir fid="MedicationAdministration.dosage.site" definition="A coded specification of the anatomic site where the medication first entered the body.  For example, &#34;left arm&#34;."
                            comment="If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Anatomical Structure for Administration Site Codes" strength="example" description="A coded concept describing the site location the medicine enters into or onto the body." valueSet="2.16.840.1.113883.4.642.3.346" canonicalUri="http://hl7.org/fhir/ValueSet/approach-site-codes"/>
                            <mapping identity="v2" map="RXR-2 Administration Site / RXR-6 Administration Site Modifier"/>
                            <mapping identity="rim" map=".approachSiteCode"/>
                        </fhir>
                    </element>
                    <element name="route" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Path of substance into body</desc>
                        <fhir fid="MedicationAdministration.dosage.route" definition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto the patient.  For example, topical, intravenous, etc.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Route Codes" strength="example" description="A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject." valueSet="2.16.840.1.113883.4.642.3.98" canonicalUri="http://hl7.org/fhir/ValueSet/route-codes"/>
                            <mapping identity="v2" map="RXR-1-Route"/>
                            <mapping identity="rim" map=".routeCode"/>
                        </fhir>
                    </element>
                    <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How drug was administered</desc>
                        <fhir fid="MedicationAdministration.dosage.method" definition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body.  This attribute will most often NOT be populated.  It is most commonly used for injections.  For example, Slow Push, Deep IV."
                            comment="One of the reasons this attribute is not used often, is that the method is often pre-coordinated with the route and/or form of administration.  This means the codes used in route or form may pre-coordinate the method in the route code or the form code.  The implementation decision about what coding system to use for route or form code will determine how frequently the method code will be populated e.g. if route or form code pre-coordinate method code, then this attribute will not be populated often; if there is no pre-coordination then method code may  be used frequently.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Administration Method Codes" strength="example" description="A coded concept describing the technique by which the medicine is administered." valueSet="2.16.840.1.113883.4.642.3.97" canonicalUri="http://hl7.org/fhir/ValueSet/administration-method-codes"/>
                            <mapping identity="v2" map="RXR-4-Administration Method"/>
                            <mapping identity="rim" map=".methodCode"/>
                        </fhir>
                    </element>
                    <element name="dose" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount of medication per dose</desc>
                        <fhir fid="MedicationAdministration.dosage.dose" definition="The amount of the medication given at one administration event.   Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection."
                            comment="If the administration is not instantaneous (rate is present), this can be specified to convey the total amount administered over period of time of a single administration.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="RXA-6 Administered Amount / RXA-7 Administered Units"/>
                            <mapping identity="rim" map=".doseQuantity"/>
                        </fhir>
                    </element>
                    <choice name="rate[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Dose quantity per unit of time</desc>
                        <fhir fid="MedicationAdministration.dosage.rate[x]" definition="Identifies the speed with which the medication was or will be introduced into the patient.  Typically, the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed as a rate per unit of time, e.g. 500 ml per 2 hours.  Other examples:  200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours."
                            comment="If the rate changes over time, and you want to capture this in MedicationAdministration, then each change should be captured as a distinct MedicationAdministration, with a specific MedicationAdministration.dosage.rate, and the date time when the rate change occurred. Typically, the MedicationAdministration.dosage.rate element is not used to convey an average rate.">
                            <type value="Ratio"/>
                            <type value="Quantity"/>
                            <mapping identity="v2" map="RXA-12-Administered Per (Time Unit)"/>
                            <mapping identity="rim" map=".rateQuantity"/>
                        </fhir>
                        <element name="rateRatio">
                            <fhir fid="MedicationAdministration.dosage.rateRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="rateQuantity">
                            <fhir fid="MedicationAdministration.dosage.rateQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="eventHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A list of events of interest in the lifecycle</desc>
                    <fhir fid="MedicationAdministration.eventHistory" definition="A summary of the events of interest that have occurred, such as when the administration was verified."
                        comment="This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.79" name="MedicationDispense" displayName="MedicationDispense" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicationDispense">
            <desc language="en-US">Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicationDispense" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rx-dispense-rmim" uri="http://www.hl7.org/v3/PORX_RM020070UV" name="V3 Pharmacy Dispense RMIM"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="MedicationDispense" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Dispensing a medication to a named patient</desc>
                <fhir fid="MedicationDispense" definition="Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Supply[moodCode=EVN]"/>
                    <constraint key="mdd-1" severity="error" human="whenHandedOver cannot be before whenPrepared" expression="whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver &gt;= whenPrepared" xpath="not(exists(f:whenHandedOver/@value)) or not(exists(f:whenPrepared/@value)) or ( f:whenHandedOver/@value &gt;= f:whenPrepared/@value)" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifier</desc>
                    <fhir fid="MedicationDispense.identifier"
                        definition="Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.id"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Event that dispense is part of</desc>
                    <fhir fid="MedicationDispense.partOf" definition="The procedure that trigger the dispense.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP]/target[classCode=PROC,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown</desc>
                    <fhir fid="MedicationDispense.status" definition="A code specifying the state of the set of dispense events." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication dispense  status  codes" strength="required" description="A coded concept specifying the state of the dispense event." valueSet="2.16.840.1.113883.4.642.3.1312" canonicalUri="http://hl7.org/fhir/ValueSet/medicationdispense-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.statusCode"/>
                    </fhir>
                </element>
                <choice name="statusReason[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why a dispense was not performed</desc>
                    <fhir fid="MedicationDispense.statusReason[x]" definition="Indicates the reason why a dispense was not performed.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/>
                        </type>
                        <binding displayName="Medication dispense  status  reason  codes" strength="example" description="A code describing why a dispense was not performed." valueSet="2.16.840.1.113883.4.642.3.1316" canonicalUri="http://hl7.org/fhir/ValueSet/medicationdispense-status-reason"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=&#34;not done reason&#34;].value"/>
                    </fhir>
                    <element name="statusReasonCodeableConcept">
                        <fhir fid="MedicationDispense.statusReasonCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="statusReasonReference">
                        <fhir fid="MedicationDispense.statusReasonReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/>
                        </fhir>
                    </element>
                </choice>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of medication dispense</desc>
                    <fhir fid="MedicationDispense.category" definition="Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))."
                        comment="The category can be used to include where the medication is expected to be consumed or other types of dispenses.  Invariants can be used to bind to different value sets when profiling to bind.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication dispense  category  codes" strength="preferred" description="A code describing where the dispensed medication is expected to be consumed or administered." valueSet="2.16.840.1.113883.4.642.3.1314" canonicalUri="http://hl7.org/fhir/ValueSet/medicationdispense-category"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&#34;type of medication dispense&#34;].value"/>
                    </fhir>
                </element>
                <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What medication was supplied</desc>
                    <fhir fid="MedicationDispense.medication[x]" definition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications."
                        comment="If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the medication resource is recommended.  For example, if you require form or lot number, then you must reference the Medication resource." isSummary="true">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="A coded concept identifying which substance or product can be dispensed." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="RXD-2-Dispense/Give Code"/>
                        <mapping identity="rim" map=".participation[typeCode=PRD].role"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationRequest.component1.AdministrationRequest.consumable"/>
                    </fhir>
                    <element name="medicationCodeableConcept">
                        <fhir fid="MedicationDispense.medicationCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="medicationReference">
                        <fhir fid="MedicationDispense.medicationReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </fhir>
                    </element>
                </choice>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who the dispense is for</desc>
                    <fhir fid="MedicationDispense.subject" definition="A link to a resource representing the person or the group to whom the medication will be given." comment="SubstanceAdministration-&gt;subject-&gt;Patient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter / Episode associated with event</desc>
                    <fhir fid="MedicationDispense.context" definition="The encounter or episode of care that establishes the context for this event.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&#34;type of encounter or episode&#34;]"/>
                    </fhir>
                </element>
                <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information that supports the dispensing of the medication</desc>
                    <fhir fid="MedicationDispense.supportingInformation" definition="Additional information that supports the medication being dispensed.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who performed event</desc>
                    <fhir fid="MedicationDispense.performer" definition="Indicates who or what performed the event.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                    </fhir>
                    <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who performed the dispense and what they did</desc>
                        <fhir fid="MedicationDispense.performer.function" definition="Distinguishes the type of performer in the dispense.  For example, date enterer, packager, final checker." requirements="Allows disambiguation of the types of involvement of different performers.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Medication dispense  performer  function  codes" strength="example" description="A code describing the role an individual played in dispensing a medication." valueSet="2.16.840.1.113883.4.642.3.1318" canonicalUri="http://hl7.org/fhir/ValueSet/medicationdispense-performer-function"/>
                            <mapping identity="rim" map="participation[typeCode=PRF].functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Individual who was performing</desc>
                        <fhir fid="MedicationDispense.performer.actor" definition="The device, practitioner, etc. who performed the action.  It should be assumed that the actor is the dispenser of the medication.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the dispense occurred</desc>
                    <fhir fid="MedicationDispense.location" definition="The principal physical location where the dispense was performed.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role"/>
                    </fhir>
                </element>
                <element name="authorizingPrescription" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Medication order that authorizes the dispense</desc>
                    <fhir fid="MedicationDispense.authorizingPrescription" definition="Indicates the medication order that is being dispensed against." comment="Maps to basedOn in Event logical model.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC-2 Placer Order Number"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[moodCode=RQO]"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.inFulfillmentOf"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Trial fill, partial fill, emergency fill, etc.</desc>
                    <fhir fid="MedicationDispense.type" definition="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetActPharmacySupplyType" strength="example" description="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc." valueSet="2.16.840.1.113883.1.11.16208" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActPharmacySupplyType"/>
                        <mapping identity="v2" map="RXD-33-Dispense Type"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.code"/>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Amount dispensed</desc>
                    <fhir fid="MedicationDispense.quantity" definition="The amount of medication that has been dispensed. Includes unit of measure.">
                        <type value="Quantity"/>
                        <mapping identity="v2" map="RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense Units.name of coding system"/>
                        <mapping identity="rim" map=".quantity"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.quantity"/>
                    </fhir>
                </element>
                <element name="daysSupply" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Amount of medication expressed as a timing amount</desc>
                    <fhir fid="MedicationDispense.daysSupply" definition="The amount of medication expressed as a timing amount.">
                        <type value="Quantity"/>
                        <mapping identity="v2"
                            map="TQ1.6 Timing/Quantity Segment Service Duration.&#xD;Prior to v2.5, ORC.7.3 Common Order Segment / Quantity/Timing / Duration component.  This is a formatted string, first character for the time unit (e.g., D=days), followed by the value.  For example, “D14” represents “14 days supply”&#xD;From v2.5 on, TQ1.6 Timing/Quantity Segment / Service Duration.  This is a CQ data type (&lt;Quantity (NM)&gt; ^ &lt;Units (CWE)&gt;), thus for days supply, assuming the unit of measure is “days”, the numeric value is TQ1.6.1 (…|14^&#xD;For backwards compatibility, ORC.7 was permitted through v2.6.  Both forms (field and segment) may be present in v2.5, v2.5.1, and v2.6"/>
                        <mapping identity="rim" map="effectiveUseTime"/>
                    </fhir>
                </element>
                <element name="whenPrepared" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When product was packaged and reviewed</desc>
                    <fhir fid="MedicationDispense.whenPrepared" definition="The time when the dispensed product was packaged and reviewed." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="v2" map="RXD-3-Date/Time Dispensed"/>
                        <mapping identity="rim" map=".effectiveTime[xmi:type=IVL_TS].low"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.effectiveTime"/>
                    </fhir>
                </element>
                <element name="whenHandedOver" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When product was given out</desc>
                    <fhir fid="MedicationDispense.whenHandedOver" definition="The time the dispensed product was provided to the patient or their representative.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="v2" map="RXD-3-Date/Time Dispensed"/>
                        <mapping identity="rim" map=".effectiveTime[xmi:type=IVL_TS].high"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.effectiveTime"/>
                    </fhir>
                </element>
                <element name="destination" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the medication was sent</desc>
                    <fhir fid="MedicationDispense.destination" definition="Identification of the facility/location where the medication was shipped to, as part of the dispense event.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="v2" map="RXD-13 Dispense-to Location; RXD-30 Dispense to Pharmacy; RXD-31 Dispense to Pharmacy Address"/>
                        <mapping identity="rim" map=".participation[typeCode=DST].role"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.destination"/>
                    </fhir>
                </element>
                <element name="receiver" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who collected the medication</desc>
                    <fhir fid="MedicationDispense.receiver" definition="Identifies the person who picked up the medication.  This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=RCV].role"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.SupplyEvent.receiver"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the dispense</desc>
                    <fhir fid="MedicationDispense.note" definition="Extra information about the dispense that could not be conveyed in the other attributes.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="RXD-9 Dispense Notes"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=ACT,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="dosageInstruction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">How the medication is to be used by the patient or administered by the caregiver</desc>
                    <fhir fid="MedicationDispense.dosageInstruction" definition="Indicates how the medication is to be used by the patient."
                        comment="When the dose or rate is intended to change over the entire administration period (e.g. Tapering dose prescriptions), multiple instances of dosage instructions will need to be supplied to convey the different doses/rates.&#xD;The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed.">
                        <type value="Dosage"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]"/>
                    </fhir>
                </element>
                <element name="substitution" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether a substitution was performed on the dispense</desc>
                    <fhir fid="MedicationDispense.substitution" definition="Indicates whether or not substitution was made as part of the dispense.  In some cases, substitution will be expected but does not happen, in other cases substitution is not expected but does happen.  This block explains what substitution did or did not happen and why.  If nothing is specified, substitution was not done.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=SUBST, moodCode=EVN]"/>
                        <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.substitutionMade"/>
                    </fhir>
                    <element name="wasSubstituted" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether a substitution was or was not performed on the dispense</desc>
                        <fhir fid="MedicationDispense.substitution.wasSubstituted" definition="True if the dispenser dispensed a different drug or product from what was prescribed.">
                            <type value="boolean"/>
                            <mapping identity="rim" map=".actionNegationInd"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Code signifying whether a different drug was dispensed from what was prescribed</desc>
                        <fhir fid="MedicationDispense.substitution.type" definition="A code signifying whether a different drug was dispensed from what was prescribed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetActSubstanceAdminSubstitutionCode" strength="example" description="A coded concept describing whether a different medicinal product may be dispensed other than the product as specified exactly in the prescription." valueSet="2.16.840.1.113883.1.11.16621"
                                canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode"/>
                            <mapping identity="v2" map="RXO-9-Allow Substitutions / RXE-9-Substitution Status"/>
                            <mapping identity="rim" map=".code"/>
                            <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.substitutionMade.code"/>
                        </fhir>
                    </element>
                    <element name="reason" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Why was substitution made</desc>
                        <fhir fid="MedicationDispense.substitution.reason" definition="Indicates the reason for the substitution (or lack of substitution) from what was prescribed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetSubstanceAdminSubstitutionReason" strength="example" description="A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed." valueSet="2.16.840.1.113883.1.11.19377" canonicalUri="http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason"/>
                            <mapping identity="rim" map=".reasonCode"/>
                            <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.substitutionMade.reasonCode"/>
                        </fhir>
                    </element>
                    <element name="responsibleParty" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who is responsible for the substitution</desc>
                        <fhir fid="MedicationDispense.substitution.responsibleParty" definition="The person or organization that has primary responsibility for the substitution.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                            <mapping identity="rim" map=".participation[typeCode=PFM].role[classCode=ASSIGN]"/>
                            <mapping identity="rx-dispense-rmim" map="CombinedMedicationDispense.substitutionMade.ResponsibleParty"/>
                        </fhir>
                    </element>
                </element>
                <element name="detectedIssue" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical issue with action</desc>
                    <fhir fid="MedicationDispense.detectedIssue" definition="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. drug-drug interaction, duplicate therapy, dosage alert etc."
                        comment="This element can include a detected issue that has been identified either by a decision support system or by a clinician and may include information on the steps that were taken to address the issue.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/>
                        </type>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=ALRT,moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="eventHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A list of relevant lifecycle events</desc>
                    <fhir fid="MedicationDispense.eventHistory" definition="A summary of the events of interest that have occurred, such as when the dispense was verified."
                        comment="This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the Provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the Provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.80" name="MedicationKnowledge" displayName="MedicationKnowledge" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicationKnowledge">
            <desc language="en-US">Information about a medication that is used to support knowledge.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicationKnowledge" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="script10.6" uri="http://ncpdp.org/SCRIPT10_6" name="Mapping to NCPDP SCRIPT 10.6"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="MedicationKnowledge" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of Medication Knowledge</desc>
                <fhir fid="MedicationKnowledge" definition="Information about a medication that is used to support knowledge.">
                    <mapping identity="rim" map="Todo"/>
                </fhir>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Code that identifies this medication</desc>
                    <fhir fid="MedicationKnowledge.code" definition="A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems."
                        comment="Depending on the context of use, the code that was actually selected by the user (prescriber, dispenser, etc.) will have the coding.userSelected set to true.  As described in the coding datatype: &#34;A coding may be marked as a &#34;userSelected&#34; if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). If a user selected coding exists, it is the preferred choice for performing translations etc. Other codes can only be literal translations to alternative code systems, or codes at a lower level of granularity (e.g. a generic code for a vendor-specific primary one)."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="A coded concept that defines the type of a medication." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="script10.6" map="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode&#xD;&#xD;coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier&#xD;&#xD;coding.display = //element(*,MedicationType)/DrugDescription"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="RXO-1.1-Requested Give Code.code / RXE-2.1-Give Code.code / RXD-2.1-Dispense/Give Code.code / RXG-4.1-Give Code.code /RXA-5.1-Administered Code.code / RXC-2.1 Component Code"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error</desc>
                    <fhir fid="MedicationKnowledge.status" definition="A code to indicate if the medication is in active use.  The status refers to the validity about the information of the medication and not to its medicinal properties."
                        comment="This status is intended to identify if the medication in a local system is in active use within a drug database or inventory.  For example, a pharmacy system may create a new drug file record for a compounded product &#34;ABC Hospital Special Cream&#34; with an active status.  At some point in the future, it may be determined that the drug record was created with an error and the status is changed to &#34;entered in error&#34;.   This status is not intended to specify if a medication is part of a particular formulary.  It is possible that the drug record may be referenced by multiple formularies or catalogues and each of those entries would have a separate status."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication knowledge  status  codes" strength="required" description="A coded concept defining if the medication is in active use." valueSet="2.16.840.1.113883.4.642.3.1335" canonicalUri="http://hl7.org/fhir/ValueSet/medicationknowledge-status|4.0.1"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Manufacturer of the item</desc>
                    <fhir fid="MedicationKnowledge.manufacturer" definition="Describes the details of the manufacturer of the medication product.  This is not intended to represent the distributor of a medication product." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="RXD-20-Substance Manufacturer Name / RXG-21-Substance Manufacturer Name / RXA-17-Substance Manufacturer Name"/>
                        <mapping identity="rim" map=".player.scopingRole[typeCode=MANU].scoper"/>
                    </fhir>
                </element>
                <element name="doseForm" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">powder | tablets | capsule +</desc>
                    <fhir fid="MedicationKnowledge.doseForm" definition="Describes the form of the item.  Powder; tablets; capsule." comment="When Medication is referenced from MedicationRequest, this is the ordered form.  When Medication is referenced within MedicationDispense, this is the dispensed form.  When Medication is referenced within MedicationAdministration, this is administered form.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Form Codes" strength="example" description="A coded concept defining the form of a medication." valueSet="2.16.840.1.113883.4.642.3.374" canonicalUri="http://hl7.org/fhir/ValueSet/medication-form-codes"/>
                        <mapping identity="script10.6" map="coding.code =  //element(*,DrugCodedType)/FormCode&#xD;&#xD;coding.system = //element(*,DrugCodedType)/FormSourceCode"/>
                        <mapping identity="v2" map="RXO-5-Requested Dosage Form / RXE-6-Give Dosage Form / RXD-6-Actual Dosage Form / RXG-8-Give Dosage Form / RXA-8-Administered Dosage Form"/>
                        <mapping identity="rim" map=".formCode"/>
                    </fhir>
                </element>
                <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Amount of drug in package</desc>
                    <fhir fid="MedicationKnowledge.amount" definition="Specific amount of the drug in the packaged product.  For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.)."
                        comment="This is the quantity of medication in a package.  To specify the strength of the medication, the Ingredient.strength attribute is used." isSummary="true">
                        <type value="Quantity"/>
                        <mapping identity="rim" map=".quantity"/>
                    </fhir>
                </element>
                <element name="synonym" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional names for a medication</desc>
                    <fhir fid="MedicationKnowledge.synonym" definition="Additional names for a medication, for example, the name(s) given to a medication in different countries.  For example, acetaminophen and paracetamol or salbutamol and albuterol." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="relatedMedicationKnowledge" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated or related medication information</desc>
                    <fhir fid="MedicationKnowledge.relatedMedicationKnowledge" definition="Associated or related knowledge about a medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Category of medicationKnowledge</desc>
                        <fhir fid="MedicationKnowledge.relatedMedicationKnowledge.type" definition="The category of the associated medication knowledge reference.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="reference" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Associated documentation about the associated medication knowledge</desc>
                        <fhir fid="MedicationKnowledge.relatedMedicationKnowledge.reference" definition="Associated documentation about the associated medication knowledge.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationKnowledge"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="associatedMedication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A medication resource that is associated with this medication</desc>
                    <fhir fid="MedicationKnowledge.associatedMedication" definition="Associated or related medications.  For example, if the medication is a branded product (e.g. Crestor), this is the Therapeutic Moeity (e.g. Rosuvastatin) or if this is a generic medication (e.g. Rosuvastatin), this would link to a branded product (e.g. Crestor).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                    </fhir>
                </element>
                <element name="productType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Category of the medication or product</desc>
                    <fhir fid="MedicationKnowledge.productType" definition="Category of the medication or product (e.g. branded product, therapeutic moeity, generic product, innovator product, etc.).">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="monograph" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated documentation about the medication</desc>
                    <fhir fid="MedicationKnowledge.monograph" definition="Associated documentation about the medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The category of medication document</desc>
                        <fhir fid="MedicationKnowledge.monograph.type" definition="The category of documentation about the medication. (e.g. professional monograph, patient education monograph).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Associated documentation about the medication</desc>
                        <fhir fid="MedicationKnowledge.monograph.source" definition="Associated documentation about the medication.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="ingredient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Active or inactive ingredient</desc>
                    <fhir fid="MedicationKnowledge.ingredient" definition="Identifies a particular constituent of interest in the product.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="item[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Medication(s) or substance(s) contained in the medication</desc>
                        <fhir fid="MedicationKnowledge.ingredient.item[x]" definition="The actual ingredient - either a substance (simple ingredient) or another medication.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                            <mapping identity="script10.6" map="coding.code = //element(*,MedicationType)/DrugCoded/ProductCode&#xD;&#xD;coding.system = //element(*,MedicationType)/DrugCoded/ProductCodeQualifier&#xD;&#xD;coding.display = //element(*,MedicationType)/DrugDescription"/>
                            <mapping identity="v2" map="RXC-2-Component Code  if medication: RXO-1-Requested Give Code / RXE-2-Give Code / RXD-2-Dispense/Give Code / RXG-4-Give Code / RXA-5-Administered Code"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                        <element name="itemCodeableConcept">
                            <fhir fid="MedicationKnowledge.ingredient.itemCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="itemReference">
                            <fhir fid="MedicationKnowledge.ingredient.itemReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="isActive" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Active ingredient indicator</desc>
                        <fhir fid="MedicationKnowledge.ingredient.isActive" definition="Indication of whether this ingredient affects the therapeutic action of the drug." requirements="True indicates that the ingredient affects the therapeutic action of the drug (i.e. active). &#xD;False indicates that the ingredient does not affect the therapeutic action of the drug (i.e. inactive).">
                            <type value="boolean"/>
                            <mapping identity="rim" map="NA"/>
                        </fhir>
                    </element>
                    <element name="strength" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quantity of ingredient present</desc>
                        <fhir fid="MedicationKnowledge.ingredient.strength" definition="Specifies how many (or how much) of the items there are in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.">
                            <type value="Ratio"/>
                            <mapping identity="script10.6" map="//element(*,DrugCodedType)/Strength"/>
                            <mapping identity="v2"
                                map="RXC-3-Component Amount &amp; RXC-4-Component Units  if medication: RXO-2-Requested Give Amount - Minimum &amp; RXO-4-Requested Give Units / RXO-3-Requested Give Amount - Maximum &amp; RXO-4-Requested Give Units / RXO-11-Requested Dispense Amount &amp; RXO-12-Requested Dispense Units / RXE-3-Give Amount - Minimum &amp; RXE-5-Give Units / RXE-4-Give Amount - Maximum &amp; RXE-5-Give Units / RXE-10-Dispense Amount &amp; RXE-10-Dispense Units"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                </element>
                <element name="preparationInstruction" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The instructions for preparing the medication</desc>
                    <fhir fid="MedicationKnowledge.preparationInstruction" definition="The instructions for preparing the medication.">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="intendedRoute" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The intended or approved route of administration</desc>
                    <fhir fid="MedicationKnowledge.intendedRoute" definition="The intended or approved route of administration.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Route Codes" strength="example" description="A coded concept defining the intended route of administration." valueSet="2.16.840.1.113883.4.642.3.98" canonicalUri="http://hl7.org/fhir/ValueSet/route-codes"/>
                    </fhir>
                </element>
                <element name="cost" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The pricing of the medication</desc>
                    <fhir fid="MedicationKnowledge.cost" definition="The price of the medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The category of the cost information</desc>
                        <fhir fid="MedicationKnowledge.cost.type" definition="The category of the cost information.  For example, manufacturers' cost, patient cost, claim reimbursement cost, actual acquisition cost.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The source or owner for the price information</desc>
                        <fhir fid="MedicationKnowledge.cost.source" definition="The source or owner that assigns the price to the medication.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="cost" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The price of the medication</desc>
                        <fhir fid="MedicationKnowledge.cost.cost" definition="The price of the medication.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                </element>
                <element name="monitoringProgram" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Program under which a medication is reviewed</desc>
                    <fhir fid="MedicationKnowledge.monitoringProgram" definition="The program under which the medication is reviewed.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of program under which the medication is monitored</desc>
                        <fhir fid="MedicationKnowledge.monitoringProgram.type" definition="Type of program under which the medication is monitored.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of the reviewing program</desc>
                        <fhir fid="MedicationKnowledge.monitoringProgram.name" definition="Name of the reviewing program.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="administrationGuidelines" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Guidelines for administration of the medication</desc>
                    <fhir fid="MedicationKnowledge.administrationGuidelines" definition="Guidelines for the administration of the medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="dosage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Dosage for the medication for the specific guidelines</desc>
                        <fhir fid="MedicationKnowledge.administrationGuidelines.dosage" definition="Dosage for the medication for the specific guidelines.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Type of dosage</desc>
                            <fhir fid="MedicationKnowledge.administrationGuidelines.dosage.type" definition="The type of dosage (for example, prophylaxis, maintenance, therapeutic, etc.).">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="dosage" minimumMultiplicity="1" maximumMultiplicity="*">
                            <desc language="en-US">Dosage for the medication for the specific guidelines</desc>
                            <fhir fid="MedicationKnowledge.administrationGuidelines.dosage.dosage" definition="Dosage for the medication for the specific guidelines.">
                                <type value="Dosage"/>
                            </fhir>
                        </element>
                    </element>
                    <choice name="indication[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indication for use that apply to the specific administration guidelines</desc>
                        <fhir fid="MedicationKnowledge.administrationGuidelines.indication[x]" definition="Indication for use that apply to the specific administration guidelines.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                            </type>
                        </fhir>
                        <element name="indicationCodeableConcept">
                            <fhir fid="MedicationKnowledge.administrationGuidelines.indicationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="indicationReference">
                            <fhir fid="MedicationKnowledge.administrationGuidelines.indicationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="patientCharacteristics" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Characteristics of the patient that are relevant to the administration guidelines</desc>
                        <fhir fid="MedicationKnowledge.administrationGuidelines.patientCharacteristics" definition="Characteristics of the patient that are relevant to the administration guidelines (for example, height, weight, gender, etc.).">
                            <type value="BackboneElement"/>
                        </fhir>
                        <choice name="characteristic[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Specific characteristic that is relevant to the administration guideline</desc>
                            <fhir fid="MedicationKnowledge.administrationGuidelines.patientCharacteristics.characteristic[x]" definition="Specific characteristic that is relevant to the administration guideline (e.g. height, weight, gender).">
                                <type value="CodeableConcept"/>
                                <type value="Quantity"/>
                            </fhir>
                            <element name="characteristicCodeableConcept">
                                <fhir fid="MedicationKnowledge.administrationGuidelines.patientCharacteristics.characteristicCodeableConcept">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="characteristicQuantity">
                                <fhir fid="MedicationKnowledge.administrationGuidelines.patientCharacteristics.characteristicQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="value" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">The specific characteristic</desc>
                            <fhir fid="MedicationKnowledge.administrationGuidelines.patientCharacteristics.value" definition="The specific characteristic (e.g. height, weight, gender, etc.).">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="medicineClassification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Categorization of the medication within a formulary or classification system</desc>
                    <fhir fid="MedicationKnowledge.medicineClassification" definition="Categorization of the medication within a formulary or classification system.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification)</desc>
                        <fhir fid="MedicationKnowledge.medicineClassification.type" definition="The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="classification" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specific category assigned to the medication</desc>
                        <fhir fid="MedicationKnowledge.medicineClassification.classification" definition="Specific category assigned to the medication (e.g. anti-infective, anti-hypertensive, antibiotic, etc.).">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="packaging" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Details about packaged medications</desc>
                    <fhir fid="MedicationKnowledge.packaging" definition="Information that only applies to packages (not products).">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A code that defines the specific type of packaging that the medication can be found in</desc>
                        <fhir fid="MedicationKnowledge.packaging.type" definition="A code that defines the specific type of packaging that the medication can be found in (e.g. blister sleeve, tube, bottle).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Medication knowledge  package  type  codes" strength="example" description="A coded concept defining the type of packaging of a medication." valueSet="2.16.840.1.113883.4.642.3.1339" canonicalUri="http://hl7.org/fhir/ValueSet/medicationknowledge-package-type"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The number of product units the package would contain if fully loaded</desc>
                        <fhir fid="MedicationKnowledge.packaging.quantity" definition="The number of product units the package would contain if fully loaded.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                </element>
                <element name="drugCharacteristic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specifies descriptive properties of the medicine</desc>
                    <fhir fid="MedicationKnowledge.drugCharacteristic" definition="Specifies descriptive properties of the medicine, such as color, shape, imprints, etc.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Code specifying the type of characteristic of medication</desc>
                        <fhir fid="MedicationKnowledge.drugCharacteristic.type" definition="A code specifying which characteristic of the medicine is being described (for example, colour, shape, imprint).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Medication knowledge  characteristic  codes" strength="example" description="A coded concept defining the characteristic types of a medication." valueSet="2.16.840.1.113883.4.642.3.1337" canonicalUri="http://hl7.org/fhir/ValueSet/medicationknowledge-characteristic"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of the characteristic</desc>
                        <fhir fid="MedicationKnowledge.drugCharacteristic.value[x]" definition="Description of the characteristic." comment="The description should be provided as a CodeableConcept, SimpleQuantity or an image.  The description can be a string only when these others are not available.">
                            <type value="CodeableConcept"/>
                            <type value="string"/>
                            <type value="Quantity"/>
                            <type value="base64Binary"/>
                        </fhir>
                        <element name="valueCodeableConcept">
                            <fhir fid="MedicationKnowledge.drugCharacteristic.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="MedicationKnowledge.drugCharacteristic.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="MedicationKnowledge.drugCharacteristic.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueBase64Binary">
                            <fhir fid="MedicationKnowledge.drugCharacteristic.valueBase64Binary">
                                <type value="base64Binary"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="contraindication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Potential clinical issue with or between medication(s)</desc>
                    <fhir fid="MedicationKnowledge.contraindication" definition="Potential clinical issue with or between medication(s) (for example, drug-drug interaction, drug-disease contraindication, drug-allergy interaction, etc.).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/>
                        </type>
                    </fhir>
                </element>
                <element name="regulatory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Regulatory information about a medication</desc>
                    <fhir fid="MedicationKnowledge.regulatory" definition="Regulatory information about a medication.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="regulatoryAuthority" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Specifies the authority of the regulation</desc>
                        <fhir fid="MedicationKnowledge.regulatory.regulatoryAuthority" definition="The authority that is specifying the regulations.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="substitution" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specifies if changes are allowed when dispensing a medication from a regulatory perspective</desc>
                        <fhir fid="MedicationKnowledge.regulatory.substitution" definition="Specifies if changes are allowed when dispensing a medication from a regulatory perspective.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Specifies the type of substitution allowed</desc>
                            <fhir fid="MedicationKnowledge.regulatory.substitution.type" definition="Specifies the type of substitution allowed.">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="allowed" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Specifies if regulation allows for changes in the medication when dispensing</desc>
                            <fhir fid="MedicationKnowledge.regulatory.substitution.allowed" definition="Specifies if regulation allows for changes in the medication when dispensing.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="schedule" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specifies the schedule of a medication in jurisdiction</desc>
                        <fhir fid="MedicationKnowledge.regulatory.schedule" definition="Specifies the schedule of a medication in jurisdiction.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="schedule" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Specifies the specific drug schedule</desc>
                            <fhir fid="MedicationKnowledge.regulatory.schedule.schedule" definition="Specifies the specific drug schedule.">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="maxDispense" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The maximum number of units of the medication that can be dispensed in a period</desc>
                        <fhir fid="MedicationKnowledge.regulatory.maxDispense" definition="The maximum number of units of the medication that can be dispensed in a period.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="quantity" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The maximum number of units of the medication that can be dispensed</desc>
                            <fhir fid="MedicationKnowledge.regulatory.maxDispense.quantity" definition="The maximum number of units of the medication that can be dispensed.">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The period that applies to the maximum number of units</desc>
                            <fhir fid="MedicationKnowledge.regulatory.maxDispense.period" definition="The period that applies to the maximum number of units.">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="kinetics" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The time course of drug absorption, distribution, metabolism and excretion of a medication from the body</desc>
                    <fhir fid="MedicationKnowledge.kinetics" definition="The time course of drug absorption, distribution, metabolism and excretion of a medication from the body.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="areaUnderCurve" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The drug concentration measured at certain discrete points in time</desc>
                        <fhir fid="MedicationKnowledge.kinetics.areaUnderCurve" definition="The drug concentration measured at certain discrete points in time.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="lethalDose50" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The median lethal dose of a drug</desc>
                        <fhir fid="MedicationKnowledge.kinetics.lethalDose50" definition="The median lethal dose of a drug.">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="halfLifePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time required for concentration in the body to decrease by half</desc>
                        <fhir fid="MedicationKnowledge.kinetics.halfLifePeriod" definition="The time required for any specified property (e.g., the concentration of a substance in the body) to decrease by half.">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.81" name="MedicationRequest" displayName="MedicationRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicationRequest">
            <desc language="en-US">An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow
                patterns.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicationRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="script10.6" uri="http://ncpdp.org/SCRIPT10_6" name="Mapping to NCPDP SCRIPT 10.6"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="MedicationRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Ordering of medication for patient or group</desc>
                <fhir fid="MedicationRequest"
                    definition="An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &#34;MedicationRequest&#34; rather than &#34;MedicationPrescription&#34; or &#34;MedicationOrder&#34; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="script10.6" map="Message/Body/NewRx"/>
                    <mapping identity="rim" map="CombinedMedicationRequest"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External ids for this request</desc>
                    <fhir fid="MedicationRequest.identifier"
                        definition="Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="script10.6" map="Message/Header/PrescriberOrderNumber"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC-2-Placer Order Number / ORC-3-Filler Order Number"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown</desc>
                    <fhir fid="MedicationRequest.status" definition="A code specifying the current state of the order.  Generally, this will be active or completed state." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medicationrequest  status" strength="required" description="A coded concept specifying the state of the prescribing event. Describes the lifecycle of the prescription." valueSet="2.16.840.1.113883.4.642.3.1320" canonicalUri="http://hl7.org/fhir/ValueSet/medicationrequest-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="MedicationRequest.statusReason" definition="Captures the reason for the current state of the MedicationRequest." comment="This is generally only used for &#34;exception&#34; statuses such as &#34;suspended&#34; or &#34;cancelled&#34;. The reason why the MedicationRequest was created at all is captured in reasonCode, not here.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication request  status  reason  codes" strength="example" description="Identifies the reasons for a given status." valueSet="2.16.840.1.113883.4.642.3.1324" canonicalUri="http://hl7.org/fhir/ValueSet/medicationrequest-status-reason"/>
                        <mapping identity="workflow" map="Request.statusReason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="MedicationRequest.intent" definition="Whether the request is a proposal, plan, or an original order."
                        comment="It is expected that the type of requester will be restricted for different stages of a MedicationRequest.  For example, Proposals can be created by a patient, relatedPerson, Practitioner or Device.  Plans can be created by Practitioners, Patients, RelatedPersons and Devices.  Original orders can be created by a Practitioner only.&#xD;&#xD;An instance-order is an instantiation of a request or order and may be used to populate Medication Administration Record.&#xD;&#xD;This element is labeled as a modifier because the intent alters when and how the resource is actually applicable."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication request  intent" strength="required" description="The kind of medication order." valueSet="2.16.840.1.113883.4.642.3.1321" canonicalUri="http://hl7.org/fhir/ValueSet/medicationrequest-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of medication usage</desc>
                    <fhir fid="MedicationRequest.category" definition="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." comment="The category can be used to include where the medication is expected to be consumed or other types of requests.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication request  category  codes" strength="example" description="A coded concept identifying the category of medication request.  For example, where the medication is to be consumed or administered, or the type of medication treatment." valueSet="2.16.840.1.113883.4.642.3.1322" canonicalUri="http://hl7.org/fhir/ValueSet/medicationrequest-category"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Directions&#xD;&#xD;or &#xD;&#xD;Message/Body/NewRx/MedicationPrescribed/StructuredSIG"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&#34;type of medication usage&#34;].value"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="MedicationRequest.priority" definition="Indicates how quickly the Medication Request should be addressed with respect to other requests." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">True if request is prohibiting action</desc>
                    <fhir fid="MedicationRequest.doNotPerform" definition="If true indicates that the provider is asking for the medication request not to occur." comment="If do not perform is not specified, the request is a positive request e.g. &#34;do perform&#34;." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="rim" map="SubstanceAdministration.actionNegationInd"/>
                    </fhir>
                </element>
                <choice name="reported[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reported rather than primary record</desc>
                    <fhir fid="MedicationRequest.reported[x]" definition="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report." isSummary="true">
                        <type value="boolean"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=INF].role"/>
                    </fhir>
                    <element name="reportedBoolean">
                        <fhir fid="MedicationRequest.reportedBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="reportedReference">
                        <fhir fid="MedicationRequest.reportedReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Medication to be taken</desc>
                    <fhir fid="MedicationRequest.medication[x]" definition="Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications."
                        comment="If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the Medication resource is recommended.  For example, if you require form or lot number or if the medication is compounded or extemporaneously prepared, then you must reference the Medication resource." isSummary="true">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="A coded concept identifying substance or product that can be ordered." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="script10.6"
                            map="Message/Body/NewRx/MedicationPrescribed&#xD;&#xD;Medication.code.coding.code = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCode&#xD;&#xD;Medication.code.coding.system = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCodeQualifier&#xD;&#xD;Medication.code.coding.display = Message/Body/NewRx/MedicationPrescribed/DrugDescription"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="RXE-2-Give Code / RXO-1-Requested Give Code / RXC-2-Component Code"/>
                        <mapping identity="rim" map="consumable.administrableMedication"/>
                    </fhir>
                    <element name="medicationCodeableConcept">
                        <fhir fid="MedicationRequest.medicationCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="medicationReference">
                        <fhir fid="MedicationRequest.medicationReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </fhir>
                    </element>
                </choice>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who or group medication request is for</desc>
                    <fhir fid="MedicationRequest.subject" definition="A link to a resource representing the person or set of individuals to whom the medication will be given." comment="The subject on a medication request is mandatory.  For the secondary use case where the actual subject is not provided, there still must be an anonymized subject specified." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/Patient&#xD;&#xD;(need detail to link to specific patient … Patient.Identification in SCRIPT)"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of encounter/admission/stay</desc>
                    <fhir fid="MedicationRequest.encounter" definition="The Encounter during which this [x] was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.&#34;    If there is a need to link to episodes of care they will be handled with an extension.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.context"/>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19-Visit Number"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&#34;type of encounter or episode&#34;]"/>
                    </fhir>
                </element>
                <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information to support ordering of the medication</desc>
                    <fhir fid="MedicationRequest.supportingInformation" definition="Include additional information (for example, patient height and weight) that supports the ordering of the medication.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]"/>
                    </fhir>
                </element>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When request was initially authored</desc>
                    <fhir fid="MedicationRequest.authoredOn" definition="The date (and perhaps time) when the prescription was initially written or authored on." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/WrittenDate"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="RXE-32-Original Order Date/Time / ORC-9-Date/Time of Transaction"/>
                        <mapping identity="rim" map="author.time"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/What requested the Request</desc>
                    <fhir fid="MedicationRequest.requester" definition="The individual, organization, or device that initiated the request and has responsibility for its activation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Intended performer of administration</desc>
                    <fhir fid="MedicationRequest.performer" definition="The specified desired performer of the medication treatment (e.g. the performer of the medication administration).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="performerType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Desired kind of performer of the medication administration</desc>
                    <fhir fid="MedicationRequest.performerType" definition="Indicates the type of performer of the administration of the medication." comment="If specified without indicating a performer, this indicates that the performer must be of the specified type. If specified with a performer then it indicates the requirements of the performer if the designated performer is not available."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Performer Role Codes" strength="example" description="Identifies the type of individual that is desired to administer the medication." valueSet="2.16.840.1.113883.4.642.3.433" canonicalUri="http://hl7.org/fhir/ValueSet/performer-role"/>
                        <mapping identity="workflow" map="Request.performerType"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=KIND].code"/>
                    </fhir>
                </element>
                <element name="recorder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person who entered the request</desc>
                    <fhir fid="MedicationRequest.recorder" definition="The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.who"/>
                        <mapping identity="rim" map=".participation[typeCode=TRANS].role[classCode=ASSIGNED].code (HealthcareProviderType)"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason or indication for ordering or not ordering the medication</desc>
                    <fhir fid="MedicationRequest.reasonCode" definition="The reason or the indication for ordering or not ordering the medication." comment="This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonReference.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="A coded concept indicating why the medication was ordered." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Diagnosis/Primary/Value"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC-16-Order Control Code Reason /RXE-27-Give Indication/RXO-20-Indication / RXD-21-Indication / RXG-22-Indication / RXA-19-Indication"/>
                        <mapping identity="rim" map="reason.observation.reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Condition or observation that supports why the prescription is being written</desc>
                    <fhir fid="MedicationRequest.reasonReference" definition="Condition or observation that supports why the medication was ordered." comment="This is a reference to a condition or observation that is the reason for the medication order.  If only a code exists, use reasonCode.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="script10.6" map="no mapping"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map="reason.observation[code=ASSERTION].value"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="MedicationRequest.instantiatesCanonical" definition="The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest." isSummary="true">
                        <type value="canonical"/>
                        <mapping identity="workflow" map="Request.instantiates"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="MedicationRequest.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What request fulfills</desc>
                    <fhir fid="MedicationRequest.basedOn" definition="A plan or request that is fulfilled in whole or in part by this medication request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=SBADM or PROC or PCPR or OBS, moodCode=RQO orPLAN or PRP]"/>
                    </fhir>
                </element>
                <element name="groupIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Composite request this is part of</desc>
                    <fhir fid="MedicationRequest.groupIdentifier" definition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription."
                        requirements="Requests are linked either by a &#34;basedOn&#34; relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                        <mapping identity="rim" map=".outboundRelationship(typeCode=COMP].target[classCode=SBADM, moodCode=INT].id"/>
                    </fhir>
                </element>
                <element name="courseOfTherapyType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Overall pattern of medication administration</desc>
                    <fhir fid="MedicationRequest.courseOfTherapyType" definition="The description of the overall patte3rn of the administration of the medication to the patient." comment="This attribute should not be confused with the protocol of the medication.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication request  course of  therapy  codes" strength="example" description="Identifies the overall pattern of medication administratio." valueSet="2.16.840.1.113883.4.642.3.1326" canonicalUri="http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy"/>
                        <mapping identity="rim" map="Act.code where classCode = LIST and moodCode = EVN"/>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated insurance coverage</desc>
                    <fhir fid="MedicationRequest.insurance" definition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                        </type>
                        <mapping identity="workflow" map="Request.insurance"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COVBY].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the prescription</desc>
                    <fhir fid="MedicationRequest.note" definition="Extra information about the prescription that could not be conveyed by the other attributes.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Note"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="dosageInstruction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">How the medication should be taken</desc>
                    <fhir fid="MedicationRequest.dosageInstruction" definition="Indicates how the medication is to be used by the patient."
                        comment="There are examples where a medication request may include the option of an oral dose or an Intravenous or Intramuscular dose.  For example, &#34;Ondansetron 8mg orally or IV twice a day as needed for nausea&#34; or &#34;Compazine® (prochlorperazine) 5-10mg PO or 25mg PR bid prn nausea or vomiting&#34;.  In these cases, two medication requests would be created that could be grouped together.  The decision on which dose and route of administration to use is based on the patient's condition at the time the dose is needed.">
                        <type value="Dosage"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="rim" map="see dosageInstruction mapping"/>
                    </fhir>
                </element>
                <element name="dispenseRequest" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Medication supply authorization</desc>
                    <fhir fid="MedicationRequest.dispenseRequest"
                        definition="Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order).  Note that this information is not always sent with the order.  There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department.">
                        <type value="BackboneElement"/>
                        <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/ExpirationDate"/>
                        <mapping identity="rim" map="component.supplyEvent"/>
                    </fhir>
                    <element name="initialFill" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">First fill details</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.initialFill" definition="Indicates the quantity or duration for the first dispense of the medication." comment="If populating this element, either the quantity or the duration must be included.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="SubstanceAdministration -&gt; ActRelationship[sequenceNumber = '1'] -&gt; Supply"/>
                        </fhir>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">First fill quantity</desc>
                            <fhir fid="MedicationRequest.dispenseRequest.initialFill.quantity" definition="The amount or quantity to provide as part of the first dispense.">
                                <type value="Quantity"/>
                                <mapping identity="rim" map="Supply.quantity[moodCode=RQO]"/>
                            </fhir>
                        </element>
                        <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">First fill duration</desc>
                            <fhir fid="MedicationRequest.dispenseRequest.initialFill.duration" definition="The length of time that the first dispense is expected to last.">
                                <type value="Duration"/>
                                <mapping identity="rim" map="Supply.effectivetime[moodCode=RQO]"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="dispenseInterval" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Minimum period of time between dispenses</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.dispenseInterval" definition="The minimum period of time that must occur between dispenses of the medication.">
                            <type value="Duration"/>
                            <mapping identity="rim" map="Supply.effectivetime[moodCode=RQO]"/>
                        </fhir>
                    </element>
                    <element name="validityPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Time period supply is authorized for</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.validityPeriod" definition="This indicates the validity period of a prescription (stale dating the Prescription)."
                            comment="It reflects the prescribers' perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations."
                            requirements="Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription.">
                            <type value="Period"/>
                            <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Refills"/>
                            <mapping identity="rim" map="effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="numberOfRepeatsAllowed" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Number of refills authorized</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed"
                            definition="An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus &#34;3 repeats&#34;, then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.  A prescriber may explicitly say that zero refills are permitted after the initial dispense."
                            comment="If displaying &#34;number of authorized fills&#34;, add 1 to this number.">
                            <type value="unsignedInt"/>
                            <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Quantity"/>
                            <mapping identity="v2" map="RXE-12-Number of Refills"/>
                            <mapping identity="rim" map="repeatNumber"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount of medication to supply per dispense</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.quantity" definition="The amount that is to be dispensed for one fill.">
                            <type value="Quantity"/>
                            <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/DaysSupply"/>
                            <mapping identity="v2" map="RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense Units.name of coding system"/>
                            <mapping identity="rim" map="quantity"/>
                        </fhir>
                    </element>
                    <element name="expectedSupplyDuration" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Number of days supply per dispense</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.expectedSupplyDuration" definition="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last."
                            comment="In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage). When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors.">
                            <type value="Duration"/>
                            <mapping identity="script10.6" map="Message/Body/NewRx/MedicationPrescribed/Substitutions"/>
                            <mapping identity="rim" map="expectedUseTime"/>
                        </fhir>
                    </element>
                    <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Intended dispenser</desc>
                        <fhir fid="MedicationRequest.dispenseRequest.performer" definition="Indicates the intended dispensing Organization specified by the prescriber.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.who"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=SPLY, moodCode=RQO] .participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                        </fhir>
                    </element>
                </element>
                <element name="substitution" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Any restrictions on medication substitution</desc>
                    <fhir fid="MedicationRequest.substitution" definition="Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done.">
                        <type value="BackboneElement"/>
                        <mapping identity="script10.6" map="specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions"/>
                        <mapping identity="rim" map="subjectOf.substitutionPersmission"/>
                    </fhir>
                    <choice name="allowed[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether substitution is allowed or not</desc>
                        <fhir fid="MedicationRequest.substitution.allowed[x]" definition="True if the prescriber allows a different drug to be dispensed from what was prescribed." comment="This element is labeled as a modifier because whether substitution is allow or not, it cannot be ignored.">
                            <type value="boolean"/>
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetActSubstanceAdminSubstitutionCode" strength="example" description="Identifies the type of substitution allowed." valueSet="2.16.840.1.113883.1.11.16621" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode"/>
                            <mapping identity="script10.6" map="specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions"/>
                            <mapping identity="v2" map="RXO-9-Allow Substitutions / RXE-9-Substitution Status"/>
                            <mapping identity="rim" map="code"/>
                        </fhir>
                        <element name="allowedBoolean">
                            <fhir fid="MedicationRequest.substitution.allowedBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="allowedCodeableConcept">
                            <fhir fid="MedicationRequest.substitution.allowedCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Why should (not) substitution be made</desc>
                        <fhir fid="MedicationRequest.substitution.reason" definition="Indicates the reason for the substitution, or why substitution must or must not be performed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="V3 Value SetSubstanceAdminSubstitutionReason" strength="example" description="A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed." valueSet="2.16.840.1.113883.1.11.19377" canonicalUri="http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason"/>
                            <mapping identity="script10.6" map="not mapped"/>
                            <mapping identity="v2" map="RXE-9 Substition status"/>
                            <mapping identity="rim" map="reasonCode"/>
                        </fhir>
                    </element>
                </element>
                <element name="priorPrescription" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">An order/prescription that is being replaced</desc>
                    <fhir fid="MedicationRequest.priorPrescription" definition="A link to a resource representing an earlier order related order or prescription.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                        <mapping identity="script10.6" map="not mapped"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=?RPLC or ?SUCC]/target[classCode=SBADM,moodCode=RQO]"/>
                    </fhir>
                </element>
                <element name="detectedIssue" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical Issue with action</desc>
                    <fhir fid="MedicationRequest.detectedIssue" definition="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc."
                        comment="This element can include a detected issue that has been identified either by a decision support system or by a clinician and may include information on the steps that were taken to address the issue.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DetectedIssue"/>
                        </type>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=ALRT,moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="eventHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A list of events of interest in the lifecycle</desc>
                    <fhir fid="MedicationRequest.eventHistory" definition="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource."
                        comment="This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="workflow" map="Request.relevantHistory"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.82" name="MedicationStatement" displayName="MedicationStatement" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicationStatement">
            <desc language="en-US">A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common
                scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration
                is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this
                medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not
                missing detailed information.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicationStatement" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="MedicationStatement" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Record of medication being taken by a patient</desc>
                <fhir fid="MedicationStatement"
                    definition="A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. &#xA;&#xA;The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information."
                    comment="When interpreting a medicationStatement, the value of the status and NotTaken needed to be considered:&#xD;MedicationStatement.status + MedicationStatement.wasNotTaken&#xD;Status=Active + NotTaken=T = Not currently taking&#xD;Status=Completed + NotTaken=T = Not taken in the past&#xD;Status=Intended + NotTaken=T = No intention of taking&#xD;Status=Active + NotTaken=F = Taking, but not as prescribed&#xD;Status=Active + NotTaken=F = Taking&#xD;Status=Intended +NotTaken= F = Will be taking (not started)&#xD;Status=Completed + NotTaken=F = Taken in past&#xD;Status=In Error + NotTaken=N/A = In Error.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="SubstanceAdministration"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifier</desc>
                    <fhir fid="MedicationStatement.identifier"
                        definition="Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server."
                        comment="This is a business identifier, not a resource identifier." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfils plan, proposal or order</desc>
                    <fhir fid="MedicationStatement.basedOn" definition="A plan, proposal or order that is fulfilled in whole or in part by this event." requirements="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=SBADM or PROC or PCPR or OBS, moodCode=RQO orPLAN or PRP]"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="MedicationStatement.partOf" definition="A larger event of which this particular event is a component or step." requirements="This should not be used when indicating which resource a MedicationStatement has been derived from.  If that is the use case, then MedicationStatement.derivedFrom should be used." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP]/target[classCode=SPLY or SBADM or PROC or OBS,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | completed | entered-in-error | intended | stopped | on-hold | unknown | not-taken</desc>
                    <fhir fid="MedicationStatement.status" definition="A code representing the patient or other source's judgment about the state of the medication used that this statement is about.  Generally, this will be active or completed."
                        comment="MedicationStatement is a statement at a point in time.  The status is only representative at the point when it was asserted.  The value set for MedicationStatement.status contains codes that assert the status of the use of the medication by the patient (for example, stopped or on hold) as well as codes that assert the status of the medication statement itself (for example, entered in error).&#xD;&#xD;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Medication  status  codes" strength="required" description="A coded concept indicating the current status of a MedicationStatement." valueSet="2.16.840.1.113883.4.642.3.367" canonicalUri="http://hl7.org/fhir/ValueSet/medication-statement-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="MedicationStatement.statusReason" definition="Captures the reason for the current state of the MedicationStatement." comment="This is generally only used for &#34;exception&#34; statuses such as &#34;not-taken&#34;, &#34;on-hold&#34;, &#34;cancelled&#34; or &#34;entered-in-error&#34;. The reason for performing the event at all is captured in reasonCode, not here.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Drug Therapy Status codes " strength="example" description="A coded concept indicating the reason for the status of the statement." valueSet="2.16.840.1.113883.4.642.3.369" canonicalUri="http://hl7.org/fhir/ValueSet/reason-medication-status-codes"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of medication usage</desc>
                    <fhir fid="MedicationStatement.category" definition="Indicates where the medication is expected to be consumed or administered." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Medication usage category codes" strength="preferred" description="A coded concept identifying where the medication included in the MedicationStatement is expected to be consumed or administered." valueSet="2.16.840.1.113883.4.642.3.370" canonicalUri="http://hl7.org/fhir/ValueSet/medication-statement-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&#34;type of medication usage&#34;].value"/>
                    </fhir>
                </element>
                <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What medication was taken</desc>
                    <fhir fid="MedicationStatement.medication[x]" definition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications."
                        comment="If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the medication resource is recommended.  For example, if you require form or lot number, then you must reference the Medication resource." isSummary="true">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                        <binding displayName="SNOMED CT Medication Codes" strength="example" description="A coded concept identifying the substance or product being taken." valueSet="2.16.840.1.113883.4.642.3.375" canonicalUri="http://hl7.org/fhir/ValueSet/medication-codes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=ADMM or MANU]"/>
                    </fhir>
                    <element name="medicationCodeableConcept">
                        <fhir fid="MedicationStatement.medicationCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="medicationReference">
                        <fhir fid="MedicationStatement.medicationReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </fhir>
                    </element>
                </choice>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who is/was taking the medication</desc>
                    <fhir fid="MedicationStatement.subject" definition="The person, animal or group who is/was taking the medication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=PAT]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter / Episode associated with MedicationStatement</desc>
                    <fhir fid="MedicationStatement.context" definition="The encounter or episode of care that establishes the context for this MedicationStatement." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&#34;type of encounter or episode&#34;]"/>
                    </fhir>
                </element>
                <choice name="effective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date/time or interval when the medication is/was/will be taken</desc>
                    <fhir fid="MedicationStatement.effective[x]" definition="The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationStatement.taken element is No)."
                        comment="This attribute reflects the period over which the patient consumed the medication and is expected to be populated on the majority of Medication Statements. If the medication is still being taken at the time the statement is recorded, the &#34;end&#34; date will be omitted.  The date/time attribute supports a variety of dates - year, year/month and exact date.  If something more than this is required, this should be conveyed as text."
                        isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="effectiveDateTime">
                        <fhir fid="MedicationStatement.effectiveDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="effectivePeriod">
                        <fhir fid="MedicationStatement.effectivePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="dateAsserted" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the statement was asserted?</desc>
                    <fhir fid="MedicationStatement.dateAsserted" definition="The date when the medication statement was asserted by the information source." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="informationSource" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person or organization that provided the information about the taking of this medication</desc>
                    <fhir fid="MedicationStatement.informationSource" definition="The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role[classCode=PAT, or codes for Practioner or Related Person (if PAT is the informer, then syntax for self-reported =true)"/>
                    </fhir>
                </element>
                <element name="derivedFrom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional supporting information</desc>
                    <fhir fid="MedicationStatement.derivedFrom" definition="Allows linking the MedicationStatement to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationStatement."
                        comment="Likely references would be to MedicationRequest, MedicationDispense, Claim, Observation or QuestionnaireAnswers.  The most common use cases for deriving a MedicationStatement comes from creating a MedicationStatement from a MedicationRequest or from a lab observation or a claim.  it should be noted that the amount of information that is available varies from the type resource that you derive the MedicationStatement from.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SPRT]/target[classCode=ACT,moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason for why the medication is being/was taken</desc>
                    <fhir fid="MedicationStatement.reasonCode" definition="A reason for why the medication is being/was taken." comment="This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonForUseReference.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="A coded concept identifying why the medication is being taken." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Condition or observation that supports why the medication is being/was taken</desc>
                    <fhir fid="MedicationStatement.reasonReference" definition="Condition or observation that supports why the medication is being/was taken." comment="This is a reference to a condition that is the reason why the medication is being/was taken.  If only a code exists, use reasonForUseCode.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON]/target[classCode=OBS,moodCode=EVN, code=&#34;reason for use&#34;].value"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Further information about the statement</desc>
                    <fhir fid="MedicationStatement.note" definition="Provides extra information about the medication statement that is not conveyed by the other attributes.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="dosage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Details of how medication is/was taken or should be taken</desc>
                    <fhir fid="MedicationStatement.dosage" definition="Indicates how the medication is/was or should be taken by the patient."
                        comment="The dates included in the dosage on a Medication Statement reflect the dates for a given dose.  For example, &#34;from November 1, 2016 to November 3, 2016, take one tablet daily and from November 4, 2016 to November 7, 2016, take two tablets daily.&#34;  It is expected that this specificity may only be populated where the patient brings in their labeled container or where the Medication Statement is derived from a MedicationRequest.">
                        <type value="Dosage"/>
                        <mapping identity="rim" map="refer dosageInstruction mapping"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.83" name="MedicinalProduct" displayName="MedicinalProduct" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProduct">
            <desc language="en-US">Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProduct" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProduct" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use)</desc>
                <fhir fid="MedicinalProduct" definition="Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use)."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier for this product. Could be an MPID</desc>
                    <fhir fid="MedicinalProduct.identifier" definition="Business identifier for this product. Could be an MPID." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Regulatory type, e.g. Investigational or Authorized</desc>
                    <fhir fid="MedicinalProduct.type" definition="Regulatory type, e.g. Investigational or Authorized." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="domain" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If this medicine applies to human or veterinary uses</desc>
                    <fhir fid="MedicinalProduct.domain" definition="If this medicine applies to human or veterinary uses." isSummary="true">
                        <type value="Coding"/>
                    </fhir>
                </element>
                <element name="combinedPharmaceuticalDoseForm" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The dose form for a single part product, or combined form of a multiple part product</desc>
                    <fhir fid="MedicinalProduct.combinedPharmaceuticalDoseForm" definition="The dose form for a single part product, or combined form of a multiple part product." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="legalStatusOfSupply" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The legal status of supply of the medicinal product as classified by the regulator</desc>
                    <fhir fid="MedicinalProduct.legalStatusOfSupply" definition="The legal status of supply of the medicinal product as classified by the regulator." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="additionalMonitoringIndicator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether the Medicinal Product is subject to additional monitoring for regulatory reasons</desc>
                    <fhir fid="MedicinalProduct.additionalMonitoringIndicator" definition="Whether the Medicinal Product is subject to additional monitoring for regulatory reasons." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="specialMeasures" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Whether the Medicinal Product is subject to special measures for regulatory reasons</desc>
                    <fhir fid="MedicinalProduct.specialMeasures" definition="Whether the Medicinal Product is subject to special measures for regulatory reasons." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="paediatricUseIndicator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If authorised for use in children</desc>
                    <fhir fid="MedicinalProduct.paediatricUseIndicator" definition="If authorised for use in children." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="productClassification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Allows the product to be classified by various systems</desc>
                    <fhir fid="MedicinalProduct.productClassification" definition="Allows the product to be classified by various systems." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="marketingStatus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Marketing status of the medicinal product, in contrast to marketing authorizaton</desc>
                    <fhir fid="MedicinalProduct.marketingStatus" definition="Marketing status of the medicinal product, in contrast to marketing authorizaton." isSummary="true">
                        <type value="MarketingStatus"/>
                    </fhir>
                </element>
                <element name="pharmaceuticalProduct" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Pharmaceutical aspects of product</desc>
                    <fhir fid="MedicinalProduct.pharmaceuticalProduct" definition="Pharmaceutical aspects of product." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductPharmaceutical"/>
                        </type>
                    </fhir>
                </element>
                <element name="packagedMedicinalProduct" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Package representation for the product</desc>
                    <fhir fid="MedicinalProduct.packagedMedicinalProduct" definition="Package representation for the product." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductPackaged"/>
                        </type>
                    </fhir>
                </element>
                <element name="attachedDocument" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting documentation, typically for regulatory submission</desc>
                    <fhir fid="MedicinalProduct.attachedDocument" definition="Supporting documentation, typically for regulatory submission." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <element name="masterFile" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A master file for to the medicinal product (e.g. Pharmacovigilance System Master File)</desc>
                    <fhir fid="MedicinalProduct.masterFile" definition="A master file for to the medicinal product (e.g. Pharmacovigilance System Master File)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A product specific contact, person (in a role), or an organization</desc>
                    <fhir fid="MedicinalProduct.contact" definition="A product specific contact, person (in a role), or an organization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                    </fhir>
                </element>
                <element name="clinicalTrial" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Clinical trials or studies that this product is involved in</desc>
                    <fhir fid="MedicinalProduct.clinicalTrial" definition="Clinical trials or studies that this product is involved in." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/>
                        </type>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">The product's name, including full name and possibly coded parts</desc>
                    <fhir fid="MedicinalProduct.name" definition="The product's name, including full name and possibly coded parts." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="productName" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The full product name</desc>
                        <fhir fid="MedicinalProduct.name.productName" definition="The full product name." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="namePart" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Coding words or phrases of the name</desc>
                        <fhir fid="MedicinalProduct.name.namePart" definition="Coding words or phrases of the name." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="part" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">A fragment of a product name</desc>
                            <fhir fid="MedicinalProduct.name.namePart.part" definition="A fragment of a product name." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Idenifying type for this part of the name (e.g. strength part)</desc>
                            <fhir fid="MedicinalProduct.name.namePart.type" definition="Idenifying type for this part of the name (e.g. strength part)." isSummary="true">
                                <type value="Coding"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="countryLanguage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Country where the name applies</desc>
                        <fhir fid="MedicinalProduct.name.countryLanguage" definition="Country where the name applies." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="country" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Country code for where this name applies</desc>
                            <fhir fid="MedicinalProduct.name.countryLanguage.country" definition="Country code for where this name applies." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Jurisdiction code for where this name applies</desc>
                            <fhir fid="MedicinalProduct.name.countryLanguage.jurisdiction" definition="Jurisdiction code for where this name applies." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="language" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Language code for this name</desc>
                            <fhir fid="MedicinalProduct.name.countryLanguage.language" definition="Language code for this name." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="crossReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reference to another product, e.g. for linking authorised to investigational product</desc>
                    <fhir fid="MedicinalProduct.crossReference" definition="Reference to another product, e.g. for linking authorised to investigational product." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="manufacturingBusinessOperation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An operation applied to the product, for manufacturing or adminsitrative purpose</desc>
                    <fhir fid="MedicinalProduct.manufacturingBusinessOperation" definition="An operation applied to the product, for manufacturing or adminsitrative purpose." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="operationType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of manufacturing operation</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.operationType" definition="The type of manufacturing operation." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="authorisationReferenceNumber" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Regulatory authorization reference number</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.authorisationReferenceNumber" definition="Regulatory authorization reference number." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="effectiveDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Regulatory authorization date</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.effectiveDate" definition="Regulatory authorization date." isSummary="true">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="confidentialityIndicator" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">To indicate if this proces is commercially confidential</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.confidentialityIndicator" definition="To indicate if this proces is commercially confidential." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The manufacturer or establishment associated with the process</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.manufacturer" definition="The manufacturer or establishment associated with the process." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="regulator" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A regulator which oversees the operation</desc>
                        <fhir fid="MedicinalProduct.manufacturingBusinessOperation.regulator" definition="A regulator which oversees the operation." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="specialDesignation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Indicates if the medicinal product has an orphan designation for the treatment of a rare disease</desc>
                    <fhir fid="MedicinalProduct.specialDesignation" definition="Indicates if the medicinal product has an orphan designation for the treatment of a rare disease." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Identifier for the designation, or procedure number</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.identifier" definition="Identifier for the designation, or procedure number." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of special designation, e.g. orphan drug, minor use</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.type" definition="The type of special designation, e.g. orphan drug, minor use." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="intendedUse" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The intended use of the product, e.g. prevention, treatment</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.intendedUse" definition="The intended use of the product, e.g. prevention, treatment." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <choice name="indication[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Condition for which the medicinal use applies</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.indication[x]" definition="Condition for which the medicinal use applies." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductIndication"/>
                            </type>
                        </fhir>
                        <element name="indicationCodeableConcept">
                            <fhir fid="MedicinalProduct.specialDesignation.indicationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="indicationReference">
                            <fhir fid="MedicinalProduct.specialDesignation.indicationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductIndication"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">For example granted, pending, expired or withdrawn</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.status" definition="For example granted, pending, expired or withdrawn." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date when the designation was granted</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.date" definition="Date when the designation was granted." isSummary="true">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="species" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Animal species for which this applies</desc>
                        <fhir fid="MedicinalProduct.specialDesignation.species" definition="Animal species for which this applies." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.84" name="MedicinalProductAuthorization" displayName="MedicinalProductAuthorization" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization">
            <desc language="en-US">The regulatory authorization of a medicinal product.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductAuthorization" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductAuthorization" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The regulatory authorization of a medicinal product</desc>
                <fhir fid="MedicinalProductAuthorization" definition="The regulatory authorization of a medicinal product."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier for the marketing authorization, as assigned by a regulator</desc>
                    <fhir fid="MedicinalProductAuthorization.identifier" definition="Business identifier for the marketing authorization, as assigned by a regulator." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The medicinal product that is being authorized</desc>
                    <fhir fid="MedicinalProductAuthorization.subject" definition="The medicinal product that is being authorized." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductPackaged"/>
                        </type>
                    </fhir>
                </element>
                <element name="country" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The country in which the marketing authorization has been granted</desc>
                    <fhir fid="MedicinalProductAuthorization.country" definition="The country in which the marketing authorization has been granted." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Jurisdiction within a country</desc>
                    <fhir fid="MedicinalProductAuthorization.jurisdiction" definition="Jurisdiction within a country." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The status of the marketing authorization</desc>
                    <fhir fid="MedicinalProductAuthorization.status" definition="The status of the marketing authorization." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="statusDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date at which the given status has become applicable</desc>
                    <fhir fid="MedicinalProductAuthorization.statusDate" definition="The date at which the given status has become applicable." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="restoreDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored</desc>
                    <fhir fid="MedicinalProductAuthorization.restoreDate" definition="The date when a suspended the marketing or the marketing authorization of the product is anticipated to be restored." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="validityPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format</desc>
                    <fhir fid="MedicinalProductAuthorization.validityPeriod" definition="The beginning of the time period in which the marketing authorization is in the specific status shall be specified A complete date consisting of day, month and year shall be specified using the ISO 8601 date format." isSummary="true">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="dataExclusivityPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A period of time after authorization before generic product applicatiosn can be submitted</desc>
                    <fhir fid="MedicinalProductAuthorization.dataExclusivityPeriod" definition="A period of time after authorization before generic product applicatiosn can be submitted." isSummary="true">
                        <type value="Period"/>
                    </fhir>
                </element>
                <element name="dateOfFirstAuthorization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date when the first authorization was granted by a Medicines Regulatory Agency</desc>
                    <fhir fid="MedicinalProductAuthorization.dateOfFirstAuthorization" definition="The date when the first authorization was granted by a Medicines Regulatory Agency." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="internationalBirthDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date of first marketing authorization for a company's new medicinal product in any country in the World</desc>
                    <fhir fid="MedicinalProductAuthorization.internationalBirthDate" definition="Date of first marketing authorization for a company's new medicinal product in any country in the World." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="legalBasis" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The legal framework against which this authorization is granted</desc>
                    <fhir fid="MedicinalProductAuthorization.legalBasis" definition="The legal framework against which this authorization is granted." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="jurisdictionalAuthorization" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Authorization in areas within a country</desc>
                    <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization" definition="Authorization in areas within a country." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The assigned number for the marketing authorization</desc>
                        <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization.identifier" definition="The assigned number for the marketing authorization." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="country" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Country of authorization</desc>
                        <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization.country" definition="Country of authorization." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Jurisdiction within a country</desc>
                        <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization.jurisdiction" definition="Jurisdiction within a country." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="legalStatusOfSupply" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The legal status of supply in a jurisdiction or region</desc>
                        <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization.legalStatusOfSupply" definition="The legal status of supply in a jurisdiction or region." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="validityPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The start and expected end date of the authorization</desc>
                        <fhir fid="MedicinalProductAuthorization.jurisdictionalAuthorization.validityPeriod" definition="The start and expected end date of the authorization." isSummary="true">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
                <element name="holder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Marketing Authorization Holder</desc>
                    <fhir fid="MedicinalProductAuthorization.holder" definition="Marketing Authorization Holder." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="regulator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Medicines Regulatory Agency</desc>
                    <fhir fid="MedicinalProductAuthorization.regulator" definition="Medicines Regulatory Agency." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="procedure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The regulatory procedure for granting or amending a marketing authorization</desc>
                    <fhir fid="MedicinalProductAuthorization.procedure" definition="The regulatory procedure for granting or amending a marketing authorization." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifier for this procedure</desc>
                        <fhir fid="MedicinalProductAuthorization.procedure.identifier" definition="Identifier for this procedure." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of procedure</desc>
                        <fhir fid="MedicinalProductAuthorization.procedure.type" definition="Type of procedure." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <choice name="date[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date of procedure</desc>
                        <fhir fid="MedicinalProductAuthorization.procedure.date[x]" definition="Date of procedure." isSummary="true">
                            <type value="Period"/>
                            <type value="dateTime"/>
                        </fhir>
                        <element name="datePeriod">
                            <fhir fid="MedicinalProductAuthorization.procedure.datePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="dateDateTime">
                            <fhir fid="MedicinalProductAuthorization.procedure.dateDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="application" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applcations submitted to obtain a marketing authorization</desc>
                        <fhir fid="MedicinalProductAuthorization.procedure.application" definition="Applcations submitted to obtain a marketing authorization." isSummary="true"/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.85" name="MedicinalProductContraindication" displayName="MedicinalProductContraindication" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductContraindication">
            <desc language="en-US">The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductContraindication" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductContraindication" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">MedicinalProductContraindication</desc>
                <fhir fid="MedicinalProductContraindication" definition="The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes."/>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The medication for which this is an indication</desc>
                    <fhir fid="MedicinalProductContraindication.subject" definition="The medication for which this is an indication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                    </fhir>
                </element>
                <element name="disease" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The disease, symptom or procedure for the contraindication</desc>
                    <fhir fid="MedicinalProductContraindication.disease" definition="The disease, symptom or procedure for the contraindication." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="diseaseStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The status of the disease or symptom for the contraindication</desc>
                    <fhir fid="MedicinalProductContraindication.diseaseStatus" definition="The status of the disease or symptom for the contraindication." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="comorbidity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A comorbidity (concurrent condition) or coinfection</desc>
                    <fhir fid="MedicinalProductContraindication.comorbidity" definition="A comorbidity (concurrent condition) or coinfection." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="therapeuticIndication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the use of the medicinal product in relation to other therapies as part of the indication</desc>
                    <fhir fid="MedicinalProductContraindication.therapeuticIndication" definition="Information about the use of the medicinal product in relation to other therapies as part of the indication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductIndication"/>
                        </type>
                    </fhir>
                </element>
                <element name="otherTherapy" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the use of the medicinal product in relation to other therapies described as part of the indication</desc>
                    <fhir fid="MedicinalProductContraindication.otherTherapy" definition="Information about the use of the medicinal product in relation to other therapies described as part of the indication." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="therapyRelationshipType" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The type of relationship between the medicinal product indication or contraindication and another therapy</desc>
                        <fhir fid="MedicinalProductContraindication.otherTherapy.therapyRelationshipType" definition="The type of relationship between the medicinal product indication or contraindication and another therapy." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication</desc>
                        <fhir fid="MedicinalProductContraindication.otherTherapy.medication[x]" definition="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </type>
                        </fhir>
                        <element name="medicationCodeableConcept">
                            <fhir fid="MedicinalProductContraindication.otherTherapy.medicationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="medicationReference">
                            <fhir fid="MedicinalProductContraindication.otherTherapy.medicationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The population group to which this applies</desc>
                    <fhir fid="MedicinalProductContraindication.population" definition="The population group to which this applies." isSummary="true">
                        <type value="Population"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.86" name="MedicinalProductIndication" displayName="MedicinalProductIndication" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductIndication">
            <desc language="en-US">Indication for the Medicinal Product.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductIndication" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductIndication" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">MedicinalProductIndication</desc>
                <fhir fid="MedicinalProductIndication" definition="Indication for the Medicinal Product."/>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The medication for which this is an indication</desc>
                    <fhir fid="MedicinalProductIndication.subject" definition="The medication for which this is an indication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                    </fhir>
                </element>
                <element name="diseaseSymptomProcedure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The disease, symptom or procedure that is the indication for treatment</desc>
                    <fhir fid="MedicinalProductIndication.diseaseSymptomProcedure" definition="The disease, symptom or procedure that is the indication for treatment." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="diseaseStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The status of the disease or symptom for which the indication applies</desc>
                    <fhir fid="MedicinalProductIndication.diseaseStatus" definition="The status of the disease or symptom for which the indication applies." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="comorbidity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comorbidity (concurrent condition) or co-infection as part of the indication</desc>
                    <fhir fid="MedicinalProductIndication.comorbidity" definition="Comorbidity (concurrent condition) or co-infection as part of the indication." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="intendedEffect" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The intended effect, aim or strategy to be achieved by the indication</desc>
                    <fhir fid="MedicinalProductIndication.intendedEffect" definition="The intended effect, aim or strategy to be achieved by the indication." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Timing or duration information as part of the indication</desc>
                    <fhir fid="MedicinalProductIndication.duration" definition="Timing or duration information as part of the indication." isSummary="true">
                        <type value="Quantity"/>
                    </fhir>
                </element>
                <element name="otherTherapy" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the use of the medicinal product in relation to other therapies described as part of the indication</desc>
                    <fhir fid="MedicinalProductIndication.otherTherapy" definition="Information about the use of the medicinal product in relation to other therapies described as part of the indication." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="therapyRelationshipType" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The type of relationship between the medicinal product indication or contraindication and another therapy</desc>
                        <fhir fid="MedicinalProductIndication.otherTherapy.therapyRelationshipType" definition="The type of relationship between the medicinal product indication or contraindication and another therapy." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <choice name="medication[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication</desc>
                        <fhir fid="MedicinalProductIndication.otherTherapy.medication[x]" definition="Reference to a specific medication (active substance, medicinal product or class of products) as part of an indication or contraindication." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </type>
                        </fhir>
                        <element name="medicationCodeableConcept">
                            <fhir fid="MedicinalProductIndication.otherTherapy.medicationCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="medicationReference">
                            <fhir fid="MedicinalProductIndication.otherTherapy.medicationReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="undesirableEffect" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Describe the undesirable effects of the medicinal product</desc>
                    <fhir fid="MedicinalProductIndication.undesirableEffect" definition="Describe the undesirable effects of the medicinal product." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductUndesirableEffect"/>
                        </type>
                    </fhir>
                </element>
                <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The population group to which this applies</desc>
                    <fhir fid="MedicinalProductIndication.population" definition="The population group to which this applies." isSummary="true">
                        <type value="Population"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.87" name="MedicinalProductIngredient" displayName="MedicinalProductIngredient" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductIngredient">
            <desc language="en-US">An ingredient of a manufactured item or pharmaceutical product.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductIngredient" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductIngredient" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An ingredient of a manufactured item or pharmaceutical product</desc>
                <fhir fid="MedicinalProductIngredient" definition="An ingredient of a manufactured item or pharmaceutical product."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifier for the ingredient</desc>
                    <fhir fid="MedicinalProductIngredient.identifier" definition="The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="role" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Ingredient role e.g. Active ingredient, excipient</desc>
                    <fhir fid="MedicinalProductIngredient.role" definition="Ingredient role e.g. Active ingredient, excipient." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="allergenicIndicator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If the ingredient is a known or suspected allergen</desc>
                    <fhir fid="MedicinalProductIngredient.allergenicIndicator" definition="If the ingredient is a known or suspected allergen." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Manufacturer of this Ingredient</desc>
                    <fhir fid="MedicinalProductIngredient.manufacturer" definition="Manufacturer of this Ingredient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="specifiedSubstance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A specified substance that comprises this ingredient</desc>
                    <fhir fid="MedicinalProductIngredient.specifiedSubstance" definition="A specified substance that comprises this ingredient." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The specified substance</desc>
                        <fhir fid="MedicinalProductIngredient.specifiedSubstance.code" definition="The specified substance." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="group" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The group of specified substance, e.g. group 1 to 4</desc>
                        <fhir fid="MedicinalProductIngredient.specifiedSubstance.group" definition="The group of specified substance, e.g. group 1 to 4." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="confidentiality" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Confidentiality level of the specified substance as the ingredient</desc>
                        <fhir fid="MedicinalProductIngredient.specifiedSubstance.confidentiality" definition="Confidentiality level of the specified substance as the ingredient." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="strength" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product</desc>
                        <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength" definition="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="presentation" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.presentation" definition="The quantity of substance in the unit of presentation, or in the volume (or mass) of the single pharmaceutical product or manufactured item." isSummary="true">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="presentationLowLimit" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">A lower limit for the quantity of substance in the unit of presentation. For use when there is a range of strengths, this is the lower limit, with the presentation attribute becoming the upper limit</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.presentationLowLimit" definition="A lower limit for the quantity of substance in the unit of presentation. For use when there is a range of strengths, this is the lower limit, with the presentation attribute becoming the upper limit." isModifier="true" isSummary="true">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="concentration" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The strength per unitary volume (or mass)</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.concentration" definition="The strength per unitary volume (or mass)." isSummary="true">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="concentrationLowLimit" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">A lower limit for the strength per unitary volume (or mass), for when there is a range. The concentration attribute then becomes the upper limit</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.concentrationLowLimit" definition="A lower limit for the strength per unitary volume (or mass), for when there is a range. The concentration attribute then becomes the upper limit." isModifier="true" isSummary="true">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="measurementPoint" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">For when strength is measured at a particular point or distance</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.measurementPoint" definition="For when strength is measured at a particular point or distance." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="country" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">The country or countries for which the strength range applies</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.country" definition="The country or countries for which the strength range applies." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="referenceStrength" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Strength expressed in terms of a reference substance</desc>
                            <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength" definition="Strength expressed in terms of a reference substance." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="substance" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Relevant reference substance</desc>
                                <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength.substance" definition="Relevant reference substance." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="strength" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Strength expressed in terms of a reference substance</desc>
                                <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength.strength" definition="Strength expressed in terms of a reference substance." isSummary="true">
                                    <type value="Ratio"/>
                                </fhir>
                            </element>
                            <element name="strengthLowLimit" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Strength expressed in terms of a reference substance</desc>
                                <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength.strengthLowLimit" definition="Strength expressed in terms of a reference substance." isSummary="true">
                                    <type value="Ratio"/>
                                </fhir>
                            </element>
                            <element name="measurementPoint" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">For when strength is measured at a particular point or distance</desc>
                                <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength.measurementPoint" definition="For when strength is measured at a particular point or distance." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="country" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">The country or countries for which the strength range applies</desc>
                                <fhir fid="MedicinalProductIngredient.specifiedSubstance.strength.referenceStrength.country" definition="The country or countries for which the strength range applies." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="substance" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The ingredient substance</desc>
                    <fhir fid="MedicinalProductIngredient.substance" definition="The ingredient substance." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The ingredient substance</desc>
                        <fhir fid="MedicinalProductIngredient.substance.code" definition="The ingredient substance." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="strength" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product</desc>
                        <fhir fid="MedicinalProductIngredient.substance.strength" definition="Quantity of the substance or specified substance present in the manufactured item or pharmaceutical product." isSummary="true"/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.88" name="MedicinalProductInteraction" displayName="MedicinalProductInteraction" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductInteraction">
            <desc language="en-US">The interactions of the medicinal product with other medicinal products, or other forms of interactions.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductInteraction" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductInteraction" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">MedicinalProductInteraction</desc>
                <fhir fid="MedicinalProductInteraction" definition="The interactions of the medicinal product with other medicinal products, or other forms of interactions."/>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The medication for which this is a described interaction</desc>
                    <fhir fid="MedicinalProductInteraction.subject" definition="The medication for which this is a described interaction." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </type>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The interaction described</desc>
                    <fhir fid="MedicinalProductInteraction.description" definition="The interaction described." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="interactant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The specific medication, food or laboratory test that interacts</desc>
                    <fhir fid="MedicinalProductInteraction.interactant" definition="The specific medication, food or laboratory test that interacts." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="item[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The specific medication, food or laboratory test that interacts</desc>
                        <fhir fid="MedicinalProductInteraction.interactant.item[x]" definition="The specific medication, food or laboratory test that interacts." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                            </type>
                            <type value="CodeableConcept"/>
                        </fhir>
                        <element name="itemReference">
                            <fhir fid="MedicinalProductInteraction.interactant.itemReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ObservationDefinition"/>
                            </fhir>
                        </element>
                        <element name="itemCodeableConcept">
                            <fhir fid="MedicinalProductInteraction.interactant.itemCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction</desc>
                    <fhir fid="MedicinalProductInteraction.type" definition="The type of the interaction e.g. drug-drug interaction, drug-food interaction, drug-lab test interaction." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="effect" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The effect of the interaction, for example "reduced gastric absorption of primary medication"</desc>
                    <fhir fid="MedicinalProductInteraction.effect" definition="The effect of the interaction, for example &#34;reduced gastric absorption of primary medication&#34;." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="incidence" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The incidence of the interaction, e.g. theoretical, observed</desc>
                    <fhir fid="MedicinalProductInteraction.incidence" definition="The incidence of the interaction, e.g. theoretical, observed." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="management" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Actions for managing the interaction</desc>
                    <fhir fid="MedicinalProductInteraction.management" definition="Actions for managing the interaction." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.89" name="MedicinalProductManufactured" displayName="MedicinalProductManufactured" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductManufactured">
            <desc language="en-US">The manufactured item as contained in the packaged medicinal product.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductManufactured" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductManufactured" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The manufactured item as contained in the packaged medicinal product</desc>
                <fhir fid="MedicinalProductManufactured" definition="The manufactured item as contained in the packaged medicinal product."/>
                <element name="manufacturedDoseForm" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Dose form as manufactured and before any transformation into the pharmaceutical product</desc>
                    <fhir fid="MedicinalProductManufactured.manufacturedDoseForm" definition="Dose form as manufactured and before any transformation into the pharmaceutical product." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="unitOfPresentation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The “real world” units in which the quantity of the manufactured item is described</desc>
                    <fhir fid="MedicinalProductManufactured.unitOfPresentation" definition="The “real world” units in which the quantity of the manufactured item is described." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The quantity or "count number" of the manufactured item</desc>
                    <fhir fid="MedicinalProductManufactured.quantity" definition="The quantity or &#34;count number&#34; of the manufactured item." isSummary="true">
                        <type value="Quantity"/>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Manufacturer of the item (Note that this should be named "manufacturer" but it currently causes technical issues)</desc>
                    <fhir fid="MedicinalProductManufactured.manufacturer" definition="Manufacturer of the item (Note that this should be named &#34;manufacturer&#34; but it currently causes technical issues)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="ingredient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Ingredient</desc>
                    <fhir fid="MedicinalProductManufactured.ingredient" definition="Ingredient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductIngredient"/>
                        </type>
                    </fhir>
                </element>
                <element name="physicalCharacteristics" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dimensions, color etc.</desc>
                    <fhir fid="MedicinalProductManufactured.physicalCharacteristics" definition="Dimensions, color etc." isSummary="true">
                        <type value="ProdCharacteristic"/>
                    </fhir>
                </element>
                <element name="otherCharacteristics" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Other codeable characteristics</desc>
                    <fhir fid="MedicinalProductManufactured.otherCharacteristics" definition="Other codeable characteristics." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.90" name="MedicinalProductPackaged" displayName="MedicinalProductPackaged" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductPackaged">
            <desc language="en-US">A medicinal product in a container or package.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductPackaged" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductPackaged" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A medicinal product in a container or package</desc>
                <fhir fid="MedicinalProductPackaged" definition="A medicinal product in a container or package."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier</desc>
                    <fhir fid="MedicinalProductPackaged.identifier" definition="Unique identifier." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The product with this is a pack for</desc>
                    <fhir fid="MedicinalProductPackaged.subject" definition="The product with this is a pack for." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                        </type>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Textual description</desc>
                    <fhir fid="MedicinalProductPackaged.description" definition="Textual description." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="legalStatusOfSupply" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The legal status of supply of the medicinal product as classified by the regulator</desc>
                    <fhir fid="MedicinalProductPackaged.legalStatusOfSupply" definition="The legal status of supply of the medicinal product as classified by the regulator." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="marketingStatus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Marketing information</desc>
                    <fhir fid="MedicinalProductPackaged.marketingStatus" definition="Marketing information." isSummary="true">
                        <type value="MarketingStatus"/>
                    </fhir>
                </element>
                <element name="marketingAuthorization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Manufacturer of this Package Item</desc>
                    <fhir fid="MedicinalProductPackaged.marketingAuthorization" definition="Manufacturer of this Package Item." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization"/>
                        </type>
                    </fhir>
                </element>
                <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Manufacturer of this Package Item</desc>
                    <fhir fid="MedicinalProductPackaged.manufacturer" definition="Manufacturer of this Package Item." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="batchIdentifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Batch numbering</desc>
                    <fhir fid="MedicinalProductPackaged.batchIdentifier" definition="Batch numbering." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="outerPackaging" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A number appearing on the outer packaging of a specific batch</desc>
                        <fhir fid="MedicinalProductPackaged.batchIdentifier.outerPackaging" definition="A number appearing on the outer packaging of a specific batch." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="immediatePackaging" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A number appearing on the immediate packaging (and not the outer packaging)</desc>
                        <fhir fid="MedicinalProductPackaged.batchIdentifier.immediatePackaging" definition="A number appearing on the immediate packaging (and not the outer packaging)." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                </element>
                <element name="packageItem" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">A packaging item, as a contained for medicine, possibly with other packaging items within</desc>
                    <fhir fid="MedicinalProductPackaged.packageItem" definition="A packaging item, as a contained for medicine, possibly with other packaging items within." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Including possibly Data Carrier Identifier</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.identifier" definition="Including possibly Data Carrier Identifier." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The physical type of the container of the medicine</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.type" definition="The physical type of the container of the medicine." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The quantity of this package in the medicinal product, at the current level of packaging. The outermost is always 1</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.quantity" definition="The quantity of this package in the medicinal product, at the current level of packaging. The outermost is always 1." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="material" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Material type of the package item</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.material" definition="Material type of the package item." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="alternateMaterial" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A possible alternate material for the packaging</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.alternateMaterial" definition="A possible alternate material for the packaging." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="device" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A device accompanying a medicinal product</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.device" definition="A device accompanying a medicinal product." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceDefinition"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="manufacturedItem" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The manufactured item as contained in the packaged medicinal product</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.manufacturedItem" definition="The manufactured item as contained in the packaged medicinal product." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductManufactured"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="packageItem" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Allows containers within containers</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.packageItem" definition="Allows containers within containers." isSummary="true"/>
                    </element>
                    <element name="physicalCharacteristics" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Dimensions, color etc.</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.physicalCharacteristics" definition="Dimensions, color etc." isSummary="true">
                            <type value="ProdCharacteristic"/>
                        </fhir>
                    </element>
                    <element name="otherCharacteristics" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Other codeable characteristics</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.otherCharacteristics" definition="Other codeable characteristics." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="shelfLifeStorage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Shelf Life and storage information</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.shelfLifeStorage" definition="Shelf Life and storage information." isSummary="true">
                            <type value="ProductShelfLife"/>
                        </fhir>
                    </element>
                    <element name="manufacturer" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Manufacturer of this Package Item</desc>
                        <fhir fid="MedicinalProductPackaged.packageItem.manufacturer" definition="Manufacturer of this Package Item." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.91" name="MedicinalProductPharmaceutical" displayName="MedicinalProductPharmaceutical" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductPharmaceutical">
            <desc language="en-US">A pharmaceutical product described in terms of its composition and dose form.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductPharmaceutical" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductPharmaceutical" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A pharmaceutical product described in terms of its composition and dose form</desc>
                <fhir fid="MedicinalProductPharmaceutical" definition="A pharmaceutical product described in terms of its composition and dose form."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An identifier for the pharmaceutical medicinal product</desc>
                    <fhir fid="MedicinalProductPharmaceutical.identifier" definition="An identifier for the pharmaceutical medicinal product." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="administrableDoseForm" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The administrable dose form, after necessary reconstitution</desc>
                    <fhir fid="MedicinalProductPharmaceutical.administrableDoseForm" definition="The administrable dose form, after necessary reconstitution." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="unitOfPresentation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="MedicinalProductPharmaceutical.unitOfPresentation" definition="Todo." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="ingredient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Ingredient</desc>
                    <fhir fid="MedicinalProductPharmaceutical.ingredient" definition="Ingredient." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProductIngredient"/>
                        </type>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Accompanying device</desc>
                    <fhir fid="MedicinalProductPharmaceutical.device" definition="Accompanying device." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="characteristics" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Characteristics e.g. a products onset of action</desc>
                    <fhir fid="MedicinalProductPharmaceutical.characteristics" definition="Characteristics e.g. a products onset of action." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A coded characteristic</desc>
                        <fhir fid="MedicinalProductPharmaceutical.characteristics.code" definition="A coded characteristic." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The status of characteristic e.g. assigned or pending</desc>
                        <fhir fid="MedicinalProductPharmaceutical.characteristics.status" definition="The status of characteristic e.g. assigned or pending." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="routeOfAdministration" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">The path by which the pharmaceutical product is taken into or makes contact with the body</desc>
                    <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration" definition="The path by which the pharmaceutical product is taken into or makes contact with the body." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Coded expression for the route</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.code" definition="Coded expression for the route." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="firstDose" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The first dose (dose quantity) administered in humans can be specified, for a product under investigation, using a numerical value and its unit of measurement</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.firstDose" definition="The first dose (dose quantity) administered in humans can be specified, for a product under investigation, using a numerical value and its unit of measurement." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="maxSingleDose" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The maximum single dose that can be administered as per the protocol of a clinical trial can be specified using a numerical value and its unit of measurement</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.maxSingleDose" definition="The maximum single dose that can be administered as per the protocol of a clinical trial can be specified using a numerical value and its unit of measurement." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="maxDosePerDay" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered as per the protocol referenced in the clinical trial authorisation</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.maxDosePerDay" definition="The maximum dose per day (maximum dose quantity to be administered in any one 24-h period) that can be administered as per the protocol referenced in the clinical trial authorisation." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="maxDosePerTreatmentPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The maximum dose per treatment period that can be administered as per the protocol referenced in the clinical trial authorisation</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.maxDosePerTreatmentPeriod" definition="The maximum dose per treatment period that can be administered as per the protocol referenced in the clinical trial authorisation." isSummary="true">
                            <type value="Ratio"/>
                        </fhir>
                    </element>
                    <element name="maxTreatmentPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The maximum treatment period during which an Investigational Medicinal Product can be administered as per the protocol referenced in the clinical trial authorisation</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.maxTreatmentPeriod" definition="The maximum treatment period during which an Investigational Medicinal Product can be administered as per the protocol referenced in the clinical trial authorisation." isSummary="true">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                    <element name="targetSpecies" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A species for which this route applies</desc>
                        <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies" definition="A species for which this route applies." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Coded expression for the species</desc>
                            <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.code" definition="Coded expression for the species." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="withdrawalPeriod" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">A species specific time during which consumption of animal product is not appropriate</desc>
                            <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.withdrawalPeriod" definition="A species specific time during which consumption of animal product is not appropriate." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="tissue" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Coded expression for the type of tissue for which the withdrawal period applues, e.g. meat, milk</desc>
                                <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.withdrawalPeriod.tissue" definition="Coded expression for the type of tissue for which the withdrawal period applues, e.g. meat, milk." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">A value for the time</desc>
                                <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.withdrawalPeriod.value" definition="A value for the time." isSummary="true">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="supportingInformation" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Extra information about the withdrawal period</desc>
                                <fhir fid="MedicinalProductPharmaceutical.routeOfAdministration.targetSpecies.withdrawalPeriod.supportingInformation" definition="Extra information about the withdrawal period." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.92" name="MedicinalProductUndesirableEffect" displayName="MedicinalProductUndesirableEffect" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MedicinalProductUndesirableEffect">
            <desc language="en-US">Describe the undesirable effects of the medicinal product.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MedicinalProductUndesirableEffect" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MedicinalProductUndesirableEffect" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">MedicinalProductUndesirableEffect</desc>
                <fhir fid="MedicinalProductUndesirableEffect" definition="Describe the undesirable effects of the medicinal product."/>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The medication for which this is an indication</desc>
                    <fhir fid="MedicinalProductUndesirableEffect.subject" definition="The medication for which this is an indication." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicinalProduct"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                        </type>
                    </fhir>
                </element>
                <element name="symptomConditionEffect" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The symptom, condition or undesirable effect</desc>
                    <fhir fid="MedicinalProductUndesirableEffect.symptomConditionEffect" definition="The symptom, condition or undesirable effect." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="classification" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Classification of the effect</desc>
                    <fhir fid="MedicinalProductUndesirableEffect.classification" definition="Classification of the effect." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="frequencyOfOccurrence" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The frequency of occurrence of the effect</desc>
                    <fhir fid="MedicinalProductUndesirableEffect.frequencyOfOccurrence" definition="The frequency of occurrence of the effect." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="population" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The population group to which this applies</desc>
                    <fhir fid="MedicinalProductUndesirableEffect.population" definition="The population group to which this applies." isSummary="true">
                        <type value="Population"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.93" name="MessageDefinition" displayName="MessageDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MessageDefinition">
            <desc language="en-US">Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Allows messages to be defined once and re-used across systems.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MessageDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="MessageDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A resource that defines a type of message that can be exchanged between systems</desc>
                <fhir fid="MessageDefinition" definition="Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted." comment="This would be a MIF-level artifact.">
                    <mapping identity="v2" map="N/A"/>
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="msd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business Identifier for a given MessageDefinition</desc>
                    <fhir fid="MessageDefinition.url" definition="The business identifier that is used to reference the MessageDefinition and *is* expected to be consistent from server to server."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the message definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Primary key for the message definition on a given server</desc>
                    <fhir fid="MessageDefinition.identifier" definition="A formal identifier that is used to identify this message definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this message definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the message definition</desc>
                    <fhir fid="MessageDefinition.version"
                        definition="The identifier that is used to identify this version of the message definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the message definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different message definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the message definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this message definition (computer friendly)</desc>
                    <fhir fid="MessageDefinition.name" definition="A natural language name identifying the message definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this message definition (human friendly)</desc>
                    <fhir fid="MessageDefinition.title" definition="A short, descriptive, user-friendly title for the message definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Takes the place of</desc>
                    <fhir fid="MessageDefinition.replaces" definition="A MessageDefinition that is superseded by this definition." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MessageDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="MessageDefinition.status" definition="The status of this message definition. Enables tracking the life-cycle of the content." comment="Allows filtering of message definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="MessageDefinition.experimental" definition="A Boolean value to indicate that this message definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of message definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level message definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="MessageDefinition.date" definition="The date  (and optionally time) when the message definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the message definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the message definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="MessageDefinition.publisher" definition="The name of the organization or individual that published the message definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the message definition is the organization or individual primarily responsible for the maintenance and upkeep of the message definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the message definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the message definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="MessageDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the message definition</desc>
                    <fhir fid="MessageDefinition.description" definition="A free text natural language description of the message definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the message definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the message definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the message definition is presumed to be the predominant language in the place the message definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="MessageDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate message definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for message definition (if applicable)</desc>
                    <fhir fid="MessageDefinition.jurisdiction" definition="A legal or geographic region in which the message definition is intended to be used." comment="It may be possible for the message definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this message definition is defined</desc>
                    <fhir fid="MessageDefinition.purpose" definition="Explanation of why this message definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the message definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this message definition." isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="MessageDefinition.copyright" definition="A copyright statement relating to the message definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the message definition." requirements="Consumers must be able to determine any legal restrictions on the use of the message definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="base" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Definition this one is based on</desc>
                    <fhir fid="MessageDefinition.base" definition="The MessageDefinition that is the basis for the contents of this resource." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MessageDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Protocol/workflow this is part of</desc>
                    <fhir fid="MessageDefinition.parent" definition="Identifies a protocol or workflow that this MessageDefinition represents a step in." comment="It should be possible to use MessageDefinition to describe a message to be used by certain steps in a particular protocol as part of a PlanDefinition or ActivityDefinition." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                        </type>
                    </fhir>
                </element>
                <choice name="event[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Event code or link to the EventDefinition</desc>
                    <fhir fid="MessageDefinition.event[x]" definition="Event code or link to the EventDefinition." isSummary="true">
                        <type value="Coding"/>
                        <type value="uri"/>
                        <binding displayName="MessageEvent" strength="example" description="One of the message events defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.26" canonicalUri="http://hl7.org/fhir/ValueSet/message-events"/>
                    </fhir>
                    <element name="eventCoding">
                        <fhir fid="MessageDefinition.eventCoding">
                            <type value="Coding"/>
                        </fhir>
                    </element>
                    <element name="eventUri">
                        <fhir fid="MessageDefinition.eventUri">
                            <type value="uri"/>
                        </fhir>
                    </element>
                </choice>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">consequence | currency | notification</desc>
                    <fhir fid="MessageDefinition.category" definition="The impact of the content of the message." isSummary="true">
                        <type value="code"/>
                        <binding displayName="MessageSignificanceCategory" strength="required" description="The impact of the content of a message." valueSet="2.16.840.1.113883.4.642.3.188" canonicalUri="http://hl7.org/fhir/ValueSet/message-significance-category|4.0.1"/>
                    </fhir>
                </element>
                <element name="focus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Resource(s) that are the subject of the event</desc>
                    <fhir fid="MessageDefinition.focus" definition="Identifies the resource (or resources) that are being addressed by the event.  For example, the Encounter for an admit message or two Account records for a merge." isSummary="true">
                        <type value="BackboneElement"/>
                        <constraint key="md-1" severity="error" human="Max must be postive int or *" expression="max='*' or (max.toInteger() &gt; 0)" xpath="f:max/@value='*' or number(f:max/@value) &gt; 0" source=""/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of resource</desc>
                        <fhir fid="MessageDefinition.focus.code" definition="The kind of resource that must be the focus for this message." comment="Multiple focuses addressing different resources may occasionally occur.  E.g. to link or unlink a resource from a particular account or encounter, etc." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="profile" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Profile that must be adhered to by focus</desc>
                        <fhir fid="MessageDefinition.focus.profile" definition="A profile that reflects constraints for the focal resource (and potentially for related resources)."
                            comment="This should be present for most message definitions.  However, if the message focus is only a single resource and there is no need to include referenced resources or otherwise enforce the presence of particular elements, it can be omitted."
                            requirements="This profile allows setting boundaries for what content must appear within the message bundle vs. outside based on the declared aggregation constraints on referenced resources on this and related profiles.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="min" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Minimum number of focuses of this type</desc>
                        <fhir fid="MessageDefinition.focus.min" definition="Identifies the minimum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition." isSummary="true">
                            <type value="unsignedInt"/>
                        </fhir>
                    </element>
                    <element name="max" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Maximum number of focuses of this type</desc>
                        <fhir fid="MessageDefinition.focus.max" definition="Identifies the maximum number of resources of this type that must be pointed to by a message in order for it to be valid against this MessageDefinition.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="responseRequired" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">always | on-error | never | on-success</desc>
                    <fhir fid="MessageDefinition.responseRequired" definition="Declare at a message definition level whether a response is required or only upon error or success, or never."
                        comment="This enables the capability currently available through MSH-16 (Application Level acknowledgement) in HL7 Version 2 to declare at a message instance level whether a response is required or only upon error or success, or never.">
                        <type value="code"/>
                        <binding displayName="messageheader-response-request" strength="required" description="HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message." valueSet="2.16.840.1.113883.4.642.3.924" canonicalUri="http://hl7.org/fhir/ValueSet/messageheader-response-request|4.0.1"/>
                        <mapping identity="v2" map="MSH-16"/>
                    </fhir>
                </element>
                <element name="allowedResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Responses to this message</desc>
                    <fhir fid="MessageDefinition.allowedResponse" definition="Indicates what types of messages may be sent as an application-level response to this message."
                        comment="This indicates an application level response to &#34;close&#34; a transaction implicit in a particular request message.  To define a complete workflow scenario, look to the [[PlanDefinition]] resource which allows the definition of complex orchestrations, conditionality, etc.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="message" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to allowed message definition response</desc>
                        <fhir fid="MessageDefinition.allowedResponse.message" definition="A reference to the message definition that must be adhered to by this supported response.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MessageDefinition"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="situation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When should this response be used</desc>
                        <fhir fid="MessageDefinition.allowedResponse.situation" definition="Provides a description of the circumstances in which this response should be used (as opposed to one of the alternative responses).">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                </element>
                <element name="graph" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Canonical reference to a GraphDefinition</desc>
                    <fhir fid="MessageDefinition.graph" definition="Canonical reference to a GraphDefinition. If a URL is provided, it is the canonical reference to a [GraphDefinition](graphdefinition.html) that it controls what resources are to be added to the bundle when building the document. The GraphDefinition can also specify profiles that apply to the various resources.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/GraphDefinition"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.94" name="MessageHeader" displayName="MessageHeader" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MessageHeader">
            <desc language="en-US">The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Many implementations are not prepared to use REST and need a messaging based infrastructure.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MessageHeader" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="MessageHeader" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A resource that describes a message that is exchanged between systems</desc>
                <fhir fid="MessageHeader" definition="The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.">
                    <mapping identity="v2" map="MSH / MSA / ERR"/>
                    <mapping identity="rim" map="Message"/>
                </fhir>
                <choice name="event[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Code for the event this message represents or link to event definition</desc>
                    <fhir fid="MessageHeader.event[x]" definition="Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value &#34;http://terminology.hl7.org/CodeSystem/message-events&#34;.  Alternatively uri to the EventDefinition."
                        comment="The time of the event will be found in the focus resource. The time of the message will be found in [Bundle.timestamp](bundle-definitions.html#Bundle.timestamp)." requirements="Drives the behavior associated with this message." isSummary="true">
                        <type value="Coding"/>
                        <type value="uri"/>
                        <binding displayName="MessageEvent" strength="example" description="One of the message events defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.26" canonicalUri="http://hl7.org/fhir/ValueSet/message-events"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="MSH-9.2"/>
                        <mapping identity="rim" map="./payload[classCode=&#34;CACT&#34; and moodCode=&#34;EVN&#34; and isNormalAct()]/code[isNormalDatatype()]/code"/>
                    </fhir>
                    <element name="eventCoding">
                        <fhir fid="MessageHeader.eventCoding">
                            <type value="Coding"/>
                        </fhir>
                    </element>
                    <element name="eventUri">
                        <fhir fid="MessageHeader.eventUri">
                            <type value="uri"/>
                        </fhir>
                    </element>
                </choice>
                <element name="destination" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Message destination application(s)</desc>
                    <fhir fid="MessageHeader.destination" definition="The destination application which the message is intended for." comment="There SHOULD be at least one destination, but in some circumstances, the source system is unaware of any particular destination system."
                        requirements="Indicates where message is to be sent for routing purposes.  Allows verification of &#34;am I the intended recipient&#34;." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map="./communicationFunction[typeCode=&#34;RCV&#34;]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of system</desc>
                        <fhir fid="MessageHeader.destination.name" definition="Human-readable name for the target system." requirements="May be used for routing of response and/or to support audit." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="MSH-5"/>
                            <mapping identity="rim" map="unique(./entity[determinerCode=&#34;INST&#34; and (classCode=(&#34;DEV&#34;, &#34;PSN&#34;, &#34;ORG&#34;]/name[type='ST' and isNormalDatatype()])"/>
                        </fhir>
                    </element>
                    <element name="target" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Particular delivery destination within the destination</desc>
                        <fhir fid="MessageHeader.destination.target" definition="Identifies the target end system in situations where the initial message transmission is to an intermediary system." requirements="Supports multi-hop routing." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <mapping identity="rim" map="unique(./entity[determinerCode=&#34;INST&#34; and (classCode=(&#34;DEV&#34;, &#34;PSN&#34;, &#34;ORG&#34;]"/>
                        </fhir>
                    </element>
                    <element name="endpoint" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Actual destination address or id</desc>
                        <fhir fid="MessageHeader.destination.endpoint" definition="Indicates where the message should be routed to." comment="The id may be a non-resolvable URI for systems that do not use standard network-based addresses." requirements="Identifies where to route the message." isSummary="true">
                            <type value="url"/>
                            <mapping identity="v2" map="MSH-25 (or MSH-6)"/>
                            <mapping identity="rim" map="./telecom"/>
                        </fhir>
                    </element>
                    <element name="receiver" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Intended "real-world" recipient for the data</desc>
                        <fhir fid="MessageHeader.destination.receiver" definition="Allows data conveyed by a message to be addressed to a particular person or department when routing to a specific application isn't sufficient." requirements="Allows routing beyond just the application level." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.subject[x]"/>
                            <mapping identity="v2" map="PRT-5:PRT-4='WAYR' / PRT-8:PRT-4='WAYR'"/>
                            <mapping identity="rim" map="Not directly supported.  Could be shared using attentionLine.value with an appropriate keyWordText"/>
                            <mapping identity="w5" map="FiveWs.subject"/>
                        </fhir>
                    </element>
                </element>
                <element name="sender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Real world sender of the message</desc>
                    <fhir fid="MessageHeader.sender" definition="Identifies the sending system to allow the use of a trust relationship." comment="Use case is for where a (trusted) sending system is responsible for multiple organizations, and therefore cannot differentiate based on source endpoint / authentication alone." requirements="Allows routing beyond just the application level."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PRT-5:PRT-4='WAYR' / PRT-8:PRT-4='WAYR'"/>
                        <mapping identity="rim" map="Not directly supported.  Could be shared using attentionLine.value with an appropriate keyWordText"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="enterer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The source of the data entry</desc>
                    <fhir fid="MessageHeader.enterer" definition="The person or device that performed the data entry leading to this message. When there is more than one candidate, pick the most proximal to the message. Can provide other enterers in extensions." comment="Usually only for the request but can be used in a response."
                        requirements="Need to know for audit/traceback requirements and possibly for authorization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="EVN-5 / ORC-10 / PRT-5:PRT-4='EP' / ROL where ROL.3 is EP or ORC.10"/>
                        <mapping identity="rim" map="unique(./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/participation[typeCode=&#34;ENT&#34; and isNormalParticipation]/role[classCode=&#34;ASSIGNED&#34; and isNormalRole()]/player[isNormalEntity() and classCode=(&#34;DEV&#34;, &#34;PSN&#34;) and determinerCode=&#34;INST&#34;])"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The source of the decision</desc>
                    <fhir fid="MessageHeader.author" definition="The logical author of the message - the person or device that decided the described event should happen. When there is more than one candidate, pick the most proximal to the MessageHeader. Can provide other authors in extensions." comment="Usually only for the request but can be used in a response."
                        requirements="Need to know for audit/traceback requirements and possibly for authorization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ORC-19 / PRT-5:PRT-4='AUT' / ROL where ROL.3 is IP or ORC.12"/>
                        <mapping identity="rim" map="unique(./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=&#34;AUT&#34; and isNormalParticipation]/role[classCode=&#34;ASSIGNED&#34; and isNormalRole()]/player[isNormalEntity() and classCode=(&#34;DEV&#34;, &#34;PSN&#34;) and determinerCode=&#34;INST&#34;])"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Message source application</desc>
                    <fhir fid="MessageHeader.source" definition="The source application from which this message originated." requirements="Allows replies, supports audit." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map="unique(./communicationFunction[typeCode=&#34;SND&#34;])"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of system</desc>
                        <fhir fid="MessageHeader.source.name" definition="Human-readable name for the source system." requirements="May be used to support audit." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="MSH-3"/>
                            <mapping identity="rim" map="unique(./entity[determinerCode=&#34;INST&#34; and classCode=&#34;DEV&#34;]/name[type='ST' and isNormalDatatype()])"/>
                        </fhir>
                    </element>
                    <element name="software" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name of software running the system</desc>
                        <fhir fid="MessageHeader.source.software" definition="May include configuration or other information useful in debugging." requirements="Supports audit and possibly interface engine behavior." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="SFT-3 ( +SFT-1)"/>
                            <mapping identity="rim" map="unique(./entity[determinerCode=&#34;INST&#34; and classCode=&#34;DEV&#34;]/softwareName[isNormalDatatype()])"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Version of software running</desc>
                        <fhir fid="MessageHeader.source.version" definition="Can convey versions of multiple systems in situations where a message passes through multiple hands." requirements="Supports audit and possibly interface engine behavior." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="SFT-2"/>
                            <mapping identity="rim" map="(Not supported)"/>
                        </fhir>
                    </element>
                    <element name="contact" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Human contact for problems</desc>
                        <fhir fid="MessageHeader.source.contact" definition="An e-mail, phone, website or other contact point to use to resolve issues with message communications." requirements="Allows escalation of technical issues." isSummary="true">
                            <type value="ContactPoint"/>
                            <mapping identity="v2" map="(MSH-22?)"/>
                            <mapping identity="rim" map="unique(./entity[determinerCode=&#34;INST&#34; and classCode=&#34;DEV&#34;]/scopesRole[normalRole() and classCode=&#34;CON&#34; and layer[classCode=&#34;PSN&#34;]/telecom[isNormalDatatype()])"/>
                        </fhir>
                    </element>
                    <element name="endpoint" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Actual message source address or id</desc>
                        <fhir fid="MessageHeader.source.endpoint" definition="Identifies the routing target to send acknowledgements to." comment="The id may be a non-resolvable URI for systems that do not use standard network-based addresses." requirements="Identifies where to send responses, may influence security permissions." isSummary="true">
                            <type value="url"/>
                            <mapping identity="v2" map="MSH-24"/>
                            <mapping identity="rim" map="./telecom[isNormalDatatype()]"/>
                        </fhir>
                    </element>
                </element>
                <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Final responsibility for event</desc>
                    <fhir fid="MessageHeader.responsible" definition="The person or organization that accepts overall responsibility for the contents of the message. The implication is that the message event happened under the policies of the responsible party." comment="Usually only for the request but can be used in a response."
                        requirements="Need to know for audit/traceback requirements and possibly for authorization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="v2" map="ORC-12 /  PRT-5:PRT-4='OP' /  PRT-8:PRT-4='OP' / ROL where ROL.3 is RO or ORC.11"/>
                        <mapping identity="rim"
                            map="unique(./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=&#34;RESP&#34; and isNormalParticipation]/role[classCode=&#34;ASSIGNED&#34; and isNormalRole()]/player[isNormalEntity() and classCode=&#34;PSN&#34; and determinerCode=&#34;INST&#34;] or ./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/participation[isHighest(priorityCode) and typeCode=&#34;RESP&#34; and isNormalParticipation]/role[classCode=&#34;ASSIGNED&#34; and isNormalRole()]/scoper[isNormalEntity() and classCode=&#34;ORG&#34; and determinerCode=&#34;INST&#34;])"
                        />
                    </fhir>
                </element>
                <element name="reason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Cause of event</desc>
                    <fhir fid="MessageHeader.reason" definition="Coded indication of the cause for the event - indicates  a reason for the occurrence of the event that is a focus of this message." requirements="Need to be able to track why resources are being changed and report in the audit log/history of the resource.  May affect authorization." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Example Message Reason Codes" strength="example" description="Reason for event occurrence." valueSet="2.16.840.1.113883.4.642.3.378" canonicalUri="http://hl7.org/fhir/ValueSet/message-reason-encounter"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.4 / ORC.16 / OBR-31-reason for study / BPO-13-BP indication for use / RXO-20-indication / RXE-27-give indication / RXD-21-indication / RXG-22-indication / RXA-19-indication"/>
                        <mapping identity="rim" map="unique(./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/reasonCode[isNormalDatatype()])"/>
                    </fhir>
                </element>
                <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If this is a reply to prior message</desc>
                    <fhir fid="MessageHeader.response" definition="Information about the message that this message is a response to.  Only present if this message is a response." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="MSA"/>
                        <mapping identity="rim" map="./conveyedAcknowledgement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Id of original message</desc>
                        <fhir fid="MessageHeader.response.identifier" definition="The MessageHeader.id of the message to which this message is a response." requirements="Allows receiver to know what message is being responded to." isSummary="true">
                            <type value="id"/>
                            <mapping identity="v2" map="MSA-2"/>
                            <mapping identity="rim" map="./acknowledges.id[isNormalDatatype()]"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">ok | transient-error | fatal-error</desc>
                        <fhir fid="MessageHeader.response.code" definition="Code that identifies the type of response to the message - whether it was successful or not, and whether it should be resent or not." comment="This is a generic response to the request message. Specific data for the response will be found in MessageHeader.focus."
                            requirements="Allows the sender of the acknowledge message to know if the request was successful or if action is needed." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ResponseType" strength="required" description="The kind of response to a message." valueSet="2.16.840.1.113883.4.642.3.380" canonicalUri="http://hl7.org/fhir/ValueSet/response-code|4.0.1"/>
                            <mapping identity="v2" map="MSA-1"/>
                            <mapping identity="rim" map="./typeCode[isNormalDatatype()]"/>
                        </fhir>
                    </element>
                    <element name="details" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specific list of hints/warnings/errors</desc>
                        <fhir fid="MessageHeader.response.details" definition="Full details of any issues found in the message." comment="This SHALL be contained in the bundle. If any of the issues are errors, the response code SHALL be an error." requirements="Allows the sender of the message to determine what the specific issues are." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationOutcome"/>
                            </type>
                            <mapping identity="v2" map="ERR"/>
                            <mapping identity="rim" map="AcknowledgementDetail or Observation[classCode=&#34;ALRT&#34; and moodCode=&#34;EVN&#34;]"/>
                        </fhir>
                    </element>
                </element>
                <element name="focus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The actual content of the message</desc>
                    <fhir fid="MessageHeader.focus" definition="The actual data of the message - a reference to the root/focus class of the event."
                        comment="The data is defined where the transaction type is defined. The transaction data is always included in the bundle that is the full message.  Only the root resource is specified.  The resources it references should be contained in the bundle but are not also listed here.  Multiple repetitions are allowed to cater for merges and other situations with multiple focal targets."
                        requirements="Every message event is about actual data, a single resource, that is identified in the definition of the event, and perhaps some or all linked resources." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="rim" map="unique(./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/participation[typeCode=&#34;SUBJ&#34; and isNormalParticipation]/role or ./controlAct[classCode=&#34;CACT&#34; and classCode=&#34;EVN&#34; and isNormalAct()]/outboundRelationship[typeCode=&#34;SBJ&#34; and isNormalActRelatoinship]/target)"/>
                    </fhir>
                </element>
                <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Link to the definition for this message</desc>
                    <fhir fid="MessageHeader.definition" definition="Permanent link to the MessageDefinition for this message." requirements="Allows sender to define the expected contents of the message." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MessageDefinition"/>
                        </type>
                        <mapping identity="rim" map="Not directly supported."/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.95" name="MolecularSequence" displayName="MolecularSequence" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/MolecularSequence">
            <desc language="en-US">Raw data describing a biological sequence.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="MolecularSequence" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="MolecularSequence" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Information about a biological sequence</desc>
                <fhir fid="MolecularSequence" definition="Raw data describing a biological sequence.">
                    <constraint key="msq-3" severity="error" human="Only 0 and 1 are valid for coordinateSystem" expression="coordinateSystem = 1 or coordinateSystem = 0" xpath="count(f:coordinateSystem[@value=0 and @value=1]) = 1" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique ID for this particular sequence. This is a FHIR-defined id</desc>
                    <fhir fid="MolecularSequence.identifier" definition="A unique identifier for this particular sequence instance. This is a FHIR-defined id." requirements="Allows sequences to be distinguished and referenced." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">aa | dna | rna</desc>
                    <fhir fid="MolecularSequence.type" definition="Amino Acid Sequence/ DNA Sequence / RNA Sequence." isSummary="true">
                        <type value="code"/>
                        <binding displayName="sequenceType" strength="required" description="Type if a sequence -- DNA, RNA, or amino acid sequence." valueSet="2.16.840.1.113883.4.642.3.219" canonicalUri="http://hl7.org/fhir/ValueSet/sequence-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="coordinateSystem" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Base number of coordinate system (0 for 0-based numbering or coordinates, inclusive start, exclusive end, 1 for 1-based numbering, inclusive start, inclusive end)</desc>
                    <fhir fid="MolecularSequence.coordinateSystem" definition="Whether the sequence is numbered starting at 0 (0-based numbering or coordinates, inclusive start, exclusive end) or starting at 1 (1-based numbering, inclusive start and inclusive end)." isSummary="true">
                        <type value="integer"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who and/or what this is about</desc>
                    <fhir fid="MolecularSequence.patient" definition="The patient whose sequencing results are described by this resource." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                    </fhir>
                </element>
                <element name="specimen" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Specimen used for sequencing</desc>
                    <fhir fid="MolecularSequence.specimen" definition="Specimen used for sequencing." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                        </type>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The method for sequencing</desc>
                    <fhir fid="MolecularSequence.device" definition="The method for sequencing, for example, chip information." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who should be responsible for test result</desc>
                    <fhir fid="MolecularSequence.performer" definition="The organization or lab that should be responsible for this result." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The number of copies of the sequence of interest. (RNASeq)</desc>
                    <fhir fid="MolecularSequence.quantity" definition="The number of copies of the sequence of interest. (RNASeq)." isSummary="true">
                        <type value="Quantity"/>
                    </fhir>
                </element>
                <element name="referenceSeq" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A sequence used as reference</desc>
                    <fhir fid="MolecularSequence.referenceSeq" definition="A sequence that is used as a reference to describe variants that are present in a sequence analyzed." isSummary="true">
                        <type value="BackboneElement"/>
                        <constraint key="msq-6" severity="error" human="Have and only have one of the following elements in referenceSeq : 1. genomeBuild ; 2 referenceSeqId; 3. referenceSeqPointer;  4. referenceSeqString;" expression="(genomeBuild.count()+referenceSeqId.count()+ referenceSeqPointer.count()+ referenceSeqString.count()) = 1"
                            xpath="count(f:genomeBuild)+count(f:referenceSeqId)+count(f:referenceSeqPointer)+count(f:referenceSeqString)=1" source=""/>
                        <constraint key="msq-5" severity="error" human="GenomeBuild and chromosome must be both contained if either one of them is contained" expression="(chromosome.empty() and genomeBuild.empty()) or (chromosome.exists() and genomeBuild.exists())" xpath="(exists(f:chromosome) and exists(f:genomeBuild)) or (not(exists(f:chromosome)) and not(exists(f:genomeBuild)))" source=""/>
                    </fhir>
                    <element name="chromosome" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Chromosome containing genetic finding</desc>
                        <fhir fid="MolecularSequence.referenceSeq.chromosome" definition="Structural unit composed of a nucleic acid molecule which controls its own replication through the interaction of specific proteins at one or more origins of replication ([SO:0000340](http://www.sequenceontology.org/browser/current_svn/term/SO:0000340))." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="chromosome-human" strength="example" description="Chromosome number for human." valueSet="2.16.840.1.113883.4.642.3.224" canonicalUri="http://hl7.org/fhir/ValueSet/chromosome-human"/>
                        </fhir>
                    </element>
                    <element name="genomeBuild" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'</desc>
                        <fhir fid="MolecularSequence.referenceSeq.genomeBuild" definition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'.  Version number must be included if a versioned release of a primary build was used." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="orientation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">sense | antisense</desc>
                        <fhir fid="MolecularSequence.referenceSeq.orientation" definition="A relative reference to a DNA strand based on gene orientation. The strand that contains the open reading frame of the gene is the &#34;sense&#34; strand, and the opposite complementary strand is the &#34;antisense&#34; strand." isSummary="true">
                            <type value="code"/>
                            <binding displayName="orientationType" strength="required" description="Type for orientation." valueSet="2.16.840.1.113883.4.642.3.987" canonicalUri="http://hl7.org/fhir/ValueSet/orientation-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="referenceSeqId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference identifier</desc>
                        <fhir fid="MolecularSequence.referenceSeq.referenceSeqId" definition="Reference identifier of reference sequence submitted to NCBI. It must match the type in the MolecularSequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="E n s e m b l" strength="example" description="Reference identifier." valueSet="2.16.840.1.113883.4.642.3.221" canonicalUri="http://hl7.org/fhir/ValueSet/sequence-referenceSeq"/>
                        </fhir>
                    </element>
                    <element name="referenceSeqPointer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A pointer to another MolecularSequence entity as reference sequence</desc>
                        <fhir fid="MolecularSequence.referenceSeq.referenceSeqPointer" definition="A pointer to another MolecularSequence entity as reference sequence." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="referenceSeqString" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A string to represent reference sequence</desc>
                        <fhir fid="MolecularSequence.referenceSeq.referenceSeqString" definition="A string like &#34;ACGT&#34;." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="strand" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">watson | crick</desc>
                        <fhir fid="MolecularSequence.referenceSeq.strand" definition="An absolute reference to a strand. The Watson strand is the strand whose 5'-end is on the short arm of the chromosome, and the Crick strand as the one whose 5'-end is on the long arm." isSummary="true">
                            <type value="code"/>
                            <binding displayName="strandType" strength="required" description="Type for strand." valueSet="2.16.840.1.113883.4.642.3.985" canonicalUri="http://hl7.org/fhir/ValueSet/strand-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="windowStart" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Start position of the window on the reference sequence</desc>
                        <fhir fid="MolecularSequence.referenceSeq.windowStart" definition="Start position of the window on the reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="windowEnd" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">End position of the window on the reference sequence</desc>
                        <fhir fid="MolecularSequence.referenceSeq.windowEnd" definition="End position of the window on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                </element>
                <element name="variant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Variant in sequence</desc>
                    <fhir fid="MolecularSequence.variant"
                        definition="The definition of variant here originates from Sequence ontology ([variant_of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)). This element can represent amino acid or nucleic sequence change(including insertion,deletion,SNP,etc.)  It can represent some complex mutation or segment variation with the assist of CIGAR string."
                        isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Start position of the variant on the reference sequence</desc>
                        <fhir fid="MolecularSequence.variant.start" definition="Start position of the variant on the  reference sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">End position of the variant on the reference sequence</desc>
                        <fhir fid="MolecularSequence.variant.end" definition="End position of the variant on the reference sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="observedAllele" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Allele that was observed</desc>
                        <fhir fid="MolecularSequence.variant.observedAllele"
                            definition="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)).  Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed  sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end."
                            isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="referenceAllele" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Allele in the reference sequence</desc>
                        <fhir fid="MolecularSequence.variant.referenceAllele"
                            definition="An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence  type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end."
                            isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="cigar" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Extended CIGAR string for aligning the sequence with reference bases</desc>
                        <fhir fid="MolecularSequence.variant.cigar" definition="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="variantPointer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Pointer to observed variant information</desc>
                        <fhir fid="MolecularSequence.variant.variantPointer" definition="A pointer to an Observation containing variant information." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="observedSeq" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Sequence that was observed</desc>
                    <fhir fid="MolecularSequence.observedSeq" definition="Sequence that was observed. It is the result marked by referenceSeq along with variant records on referenceSeq. This shall start from referenceSeq.windowStart and end by referenceSeq.windowEnd." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="quality" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An set of value as quality of sequence</desc>
                    <fhir fid="MolecularSequence.quality" definition="An experimental feature attribute that defines the quality of the feature in a quantitative way, such as a phred quality score ([SO:0001686](http://www.sequenceontology.org/browser/current_svn/term/SO:0001686))." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">indel | snp | unknown</desc>
                        <fhir fid="MolecularSequence.quality.type" definition="INDEL / SNP / Undefined variant." isSummary="true">
                            <type value="code"/>
                            <binding displayName="qualityType" strength="required" description="Type for quality report." valueSet="2.16.840.1.113883.4.642.3.228" canonicalUri="http://hl7.org/fhir/ValueSet/quality-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="standardSequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Standard sequence for comparison</desc>
                        <fhir fid="MolecularSequence.quality.standardSequence" definition="Gold standard sequence used for comparing against." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="F d a- standard sequence" strength="example" description="Reference identifier of the sequence that used to mark the quality of tested samples." valueSet="2.16.840.1.113883.4.642.3.222" canonicalUri="http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence"/>
                        </fhir>
                    </element>
                    <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Start position of the sequence</desc>
                        <fhir fid="MolecularSequence.quality.start" definition="Start position of the sequence. If the coordinate system is either 0-based or 1-based, then start position is inclusive." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">End position of the sequence</desc>
                        <fhir fid="MolecularSequence.quality.end" definition="End position of the sequence. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="score" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quality score for the comparison</desc>
                        <fhir fid="MolecularSequence.quality.score" definition="The score of an experimentally derived feature such as a p-value ([SO:0001685](http://www.sequenceontology.org/browser/current_svn/term/SO:0001685))." isSummary="true">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Method to get quality</desc>
                        <fhir fid="MolecularSequence.quality.method" definition="Which method is used to get sequence quality." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="F d a- method" strength="example" description="The method used to evaluate the numerical quality of the observed sequence." valueSet="2.16.840.1.113883.4.642.3.223" canonicalUri="http://hl7.org/fhir/ValueSet/sequence-quality-method"/>
                        </fhir>
                    </element>
                    <element name="truthTP" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">True positives from the perspective of the truth data</desc>
                        <fhir fid="MolecularSequence.quality.truthTP" definition="True positives, from the perspective of the truth data, i.e. the number of sites in the Truth Call Set for which there are paths through the Query Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="queryTP" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">True positives from the perspective of the query data</desc>
                        <fhir fid="MolecularSequence.quality.queryTP" definition="True positives, from the perspective of the query data, i.e. the number of sites in the Query Call Set for which there are paths through the Truth Call Set that are consistent with all of the alleles at this site, and for which there is an accurate genotype call for the event." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="truthFN" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">False negatives</desc>
                        <fhir fid="MolecularSequence.quality.truthFN" definition="False negatives, i.e. the number of sites in the Truth Call Set for which there is no path through the Query Call Set that is consistent with all of the alleles at this site, or sites for which there is an inaccurate genotype call for the event. Sites with correct variant but incorrect genotype are counted here."
                            isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="queryFP" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">False positives</desc>
                        <fhir fid="MolecularSequence.quality.queryFP" definition="False positives, i.e. the number of sites in the Query Call Set for which there is no path through the Truth Call Set that is consistent with this site. Sites with correct variant but incorrect genotype are counted here." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="gtFP" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">False positives where the non-REF alleles in the Truth and Query Call Sets match</desc>
                        <fhir fid="MolecularSequence.quality.gtFP" definition="The number of false positives where the non-REF alleles in the Truth and Query Call Sets match (i.e. cases where the truth is 1/1 and the query is 0/1 or similar)." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="precision" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Precision of comparison</desc>
                        <fhir fid="MolecularSequence.quality.precision" definition="QUERY.TP / (QUERY.TP + QUERY.FP)." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="recall" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recall of comparison</desc>
                        <fhir fid="MolecularSequence.quality.recall" definition="TRUTH.TP / (TRUTH.TP + TRUTH.FN)." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="fScore" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">F-score</desc>
                        <fhir fid="MolecularSequence.quality.fScore" definition="Harmonic mean of Recall and Precision, computed as: 2 * precision * recall / (precision + recall)." isSummary="true">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="roc" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Receiver Operator Characteristic (ROC) Curve</desc>
                        <fhir fid="MolecularSequence.quality.roc" definition="Receiver Operator Characteristic (ROC) Curve  to give sensitivity/specificity tradeoff." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="score" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Genotype quality score</desc>
                            <fhir fid="MolecularSequence.quality.roc.score" definition="Invidual data point representing the GQ (genotype quality) score threshold." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="numTP" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Roc score true positive numbers</desc>
                            <fhir fid="MolecularSequence.quality.roc.numTP" definition="The number of true positives if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="numFP" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Roc score false positive numbers</desc>
                            <fhir fid="MolecularSequence.quality.roc.numFP" definition="The number of false positives if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="numFN" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Roc score false negative numbers</desc>
                            <fhir fid="MolecularSequence.quality.roc.numFN" definition="The number of false negatives if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="precision" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Precision of the GQ score</desc>
                            <fhir fid="MolecularSequence.quality.roc.precision" definition="Calculated precision if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="sensitivity" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Sensitivity of the GQ score</desc>
                            <fhir fid="MolecularSequence.quality.roc.sensitivity" definition="Calculated sensitivity if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="fMeasure" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">FScore of the GQ score</desc>
                            <fhir fid="MolecularSequence.quality.roc.fMeasure" definition="Calculated fScore if the GQ score threshold was set to &#34;score&#34; field value." isSummary="true">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="readCoverage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Average number of reads representing a given nucleotide in the reconstructed sequence</desc>
                    <fhir fid="MolecularSequence.readCoverage" definition="Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence." isSummary="true">
                        <type value="integer"/>
                    </fhir>
                </element>
                <element name="repository" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External repository which contains detailed report related with observedSeq in this resource</desc>
                    <fhir fid="MolecularSequence.repository" definition="Configurations of the external repository. The repository shall store target's observedSeq or records related with target's observedSeq." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">directlink | openapi | login | oauth | other</desc>
                        <fhir fid="MolecularSequence.repository.type" definition="Click and see / RESTful API / Need login to see / RESTful API with authentication / Other ways to see resource." isSummary="true">
                            <type value="code"/>
                            <binding displayName="repositoryType" strength="required" description="Type for access of external URI." valueSet="2.16.840.1.113883.4.642.3.230" canonicalUri="http://hl7.org/fhir/ValueSet/repository-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">URI of the repository</desc>
                        <fhir fid="MolecularSequence.repository.url" definition="URI of an external repository which contains further details about the genetics data." isSummary="true">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Repository's name</desc>
                        <fhir fid="MolecularSequence.repository.name" definition="URI of an external repository which contains further details about the genetics data." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="datasetId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Id of the dataset that used to call for dataset in repository</desc>
                        <fhir fid="MolecularSequence.repository.datasetId" definition="Id of the variant in this external repository. The server will understand how to use this id to call for more info about datasets in external repository." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="variantsetId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Id of the variantset that used to call for variantset in repository</desc>
                        <fhir fid="MolecularSequence.repository.variantsetId" definition="Id of the variantset in this external repository. The server will understand how to use this id to call for more info about variantsets in external repository." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="readsetId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Id of the read</desc>
                        <fhir fid="MolecularSequence.repository.readsetId" definition="Id of the read in this external repository." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="pointer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Pointer to next atomic sequence</desc>
                    <fhir fid="MolecularSequence.pointer" definition="Pointer to next atomic sequence which at most contains one variant." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/>
                        </type>
                    </fhir>
                </element>
                <element name="structureVariant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Structural variant</desc>
                    <fhir fid="MolecularSequence.structureVariant" definition="Information about chromosome structure variation." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="variantType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Structural variant change type</desc>
                        <fhir fid="MolecularSequence.structureVariant.variantType" definition="Information about chromosome structure variation DNA change type." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="LOINC LL379-9 answerlist" strength="required" description="DNA change type." canonicalUri="http://loinc.org/vs/LL379-9|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="exact" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Does the structural variant have base pair resolution breakpoints?</desc>
                        <fhir fid="MolecularSequence.structureVariant.exact" definition="Used to indicate if the outer and inner start-end values have the same meaning." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="length" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Structural variant length</desc>
                        <fhir fid="MolecularSequence.structureVariant.length" definition="Length of the variant chromosome." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="outer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Structural variant outer</desc>
                        <fhir fid="MolecularSequence.structureVariant.outer" definition="Structural variant outer." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Structural variant outer start</desc>
                            <fhir fid="MolecularSequence.structureVariant.outer.start" definition="Structural variant outer start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Structural variant outer end</desc>
                            <fhir fid="MolecularSequence.structureVariant.outer.end" definition="Structural variant outer end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="inner" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Structural variant inner</desc>
                        <fhir fid="MolecularSequence.structureVariant.inner" definition="Structural variant inner." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Structural variant inner start</desc>
                            <fhir fid="MolecularSequence.structureVariant.inner.start" definition="Structural variant inner start. If the coordinate system is either 0-based or 1-based, then start position is inclusive." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Structural variant inner end</desc>
                            <fhir fid="MolecularSequence.structureVariant.inner.end" definition="Structural variant inner end. If the coordinate system is 0-based then end is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position." isSummary="true">
                                <type value="integer"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.96" name="NamingSystem" displayName="NamingSystem" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/NamingSystem">
            <desc language="en-US">A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="NamingSystem" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="NamingSystem" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">System of unique identification</desc>
                <fhir fid="NamingSystem" definition="A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a &#34;System&#34; used within the Identifier and Coding data types.">
                    <mapping identity="v2" map="N/A"/>
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="nsd-1" severity="error" human="Root systems cannot have uuid identifiers" expression="kind != 'root' or uniqueId.all(type != 'uuid')" xpath="not(f:kind/@value='root' and f:uniqueId/f:type/@value='uuid')" source=""/>
                    <constraint key="nsd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                    <constraint key="nsd-2" severity="error" human="Can't have more than one preferred identifier for a type" expression="uniqueId.where(preferred = true).select(type).isDistinct()" xpath="not(exists(for $type in distinct-values(f:uniqueId/f:type/@value) return if (count(f:uniqueId[f:type/@value=$type and f:preferred/@value=true()])&gt;1) then $type else ()))" source=""/>
                </fhir>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this naming system (computer friendly)</desc>
                    <fhir fid="NamingSystem.name" definition="A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.The&#34;symbolic name&#34; for an OID would be captured as an extension." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="NamingSystem.status" definition="The status of this naming system. Enables tracking the life-cycle of the content." comment="Allows filtering of naming systems that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">codesystem | identifier | root</desc>
                    <fhir fid="NamingSystem.kind" definition="Indicates the purpose for the naming system - what kinds of things does it make unique?" isSummary="true">
                        <type value="code"/>
                        <binding displayName="NamingSystemType" strength="required" description="Identifies the purpose of the naming system." valueSet="2.16.840.1.113883.4.642.3.490" canonicalUri="http://hl7.org/fhir/ValueSet/namingsystem-type|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="NamingSystem.date" definition="The date  (and optionally time) when the naming system was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the naming system changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the naming system. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="NamingSystem.publisher" definition="The name of the organization or individual that published the naming system."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the naming system is the organization or individual primarily responsible for the maintenance and upkeep of the naming system. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the naming system. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the naming system.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="NamingSystem.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who maintains system namespace?</desc>
                    <fhir fid="NamingSystem.responsible" definition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." comment="This is the primary organization.  Responsibility for some aspects of a namespace may be delegated.">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">e.g. driver, provider, patient, bank etc.</desc>
                    <fhir fid="NamingSystem.type" definition="Categorizes a naming system for easier search by grouping related naming systems." comment="This will most commonly be used for identifier namespaces, but categories could potentially be useful for code systems and authorities as well.">
                        <type value="CodeableConcept"/>
                        <binding displayName="IdentifierType" strength="extensible" description="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." valueSet="2.16.840.1.113883.4.642.3.45" canonicalUri="http://hl7.org/fhir/ValueSet/identifier-type"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the naming system</desc>
                    <fhir fid="NamingSystem.description" definition="A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc."
                        comment="This description can be used to capture details such as why the naming system was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the naming system as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the naming system is presumed to be the predominant language in the place the naming system was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="NamingSystem.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate naming system instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for naming system (if applicable)</desc>
                    <fhir fid="NamingSystem.jurisdiction" definition="A legal or geographic region in which the naming system is intended to be used." comment="It may be possible for the naming system to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How/where is it used</desc>
                    <fhir fid="NamingSystem.usage" definition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="uniqueId" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifiers used for system</desc>
                    <fhir fid="NamingSystem.uniqueId" definition="Indicates how the system may be identified when referenced in electronic exchange." comment="Multiple identifiers may exist, either due to duplicate registration, regional rules, needs of different communication technologies, etc." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">oid | uuid | uri | other</desc>
                        <fhir fid="NamingSystem.uniqueId.type" definition="Identifies the unique identifier scheme used for this particular identifier." comment="Different identifier types may be used in different types of communications (OIDs for v3, URIs for FHIR, etc.).  Other includes RUIDs from v3, standard v2 code name strings, etc." isSummary="true">
                            <type value="code"/>
                            <binding displayName="NamingSystemIdentifierType" strength="required" description="Identifies the style of unique identifier used to identify a namespace." valueSet="2.16.840.1.113883.4.642.3.492" canonicalUri="http://hl7.org/fhir/ValueSet/namingsystem-identifier-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The unique identifier</desc>
                        <fhir fid="NamingSystem.uniqueId.value" definition="The string that should be sent over the wire to identify the code system or identifier system." comment="If the value is a URI intended for use as FHIR system identifier, the URI should not contain &#34;\&#34; or &#34;?&#34; or &#34;,&#34; since this makes escaping very difficult." isSummary="true">
                            <type value="string"/>
                            <mapping identity="w5" map="FiveWs.identifier"/>
                        </fhir>
                    </element>
                    <element name="preferred" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Is this the id that should be used for this type</desc>
                        <fhir fid="NamingSystem.uniqueId.preferred" definition="Indicates whether this identifier is the &#34;preferred&#34; identifier of this type.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Notes about identifier usage</desc>
                        <fhir fid="NamingSystem.uniqueId.comment" definition="Notes about the past or intended usage of this identifier." comment="e.g. &#34;must be used in Germany&#34; or &#34;was initially published in error with this value&#34;.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When is identifier valid?</desc>
                        <fhir fid="NamingSystem.uniqueId.period" definition="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic."
                            comment="Within a registry, a given identifier should only be &#34;active&#34; for a single namespace at a time.  (Ideally, an identifier should only ever be associated with a single namespace across all time).">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.97" name="NutritionOrder" displayName="NutritionOrder" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/NutritionOrder">
            <desc language="en-US">A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="NutritionOrder" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="NutritionOrder" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Diet, formula or nutritional supplement request</desc>
                <fhir fid="NutritionOrder" definition="A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident." comment="Referenced by an Order Request (workflow).">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="v2" map="ORC / ODS"/>
                    <mapping identity="rim" map="SupplyRequest"/>
                    <constraint key="nor-1" severity="warning" human="Nutrition Order SHALL contain either Oral Diet , Supplement, or Enteral Formula class" expression="oralDiet.exists() or supplement.exists() or enteralFormula.exists()" xpath="exists(f:oralDiet) or exists(f:supplement) or exists(f:enteralFormula)" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifiers assigned to this order</desc>
                    <fhir fid="NutritionOrder.identifier" definition="Identifiers assigned to this order by the order sender or by the order receiver." comment="The Identifier.type element can be to indicate filler vs. placer if needed.  This is explained in further detail [here](servicerequest.html#notes).">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC-2/ORC-3"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="NutritionOrder.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder."
                        comment="Note: This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="NutritionOrder.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiatesUri"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiates" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates protocol or definition</desc>
                    <fhir fid="NutritionOrder.instantiates" definition="The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiates"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="NutritionOrder.status" definition="The workflow status of the nutrition order/request."
                        comment="Typically the system placing the order sets the status to &#34;requested&#34;. Thereafter, the order is maintained by the receiver that updates the status as the request is handled.  This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="Codes identifying the lifecycle stage of the nutrition order." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="ORC-1"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="NutritionOrder.intent" definition="Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain."
                        comment="When resources map to this element, they are free to define as many codes as necessary to cover their space and will map to &#34;proposal, plan or order&#34;.  Can have multiple codes that map to one of these.  E.g. &#34;original order&#34;, &#34;encoded order&#34;, &#34;reflex order&#34; would all map to &#34;order&#34;.  Expectation is that the set of codes is mutually exclusive or a strict all-encompassing hierarchy."
                        requirements="Proposals/recommendations, plans and orders all use the same structure and can exist in the same fulfillment chain." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestIntent" strength="required" description="Codes indicating the degree of authority/intentionality associated with a nutrition order." valueSet="2.16.840.1.113883.4.642.3.113" canonicalUri="http://hl7.org/fhir/ValueSet/request-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The person who requires the diet, formula or nutritional supplement</desc>
                    <fhir fid="NutritionOrder.patient" definition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The encounter associated with this nutrition order</desc>
                    <fhir fid="NutritionOrder.encounter" definition="An encounter that provides additional information about the healthcare context in which this request is made.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="dateTime" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date and time the nutrition order was requested</desc>
                    <fhir fid="NutritionOrder.dateTime" definition="The date and time that this nutrition order was requested." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="ORC-9"/>
                        <mapping identity="rim" map="author.time"/>
                    </fhir>
                </element>
                <element name="orderer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who ordered the diet, formula or nutritional supplement</desc>
                    <fhir fid="NutritionOrder.orderer" definition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ORC-12"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="allergyIntolerance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">List of the patient's food and nutrition-related allergies and intolerances</desc>
                    <fhir fid="NutritionOrder.allergyIntolerance" definition="A link to a record of allergies or intolerances  which should be included in the nutrition order." comment="Information on a patient's food allergies and intolerances to inform healthcare personnel about the type of foods that the patient shouldn't receive or consume.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target[classCode=OBS, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="foodPreferenceModifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Order-specific modifier about the type of food that should be given</desc>
                    <fhir fid="NutritionOrder.foodPreferenceModifier"
                        definition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings."
                        comment="Information on a patient's food preferences that inform healthcare personnel about the food that the patient should receive or consume.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Diet" strength="example" description="Medical, cultural or ethical food preferences to help with catering requirements." valueSet="2.16.840.1.113883.4.642.3.255" canonicalUri="http://hl7.org/fhir/ValueSet/encounter-diet"/>
                        <mapping identity="v2" map="ODS-1 Value = &#34;P&#34;,ODS-3"/>
                        <mapping identity="rim" map=".outboundRelationship [typeCode =COMP], target [classCode=PROC, moodCode=EVN, code=NutritionModificationType]"/>
                    </fhir>
                </element>
                <element name="excludeFoodModifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Order-specific modifier about the type of food that should not be given</desc>
                    <fhir fid="NutritionOrder.excludeFoodModifier"
                        definition="This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or  Gluten-Free.  While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason.  This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings."
                        comment="Information on a patient's food allergies, intolerances and preferences to inform healthcare personnel about the type  of foods that the patient shouldn't receive or consume.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Food Type Codes" strength="example" description="Codes used to indicate the type of food that should NOT be given to the patient." valueSet="2.16.840.1.113883.4.642.3.384" canonicalUri="http://hl7.org/fhir/ValueSet/food-type"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="oralDiet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Oral diet components</desc>
                    <fhir fid="NutritionOrder.oralDiet" definition="Diet given orally in contrast to enteral (tube) feeding.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="ODS-1 Value = &#34;D&#34;"/>
                        <mapping identity="rim" map="oralDiet .outboundRelationship [typeCode =COMP], target [classCode=SPLY, moodCode=RQO, code=OralDietSupplyType]"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Type of oral diet or diet restrictions that describe what can be consumed orally</desc>
                        <fhir fid="NutritionOrder.oralDiet.type" definition="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Diet Codes" strength="example" description="Codes used to indicate the type of diet being ordered for a patient." valueSet="2.16.840.1.113883.4.642.3.385" canonicalUri="http://hl7.org/fhir/ValueSet/diet-type"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="ODS-3"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <element name="schedule" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Scheduled frequency of diet</desc>
                        <fhir fid="NutritionOrder.oralDiet.schedule" definition="The time period and frequency at which the diet should be given.  The diet should be given for the combination of all schedules if more than one schedule is present.">
                            <type value="Timing"/>
                            <mapping identity="workflow" map="Request.occurrence[x]"/>
                            <mapping identity="v2" map="ODS-2, TQ1-7/8"/>
                            <mapping identity="rim" map=".expectedUseTime"/>
                        </fhir>
                    </element>
                    <element name="nutrient" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Required nutrient modifications</desc>
                        <fhir fid="NutritionOrder.oralDiet.nutrient" definition="Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.">
                            <type value="BackboneElement"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".participation[typeCode=PRD].role[classCode=MANU], manufacturedFoodKind"/>
                        </fhir>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of nutrient that is being modified</desc>
                            <fhir fid="NutritionOrder.oralDiet.nutrient.modifier" definition="The nutrient that is being modified such as carbohydrate or sodium.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Nutrient Modifier Codes" strength="example" description="Codes for types of nutrients that are being modified such as carbohydrate or sodium." valueSet="2.16.840.1.113883.4.642.3.386" canonicalUri="http://hl7.org/fhir/ValueSet/nutrient-code"/>
                                <mapping identity="workflow" map="Request.code"/>
                                <mapping identity="w5" map="FiveWs.what[x]"/>
                                <mapping identity="v2" map="ODS-4"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Quantity of the specified nutrient</desc>
                            <fhir fid="NutritionOrder.oralDiet.nutrient.amount" definition="The quantity of the specified nutrient to include in diet.">
                                <type value="Quantity"/>
                                <mapping identity="v2" map="ODS-4"/>
                                <mapping identity="rim" map=".quantity"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="texture" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Required texture modifications</desc>
                        <fhir fid="NutritionOrder.oralDiet.texture" definition="Class that describes any texture modifications required for the patient to safely consume various types of solid foods.">
                            <type value="BackboneElement"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".inboundRelationship [typeCode =COMP], target [classCode=PROC, moodCode=EVN, code=DietTextureModificationType]"/>
                        </fhir>
                        <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Code to indicate how to alter the texture of the foods, e.g. pureed</desc>
                            <fhir fid="NutritionOrder.oralDiet.texture.modifier" definition="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed." comment="Coupled with the foodType (Meat).">
                                <type value="CodeableConcept"/>
                                <binding displayName="Texture Modifier Codes" strength="example" description="Codes for food consistency types or texture modifications to apply to foods." valueSet="2.16.840.1.113883.4.642.3.387" canonicalUri="http://hl7.org/fhir/ValueSet/texture-code"/>
                                <mapping identity="workflow" map="Request.code"/>
                                <mapping identity="v2" map="ODS-4"/>
                                <mapping identity="rim" map=".code"/>
                            </fhir>
                        </element>
                        <element name="foodType" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Concepts that are used to identify an entity that is ingested for nutritional purposes</desc>
                            <fhir fid="NutritionOrder.oralDiet.texture.foodType" definition="The food type(s) (e.g. meats, all foods)  that the texture modification applies to.  This could be all foods types." comment="Coupled with the `texture.modifier`; could be (All Foods).">
                                <type value="CodeableConcept"/>
                                <binding displayName="Texture Modified Food Type Codes" strength="example" description="Codes for types of foods that are texture-modified." valueSet="2.16.840.1.113883.4.642.3.388" canonicalUri="http://hl7.org/fhir/ValueSet/modified-foodtype"/>
                                <mapping identity="workflow" map="Request.code"/>
                                <mapping identity="v2" map="ODS-4"/>
                                <mapping identity="rim" map=".participation[typeCode=PRD].role[classCode=MANU], manufacturedFoodKind; .code"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="fluidConsistencyType" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The required consistency of fluids and liquids provided to the patient</desc>
                        <fhir fid="NutritionOrder.oralDiet.fluidConsistencyType" definition="The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Fluid Consistency Type Codes" strength="example" description="Codes used to represent the consistency of fluids and liquids provided to the patient." valueSet="2.16.840.1.113883.4.642.3.389" canonicalUri="http://hl7.org/fhir/ValueSet/consistency-type"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".code  (Not differentiated from dietTextureModificationType in HL7 v3)"/>
                        </fhir>
                    </element>
                    <element name="instruction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Instructions or additional information about the oral diet</desc>
                        <fhir fid="NutritionOrder.oralDiet.instruction" definition="Free text or additional instructions or information pertaining to the oral diet." comment="Free text dosage instructions can be used for cases where the instructions are too complex to code." isSummary="true">
                            <type value="string"/>
                            <mapping identity="workflow" map="Request.supportingInfo"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                </element>
                <element name="supplement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supplement components</desc>
                    <fhir fid="NutritionOrder.supplement" definition="Oral nutritional products given in order to add further nutritional value to the patient's diet.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="ODS-1 Value = &#34;P&#34;"/>
                        <mapping identity="rim" map=".outboundRelationship [typeCode =COMP], target [classCode=SPLY, moodCode=RQO, code=SUPPLEMENT]"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of supplement product requested</desc>
                        <fhir fid="NutritionOrder.supplement.type" definition="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Supplement Type Codes" strength="example" description="Codes for nutritional supplements to be provided to the patient." valueSet="2.16.840.1.113883.4.642.3.390" canonicalUri="http://hl7.org/fhir/ValueSet/supplement-type"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="ODS-3"/>
                            <mapping identity="rim" map=".participation[typeCode=PRD].role[classCode=MANU], manufacturedFoodKind; .code (NutritionalSupplementType)"/>
                        </fhir>
                    </element>
                    <element name="productName" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Product or brand name of the nutritional supplement</desc>
                        <fhir fid="NutritionOrder.supplement.productName" definition="The product or brand name of the nutritional supplement such as &#34;Acme Protein Shake&#34;.">
                            <type value="string"/>
                            <mapping identity="v2" map="ODS-3"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="schedule" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Scheduled frequency of supplement</desc>
                        <fhir fid="NutritionOrder.supplement.schedule" definition="The time period and frequency at which the supplement(s) should be given.  The supplement should be given for the combination of all schedules if more than one schedule is present.">
                            <type value="Timing"/>
                            <mapping identity="workflow" map="Request.occurrence[x]"/>
                            <mapping identity="v2" map="ODS-2,TQ1-7/8"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount of the nutritional supplement</desc>
                        <fhir fid="NutritionOrder.supplement.quantity" definition="The amount of the nutritional supplement to be given.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="TQ1-2"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                    <element name="instruction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Instructions or additional information about the oral supplement</desc>
                        <fhir fid="NutritionOrder.supplement.instruction" definition="Free text or additional instructions or information pertaining to the oral supplement." comment="Free text dosage instructions can be used for cases where the instructions are too complex to code." isSummary="true">
                            <type value="string"/>
                            <mapping identity="workflow" map="Request.supportingInfo"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                </element>
                <element name="enteralFormula" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Enteral formula components</desc>
                    <fhir fid="NutritionOrder.enteralFormula" definition="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="ODS-1 Value coded for enteral"/>
                        <mapping identity="rim" map=".outboundRelationship [typeCode =COMP], target [classCode=SPLY, moodCode=RQO, code=FORMULA]"/>
                    </fhir>
                    <element name="baseFormulaType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of enteral or infant formula</desc>
                        <fhir fid="NutritionOrder.enteralFormula.baseFormulaType" definition="The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Enteral Formula Type Codes" strength="example" description="Codes for type of enteral formula to be administered to patient." valueSet="2.16.840.1.113883.4.642.3.391" canonicalUri="http://hl7.org/fhir/ValueSet/entformula-type"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="ODS-3"/>
                            <mapping identity="rim" map=".participation[typeCode=PRD].role[classCode=MANU], manufacturedFoodKind; .code (NutritionalFormulaType)"/>
                        </fhir>
                    </element>
                    <element name="baseFormulaProductName" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Product or brand name of the enteral or infant formula</desc>
                        <fhir fid="NutritionOrder.enteralFormula.baseFormulaProductName" definition="The product or brand name of the enteral or infant formula product such as &#34;ACME Adult Standard Formula&#34;.">
                            <type value="string"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="additiveType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of modular component to add to the feeding</desc>
                        <fhir fid="NutritionOrder.enteralFormula.additiveType" definition="Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Enteral Formula Additive Type Code" strength="example" description="Codes for the type of modular component such as protein, carbohydrate or fiber to be provided in addition to or mixed with the base formula." valueSet="2.16.840.1.113883.4.642.3.392" canonicalUri="http://hl7.org/fhir/ValueSet/entformula-additive"/>
                            <mapping identity="workflow" map="Request.code"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="ODS-3"/>
                            <mapping identity="rim" map="N/A (not differentiated from NutritionalFormulaType in HL7 v3)"/>
                        </fhir>
                    </element>
                    <element name="additiveProductName" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Product or brand name of the modular additive</desc>
                        <fhir fid="NutritionOrder.enteralFormula.additiveProductName" definition="The product or brand name of the type of modular component to be added to the formula.">
                            <type value="string"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                    <element name="caloricDensity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount of energy per specified volume that is required</desc>
                        <fhir fid="NutritionOrder.enteralFormula.caloricDensity" definition="The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz.  For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="TQ1-2"/>
                            <mapping identity="rim" map=".quantity (caloricDensity)"/>
                        </fhir>
                    </element>
                    <element name="routeofAdministration" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How the formula should enter the patient's gastrointestinal tract</desc>
                        <fhir fid="NutritionOrder.enteralFormula.routeofAdministration" definition="The route or physiological path of administration into the patient's gastrointestinal  tract for purposes of providing the formula feeding, e.g. nasogastric tube.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Enteral Route Codes" strength="extensible" description="Codes specifying the route of administration of enteral formula." valueSet="2.16.840.1.113883.4.642.3.394" canonicalUri="http://hl7.org/fhir/ValueSet/enteral-route"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".routeCode"/>
                        </fhir>
                    </element>
                    <element name="administration" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Formula feeding instruction as structured data</desc>
                        <fhir fid="NutritionOrder.enteralFormula.administration" definition="Formula administration instructions as structured data.  This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding.  An example of this would be an instruction to increase the rate of continuous feeding every 2 hours."
                            comment="See implementation notes below for further discussion on how to order continuous vs bolus enteral feeding using this resource.">
                            <type value="BackboneElement"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".outboundRelationship [typeCode =COMP], target [classCode=SBADM, moodCode=RQO]"/>
                        </fhir>
                        <element name="schedule" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Scheduled frequency of enteral feeding</desc>
                            <fhir fid="NutritionOrder.enteralFormula.administration.schedule" definition="The time period and frequency at which the enteral formula should be delivered to the patient.">
                                <type value="Timing"/>
                                <mapping identity="workflow" map="Request.occurrence[x]"/>
                                <mapping identity="v2" map="ODS-2,TQ1-7/8"/>
                                <mapping identity="rim" map=".effectiveUseTime"/>
                            </fhir>
                        </element>
                        <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The volume of formula to provide</desc>
                            <fhir fid="NutritionOrder.enteralFormula.administration.quantity" definition="The volume of formula to provide to the patient per the specified administration schedule.">
                                <type value="Quantity"/>
                                <mapping identity="v2" map="TQ1-2"/>
                                <mapping identity="rim" map=".doseQuantity"/>
                            </fhir>
                        </element>
                        <choice name="rate[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Speed with which the formula is provided per period of time</desc>
                            <fhir fid="NutritionOrder.enteralFormula.administration.rate[x]" definition="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule."
                                comment="Ratio is used when the quantity value in the denominator is not &#34;1&#34;, otherwise use Quantity. For example, the Ratio datatype is used for &#34;200 mL/4 hrs&#34; versus the Quantity datatype for &#34;50 mL/hr&#34;.">
                                <type value="Quantity"/>
                                <type value="Ratio"/>
                                <mapping identity="v2" map="ODS-4"/>
                                <mapping identity="rim" map=".rateQuantity"/>
                            </fhir>
                            <element name="rateQuantity">
                                <fhir fid="NutritionOrder.enteralFormula.administration.rateQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="rateRatio">
                                <fhir fid="NutritionOrder.enteralFormula.administration.rateRatio">
                                    <type value="Ratio"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="maxVolumeToDeliver" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Upper limit on formula volume per unit of time</desc>
                        <fhir fid="NutritionOrder.enteralFormula.maxVolumeToDeliver" definition="The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map=".maxDoseQuantity"/>
                        </fhir>
                    </element>
                    <element name="administrationInstruction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Formula feeding instructions expressed as text</desc>
                        <fhir fid="NutritionOrder.enteralFormula.administrationInstruction" definition="Free text formula administration, feeding instructions or additional instructions or information." comment="Free text dosage instructions can be used for cases where the instructions are too complex to code." isSummary="true">
                            <type value="string"/>
                            <mapping identity="workflow" map="Request.supportingInfo"/>
                            <mapping identity="v2" map="ODS-4"/>
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments</desc>
                    <fhir fid="NutritionOrder.note" definition="Comments made about the {{title}} by the requester, performer, subject or other participants." comment="This element SHALL NOT be used to supply free text instructions for the diet which are represented in the `.oralDiet.instruction`, `supplement.instruction`, or `enteralFormula.administrationInstruction` elements.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.98" name="Observation" displayName="Observation" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Observation">
            <desc language="en-US">Measurements and simple assertions made about a patient, device or other subject.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Observations are a key aspect of healthcare. This resource is used to capture those that do not require more sophisticated mechanisms.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Observation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="sct-concept" uri="http://snomed.info/conceptdomain" name="SNOMED CT Concept Domain Binding"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="sct-attr" uri="http://snomed.org/attributebinding" name="SNOMED CT Attribute Binding"/>
            </fhir>
            <element name="Observation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Measurements and simple assertions</desc>
                <fhir fid="Observation" definition="Measurements and simple assertions made about a patient, device or other subject." comment="Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as laboratory reports, etc.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="sct-concept" map="&lt; 363787002 |Observable entity|"/>
                    <mapping identity="v2" map="OBX"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN]"/>
                    <constraint key="obs-7" severity="error" human="If Observation.code is the same as an Observation.component.code then the value element associated with the code SHALL NOT be present" expression="value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()"
                        xpath="not(f:*[starts-with(local-name(.), 'value')] and (for $coding in f:code/f:coding return f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value] [f:system/@value=$coding/f:system/@value]))" source=""/>
                    <constraint key="obs-6" severity="error" human="dataAbsentReason SHALL only be present if Observation.value[x] is not present" expression="dataAbsentReason.empty() or value.empty()" xpath="not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for observation</desc>
                    <fhir fid="Observation.identifier" definition="A unique identifier assigned to this observation." requirements="Allows observations to be distinguished and referenced." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2"
                            map="OBX.21  For OBX segments from systems without OBX-21 support a combination of ORC/OBR and OBX must be negotiated between trading partners to uniquely identify the OBX segment. Depending on how V2 has been implemented each of these may be an option: 1) OBR-3 + OBX-3 + OBX-4 or 2) OBR-3 + OBR-4 + OBX-3 + OBX-4 or 2) some other way to uniquely ID the OBR/ORC + OBX-3 + OBX-4."/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills plan, proposal or order</desc>
                    <fhir fid="Observation.basedOn" definition="A plan, proposal or order that is fulfilled in whole or in part by this event.  For example, a MedicationRequest may require a patient to have laboratory test performed before  it is dispensed." requirements="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/NutritionOrder"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="Observation.partOf" definition="A larger event of which this particular Observation is a component or step.  For example,  an observation as part of a procedure." comment="To link an Observation to an Encounter use `encounter`.  See the  [Notes](observation.html#obsgrouping) below for guidance on referencing another Observation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Immunization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">registered | preliminary | final | amended +</desc>
                    <fhir fid="Observation.status" definition="The status of the result value." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." requirements="Need to track the status of individual results. Some results are finalized before the whole report is finalized." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ObservationStatus" strength="required" description="Codes providing the status of an observation." valueSet="2.16.840.1.113883.4.642.3.400" canonicalUri="http://hl7.org/fhir/ValueSet/observation-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="sct-concept" map="&lt; 445584004 |Report by finality status|"/>
                        <mapping identity="v2" map="OBX-11"/>
                        <mapping identity="rim" map="status  Amended &amp; Final are differentiated by whether it is the subject of a ControlAct event with a type of &#34;revise&#34;"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Classification of type of observation</desc>
                    <fhir fid="Observation.category" definition="A code that classifies the general type of observation being made."
                        comment="In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set." requirements="Used for filtering what observations are retrieved and displayed.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Observation Category Codes" strength="preferred" description="Codes for high level observation categories." valueSet="2.16.840.1.113883.4.642.3.403" canonicalUri="http://hl7.org/fhir/ValueSet/observation-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;EVN&#34;].code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Type of observation (code / type)</desc>
                    <fhir fid="Observation.code" definition="Describes what was observed. Sometimes this is called the observation &#34;name&#34;." comment="*All* code-value and, if present, component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation."
                        requirements="Knowing what kind of observation is being made is essential to understanding the observation." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="LOINC Codes" strength="example" description="Codes identifying names of simple observations." valueSet="2.16.840.1.113883.4.642.3.396" canonicalUri="http://hl7.org/fhir/ValueSet/observation-codes"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="sct-concept" map="&lt; 363787002 |Observable entity| OR &lt; 386053000 |Evaluation procedure|"/>
                        <mapping identity="v2" map="OBX-3"/>
                        <mapping identity="rim" map="code"/>
                        <mapping identity="sct-attr" map="116680003 |Is a|"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who and/or what the observation is about</desc>
                    <fhir fid="Observation.subject"
                        definition="The patient, or group of patients, location, or device this observation is about and into whose record the observation is placed. If the actual focus of the observation is different from the subject (or a sample of, part, or region of the subject), the `focus` element or the `code` itself specifies the actual focus of the observation."
                        comment="One would expect this element to be a cardinality of 1..1. The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated."
                        requirements="Observations have no value if you don't know who or what they're about." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map="participation[typeCode=RTGT] "/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="focus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What the observation is about, when it is not about the subject of record</desc>
                    <fhir fid="Observation.focus"
                        definition="The actual focus of an observation when it is not the patient of record representing something or someone associated with the patient such as a spouse, parent, fetus, or donor. For example, fetus observations in a mother's record.  The focus of an observation could also be an existing condition,  an intervention, the subject's diet,  another observation of the subject,  or a body structure such as tumor or implanted device.   An example use case would be using the Observation resource to capture whether the mother is trained to change her child's tracheostomy tube. In this example, the child is the patient of record and the mother is the focus."
                        comment="Typically, an observation is made about the subject - a patient, or group of patients, location, or device - and the distinction between the subject and what is directly measured for an observation is specified in the observation code itself ( e.g., &#34;Blood Glucose&#34;) and does not need to be represented separately using this element.  Use `specimen` if a reference to a specimen is required.  If a code is required instead of a resource use either  `bodysite` for bodysites or the standard extension [focusCode](extension-observation-focuscode.html)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="OBX-3"/>
                        <mapping identity="rim" map="participation[typeCode=SBJ]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Healthcare event during which this observation is made</desc>
                    <fhir fid="Observation.encounter" definition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made."
                        comment="This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission laboratory tests)."
                        requirements="For some observations it may be important to know the link between an observation and a particular encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1"/>
                        <mapping identity="rim" map="inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="effective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Clinically relevant time/time-period for observation</desc>
                    <fhir fid="Observation.effective[x]"
                        definition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the &#34;physiologically relevant time&#34;. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself."
                        comment="At least a date should be present unless this observation is a historical report.  For recording imprecise or &#34;fuzzy&#34; times (For example, a blood glucose measurement taken &#34;after breakfast&#34;) use the [Timing](datatypes.html#timing) datatype which allow the measurement to be tied to regular life events."
                        requirements="Knowing when an observation was deemed true is important to its relevance as well as determining trends." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <type value="instant"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="OBX-14, and/or OBX-19 after v2.4  (depends on who observation made)"/>
                        <mapping identity="rim" map="effectiveTime"/>
                    </fhir>
                    <element name="effectiveDateTime">
                        <fhir fid="Observation.effectiveDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="effectivePeriod">
                        <fhir fid="Observation.effectivePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="effectiveTiming">
                        <fhir fid="Observation.effectiveTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                    <element name="effectiveInstant">
                        <fhir fid="Observation.effectiveInstant">
                            <type value="instant"/>
                        </fhir>
                    </element>
                </choice>
                <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date/Time this version was made available</desc>
                    <fhir fid="Observation.issued" definition="The date and time this version of the observation was made available to providers, typically after the results have been reviewed and verified."
                        comment="For Observations that don’t require review and verification, it may be the same as the [`lastUpdated` ](resource-definitions.html#Meta.lastUpdated) time of the resource itself.  For Observations that do require review and verification for certain updates, it might not be the same as the `lastUpdated` time of the resource itself due to a non-clinically significant update that doesn’t require the new version to be reviewed and verified again."
                        isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="OBR.22 (or MSH.7), or perhaps OBX-19 (depends on who observation made)"/>
                        <mapping identity="rim" map="participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who is responsible for the observation</desc>
                    <fhir fid="Observation.performer" definition="Who was responsible for asserting the observed value as &#34;true&#34;." requirements="May give a degree of confidence in the observation and also indicates where follow-up questions should be directed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="OBX.15 / (Practitioner)  OBX-16,  PRT-5:PRT-4='RO' /  (Device)  OBX-18 , PRT-10:PRT-4='EQUIP' / (Organization)  OBX-23,  PRT-8:PRT-4='PO'"/>
                        <mapping identity="rim" map="participation[typeCode=PRF]"/>
                    </fhir>
                </element>
                <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Actual result</desc>
                    <fhir fid="Observation.value[x]" definition="The information determined as a result of making the observation, if the information has a simple value."
                        comment="An observation may have; 1)  a single value here, 2)  both a value and a set of related or component values,  or 3)  only a set of related or component values. If a value is present, the datatype for this element should be determined by Observation.code.  A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.  For additional guidance, see the [Notes section](observation.html#notes) below."
                        requirements="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." isSummary="true">
                        <type value="Quantity"/>
                        <type value="CodeableConcept"/>
                        <type value="string"/>
                        <type value="boolean"/>
                        <type value="integer"/>
                        <type value="Range"/>
                        <type value="Ratio"/>
                        <type value="SampledData"/>
                        <type value="time"/>
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="sct-concept" map="&lt; 441742003 |Evaluation finding|"/>
                        <mapping identity="v2" map="OBX.2, OBX.5, OBX.6"/>
                        <mapping identity="rim" map="value"/>
                        <mapping identity="sct-attr" map="363714003 |Interprets|"/>
                    </fhir>
                    <element name="valueQuantity">
                        <fhir fid="Observation.valueQuantity">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="valueCodeableConcept">
                        <fhir fid="Observation.valueCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="valueString">
                        <fhir fid="Observation.valueString">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="valueBoolean">
                        <fhir fid="Observation.valueBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="valueInteger">
                        <fhir fid="Observation.valueInteger">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="valueRange">
                        <fhir fid="Observation.valueRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                    <element name="valueRatio">
                        <fhir fid="Observation.valueRatio">
                            <type value="Ratio"/>
                        </fhir>
                    </element>
                    <element name="valueSampledData">
                        <fhir fid="Observation.valueSampledData">
                            <type value="SampledData"/>
                        </fhir>
                    </element>
                    <element name="valueTime">
                        <fhir fid="Observation.valueTime">
                            <type value="time"/>
                        </fhir>
                    </element>
                    <element name="valueDateTime">
                        <fhir fid="Observation.valueDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="valuePeriod">
                        <fhir fid="Observation.valuePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="dataAbsentReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why the result is missing</desc>
                    <fhir fid="Observation.dataAbsentReason" definition="Provides a reason why the expected value in the element Observation.value[x] is missing."
                        comment="Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  &#34;detected&#34;, &#34;not detected&#34;, &#34;inconclusive&#34;, or  &#34;specimen unsatisfactory&#34;.   &#xA;&#xA;The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code &#34;error&#34; could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when &gt; 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values."
                        requirements="For many results it is necessary to handle exceptional values in measurements.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DataAbsentReason" strength="extensible" description="Codes specifying why the result (`Observation.value[x]`) is missing." valueSet="2.16.840.1.113883.4.642.3.5" canonicalUri="http://hl7.org/fhir/ValueSet/data-absent-reason"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map="value.nullFlavor"/>
                    </fhir>
                </element>
                <element name="interpretation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">High, low, normal, etc.</desc>
                    <fhir fid="Observation.interpretation" definition="A categorical assessment of an observation value.  For example, high, low, normal."
                        comment="Historically used for laboratory results (known as 'abnormal flag' ),  its use extends to other use cases where coded interpretations  are relevant.  Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result."
                        requirements="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Observation Interpretation Codes" strength="extensible" description="Codes identifying interpretations of observations." valueSet="2.16.840.1.113883.4.642.3.399" canonicalUri="http://hl7.org/fhir/ValueSet/observation-interpretation"/>
                        <mapping identity="sct-concept" map="&lt; 260245000 |Findings values|"/>
                        <mapping identity="v2" map="OBX-8"/>
                        <mapping identity="rim" map="interpretationCode"/>
                        <mapping identity="sct-attr" map="363713009 |Has interpretation|"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments about the observation</desc>
                    <fhir fid="Observation.note" definition="Comments about the observation or the results." comment="May include general statements about the observation, or statements about significant, unexpected or unreliable results values, or information about its source when relevant to its interpretation." requirements="Need to be able to provide free text additional information.">
                        <type value="Annotation"/>
                        <mapping identity="v2" map="NTE.3 (partner NTE to OBX, or sometimes another (child?) OBX)"/>
                        <mapping identity="rim" map="subjectOf.observationEvent[code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Observed body part</desc>
                    <fhir fid="Observation.bodySite" definition="Indicates the site on the subject's body where the observation was made (i.e. the target site)."
                        comment="Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   &#xA;&#xA;If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ bodySite](extension-bodysite.html).">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="sct-concept" map="&lt; 123037004 |Body structure|"/>
                        <mapping identity="v2" map="OBX-20"/>
                        <mapping identity="rim" map="targetSiteCode"/>
                        <mapping identity="sct-attr" map="718497002 |Inherent location|"/>
                    </fhir>
                </element>
                <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How it was done</desc>
                    <fhir fid="Observation.method" definition="Indicates the mechanism used to perform the observation." comment="Only used if not implicit in code for Observation.code." requirements="In some cases, method can impact results and is thus used for determining whether results can be compared or determining significance of results.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Observation Methods" strength="example" description="Methods for simple observations." valueSet="2.16.840.1.113883.4.642.3.395" canonicalUri="http://hl7.org/fhir/ValueSet/observation-methods"/>
                        <mapping identity="v2" map="OBX-17"/>
                        <mapping identity="rim" map="methodCode"/>
                    </fhir>
                </element>
                <element name="specimen" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Specimen used for this observation</desc>
                    <fhir fid="Observation.specimen" definition="The specimen that was used when this observation was made."
                        comment="Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                        </type>
                        <mapping identity="sct-concept" map="&lt; 123038009 |Specimen|"/>
                        <mapping identity="v2" map="SPM segment"/>
                        <mapping identity="rim" map="participation[typeCode=SPC].specimen"/>
                        <mapping identity="sct-attr" map="704319004 |Inherent in|"/>
                    </fhir>
                </element>
                <element name="device" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">(Measurement) Device</desc>
                    <fhir fid="Observation.device" definition="The device used to generate the observation data." comment="Note that this is not meant to represent a device involved in the transmission of the result, e.g., a gateway.  Such devices may be documented using the Provenance resource where relevant.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DeviceMetric"/>
                        </type>
                        <mapping identity="sct-concept" map="&lt; 49062001 |Device|"/>
                        <mapping identity="v2" map="OBX-17 / PRT -10"/>
                        <mapping identity="rim" map="participation[typeCode=DEV]"/>
                        <mapping identity="sct-attr" map="424226004 |Using device|"/>
                    </fhir>
                </element>
                <element name="referenceRange" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Provides guide for interpretation</desc>
                    <fhir fid="Observation.referenceRange" definition="Guidance on how to interpret the value by comparison to a normal or recommended range.  Multiple reference ranges are interpreted as an &#34;OR&#34;.   In other words, to represent two distinct target populations, two `referenceRange` elements would be used."
                        comment="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties."
                        requirements="Knowing what values are considered &#34;normal&#34; can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="OBX.7"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]"/>
                        <constraint key="obs-3" severity="error" human="Must have at least a low or a high or text" expression="low.exists() or high.exists() or text.exists()" xpath="(exists(f:low) or exists(f:high)or exists(f:text))" source=""/>
                    </fhir>
                    <element name="low" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Low Range, if relevant</desc>
                        <fhir fid="Observation.referenceRange.low" definition="The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9). If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is &lt;=2.3).">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="OBX-7"/>
                            <mapping identity="rim" map="value:IVL_PQ.low"/>
                        </fhir>
                    </element>
                    <element name="high" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">High Range, if relevant</desc>
                        <fhir fid="Observation.referenceRange.high" definition="The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9). If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is &gt;= 2.3).">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="OBX-7"/>
                            <mapping identity="rim" map="value:IVL_PQ.high"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference range qualifier</desc>
                        <fhir fid="Observation.referenceRange.type" definition="Codes to indicate the what part of the targeted reference population it applies to. For example, the normal or therapeutic range." comment="This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed."
                            requirements="Need to be able to say what kind of reference range this is - normal, recommended, therapeutic, etc.,  - for proper interpretation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Observation Reference Range Meaning Codes" strength="preferred" description="Code for the meaning of a reference range." valueSet="2.16.840.1.113883.4.642.3.397" canonicalUri="http://hl7.org/fhir/ValueSet/referencerange-meaning"/>
                            <mapping identity="sct-concept" map="&lt; 260245000 |Findings values| OR  &#xD;&lt; 365860008 |General clinical state finding| &#xD;OR &#xD;&lt; 250171008 |Clinical history or observation findings| OR  &#xD;&lt; 415229000 |Racial group| OR &#xD;&lt; 365400002 |Finding of puberty stage| OR&#xD;&lt; 443938003 |Procedure carried out on subject|"/>
                            <mapping identity="v2" map="OBX-10"/>
                            <mapping identity="rim" map="interpretationCode"/>
                        </fhir>
                    </element>
                    <element name="appliesTo" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Reference range population</desc>
                        <fhir fid="Observation.referenceRange.appliesTo"
                            definition="Codes to indicate the target population this reference range applies to.  For example, a reference range may be based on the normal population or a particular sex or race.  Multiple `appliesTo`  are interpreted as an &#34;AND&#34; of the target populations.  For example, to represent a target population of African American females, both a code of female and a code for African American would be used."
                            comment="This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed." requirements="Need to be able to identify the target population for proper interpretation.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Observation Reference Range Applies To Codes" strength="example" description="Codes identifying the population the reference range applies to." valueSet="2.16.840.1.113883.4.642.3.407" canonicalUri="http://hl7.org/fhir/ValueSet/referencerange-appliesto"/>
                            <mapping identity="sct-concept" map="&lt; 260245000 |Findings values| OR  &#xD;&lt; 365860008 |General clinical state finding| &#xD;OR &#xD;&lt; 250171008 |Clinical history or observation findings| OR  &#xD;&lt; 415229000 |Racial group| OR &#xD;&lt; 365400002 |Finding of puberty stage| OR&#xD;&lt; 443938003 |Procedure carried out on subject|"/>
                            <mapping identity="v2" map="OBX-10"/>
                            <mapping identity="rim" map="interpretationCode"/>
                        </fhir>
                    </element>
                    <element name="age" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Applicable age range, if relevant</desc>
                        <fhir fid="Observation.referenceRange.age" definition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." requirements="Some analytes vary greatly over age.">
                            <type value="Range"/>
                            <mapping identity="rim" map="outboundRelationship[typeCode=PRCN].targetObservationCriterion[code=&#34;age&#34;].value"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Text based reference range in an observation</desc>
                        <fhir fid="Observation.referenceRange.text" definition="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of &#34;Negative&#34; or a list or table of &#34;normals&#34;.">
                            <type value="string"/>
                            <mapping identity="v2" map="OBX-7"/>
                            <mapping identity="rim" map="value:ST"/>
                        </fhir>
                    </element>
                </element>
                <element name="hasMember" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Related resource that belongs to the Observation group</desc>
                    <fhir fid="Observation.hasMember" definition="This observation is a group observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group."
                        comment="When using this element, an observation will typically have either a value or a set of related resources, although both may be present in some cases.  For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below.  Note that a system may calculate results from [QuestionnaireResponse](questionnaireresponse.html)  into a final score and represent the score as an Observation."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/>
                        </type>
                        <mapping identity="v2" map="Relationships established by OBX-4 usage"/>
                        <mapping identity="rim" map="outBoundRelationship"/>
                    </fhir>
                </element>
                <element name="derivedFrom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Related measurements the observation is made from</desc>
                    <fhir fid="Observation.derivedFrom" definition="The target resource that represents a measurement from which this observation value is derived. For example, a calculated anion gap or a fetal measurement based on an ultrasound image."
                        comment="All the reference choices that are listed in this element can represent clinical observations and other measurements that may be the source for a derived value.  The most common reference will be another Observation.  For a discussion on the ways Observations can assembled in groups together, see [Notes](observation.html#obsgrouping) below." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ImagingStudy"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Media"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MolecularSequence"/>
                        </type>
                        <mapping identity="v2" map="Relationships established by OBX-4 usage"/>
                        <mapping identity="rim" map=".targetObservation"/>
                    </fhir>
                </element>
                <element name="component" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Component results</desc>
                    <fhir fid="Observation.component" definition="Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations."
                        comment="For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below."
                        requirements="Component observations share the same attributes in the Observation resource as the primary observation and are always treated a part of a single observation (they are not separable).   However, the reference range for the primary observation value is not inherited by the component values and is required when appropriate for each component observation."
                        isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="containment by OBX-4?"/>
                        <mapping identity="rim" map="outBoundRelationship[typeCode=COMP]"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Type of component observation (code / type)</desc>
                        <fhir fid="Observation.component.code" definition="Describes what was observed. Sometimes this is called the observation &#34;code&#34;." comment="*All* code-value and  component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation."
                            requirements="Knowing what kind of observation is being made is essential to understanding the observation." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="LOINC Codes" strength="example" description="Codes identifying names of simple observations." valueSet="2.16.840.1.113883.4.642.3.396" canonicalUri="http://hl7.org/fhir/ValueSet/observation-codes"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="sct-concept" map="&lt; 363787002 |Observable entity| OR &#xD;&lt; 386053000 |Evaluation procedure|"/>
                            <mapping identity="v2" map="OBX-3"/>
                            <mapping identity="rim" map="code"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Actual component result</desc>
                        <fhir fid="Observation.component.value[x]" definition="The information determined as a result of making the observation, if the information has a simple value."
                            comment="Used when observation has a set of component observations. An observation may have both a value (e.g. an  Apgar score)  and component observations (the observations from which the Apgar score was derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.  For additional guidance, see the [Notes section](observation.html#notes) below."
                            requirements="An observation exists to have a value, though it might not if it is in error, or if it represents a group of observations." isSummary="true">
                            <type value="Quantity"/>
                            <type value="CodeableConcept"/>
                            <type value="string"/>
                            <type value="boolean"/>
                            <type value="integer"/>
                            <type value="Range"/>
                            <type value="Ratio"/>
                            <type value="SampledData"/>
                            <type value="time"/>
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <mapping identity="sct-concept" map="363714003 |Interprets| &lt; 441742003 |Evaluation finding|"/>
                            <mapping identity="v2" map="OBX.2, OBX.5, OBX.6"/>
                            <mapping identity="rim" map="value"/>
                            <mapping identity="sct-attr" map="363714003 |Interprets|"/>
                        </fhir>
                        <element name="valueQuantity">
                            <fhir fid="Observation.component.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueCodeableConcept">
                            <fhir fid="Observation.component.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="Observation.component.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="Observation.component.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueInteger">
                            <fhir fid="Observation.component.valueInteger">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="Observation.component.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueRatio">
                            <fhir fid="Observation.component.valueRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="valueSampledData">
                            <fhir fid="Observation.component.valueSampledData">
                                <type value="SampledData"/>
                            </fhir>
                        </element>
                        <element name="valueTime">
                            <fhir fid="Observation.component.valueTime">
                                <type value="time"/>
                            </fhir>
                        </element>
                        <element name="valueDateTime">
                            <fhir fid="Observation.component.valueDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="valuePeriod">
                            <fhir fid="Observation.component.valuePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="dataAbsentReason" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Why the component result is missing</desc>
                        <fhir fid="Observation.component.dataAbsentReason" definition="Provides a reason why the expected value in the element Observation.component.value[x] is missing."
                            comment="&#34;Null&#34; or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  &#34;detected&#34;, &#34;not detected&#34;, &#34;inconclusive&#34;, or  &#34;test not done&#34;. &#xA;&#xA;The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code &#34;error&#34; could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values."
                            requirements="For many results it is necessary to handle exceptional values in measurements.">
                            <type value="CodeableConcept"/>
                            <binding displayName="DataAbsentReason" strength="extensible" description="Codes specifying why the result (`Observation.value[x]`) is missing." valueSet="2.16.840.1.113883.4.642.3.5" canonicalUri="http://hl7.org/fhir/ValueSet/data-absent-reason"/>
                            <mapping identity="v2" map="N/A"/>
                            <mapping identity="rim" map="value.nullFlavor"/>
                        </fhir>
                    </element>
                    <element name="interpretation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">High, low, normal, etc.</desc>
                        <fhir fid="Observation.component.interpretation" definition="A categorical assessment of an observation value.  For example, high, low, normal."
                            comment="Historically used for laboratory results (known as 'abnormal flag' ),  its use extends to other use cases where coded interpretations  are relevant.  Often reported as one or more simple compact codes this element is often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result."
                            requirements="For some results, particularly numeric results, an interpretation is necessary to fully understand the significance of a result.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Observation Interpretation Codes" strength="extensible" description="Codes identifying interpretations of observations." valueSet="2.16.840.1.113883.4.642.3.399" canonicalUri="http://hl7.org/fhir/ValueSet/observation-interpretation"/>
                            <mapping identity="sct-concept" map="&lt; 260245000 |Findings values|"/>
                            <mapping identity="v2" map="OBX-8"/>
                            <mapping identity="rim" map="interpretationCode"/>
                            <mapping identity="sct-attr" map="363713009 |Has interpretation|"/>
                        </fhir>
                    </element>
                    <element name="referenceRange" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Provides guide for interpretation of component result</desc>
                        <fhir fid="Observation.component.referenceRange" definition="Guidance on how to interpret the value by comparison to a normal or recommended range."
                            comment="Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this might not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties."
                            requirements="Knowing what values are considered &#34;normal&#34; can help evaluate the significance of a particular result. Need to be able to provide multiple reference ranges for different contexts.">
                            <mapping identity="v2" map="OBX.7"/>
                            <mapping identity="rim" map="outboundRelationship[typeCode=REFV]/target[classCode=OBS, moodCode=EVN]"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.99" name="ObservationDefinition" displayName="ObservationDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ObservationDefinition">
            <desc language="en-US">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">In a catalog of health-related services that use or produce observations and measurements, this resource describes the expected characteristics of these observation / measurements.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ObservationDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="ObservationDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of an observation</desc>
                <fhir fid="ObservationDefinition" definition="Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service."
                    comment="An instance of this resource informs the consumer of a health-related service (such as a lab diagnostic test or panel) about how the observations used or produced by this service will look like.">
                    <mapping identity="v2" map="OM2&#xA;OM3&#xA;OMC"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=DEF]"/>
                </fhir>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Category of observation</desc>
                    <fhir fid="ObservationDefinition.category" definition="A code that classifies the general type of observation."
                        comment="This element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used for one instance of ObservationDefinition. The level of granularity is defined by the category concepts in the value set." requirements="Used for filtering what kinds of observations are retrieved and displayed."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Observation Category Codes" strength="example" description="Codes for high level observation categories." valueSet="2.16.840.1.113883.4.642.3.403" canonicalUri="http://hl7.org/fhir/ValueSet/observation-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;DEF&#34;].code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Type of observation (code / type)</desc>
                    <fhir fid="ObservationDefinition.code" definition="Describes what will be observed. Sometimes this is called the observation &#34;name&#34;." requirements="Knowing what kind of observation is being made is essential to understanding the observation." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="LOINC Codes" strength="example" description="Codes identifying names of simple observations." valueSet="2.16.840.1.113883.4.642.3.396" canonicalUri="http://hl7.org/fhir/ValueSet/observation-codes"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="OM1-2&#xA;OMC-4"/>
                        <mapping identity="rim" map="code"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier for this ObservationDefinition instance</desc>
                    <fhir fid="ObservationDefinition.identifier" definition="A unique identifier assigned to this ObservationDefinition artifact." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="permittedDataType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Quantity | CodeableConcept | string | boolean | integer | Range | Ratio | SampledData | time | dateTime | Period</desc>
                    <fhir fid="ObservationDefinition.permittedDataType" definition="The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.">
                        <type value="code"/>
                        <binding displayName="ObservationDataType" strength="required" description="Permitted data type for observation value." valueSet="2.16.840.1.113883.4.642.3.1331" canonicalUri="http://hl7.org/fhir/ValueSet/permitted-data-type|4.0.1"/>
                        <mapping identity="v2" map="OM1-3"/>
                    </fhir>
                </element>
                <element name="multipleResultsAllowed" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Multiple results allowed</desc>
                    <fhir fid="ObservationDefinition.multipleResultsAllowed" definition="Multiple results allowed for observations conforming to this ObservationDefinition." comment="An example of observation allowing multiple results is &#34;bacteria identified by culture&#34;. Conversely, the measurement of a potassium level allows a single result.">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Method used to produce the observation</desc>
                    <fhir fid="ObservationDefinition.method" definition="The method or technique used to perform the observation." comment="Only used if not implicit in observation code." requirements="In some cases, method can impact results.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Observation Methods" strength="example" description="Methods for simple observations." valueSet="2.16.840.1.113883.4.642.3.395" canonicalUri="http://hl7.org/fhir/ValueSet/observation-methods"/>
                        <mapping identity="v2" map="OM1-14"/>
                        <mapping identity="rim" map="methodCode"/>
                    </fhir>
                </element>
                <element name="preferredReportName" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Preferred report name</desc>
                    <fhir fid="ObservationDefinition.preferredReportName" definition="The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.">
                        <type value="string"/>
                        <mapping identity="v2" map="OM1-9"/>
                    </fhir>
                </element>
                <element name="quantitativeDetails" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Characteristics of quantitative results</desc>
                    <fhir fid="ObservationDefinition.quantitativeDetails" definition="Characteristics for quantitative results of this observation.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="OM2"/>
                    </fhir>
                    <element name="customaryUnit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Customary unit for quantitative results</desc>
                        <fhir fid="ObservationDefinition.quantitativeDetails.customaryUnit" definition="Customary unit used to report quantitative results of observations conforming to this ObservationDefinition.">
                            <type value="CodeableConcept"/>
                            <binding displayName="UCUM Codes" strength="extensible" description="Codes identifying units of measure." valueSet="2.16.840.1.113883.4.642.3.912" canonicalUri="http://hl7.org/fhir/ValueSet/ucum-units"/>
                            <mapping identity="v2" map="OM2-2"/>
                        </fhir>
                    </element>
                    <element name="unit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">SI unit for quantitative results</desc>
                        <fhir fid="ObservationDefinition.quantitativeDetails.unit" definition="SI unit used to report quantitative results of observations conforming to this ObservationDefinition.">
                            <type value="CodeableConcept"/>
                            <binding displayName="UCUM Codes" strength="extensible" description="Codes identifying units of measure." valueSet="2.16.840.1.113883.4.642.3.912" canonicalUri="http://hl7.org/fhir/ValueSet/ucum-units"/>
                            <mapping identity="v2" map="OM2-4"/>
                        </fhir>
                    </element>
                    <element name="conversionFactor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">SI to Customary unit conversion factor</desc>
                        <fhir fid="ObservationDefinition.quantitativeDetails.conversionFactor" definition="Factor for converting value expressed with SI unit to value expressed with customary unit.">
                            <type value="decimal"/>
                            <mapping identity="v2" map="OM2-5"/>
                        </fhir>
                    </element>
                    <element name="decimalPrecision" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Decimal precision of observation quantitative results</desc>
                        <fhir fid="ObservationDefinition.quantitativeDetails.decimalPrecision" definition="Number of digits after decimal separator when the results of such observations are of type Quantity.">
                            <type value="integer"/>
                            <mapping identity="v2" map="OM2-3"/>
                        </fhir>
                    </element>
                </element>
                <element name="qualifiedInterval" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Qualified range for continuous and ordinal observation results</desc>
                    <fhir fid="ObservationDefinition.qualifiedInterval" definition="Multiple  ranges of results qualified by different contexts for ordinal or continuous observations conforming to this ObservationDefinition.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="OM2-6"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">reference | critical | absolute</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.category" definition="The category of interval of values for continuous or ordinal observations conforming to this ObservationDefinition.">
                            <type value="code"/>
                            <binding displayName="ObservationRangeCategory" strength="required" description="Codes identifying the category of observation range." valueSet="2.16.840.1.113883.4.642.3.1333" canonicalUri="http://hl7.org/fhir/ValueSet/observation-range-category|4.0.1"/>
                            <mapping identity="v2" map="OM-2"/>
                        </fhir>
                    </element>
                    <element name="range" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The interval itself, for continuous or ordinal observations</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.range" definition="The low and high values determining the interval. There may be only one of the two." requirements="The unit may be not relevant for ordinal values. In case it is there, it is the same as quantitativeDetails.unit.">
                            <type value="Range"/>
                            <mapping identity="v2" map="OM-2"/>
                        </fhir>
                    </element>
                    <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Range context qualifier</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.context" definition="Codes to indicate the health context the range applies to. For example, the normal or therapeutic range.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Observation Reference Range Meaning Codes" strength="extensible" description="Code identifying the health context of a range." valueSet="2.16.840.1.113883.4.642.3.397" canonicalUri="http://hl7.org/fhir/ValueSet/referencerange-meaning"/>
                            <mapping identity="v2" map="n.a."/>
                        </fhir>
                    </element>
                    <element name="appliesTo" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Targetted population of the range</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.appliesTo" definition="Codes to indicate the target population this reference range applies to." comment="If this element is not present then the global population is assumed.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Observation Reference Range Applies To Codes" strength="example" description="Codes identifying the population the reference range applies to." valueSet="2.16.840.1.113883.4.642.3.407" canonicalUri="http://hl7.org/fhir/ValueSet/referencerange-appliesto"/>
                            <mapping identity="v2" map="RFR.6"/>
                        </fhir>
                    </element>
                    <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">male | female | other | unknown</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.gender" definition="Sex of the population the range applies to.">
                            <type value="code"/>
                            <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                            <mapping identity="v2" map="RFR.2"/>
                        </fhir>
                    </element>
                    <element name="age" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Applicable age range, if relevant</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.age" definition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so." comment="Some analytes vary greatly over age.">
                            <type value="Range"/>
                            <mapping identity="v2" map="RFR.3"/>
                        </fhir>
                    </element>
                    <element name="gestationalAge" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Applicable gestational age range, if relevant</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.gestationalAge" definition="The gestational age to which this reference range is applicable, in the context of pregnancy.">
                            <type value="Range"/>
                            <mapping identity="v2" map="RFR.4"/>
                        </fhir>
                    </element>
                    <element name="condition" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Condition associated with the reference range</desc>
                        <fhir fid="ObservationDefinition.qualifiedInterval.condition" definition="Text based condition for which the reference range is valid.">
                            <type value="string"/>
                            <mapping identity="v2" map="RFR.7"/>
                        </fhir>
                    </element>
                </element>
                <element name="validCodedValueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Value set of valid coded values for the observations conforming to this ObservationDefinition</desc>
                    <fhir fid="ObservationDefinition.validCodedValueSet" definition="The set of valid coded results for the observations  conforming to this ObservationDefinition.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                        <mapping identity="v2" map="OM3-3"/>
                    </fhir>
                </element>
                <element name="normalCodedValueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Value set of normal coded values for the observations conforming to this ObservationDefinition</desc>
                    <fhir fid="ObservationDefinition.normalCodedValueSet" definition="The set of normal coded results for the observations conforming to this ObservationDefinition.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                        <mapping identity="v2" map="OM3-4"/>
                    </fhir>
                </element>
                <element name="abnormalCodedValueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Value set of abnormal coded values for the observations conforming to this ObservationDefinition</desc>
                    <fhir fid="ObservationDefinition.abnormalCodedValueSet" definition="The set of abnormal coded results for the observation conforming to this ObservationDefinition.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                        <mapping identity="v2" map="OM3-5"/>
                    </fhir>
                </element>
                <element name="criticalCodedValueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Value set of critical coded values for the observations conforming to this ObservationDefinition</desc>
                    <fhir fid="ObservationDefinition.criticalCodedValueSet" definition="The set of critical coded results for the observation conforming to this ObservationDefinition.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                        </type>
                        <mapping identity="v2" map="OM3-6"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.100" name="OperationDefinition" displayName="OperationDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/OperationDefinition">
            <desc language="en-US">A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="OperationDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="OperationDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Definition of an operation or a named query</desc>
                <fhir fid="OperationDefinition" definition="A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).">
                    <mapping identity="workflow" map="Definition"/>
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="opd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this operation definition, represented as a URI (globally unique)</desc>
                    <fhir fid="OperationDefinition.url"
                        definition="An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the operation definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the operation definition</desc>
                    <fhir fid="OperationDefinition.version"
                        definition="The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different operation definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the operation definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this operation definition (computer friendly)</desc>
                    <fhir fid="OperationDefinition.name" definition="A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this operation definition (human friendly)</desc>
                    <fhir fid="OperationDefinition.title" definition="A short, descriptive, user-friendly title for the operation definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="OperationDefinition.status" definition="The status of this operation definition. Enables tracking the life-cycle of the content." comment="Allows filtering of operation definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status {different ValueSet}"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">operation | query</desc>
                    <fhir fid="OperationDefinition.kind" definition="Whether this is an operation or a named query." comment="Named queries are invoked differently, and have different capabilities." isSummary="true">
                        <type value="code"/>
                        <binding displayName="OperationKind" strength="required" description="Whether an operation is a normal operation or a query." valueSet="2.16.840.1.113883.4.642.3.506" canonicalUri="http://hl7.org/fhir/ValueSet/operation-kind|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="OperationDefinition.experimental" definition="A Boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of operation definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level operation definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="OperationDefinition.date" definition="The date  (and optionally time) when the operation definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the operation definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="OperationDefinition.publisher" definition="The name of the organization or individual that published the operation definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the operation definition is the organization or individual primarily responsible for the maintenance and upkeep of the operation definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the operation definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the operation definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="OperationDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the operation definition</desc>
                    <fhir fid="OperationDefinition.description" definition="A free text natural language description of the operation definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the operation definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the operation definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the operation definition is presumed to be the predominant language in the place the operation definition was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="OperationDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for operation definition (if applicable)</desc>
                    <fhir fid="OperationDefinition.jurisdiction" definition="A legal or geographic region in which the operation definition is intended to be used." comment="It may be possible for the operation definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this operation definition is defined</desc>
                    <fhir fid="OperationDefinition.purpose" definition="Explanation of why this operation definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the operation definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this operation definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="affectsState" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether content is changed by the operation</desc>
                    <fhir fid="OperationDefinition.affectsState" definition="Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'."
                        comment="What http methods can be used for the operation depends on the .affectsState value and whether the input parameters are primitive or complex:&#xA;&#xA;1. Servers SHALL support POST method for all operations.&#xA;&#xA;2. Servers SHALL support GET method if all the parameters for the operation are primitive or there are no parameters and the operation has affectsState = false."
                        isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name used to invoke the operation</desc>
                    <fhir fid="OperationDefinition.code" definition="The name used to invoke the operation." isSummary="true">
                        <type value="code"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional information about use</desc>
                    <fhir fid="OperationDefinition.comment" definition="Additional information about how to use this operation or named query.">
                        <type value="markdown"/>
                    </fhir>
                </element>
                <element name="base" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Marks this as a profile of the base</desc>
                    <fhir fid="OperationDefinition.base" definition="Indicates that this operation definition is a constraining profile on the base." comment="A constrained profile can make optional parameters required or not used and clarify documentation." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Definition.derivedFrom"/>
                    </fhir>
                </element>
                <element name="resource" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Types this operation applies to</desc>
                    <fhir fid="OperationDefinition.resource" definition="The types on which this operation can be executed." comment="If the type is an abstract resource (&#34;Resource&#34; or &#34;DomainResource&#34;) then the operation can be invoked on any concrete specialization." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        <mapping identity="workflow" map="Definition.subject[x]"/>
                    </fhir>
                </element>
                <element name="system" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Invoke at the system level?</desc>
                    <fhir fid="OperationDefinition.system" definition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Invoke at the type level?</desc>
                    <fhir fid="OperationDefinition.type" definition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context)." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="instance" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Invoke on an instance?</desc>
                    <fhir fid="OperationDefinition.instance" definition="Indicates whether this operation can be invoked on a particular instance of one of the given types." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="inputProfile" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Validation information for in parameters</desc>
                    <fhir fid="OperationDefinition.inputProfile" definition="Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole."
                        comment="If present the profile shall not conflict with what is specified in the parameters in the operation definition (max/min etc.), though it may provide additional constraints. The constraints expressed in the profile apply whether the operation is invoked by a POST wih parameters or not.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="outputProfile" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Validation information for out parameters</desc>
                    <fhir fid="OperationDefinition.outputProfile" definition="Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource."
                        comment="If present the profile shall not conflict with what is specified in the parameters in the operation definition (max/min etc.), though it may provide additional constraints. The constraints expressed in the profile apply whether the operation is invoked by a POST wih parameters or not.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Parameters for the operation/query</desc>
                    <fhir fid="OperationDefinition.parameter" definition="The parameters for the operation/query." comment="Query Definitions only have one output parameter, named &#34;result&#34;. This might not be described, but can be to allow a profile to be defined.">
                        <type value="BackboneElement"/>
                        <constraint key="opd-1" severity="error" human="Either a type must be provided, or parts" expression="type.exists() or part.exists()" xpath="exists(f:type) or exists(f:part)" source=""/>
                        <constraint key="opd-2" severity="error" human="A search type can only be specified for parameters of type string" expression="searchType.exists() implies type = 'string'" xpath="not(exists(f:searchType)) or (f:type/@value = 'string')" source=""/>
                        <constraint key="opd-3" severity="error" human="A targetProfile can only be specified for parameters of type Reference or Canonical" expression="targetProfile.exists() implies (type = 'Reference' or type = 'canonical')" xpath="not(exists(f:targetProfile)) or ((f:type/@value = 'Reference') or (f:type/@value = 'canonical'))" source=""/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Name in Parameters.parameter.name or in URL</desc>
                        <fhir fid="OperationDefinition.parameter.name" definition="The name of used to identify the parameter." comment="This name must be a token (start with a letter in a..z, and only contain letters, numerals, and underscore. Note that for search parameters (type = string, with a search type), the name may be altered by the search modifiers.">
                            <type value="code"/>
                        </fhir>
                    </element>
                    <element name="use" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">in | out</desc>
                        <fhir fid="OperationDefinition.parameter.use" definition="Whether this is an input or an output parameter." comment="If a parameter name is used for both an input and an output parameter, the parameter should be defined twice.">
                            <type value="code"/>
                            <binding displayName="OperationParameterUse" strength="required" description="Whether an operation parameter is an input or an output parameter." valueSet="2.16.840.1.113883.4.642.3.508" canonicalUri="http://hl7.org/fhir/ValueSet/operation-parameter-use|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="min" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Minimum Cardinality</desc>
                        <fhir fid="OperationDefinition.parameter.min" definition="The minimum number of times this parameter SHALL appear in the request or response.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="max" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Maximum Cardinality (a number or *)</desc>
                        <fhir fid="OperationDefinition.parameter.max" definition="The maximum number of times this element is permitted to appear in the request or response.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of meaning/use</desc>
                        <fhir fid="OperationDefinition.parameter.documentation" definition="Describes the meaning or use of this parameter.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What type this parameter has</desc>
                        <fhir fid="OperationDefinition.parameter.type" definition="The type for this parameter." comment="if there is no stated parameter, then the parameter is a multi-part parameter; type and must have at least one part defined.">
                            <type value="code"/>
                            <binding displayName="FHIRAllTypes" strength="required" description="A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types." valueSet="2.16.840.1.113883.4.642.3.25" canonicalUri="http://hl7.org/fhir/ValueSet/all-types|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="targetProfile" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">If type is Reference | canonical, allowed targets</desc>
                        <fhir fid="OperationDefinition.parameter.targetProfile"
                            definition="Used when the type is &#34;Reference&#34; or &#34;canonical&#34;, and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide."
                            comment="Often, these profiles are the base definitions from the spec (e.g. http://hl7.org/fhir/StructureDefinition/Patient).">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="searchType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">number | date | string | token | reference | composite | quantity | uri | special</desc>
                        <fhir fid="OperationDefinition.parameter.searchType" definition="How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.">
                            <type value="code"/>
                            <binding displayName="SearchParamType" strength="required" description="Data types allowed to be used for search parameters." valueSet="2.16.840.1.113883.4.642.3.11" canonicalUri="http://hl7.org/fhir/ValueSet/search-param-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="binding" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">ValueSet details if this is coded</desc>
                        <fhir fid="OperationDefinition.parameter.binding" definition="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="strength" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">required | extensible | preferred | example</desc>
                            <fhir fid="OperationDefinition.parameter.binding.strength" definition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." comment="For further discussion, see [Using Terminologies](terminologies.html).">
                                <type value="code"/>
                                <binding displayName="BindingStrength" strength="required" description="Indication of the degree of conformance expectations associated with a binding." valueSet="2.16.840.1.113883.4.642.3.43" canonicalUri="http://hl7.org/fhir/ValueSet/binding-strength|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="valueSet" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Source of value set</desc>
                            <fhir fid="OperationDefinition.parameter.binding.valueSet" definition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used." comment="For value sets with a referenceResource, the display can contain the value set description.  The reference may be version-specific or not.">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                    <element name="referencedFrom" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">References to this parameter</desc>
                        <fhir fid="OperationDefinition.parameter.referencedFrom" definition="Identifies other resource parameters within the operation invocation that are expected to resolve to this resource." comment="Resolution applies if the referenced parameter exists.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="source" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Referencing parameter</desc>
                            <fhir fid="OperationDefinition.parameter.referencedFrom.source" definition="The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="sourceId" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Element id of reference</desc>
                            <fhir fid="OperationDefinition.parameter.referencedFrom.sourceId" definition="The id of the element in the referencing resource that is expected to resolve to this resource.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="part" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Parts of a nested Parameter</desc>
                        <fhir fid="OperationDefinition.parameter.part" definition="The parts of a nested Parameter." comment="Query Definitions only have one output parameter, named &#34;result&#34;. This might not be described, but can be to allow a profile to be defined."/>
                    </element>
                </element>
                <element name="overload" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Define overloaded variants for when generating code</desc>
                    <fhir fid="OperationDefinition.overload" definition="Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation." comment="The combinations are suggestions as to which sets of parameters to use together, but the combinations are not intended to be authoritative.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="parameterName" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Name of parameter to include in overload</desc>
                        <fhir fid="OperationDefinition.overload.parameterName" definition="Name of parameter to include in overload.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Comments to go on overload</desc>
                        <fhir fid="OperationDefinition.overload.comment" definition="Comments to go on overload.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.101" name="OperationOutcome" displayName="OperationOutcome" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/OperationOutcome">
            <desc language="en-US">A collection of error, warning, or information messages that result from a system action.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="OperationOutcome" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="OperationOutcome" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Information about the success/failure of an action</desc>
                <fhir fid="OperationOutcome" definition="A collection of error, warning, or information messages that result from a system action." comment="Can result from the failure of a REST call or be part of the response message returned from a request message.">
                    <mapping identity="rim" map="Grouping is handled through multiple repetitions from whatever context references the outcomes (no specific grouper required)"/>
                </fhir>
                <element name="issue" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">A single issue associated with the action</desc>
                    <fhir fid="OperationOutcome.issue" definition="An error, warning, or information message that results from a system action." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="ERR"/>
                        <mapping identity="rim" map="AcknowledgementDetail or Observation[classCode=&#34;ALRT&#34; and moodCode=&#34;EVN&#34;]"/>
                    </fhir>
                    <element name="severity" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">fatal | error | warning | information</desc>
                        <fhir fid="OperationOutcome.issue.severity" definition="Indicates whether the issue indicates a variation from successful processing." comment="This is labeled as &#34;Is Modifier&#34; because applications should not confuse hints and warnings with errors." requirements="Indicates how relevant the issue is to the overall success of the action." isSummary="true">
                            <type value="code"/>
                            <binding displayName="IssueSeverity" strength="required" description="How the issue affects the success of the action." valueSet="2.16.840.1.113883.4.642.3.408" canonicalUri="http://hl7.org/fhir/ValueSet/issue-severity|4.0.1"/>
                            <mapping identity="v2" map="ERR-4"/>
                            <mapping identity="rim" map="./typeCode[parent::AcknowledgmentDetail] or unique(./inboundRelationship[parent::Observation and typeCode='SUBJ' and isNormalActRelationship()]/source[classCode=&#34;OBS&#34; and moodCode=&#34;EVN&#34; and implies(code, ActCode#SEV and isNormalAct())/value[xsi:type=&#34;CD&#34;]"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Error or warning code</desc>
                        <fhir fid="OperationOutcome.issue.code" definition="Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element."
                            requirements="Expresses the issue in a human and computer-friendly way, allowing the requesting system to behave differently based on the type of issue.&#xA;&#xA;The required element provides a base level of computable interoperability across all systems for processing an outcome, allowing systems to respond appropriately regardless of the internal system error codes returned."
                            isSummary="true">
                            <type value="code"/>
                            <binding displayName="IssueType" strength="required" description="A code that describes the type of issue." valueSet="2.16.840.1.113883.4.642.3.410" canonicalUri="http://hl7.org/fhir/ValueSet/issue-type|4.0.1"/>
                            <mapping identity="v2" map="ERR-3"/>
                            <mapping identity="rim" map="./code"/>
                        </fhir>
                    </element>
                    <element name="details" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional details about the error</desc>
                        <fhir fid="OperationOutcome.issue.details" definition="Additional details about the error. This may be a text description of the error or a system code that identifies the error." comment="A human readable description of the error issue SHOULD be placed in details.text." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Operation Outcome Codes" strength="example" description="A code that provides details as the exact issue." valueSet="2.16.840.1.113883.4.642.3.412" canonicalUri="http://hl7.org/fhir/ValueSet/operation-outcome"/>
                            <mapping identity="v2" map="ERR-5"/>
                            <mapping identity="rim" map="./code"/>
                        </fhir>
                    </element>
                    <element name="diagnostics" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional diagnostic information about the issue</desc>
                        <fhir fid="OperationOutcome.issue.diagnostics" definition="Additional diagnostic information about the issue." comment="This may be a description of how a value is erroneous, a stack dump to help trace the issue or other troubleshooting information." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="ERR-8"/>
                            <mapping identity="rim" map="./text[parent::AcknowledgmentDetail]"/>
                        </fhir>
                    </element>
                    <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Deprecated: Path of element(s) related to issue</desc>
                        <fhir fid="OperationOutcome.issue.location"
                            definition="This element is deprecated because it is XML specific. It is replaced by issue.expression, which is format independent, and simpler to parse. &#xA;&#xA;For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be &#34;http.&#34; + the parameter name."
                            comment="The root of the XPath is the resource or bundle that generated OperationOutcome.  Each XPath SHALL resolve to a single node.  This element is deprecated, and is being replaced by expression." requirements="Allows systems to highlight or otherwise guide users to elements implicated in issues to allow them to be fixed more easily." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="ERR-2"/>
                            <mapping identity="rim" map="./location[parent::AcknowledgmentDetail]"/>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">FHIRPath of element(s) related to issue</desc>
                        <fhir fid="OperationOutcome.issue.expression" definition="A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised."
                            comment="The root of the FHIRPath is the resource or bundle that generated OperationOutcome.  Each FHIRPath SHALL resolve to a single node." requirements="Allows systems to highlight or otherwise guide users to elements implicated in issues to allow them to be fixed more easily." isSummary="true">
                            <type value="string"/>
                            <mapping identity="v2" map="ERR-2"/>
                            <mapping identity="rim" map="./location[parent::AcknowledgmentDetail]"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.102" name="Organization" displayName="Organization" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Organization">
            <desc language="en-US">A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Organization" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="servd" uri="http://www.omg.org/spec/ServD/1.0/" name="ServD"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Organization" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A grouping of people or organizations with a common purpose</desc>
                <fhir fid="Organization" definition="A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.">
                    <mapping identity="v2" map="(also see master files messages)"/>
                    <mapping identity="rim" map="Organization(classCode=ORG, determinerCode=INST)"/>
                    <mapping identity="servd" map="Organization"/>
                    <constraint key="org-1" severity="error" human="The organization SHALL at least have a name or an identifier, and possibly more than one" expression="(identifier.count() + name.count()) &gt; 0" xpath="count(f:identifier | f:name) &gt; 0" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifies this organization across multiple systems</desc>
                    <fhir fid="Organization.identifier" definition="Identifier for the organization that is used to identify the organization across multiple disparate systems." requirements="Organizations are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the organization." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="XON.10 / XON.3"/>
                        <mapping identity="rim" map=".scopes[Role](classCode=IDENT)"/>
                        <mapping identity="servd" map="./Identifiers"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether the organization's record is still in active use</desc>
                    <fhir fid="Organization.active" definition="Whether the organization's record is still in active use."
                        comment="This active flag is not intended to be used to mark an organization as temporarily closed or under construction. Instead the Location(s) within the Organization should have the suspended status. If further details of the reason for the suspension are required, then an extension on this element should be used.&#xA;&#xA;This element is labeled as a modifier because it may be used to mark that the resource was created in error."
                        requirements="Need a flag to indicate a record is no longer to be used and should generally be hidden for the user in the UI." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="No equivalent in HL7 v2"/>
                        <mapping identity="rim" map=".status"/>
                        <mapping identity="servd" map="./Status (however this concept in ServD more covers why the organization is active or not, could be delisted, deregistered, not operational yet) this could alternatively be derived from ./StartDate and ./EndDate and given a context date."/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Kind of organization</desc>
                    <fhir fid="Organization.type" definition="The kind(s) of organization that this is."
                        comment="Organizations can be corporations, wards, sections, clinical teams, government departments, etc. Note that code is generally a classifier of the type of organization; in many applications, codes are used to identity a particular organization (say, ward) as opposed to another of the same type - these are identifiers, not codes&#xA;&#xA;When considering if multiple types are appropriate, you should evaluate if child organizations would be a more appropriate use of the concept, as different types likely are in different sub-areas of the organization. This is most likely to be used where type values have orthogonal values, such as a religious, academic and medical center.&#xA;&#xA;We expect that some jurisdictions will profile this optionality to be a single cardinality."
                        requirements="Need to be able to track the kind of organization that this is - different organization types have different uses." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Organization type" strength="example" description="Used to categorize the organization." valueSet="2.16.840.1.113883.4.642.3.414" canonicalUri="http://hl7.org/fhir/ValueSet/organization-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="No equivalent in v2"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="servd" map="n/a"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name used for the organization</desc>
                    <fhir fid="Organization.name" definition="A name associated with the organization." comment="If the name of an organization changes, consider putting the old name in the alias column so that it can still be located through searches." requirements="Need to use the name as the label of the organization." isSummary="true">
                        <type value="string"/>
                        <mapping identity="v2" map="XON.1"/>
                        <mapping identity="rim" map=".name"/>
                        <mapping identity="servd" map=".PreferredName/Name"/>
                    </fhir>
                </element>
                <element name="alias" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A list of alternate names that the organization is known as, or was known as in the past</desc>
                    <fhir fid="Organization.alias" definition="A list of alternate names that the organization is known as, or was known as in the past." comment="There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the organization."
                        requirements="Over time locations and organizations go through many changes and can be known by different names.&#xA;&#xA;For searching knowing previous names that the organization was known by can be very useful.">
                        <type value="string"/>
                        <mapping identity="rim" map=".name"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the organization</desc>
                    <fhir fid="Organization.telecom" definition="A contact detail for the organization." comment="The use code 'home' is not to be used. Note that these contacts are not the contact details of people who are employed by or represent the organization, but official contacts for the organization itself." requirements="Human contact for the organization.">
                        <type value="ContactPoint"/>
                        <mapping identity="v2" map="ORC-22?"/>
                        <mapping identity="rim" map=".telecom"/>
                        <mapping identity="servd" map="./ContactPoints"/>
                        <constraint key="org-3" severity="error" human="The telecom of an organization can never be of use 'home'" expression="where(use = 'home').empty()" xpath="count(f:use[@value='home']) = 0" source=""/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An address for the organization</desc>
                    <fhir fid="Organization.address" definition="An address for the organization." comment="Organization may have multiple addresses with different uses or applicable periods. The use code 'home' is not to be used." requirements="May need to keep track of the organization's addresses for contacting, billing or reporting requirements.">
                        <type value="Address"/>
                        <mapping identity="v2" map="ORC-23?"/>
                        <mapping identity="rim" map=".address"/>
                        <mapping identity="servd" map="./PrimaryAddress and ./OtherAddresses"/>
                        <constraint key="org-2" severity="error" human="An address of an organization can never be of use 'home'" expression="where(use = 'home').empty()" xpath="count(f:use[@value='home']) = 0" source=""/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The organization of which this organization forms a part</desc>
                    <fhir fid="Organization.partOf" definition="The organization of which this organization forms a part." requirements="Need to be able to track the hierarchy of organizations within an organization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="v2" map="No equivalent in HL7 v2"/>
                        <mapping identity="rim" map=".playedBy[classCode=Part].scoper"/>
                        <mapping identity="servd" map="n/a"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact for the organization for a certain purpose</desc>
                    <fhir fid="Organization.contact" definition="Contact for the organization for a certain purpose." comment="Where multiple contacts for the same purpose are provided there is a standard extension that can be used to determine which one is the preferred contact to use." requirements="Need to keep track of assigned contact points within bigger organization.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".contactParty"/>
                    </fhir>
                    <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The type of contact</desc>
                        <fhir fid="Organization.contact.purpose" definition="Indicates a purpose for which the contact can be reached." requirements="Need to distinguish between multiple contact persons.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Contact entity type" strength="extensible" description="The purpose for which you would contact a contact party." valueSet="2.16.840.1.113883.4.642.3.416" canonicalUri="http://hl7.org/fhir/ValueSet/contactentity-type"/>
                            <mapping identity="rim" map="./type"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A name associated with the contact</desc>
                        <fhir fid="Organization.contact.name" definition="A name associated with the contact." requirements="Need to be able to track the person by name.">
                            <type value="HumanName"/>
                            <mapping identity="v2" map="PID-5, PID-9"/>
                            <mapping identity="rim" map="./name"/>
                        </fhir>
                    </element>
                    <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Contact details (telephone, email, etc.) for a contact</desc>
                        <fhir fid="Organization.contact.telecom" definition="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." requirements="People have (primary) ways to contact them in some way such as phone, email.">
                            <type value="ContactPoint"/>
                            <mapping identity="v2" map="PID-13, PID-14"/>
                            <mapping identity="rim" map="./telecom"/>
                        </fhir>
                    </element>
                    <element name="address" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Visiting or postal addresses for the contact</desc>
                        <fhir fid="Organization.contact.address" definition="Visiting or postal addresses for the contact." requirements="May need to keep track of a contact party's address for contacting, billing or reporting requirements.">
                            <type value="Address"/>
                            <mapping identity="v2" map="PID-11"/>
                            <mapping identity="rim" map="./addr"/>
                        </fhir>
                    </element>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoints providing access to services operated for the organization</desc>
                    <fhir fid="Organization.endpoint" definition="Technical endpoints providing access to services operated for the organization." requirements="Organizations have multiple systems that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.103" name="OrganizationAffiliation" displayName="OrganizationAffiliation" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/OrganizationAffiliation">
            <desc language="en-US">Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to define relationships between organizations that are not sub-divisions of the same organization (part-of relationships).</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="OrganizationAffiliation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="OrganizationAffiliation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship</desc>
                <fhir fid="OrganizationAffiliation" definition="Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.">
                    <mapping identity="rim" map="Role"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifiers that are specific to this role</desc>
                    <fhir fid="OrganizationAffiliation.identifier" definition="Business identifiers that are specific to this role." requirements="Often, specific identities are assigned for the agent." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this organization affiliation record is in active use</desc>
                    <fhir fid="OrganizationAffiliation.active" definition="Whether this organization affiliation record is in active use." comment="If this value is false, you may refer to the period to see when the role was in active use. If there is no period specified, no inference can be made about when it was active."
                        requirements="Need to be able to mark an organization affiliation record as not to be used because it was created in error, or otherwise no longer in active use." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The period during which the participatingOrganization is affiliated with the primary organization</desc>
                    <fhir fid="OrganizationAffiliation.period" definition="The period during which the participatingOrganization is affiliated with the primary organization." requirements="An affiliation may be created ahead of time and only be active for a defined period of time. Once the affiliation is complete, the fact that it existed may still be required." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".performance[@typeCode &lt;= 'PPRF'].ActDefinitionOrEvent.effectiveTime"/>
                    </fhir>
                </element>
                <element name="organization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization where the role is available</desc>
                    <fhir fid="OrganizationAffiliation.organization" definition="Organization where the role is available (primary organization/has members)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".scoper"/>
                    </fhir>
                </element>
                <element name="participatingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that provides/performs the role (e.g. providing services or is a member of)</desc>
                    <fhir fid="OrganizationAffiliation.participatingOrganization" definition="The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".player"/>
                    </fhir>
                </element>
                <element name="network" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)</desc>
                    <fhir fid="OrganizationAffiliation.network" definition="Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Definition of the role the participatingOrganization plays</desc>
                    <fhir fid="OrganizationAffiliation.code" definition="Definition of the role the participatingOrganization plays in the association." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Organization Affiliation Role" strength="example" description="The role the participating organization providing services to the primary organization." valueSet="2.16.840.1.113883.4.642.3.880" canonicalUri="http://hl7.org/fhir/ValueSet/organization-role"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific specialty of the participatingOrganization in the context of the role</desc>
                    <fhir fid="OrganizationAffiliation.specialty" definition="Specific specialty of the participatingOrganization in the context of the role." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="Specific specialty associated with the participating organization." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="rim" map=".player.HealthCareProvider[@classCode = 'PROV'].code"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The location(s) at which the role occurs</desc>
                    <fhir fid="OrganizationAffiliation.location" definition="The location(s) at which the role occurs." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".performance.ActDefinitionOrEvent.ServiceDeliveryLocation[@classCode = 'SDLOC']"/>
                    </fhir>
                </element>
                <element name="healthcareService" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Healthcare services provided through the role</desc>
                    <fhir fid="OrganizationAffiliation.healthcareService" definition="Healthcare services provided through the role.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="rim" map=".player.QualifiedEntity[@classCode = 'QUAL'].code"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details at the participatingOrganization relevant to this Affiliation</desc>
                    <fhir fid="OrganizationAffiliation.telecom" definition="Contact details at the participatingOrganization relevant to this Affiliation." requirements="Sometimes a participating organization provides dedicated contacts to handle enquiries specifically for the role provided to the affiliated organization." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoints providing access to services operated for this role</desc>
                    <fhir fid="OrganizationAffiliation.endpoint" definition="Technical endpoints providing access to services operated for this role.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.104" name="Parameters" displayName="Parameters" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Parameters">
            <desc language="en-US">This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Parameters" baseDefinition="http://hl7.org/fhir/StructureDefinition/Resource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="Parameters" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Operation Request or Response</desc>
                <fhir fid="Parameters" definition="This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it." comment="The parameters that may be used are defined by the OperationDefinition resource.">
                    <mapping identity="v2" map="n/a"/>
                    <mapping identity="rim" map="n/a"/>
                </fhir>
                <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Operation Parameter</desc>
                    <fhir fid="Parameters.parameter" definition="A parameter passed to or received from the operation." isSummary="true">
                        <type value="BackboneElement"/>
                        <constraint key="inv-1" severity="error" human="A parameter must have one and only one of (value, resource, part)" expression="(part.exists() and value.empty() and resource.empty()) or (part.empty() and (value.exists() xor resource.exists()))"
                            xpath="(exists(f:resource) or exists(f:part) or exists(f:*[starts-with(local-name(.), 'value')])) and not(exists(f:*[starts-with(local-name(.), 'value')])) and exists(f:resource))) and not(exists(f:*[starts-with(local-name(.), 'value')])) and exists(f:part))) and not(exists(f:part) and exists(f:resource))" source=""/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Name from the definition</desc>
                        <fhir fid="Parameters.parameter.name" definition="The name of the parameter (reference to the operation definition)." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If parameter is a data type</desc>
                        <fhir fid="Parameters.parameter.value[x]" definition="If the parameter is a data type." isSummary="true">
                            <type value="base64Binary"/>
                            <type value="boolean"/>
                            <type value="canonical"/>
                            <type value="code"/>
                            <type value="date"/>
                            <type value="dateTime"/>
                            <type value="decimal"/>
                            <type value="id"/>
                            <type value="instant"/>
                            <type value="integer"/>
                            <type value="markdown"/>
                            <type value="oid"/>
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <type value="time"/>
                            <type value="unsignedInt"/>
                            <type value="uri"/>
                            <type value="url"/>
                            <type value="uuid"/>
                            <type value="Address"/>
                            <type value="Age"/>
                            <type value="Annotation"/>
                            <type value="Attachment"/>
                            <type value="CodeableConcept"/>
                            <type value="Coding"/>
                            <type value="ContactPoint"/>
                            <type value="Count"/>
                            <type value="Distance"/>
                            <type value="Duration"/>
                            <type value="HumanName"/>
                            <type value="Identifier"/>
                            <type value="Money"/>
                            <type value="Period"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="Ratio"/>
                            <type value="Reference"/>
                            <type value="SampledData"/>
                            <type value="Signature"/>
                            <type value="Timing"/>
                            <type value="ContactDetail"/>
                            <type value="Contributor"/>
                            <type value="DataRequirement"/>
                            <type value="Expression"/>
                            <type value="ParameterDefinition"/>
                            <type value="RelatedArtifact"/>
                            <type value="TriggerDefinition"/>
                            <type value="UsageContext"/>
                            <type value="Dosage"/>
                            <type value="Meta"/>
                        </fhir>
                        <element name="valueBase64Binary">
                            <fhir fid="Parameters.parameter.valueBase64Binary">
                                <type value="base64Binary"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="Parameters.parameter.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueCanonical">
                            <fhir fid="Parameters.parameter.valueCanonical">
                                <type value="canonical"/>
                            </fhir>
                        </element>
                        <element name="valueCode">
                            <fhir fid="Parameters.parameter.valueCode">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="valueDate">
                            <fhir fid="Parameters.parameter.valueDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="valueDateTime">
                            <fhir fid="Parameters.parameter.valueDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="valueDecimal">
                            <fhir fid="Parameters.parameter.valueDecimal">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="valueId">
                            <fhir fid="Parameters.parameter.valueId">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="valueInstant">
                            <fhir fid="Parameters.parameter.valueInstant">
                                <type value="instant"/>
                            </fhir>
                        </element>
                        <element name="valueInteger">
                            <fhir fid="Parameters.parameter.valueInteger">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="valueMarkdown">
                            <fhir fid="Parameters.parameter.valueMarkdown">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                        <element name="valueOid">
                            <fhir fid="Parameters.parameter.valueOid">
                                <type value="oid"/>
                            </fhir>
                        </element>
                        <element name="valuePositiveInt">
                            <fhir fid="Parameters.parameter.valuePositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="Parameters.parameter.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueTime">
                            <fhir fid="Parameters.parameter.valueTime">
                                <type value="time"/>
                            </fhir>
                        </element>
                        <element name="valueUnsignedInt">
                            <fhir fid="Parameters.parameter.valueUnsignedInt">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                        <element name="valueUri">
                            <fhir fid="Parameters.parameter.valueUri">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="valueUrl">
                            <fhir fid="Parameters.parameter.valueUrl">
                                <type value="url"/>
                            </fhir>
                        </element>
                        <element name="valueUuid">
                            <fhir fid="Parameters.parameter.valueUuid">
                                <type value="uuid"/>
                            </fhir>
                        </element>
                        <element name="valueAddress">
                            <fhir fid="Parameters.parameter.valueAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="valueAge">
                            <fhir fid="Parameters.parameter.valueAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="valueAnnotation">
                            <fhir fid="Parameters.parameter.valueAnnotation">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                        <element name="valueAttachment">
                            <fhir fid="Parameters.parameter.valueAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="valueCodeableConcept">
                            <fhir fid="Parameters.parameter.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueCoding">
                            <fhir fid="Parameters.parameter.valueCoding">
                                <type value="Coding"/>
                            </fhir>
                        </element>
                        <element name="valueContactPoint">
                            <fhir fid="Parameters.parameter.valueContactPoint">
                                <type value="ContactPoint"/>
                            </fhir>
                        </element>
                        <element name="valueCount">
                            <fhir fid="Parameters.parameter.valueCount">
                                <type value="Count"/>
                            </fhir>
                        </element>
                        <element name="valueDistance">
                            <fhir fid="Parameters.parameter.valueDistance">
                                <type value="Distance"/>
                            </fhir>
                        </element>
                        <element name="valueDuration">
                            <fhir fid="Parameters.parameter.valueDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="valueHumanName">
                            <fhir fid="Parameters.parameter.valueHumanName">
                                <type value="HumanName"/>
                            </fhir>
                        </element>
                        <element name="valueIdentifier">
                            <fhir fid="Parameters.parameter.valueIdentifier">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="valueMoney">
                            <fhir fid="Parameters.parameter.valueMoney">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="valuePeriod">
                            <fhir fid="Parameters.parameter.valuePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="Parameters.parameter.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="Parameters.parameter.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueRatio">
                            <fhir fid="Parameters.parameter.valueRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="Parameters.parameter.valueReference">
                                <type value="Reference"/>
                            </fhir>
                        </element>
                        <element name="valueSampledData">
                            <fhir fid="Parameters.parameter.valueSampledData">
                                <type value="SampledData"/>
                            </fhir>
                        </element>
                        <element name="valueSignature">
                            <fhir fid="Parameters.parameter.valueSignature">
                                <type value="Signature"/>
                            </fhir>
                        </element>
                        <element name="valueTiming">
                            <fhir fid="Parameters.parameter.valueTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                        <element name="valueContactDetail">
                            <fhir fid="Parameters.parameter.valueContactDetail">
                                <type value="ContactDetail"/>
                            </fhir>
                        </element>
                        <element name="valueContributor">
                            <fhir fid="Parameters.parameter.valueContributor">
                                <type value="Contributor"/>
                            </fhir>
                        </element>
                        <element name="valueDataRequirement">
                            <fhir fid="Parameters.parameter.valueDataRequirement">
                                <type value="DataRequirement"/>
                            </fhir>
                        </element>
                        <element name="valueExpression">
                            <fhir fid="Parameters.parameter.valueExpression">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="valueParameterDefinition">
                            <fhir fid="Parameters.parameter.valueParameterDefinition">
                                <type value="ParameterDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueRelatedArtifact">
                            <fhir fid="Parameters.parameter.valueRelatedArtifact">
                                <type value="RelatedArtifact"/>
                            </fhir>
                        </element>
                        <element name="valueTriggerDefinition">
                            <fhir fid="Parameters.parameter.valueTriggerDefinition">
                                <type value="TriggerDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueUsageContext">
                            <fhir fid="Parameters.parameter.valueUsageContext">
                                <type value="UsageContext"/>
                            </fhir>
                        </element>
                        <element name="valueDosage">
                            <fhir fid="Parameters.parameter.valueDosage">
                                <type value="Dosage"/>
                            </fhir>
                        </element>
                        <element name="valueMeta">
                            <fhir fid="Parameters.parameter.valueMeta">
                                <type value="Meta"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If parameter is a whole resource</desc>
                        <fhir fid="Parameters.parameter.resource" definition="If the parameter is a whole resource." comment="When resolving references in resources, the operation definition may specify how references may be resolved between parameters. If a reference cannot be resolved between the parameters, the application should fall back to it's general resource resolution methods."
                            isSummary="true">
                            <type value="Resource"/>
                        </fhir>
                    </element>
                    <element name="part" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Named part of a multi-part parameter</desc>
                        <fhir fid="Parameters.parameter.part" definition="A named part of a multi-part parameter." comment="Only one level of nested parameters is allowed." isSummary="true"/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.105" name="Patient" displayName="Patient" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Patient">
            <desc language="en-US">Demographics and other administrative information about an individual or animal receiving care or other health-related services.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Tracking patient is the center of the healthcare process.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Patient" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="cda" uri="http://hl7.org/v3/cda" name="CDA (R2)"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="loinc" uri="http://loinc.org" name="LOINC code for the element"/>
            </fhir>
            <element name="Patient" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Information about an individual or animal receiving health care services</desc>
                <fhir fid="Patient" definition="Demographics and other administrative information about an individual or animal receiving care or other health-related services.">
                    <mapping identity="rim" map="Patient[classCode=PAT]"/>
                    <mapping identity="cda" map="ClinicalDocument.recordTarget.patientRole"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An identifier for this patient</desc>
                    <fhir fid="Patient.identifier" definition="An identifier for this patient." requirements="Patients are almost always assigned specific numerical identifiers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map="id"/>
                        <mapping identity="cda" map=".id"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this patient's record is in active use</desc>
                    <fhir fid="Patient.active"
                        definition="Whether this patient record is in active use. &#xA;Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules.&#xA;&#xA;It is often used to filter patient lists to exclude inactive patients&#xA;&#xA;Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death."
                        comment="If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient." requirements="Need to be able to mark a patient record as not to be used because it was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="statusCode"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A name associated with the patient</desc>
                    <fhir fid="Patient.name" definition="A name associated with the individual." comment="A patient may have multiple names with different uses or applicable periods. For animals, the name is a &#34;HumanName&#34; in the sense that is assigned and used by humans and has the same patterns."
                        requirements="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." isSummary="true">
                        <type value="HumanName"/>
                        <mapping identity="v2" map="PID-5, PID-9"/>
                        <mapping identity="rim" map="name"/>
                        <mapping identity="cda" map=".patient.name"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the individual</desc>
                    <fhir fid="Patient.telecom" definition="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted."
                        comment="A Patient may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently and also to help with identification. The address might not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone)."
                        requirements="People have (primary) ways to contact them in some way such as phone, email." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="v2" map="PID-13, PID-14, PID-40"/>
                        <mapping identity="rim" map="telecom"/>
                        <mapping identity="cda" map=".telecom"/>
                    </fhir>
                </element>
                <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">male | female | other | unknown</desc>
                    <fhir fid="Patient.gender" definition="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes."
                        comment="The gender might not match the biological sex as determined by genetics or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than male and female, though the vast majority of systems and contexts only support male and female.  Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific sex or gender aspect of interest (anatomical, chromosomal, social, etc.)  However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice.  Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosomal and other gender aspects.  For example, an alert about a hysterectomy on a male should be handled as a warning or overridable error, not a &#34;hard&#34; error.  See the Patient Gender and Sex section for additional information about communicating patient gender and sex."
                        requirements="Needed for identification of the individual, in combination with (at least) name and birth date." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                        <mapping identity="v2" map="PID-8"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"/>
                        <mapping identity="cda" map=".patient.administrativeGenderCode"/>
                    </fhir>
                </element>
                <element name="birthDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date of birth for the individual</desc>
                    <fhir fid="Patient.birthDate" definition="The date of birth for the individual." comment="At least an estimated year should be provided as a guess if the real DOB is unknown  There is a standard extension &#34;patient-birthTime&#34; available that should be used where Time is required (such as in maternity/infant care systems)."
                        requirements="Age of the individual drives many clinical processes." isSummary="true">
                        <type value="date"/>
                        <mapping identity="v2" map="PID-7"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime"/>
                        <mapping identity="cda" map=".patient.birthTime"/>
                        <mapping identity="loinc" map="21112-8"/>
                    </fhir>
                </element>
                <choice name="deceased[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Indicates if the individual is deceased or not</desc>
                    <fhir fid="Patient.deceased[x]" definition="Indicates if the individual is deceased or not." comment="If there's no value in the instance, it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive."
                        requirements="The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <type value="dateTime"/>
                        <mapping identity="v2" map="PID-30  (bool) and PID-29 (datetime)"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                    <element name="deceasedBoolean">
                        <fhir fid="Patient.deceasedBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="deceasedDateTime">
                        <fhir fid="Patient.deceasedDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                </choice>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An address for the individual</desc>
                    <fhir fid="Patient.address" definition="An address for the individual." comment="Patient may have multiple addresses with different uses or applicable periods." requirements="May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification." isSummary="true">
                        <type value="Address"/>
                        <mapping identity="v2" map="PID-11"/>
                        <mapping identity="rim" map="addr"/>
                        <mapping identity="cda" map=".addr"/>
                    </fhir>
                </element>
                <element name="maritalStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Marital (civil) status of a patient</desc>
                    <fhir fid="Patient.maritalStatus" definition="This field contains a patient's most recent marital (civil) status." requirements="Most, if not all systems capture it.">
                        <type value="CodeableConcept"/>
                        <binding displayName="MaritalStatus" strength="extensible" description="The domestic partnership status of a person." valueSet="2.16.840.1.113883.4.642.3.29" canonicalUri="http://hl7.org/fhir/ValueSet/marital-status"/>
                        <mapping identity="v2" map="PID-16"/>
                        <mapping identity="rim" map="player[classCode=PSN]/maritalStatusCode"/>
                        <mapping identity="cda" map=".patient.maritalStatusCode"/>
                    </fhir>
                </element>
                <choice name="multipleBirth[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether patient is part of a multiple birth</desc>
                    <fhir fid="Patient.multipleBirth[x]" definition="Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer)."
                        comment="Where the valueInteger is provided, the number is the birth number in the sequence. E.g. The middle birth in triplets would be valueInteger=2 and the third born would have valueInteger=3 If a boolean value was provided for this triplets example, then all 3 patient records would have valueBoolean=true (the ordering is not indicated)."
                        requirements="For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.">
                        <type value="boolean"/>
                        <type value="integer"/>
                        <mapping identity="v2" map="PID-24 (bool), PID-25 (integer)"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd,  player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                    <element name="multipleBirthBoolean">
                        <fhir fid="Patient.multipleBirthBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="multipleBirthInteger">
                        <fhir fid="Patient.multipleBirthInteger">
                            <type value="integer"/>
                        </fhir>
                    </element>
                </choice>
                <element name="photo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Image of the patient</desc>
                    <fhir fid="Patient.photo" definition="Image of the patient." comment="Guidelines:&#xA;* Use id photos, not clinical photos.&#xA;* Limit dimensions to thumbnail.&#xA;* Keep byte count low to ease resource updates." requirements="Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.">
                        <type value="Attachment"/>
                        <mapping identity="v2" map="OBX-5 - needs a profile"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact party (e.g. guardian, partner, friend) for the patient</desc>
                    <fhir fid="Patient.contact" definition="A contact party (e.g. guardian, partner, friend) for the patient." comment="Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact." requirements="Need to track people you can contact about the patient.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]"/>
                        <mapping identity="cda" map="n/a"/>
                        <constraint key="pat-1" severity="error" human="SHALL at least contain a contact's details or a reference to an organization" expression="name.exists() or telecom.exists() or address.exists() or organization.exists()" xpath="exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)" source=""/>
                    </fhir>
                    <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The kind of relationship</desc>
                        <fhir fid="Patient.contact.relationship" definition="The nature of the relationship between the patient and the contact person." requirements="Used to determine which contact person is the most relevant to approach, depending on circumstances.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Patient Contact Relationship " strength="extensible" description="The nature of the relationship between a patient and a contact person for that patient." valueSet="2.16.840.1.113883.4.642.3.1130" canonicalUri="http://hl7.org/fhir/ValueSet/patient-contactrelationship"/>
                            <mapping identity="v2" map="NK1-7, NK1-3"/>
                            <mapping identity="rim" map="code"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A name associated with the contact person</desc>
                        <fhir fid="Patient.contact.name" definition="A name associated with the contact person." requirements="Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.">
                            <type value="HumanName"/>
                            <mapping identity="v2" map="NK1-2"/>
                            <mapping identity="rim" map="name"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A contact detail for the person</desc>
                        <fhir fid="Patient.contact.telecom" definition="A contact detail for the person, e.g. a telephone number or an email address." comment="Contact may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently, and also to help with identification."
                            requirements="People have (primary) ways to contact them in some way such as phone, email.">
                            <type value="ContactPoint"/>
                            <mapping identity="v2" map="NK1-5, NK1-6, NK1-40"/>
                            <mapping identity="rim" map="telecom"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="address" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Address for the contact person</desc>
                        <fhir fid="Patient.contact.address" definition="Address for the contact person." requirements="Need to keep track where the contact person can be contacted per postal mail or visited.">
                            <type value="Address"/>
                            <mapping identity="v2" map="NK1-4"/>
                            <mapping identity="rim" map="addr"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">male | female | other | unknown</desc>
                        <fhir fid="Patient.contact.gender" definition="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." requirements="Needed to address the person correctly.">
                            <type value="code"/>
                            <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                            <mapping identity="v2" map="NK1-15"/>
                            <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="organization" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Organization that is associated with the contact</desc>
                        <fhir fid="Patient.contact.organization" definition="Organization on behalf of which the contact is acting or for which the contact is working." requirements="For guardians or business related contacts, the organization is relevant.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="v2" map="NK1-13, NK1-30, NK1-31, NK1-32, NK1-41"/>
                            <mapping identity="rim" map="scoper"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The period during which this contact person or organization is valid to be contacted relating to this patient</desc>
                        <fhir fid="Patient.contact.period" definition="The period during which this contact person or organization is valid to be contacted relating to this patient.">
                            <type value="Period"/>
                            <mapping identity="rim" map="effectiveTime"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                </element>
                <element name="communication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A language which may be used to communicate with the patient about his or her health</desc>
                    <fhir fid="Patient.communication" definition="A language which may be used to communicate with the patient about his or her health."
                        comment="If no language is specified, this *implies* that the default local language is spoken.  If you need to convey proficiency for multiple modes, then you need multiple Patient.Communication associations.   For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required."
                        requirements="If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency are important things to keep track of both for patient and other persons of interest.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="LanguageCommunication"/>
                        <mapping identity="cda" map="patient.languageCommunication"/>
                    </fhir>
                    <element name="language" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The language which can be used to communicate with the patient about his or her health</desc>
                        <fhir fid="Patient.communication.language" definition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. &#34;en&#34; for English, or &#34;en-US&#34; for American English versus &#34;en-EN&#34; for England English."
                            comment="The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type." requirements="Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                            <mapping identity="v2" map="PID-15, LAN-2"/>
                            <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code"/>
                            <mapping identity="cda" map=".languageCode"/>
                        </fhir>
                    </element>
                    <element name="preferred" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Language preference indicator</desc>
                        <fhir fid="Patient.communication.preferred" definition="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." comment="This language is specifically identified for communicating healthcare information."
                            requirements="People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.">
                            <type value="boolean"/>
                            <mapping identity="v2" map="PID-15"/>
                            <mapping identity="rim" map="preferenceInd"/>
                            <mapping identity="cda" map=".preferenceInd"/>
                        </fhir>
                    </element>
                </element>
                <element name="generalPractitioner" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient's nominated primary care provider</desc>
                    <fhir fid="Patient.generalPractitioner" definition="Patient's nominated care provider."
                        comment="This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disability setting, or even organization that will provide people to perform the care provider roles.  It is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.&#xA;Multiple GPs may be recorded against the patient for various reasons, such as a student that has his home GP listed along with the GP at university during the school semesters, or a &#34;fly-in/fly-out&#34; worker that has the onsite GP also included with his home GP to remain aware of medical issues.&#xA;&#xA;Jurisdictions may decide that they can profile this down to 1 if desired, or 1 per type.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="v2" map="PD1-4"/>
                        <mapping identity="rim" map="subjectOf.CareEvent.performer.AssignedEntity"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that is the custodian of the patient record</desc>
                    <fhir fid="Patient.managingOrganization" definition="Organization that is the custodian of the patient record."
                        comment="There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association)." requirements="Need to know who recognizes this patient record, manages and updates it."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map="scoper"/>
                        <mapping identity="cda" map=".providerOrganization"/>
                    </fhir>
                </element>
                <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Link to another patient resource that concerns the same actual person</desc>
                    <fhir fid="Patient.link" definition="Link to another patient resource that concerns the same actual patient." comment="There is no assumption that linked patient records have mutual links."
                        requirements="There are multiple use cases:   &#xA;&#xA;* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and &#xA;* Distribution of patient information across multiple servers." isModifier="true" isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="outboundLink"/>
                        <mapping identity="cda" map="n/a"/>
                    </fhir>
                    <element name="other" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The other patient or related person resource that the link refers to</desc>
                        <fhir fid="Patient.link.other" definition="The other patient resource that the link refers to." comment="Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            </type>
                            <mapping identity="v2" map="PID-3, MRG-1"/>
                            <mapping identity="rim" map="id"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">replaced-by | replaces | refer | seealso</desc>
                        <fhir fid="Patient.link.type" definition="The type of link between this patient resource and another patient resource." isSummary="true">
                            <type value="code"/>
                            <binding displayName="LinkType" strength="required" description="The type of link between this patient resource and another patient resource." valueSet="2.16.840.1.113883.4.642.3.423" canonicalUri="http://hl7.org/fhir/ValueSet/link-type|4.0.1"/>
                            <mapping identity="rim" map="typeCode"/>
                            <mapping identity="cda" map="n/a"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.106" name="PaymentNotice" displayName="PaymentNotice" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/PaymentNotice">
            <desc language="en-US">This resource provides the status of the payment for goods and services rendered, and the request and response resource references.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="PaymentNotice" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="PaymentNotice" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">PaymentNotice request</desc>
                <fhir fid="PaymentNotice" definition="This resource provides the status of the payment for goods and services rendered, and the request and response resource references.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="n/a"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for the payment noctice</desc>
                    <fhir fid="PaymentNotice.identifier" definition="A unique identifier assigned to this payment notice." requirements="Allows payment notices to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="PaymentNotice.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Request reference</desc>
                    <fhir fid="PaymentNotice.request" definition="Reference of resource for which payment is being made.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Response reference</desc>
                    <fhir fid="PaymentNotice.response" definition="Reference of response to resource for which payment is being made.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map="n/a"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Creation date</desc>
                    <fhir fid="PaymentNotice.created" definition="The date when this resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="provider" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Responsible practitioner</desc>
                    <fhir fid="PaymentNotice.provider" definition="The practitioner who is responsible for the services rendered to the patient.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="cdanetv4" map="B01"/>
                        <mapping identity="v2" map="B01"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="payment" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Payment reference</desc>
                    <fhir fid="PaymentNotice.payment" definition="A reference to the payment which is the subject of this notice." requirements="Need to identify the actual payment." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PaymentReconciliation"/>
                        </type>
                    </fhir>
                </element>
                <element name="paymentDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Payment or clearing date</desc>
                    <fhir fid="PaymentNotice.paymentDate" definition="The date when the above payment action occurred." requirements="Need to convey the date when the action being notified occurred.">
                        <type value="date"/>
                    </fhir>
                </element>
                <element name="payee" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party being paid</desc>
                    <fhir fid="PaymentNotice.payee" definition="The party who will receive or has received payment that is the subject of this notification.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                    </fhir>
                </element>
                <element name="recipient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Party being notified</desc>
                    <fhir fid="PaymentNotice.recipient" definition="The party who is notified of the payment status." requirements="Need to identified the recipient of the notification." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
                <element name="amount" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Monetary amount of the payment</desc>
                    <fhir fid="PaymentNotice.amount" definition="The amount sent to the payee." requirements="Provided for validation purposes." isSummary="true">
                        <type value="Money"/>
                    </fhir>
                </element>
                <element name="paymentStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Issued or cleared Status of the payment</desc>
                    <fhir fid="PaymentNotice.paymentStatus" definition="A code indicating whether payment has been sent or cleared." comment="Typically paid: payment sent, cleared: payment received." requirements="The purpose of the notification.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Payment Status Codes" strength="example" description="The payment conveyance status codes." valueSet="2.16.840.1.113883.4.642.3.643" canonicalUri="http://hl7.org/fhir/ValueSet/payment-status"/>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.107" name="PaymentReconciliation" displayName="PaymentReconciliation" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/PaymentReconciliation">
            <desc language="en-US">This resource provides the details including amount of a payment and allocates the payment items being paid.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="PaymentReconciliation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="cdanetv4" uri="http://www.cda-adc.ca/en/services/cdanet/" name="Canadian Dental Association eclaims standard"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="PaymentReconciliation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">PaymentReconciliation resource</desc>
                <fhir fid="PaymentReconciliation" definition="This resource provides the details including amount of a payment and allocates the payment items being paid.">
                    <mapping identity="workflow" map="Event"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for a payment reconciliation</desc>
                    <fhir fid="PaymentReconciliation.identifier" definition="A unique identifier assigned to this payment reconciliation." requirements="Allows payment reconciliations to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="PaymentReconciliation.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Period covered</desc>
                    <fhir fid="PaymentReconciliation.period" definition="The period of time for which payments have been gathered into this bulk payment for settlement." requirements="Needed to allow receivers to monitor and reconcile payment issuer schedules." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Creation date</desc>
                    <fhir fid="PaymentReconciliation.created" definition="The date when the resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="paymentIssuer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Party generating payment</desc>
                    <fhir fid="PaymentReconciliation.paymentIssuer" definition="The party who generated the payment." comment="This party is also responsible for the reconciliation." requirements="Need to identify the party resonsible for the payment and this resource." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.source"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reference to requesting resource</desc>
                    <fhir fid="PaymentReconciliation.request" definition="Original request resource reference." requirements="Needed to allow the response to be linked to the request.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Task"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="cdanetv4" map="A02|G01"/>
                    </fhir>
                </element>
                <element name="requestor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Responsible practitioner</desc>
                    <fhir fid="PaymentReconciliation.requestor" definition="The practitioner who is responsible for the services rendered to the patient." requirements="Need to identify the party responsible for the request.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="cdanetv4" map="B01"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">queued | complete | error | partial</desc>
                    <fhir fid="PaymentReconciliation.outcome" definition="The outcome of a request for a reconciliation."
                        comment="The resource may be used to indicate that: the request has been held (queued) for processing; that it has been processed and errors found (error); that no errors were found and that some of the adjudication has been undertaken (partial) or that all of the adjudication has been undertaken (complete)."
                        requirements="To advise the requestor of an overall processing outcome.">
                        <type value="code"/>
                        <binding displayName="Claim Processing Codes" strength="required" description="The outcome of the processing." valueSet="2.16.840.1.113883.4.642.3.13" canonicalUri="http://hl7.org/fhir/ValueSet/remittance-outcome|4.0.1"/>
                    </fhir>
                </element>
                <element name="disposition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Disposition message</desc>
                    <fhir fid="PaymentReconciliation.disposition" definition="A human readable description of the status of the request for the reconciliation." requirements="Provided for user display.">
                        <type value="string"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
                <element name="paymentDate" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">When payment issued</desc>
                    <fhir fid="PaymentReconciliation.paymentDate" definition="The date of payment as indicated on the financial instrument." requirements="To advise the payee when payment can be expected." isSummary="true">
                        <type value="date"/>
                    </fhir>
                </element>
                <element name="paymentAmount" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Total amount of Payment</desc>
                    <fhir fid="PaymentReconciliation.paymentAmount" definition="Total payment amount as indicated on the financial instrument." requirements="Needed to provide the actual payment amount." isSummary="true">
                        <type value="Money"/>
                    </fhir>
                </element>
                <element name="paymentIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business identifier for the payment</desc>
                    <fhir fid="PaymentReconciliation.paymentIdentifier" definition="Issuer's unique identifier for the payment instrument." comment="For example: EFT number or check number." requirements="Enable the receiver to reconcile when payment is received.">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="detail" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Settlement particulars</desc>
                    <fhir fid="PaymentReconciliation.detail" definition="Distribution of the payment amount for a previously acknowledged payable." requirements="Needed to show how the payment amount is distributed across the payables.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Business identifier of the payment detail</desc>
                        <fhir fid="PaymentReconciliation.detail.identifier" definition="Unique identifier for the current payment item for the referenced payable." requirements="Needed for reconciliation of payments.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="predecessor" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Business identifier of the prior payment detail</desc>
                        <fhir fid="PaymentReconciliation.detail.predecessor" definition="Unique identifier for the prior payment item for the referenced payable." requirements="Needed for reconciliation of payments.">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Category of payment</desc>
                        <fhir fid="PaymentReconciliation.detail.type" definition="Code to indicate the nature of the payment." comment="For example: payment, adjustment, funds advance, etc." requirements="Needed to provide context for the amount.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Payment Type Codes" strength="example" description="The reason for the amount: payment, adjustment, advance." valueSet="2.16.840.1.113883.4.642.3.641" canonicalUri="http://hl7.org/fhir/ValueSet/payment-type"/>
                        </fhir>
                    </element>
                    <element name="request" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Request giving rise to the payment</desc>
                        <fhir fid="PaymentReconciliation.detail.request" definition="A resource, such as a Claim, the evaluation of which could lead to payment." requirements="Needed to provide a linkage  to the original request.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="submitter" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Submitter of the request</desc>
                        <fhir fid="PaymentReconciliation.detail.submitter" definition="The party which submitted the claim or financial transaction." requirements="Needed for audit and validation.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Response committing to a payment</desc>
                        <fhir fid="PaymentReconciliation.detail.response" definition="A resource, such as a ClaimResponse, which contains a commitment to payment." requirements="Needed to provide a linkage to the payment commitment.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date of commitment to pay</desc>
                        <fhir fid="PaymentReconciliation.detail.date" definition="The date from the response resource containing a commitment to pay." requirements="Needed for audit and validation.">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="responsible" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contact for the response</desc>
                        <fhir fid="PaymentReconciliation.detail.responsible" definition="A reference to the individual who is responsible for inquiries regarding the response and its payment." requirements="To provide contact information.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="payee" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Recipient of the payment</desc>
                        <fhir fid="PaymentReconciliation.detail.payee" definition="The party which is receiving the payment." requirements="Needed for audit and validation.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount allocated to this payable</desc>
                        <fhir fid="PaymentReconciliation.detail.amount" definition="The monetary amount allocated from the total payment to the payable." requirements="Needed to explain the distribution of the payment to the payables.">
                            <type value="Money"/>
                        </fhir>
                    </element>
                </element>
                <element name="formCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Printed form identifier</desc>
                    <fhir fid="PaymentReconciliation.formCode" definition="A code for the form to be used for printing the content." comment="May be needed to identify specific jurisdictional forms." requirements="Needed to specify the specific form used for producing output for this response.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Forms" strength="example" description="The forms codes." valueSet="2.16.840.1.113883.4.642.3.37" canonicalUri="http://hl7.org/fhir/ValueSet/forms"/>
                    </fhir>
                </element>
                <element name="processNote" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Note concerning processing</desc>
                    <fhir fid="PaymentReconciliation.processNote" definition="A note that describes or explains the processing in a human readable form." requirements="Provides the specific textual explanations associated with the processing.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">display | print | printoper</desc>
                        <fhir fid="PaymentReconciliation.processNote.type" definition="The business purpose of the note text." requirements="To convey the expectation for when the text is used.">
                            <type value="code"/>
                            <binding displayName="NoteType" strength="required" description="The presentation types of notes." valueSet="2.16.840.1.113883.4.642.3.15" canonicalUri="http://hl7.org/fhir/ValueSet/note-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Note explanatory text</desc>
                        <fhir fid="PaymentReconciliation.processNote.text" definition="The explanation or description associated with the processing." requirements="Required to provide human readable explanation.">
                            <type value="string"/>
                            <mapping identity="cdanetv4" map="G32"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.108" name="Person" displayName="Person" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Person">
            <desc language="en-US">Demographics and administrative information about a person independent of a specific health-related context.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to track persons potentially across multiple roles.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Person" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Person" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A generic person record</desc>
                <fhir fid="Person" definition="Demographics and administrative information about a person independent of a specific health-related context."
                    comment="The Person resource does justice to person registries that keep track of persons regardless of their role. The Person resource is also a primary resource to point to for people acting in a particular role such as SubjectofCare, Practitioner, and Agent. Very few attributes are specific to any role and so Person is kept lean. Most attributes are expected to be tied to the role the Person plays rather than the Person himself. Examples of that are Guardian (SubjectofCare), ContactParty (SubjectOfCare, Practitioner), and multipleBirthInd (SubjectofCare).">
                    <mapping identity="rim" map="Person(classCode=&#34;PSN&#34; and determinerCode=&#34;INST&#34; and quantity=&#34;1&#34;)"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A human identifier for this person</desc>
                    <fhir fid="Person.identifier" definition="Identifier for a person within a particular scope." requirements="People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the person. Examples are national person identifier and local identifier.">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".plays:Role(classCode='IDENT').id"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A name associated with the person</desc>
                    <fhir fid="Person.name" definition="A name associated with the person." comment="Person may have multiple names with different uses or applicable periods." requirements="Need to be able to track the person by multiple names. Examples are your official name and a partner name." isSummary="true">
                        <type value="HumanName"/>
                        <mapping identity="v2" map="PID-5, PID-9"/>
                        <mapping identity="rim" map="./name"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the person</desc>
                    <fhir fid="Person.telecom" definition="A contact detail for the person, e.g. a telephone number or an email address." comment="Person may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently and also to help with identification."
                        requirements="People have (primary) ways to contact them in some way such as phone, email." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="v2" map="PID-13, PID-14"/>
                        <mapping identity="rim" map="./telecom"/>
                    </fhir>
                </element>
                <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">male | female | other | unknown</desc>
                    <fhir fid="Person.gender" definition="Administrative Gender." comment="The gender might not match the biological sex as determined by genetics, or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though a clear majority of systems and contexts only support M and F."
                        requirements="Needed for identification of the person, in combination with (at least) name and birth date. Gender of person drives many clinical processes." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                        <mapping identity="v2" map="PID-8"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"/>
                    </fhir>
                </element>
                <element name="birthDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date on which the person was born</desc>
                    <fhir fid="Person.birthDate" definition="The birth date for the person." comment="At least an estimated year should be provided as a guess if the real DOB is unknown." requirements="Age of person drives many clinical processes, and is often used in performing identification of the person. Times are not included so as to not confuse things with potential timezone issues."
                        isSummary="true">
                        <type value="date"/>
                        <mapping identity="v2" map="PID-7"/>
                        <mapping identity="rim" map="./birthTime"/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">One or more addresses for the person</desc>
                    <fhir fid="Person.address" definition="One or more addresses for the person." comment="Person may have multiple addresses with different uses or applicable periods." requirements="May need to keep track of person's addresses for contacting, billing or reporting requirements and also to help with identification.">
                        <type value="Address"/>
                        <mapping identity="v2" map="PID-11"/>
                        <mapping identity="rim" map="./addr"/>
                    </fhir>
                </element>
                <element name="photo" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Image of the person</desc>
                    <fhir fid="Person.photo" definition="An image that can be displayed as a thumbnail of the person to enhance the identification of the individual.">
                        <type value="Attachment"/>
                        <mapping identity="v2" map="OBX-5 - needs a profile"/>
                        <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc"/>
                    </fhir>
                </element>
                <element name="managingOrganization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The organization that is the custodian of the person record</desc>
                    <fhir fid="Person.managingOrganization" definition="The organization that is the custodian of the person record." requirements="Need to know who recognizes this person record, manages and updates it." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map="scoper"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">This person's record is in active use</desc>
                    <fhir fid="Person.active" definition="Whether this person's record is in active use." requirements="Need to be able to mark a person record as not to be used because it was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="statusCode"/>
                    </fhir>
                </element>
                <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Link to a resource that concerns the same actual person</desc>
                    <fhir fid="Person.link" definition="Link to a resource that concerns the same actual person.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="outboundLink"/>
                    </fhir>
                    <element name="target" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The resource to which this actual person is associated</desc>
                        <fhir fid="Person.link.target" definition="The resource to which this actual person is associated.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Person"/>
                            </type>
                            <mapping identity="rim" map="id"/>
                        </fhir>
                    </element>
                    <element name="assurance" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">level1 | level2 | level3 | level4</desc>
                        <fhir fid="Person.link.assurance" definition="Level of assurance that this link is associated with the target resource.">
                            <type value="code"/>
                            <binding displayName="IdentityAssuranceLevel" strength="required" description="The level of confidence that this link represents the same actual person, based on NIST Authentication Levels." valueSet="2.16.840.1.113883.4.642.3.656" canonicalUri="http://hl7.org/fhir/ValueSet/identity-assuranceLevel|4.0.1"/>
                            <mapping identity="rim" map="priorityNumber?"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.109" name="PlanDefinition" displayName="PlanDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/PlanDefinition">
            <desc language="en-US">This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="PlanDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="PlanDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The definition of a plan for a series of actions, independent of any specific patient or context</desc>
                <fhir fid="PlanDefinition" definition="This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="pdf-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this plan definition, represented as a URI (globally unique)</desc>
                    <fhir fid="PlanDefinition.url"
                        definition="An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the plan definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the plan definition</desc>
                    <fhir fid="PlanDefinition.identifier" definition="A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this plan definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the plan definition</desc>
                    <fhir fid="PlanDefinition.version"
                        definition="The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different plan definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the plan definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this plan definition (computer friendly)</desc>
                    <fhir fid="PlanDefinition.name" definition="A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this plan definition (human friendly)</desc>
                    <fhir fid="PlanDefinition.title" definition="A short, descriptive, user-friendly title for the plan definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the plan definition</desc>
                    <fhir fid="PlanDefinition.subtitle" definition="An explanatory or alternate title for the plan definition giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">order-set | clinical-protocol | eca-rule | workflow-definition</desc>
                    <fhir fid="PlanDefinition.type" definition="A high-level category for the plan definition that distinguishes the kinds of systems that would be interested in the plan definition." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="PlanDefinitionType" strength="extensible" description="The type of PlanDefinition." valueSet="2.16.840.1.113883.4.642.3.797" canonicalUri="http://hl7.org/fhir/ValueSet/plan-definition-type"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="PlanDefinition.status" definition="The status of this plan definition. Enables tracking the life-cycle of the content." comment="Allows filtering of plan definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status {different ValueSet}"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="PlanDefinition.experimental" definition="A Boolean value to indicate that this plan definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of plan definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level plan definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of individual the plan definition is focused on</desc>
                    <fhir fid="PlanDefinition.subject[x]" definition="A code or group definition that describes the intended subject of the plan definition.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for a plan definition (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                        <mapping identity="workflow" map="Definition.subject"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="PlanDefinition.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="PlanDefinition.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="PlanDefinition.date" definition="The date  (and optionally time) when the plan definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the plan definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the plan definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="PlanDefinition.publisher" definition="The name of the organization or individual that published the plan definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the plan definition is the organization or individual primarily responsible for the maintenance and upkeep of the plan definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the plan definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the plan definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="PlanDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the plan definition</desc>
                    <fhir fid="PlanDefinition.description" definition="A free text natural language description of the plan definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the plan definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the plan definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the plan definition is presumed to be the predominant language in the place the plan definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="PlanDefinition.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate plan definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for plan definition (if applicable)</desc>
                    <fhir fid="PlanDefinition.jurisdiction" definition="A legal or geographic region in which the plan definition is intended to be used." comment="It may be possible for the plan definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this plan definition is defined</desc>
                    <fhir fid="PlanDefinition.purpose" definition="Explanation of why this plan definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the plan definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this plan definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the plan</desc>
                    <fhir fid="PlanDefinition.usage" definition="A detailed description of how the plan definition is used from a clinical perspective.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="PlanDefinition.copyright" definition="A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition." requirements="Consumers must be able to determine any legal restrictions on the use of the plan definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the plan definition was approved by publisher</desc>
                    <fhir fid="PlanDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the plan definition was last reviewed</desc>
                    <fhir fid="PlanDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the plan definition is expected to be used</desc>
                    <fhir fid="PlanDefinition.effectivePeriod" definition="The period during which the plan definition content was or is planned to be in active use."
                        comment="The effective period for a plan definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the plan definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">E.g. Education, Treatment, Assessment</desc>
                    <fhir fid="PlanDefinition.topic" definition="Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching." requirements="Repositories must be able to determine how to categorize the plan definition so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                        <mapping identity="workflow" map="Definition.subject[x]"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="PlanDefinition.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="PlanDefinition.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="PlanDefinition.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="PlanDefinition.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations</desc>
                    <fhir fid="PlanDefinition.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="Plan definitions must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="library" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Logic used by the plan definition</desc>
                    <fhir fid="PlanDefinition.library" definition="A reference to a Library resource containing any formal logic used by the plan definition.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Library"/>
                        </type>
                    </fhir>
                </element>
                <element name="goal" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What the plan is trying to accomplish</desc>
                    <fhir fid="PlanDefinition.goal" definition="Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."
                        requirements="Goal information needs to be captured for order sets, protocols, and care plan definitions to better describe the objectives of the protocol activities and to guide the creation of specific goals within the derived care plans and orders.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">E.g. Treatment, dietary, behavioral</desc>
                        <fhir fid="PlanDefinition.goal.category" definition="Indicates a category the goal falls within.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Goal category" strength="example" description="Example codes for grouping goals for filtering or presentation." valueSet="2.16.840.1.113883.4.642.3.275" canonicalUri="http://hl7.org/fhir/ValueSet/goal-category"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Code or text describing the goal</desc>
                        <fhir fid="PlanDefinition.goal.description" definition="Human-readable and/or coded description of a specific desired objective of care, such as &#34;control blood pressure&#34; or &#34;negotiate an obstacle course&#34; or &#34;dance with child at wedding&#34;." comment="If no code is available, use CodeableConcept.text.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Clinical Findings" strength="example" description="Describes goals that can be achieved." valueSet="2.16.840.1.113883.4.642.3.232" canonicalUri="http://hl7.org/fhir/ValueSet/clinical-findings"/>
                        </fhir>
                    </element>
                    <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">high-priority | medium-priority | low-priority</desc>
                        <fhir fid="PlanDefinition.goal.priority" definition="Identifies the expected level of importance associated with reaching/sustaining the defined goal.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Goal priority" strength="preferred" description="Indicates the level of importance associated with reaching or sustaining a goal." valueSet="2.16.840.1.113883.4.642.3.273" canonicalUri="http://hl7.org/fhir/ValueSet/goal-priority"/>
                        </fhir>
                    </element>
                    <element name="start" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When goal pursuit begins</desc>
                        <fhir fid="PlanDefinition.goal.start" definition="The event after which the goal should begin being pursued.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Goal start event" strength="example" description="Identifies the types of events that might trigger the start of a goal." valueSet="2.16.840.1.113883.4.642.3.279" canonicalUri="http://hl7.org/fhir/ValueSet/goal-start-event"/>
                        </fhir>
                    </element>
                    <element name="addresses" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What does the goal address</desc>
                        <fhir fid="PlanDefinition.goal.addresses" definition="Identifies problems, conditions, issues, or concerns the goal is intended to address.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Identifies problems, conditions, issues, or concerns that goals may address." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting documentation for the goal</desc>
                        <fhir fid="PlanDefinition.goal.documentation" definition="Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.">
                            <type value="RelatedArtifact"/>
                        </fhir>
                    </element>
                    <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Target outcome for the goal</desc>
                        <fhir fid="PlanDefinition.goal.target" definition="Indicates what should be done and within what timeframe.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="measure" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The parameter whose value is to be tracked</desc>
                            <fhir fid="PlanDefinition.goal.target.measure" definition="The parameter whose value is to be tracked, e.g. body weight, blood pressure, or hemoglobin A1c level.">
                                <type value="CodeableConcept"/>
                                <binding displayName="LOINC Codes" strength="example" description="Identifies types of parameters that can be tracked to determine goal achievement." valueSet="2.16.840.1.113883.4.642.3.396" canonicalUri="http://hl7.org/fhir/ValueSet/observation-codes"/>
                            </fhir>
                        </element>
                        <choice name="detail[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The target value to be achieved</desc>
                            <fhir fid="PlanDefinition.goal.target.detail[x]"
                                definition="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.">
                                <type value="Quantity"/>
                                <type value="Range"/>
                                <type value="CodeableConcept"/>
                            </fhir>
                            <element name="detailQuantity">
                                <fhir fid="PlanDefinition.goal.target.detailQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="detailRange">
                                <fhir fid="PlanDefinition.goal.target.detailRange">
                                    <type value="Range"/>
                                </fhir>
                            </element>
                            <element name="detailCodeableConcept">
                                <fhir fid="PlanDefinition.goal.target.detailCodeableConcept">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="due" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Reach goal within</desc>
                            <fhir fid="PlanDefinition.goal.target.due" definition="Indicates the timeframe after the start of the goal in which the goal should be met.">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Action defined by the plan</desc>
                    <fhir fid="PlanDefinition.action" definition="An action or group of actions to be taken as part of the plan."
                        comment="Note that there is overlap between many of the elements defined here and the ActivityDefinition resource. When an ActivityDefinition is referenced (using the definition element), the overlapping elements in the plan override the content of the referenced ActivityDefinition unless otherwise documented in the specific elements. See the PlanDefinition resource for more detailed information.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="{Is a contained Definition}"/>
                    </fhir>
                    <element name="prefix" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">User-visible prefix for the action (e.g. 1. or A.)</desc>
                        <fhir fid="PlanDefinition.action.prefix" definition="A user-visible prefix for the action.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">User-visible title</desc>
                        <fhir fid="PlanDefinition.action.title" definition="The title of the action displayed to a user.">
                            <type value="string"/>
                            <mapping identity="workflow" map="Definition.title"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Brief description of the action</desc>
                        <fhir fid="PlanDefinition.action.description" definition="A brief description of the action used to provide a summary to display to the user.">
                            <type value="string"/>
                            <mapping identity="workflow" map="Definition.description"/>
                        </fhir>
                    </element>
                    <element name="textEquivalent" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system</desc>
                        <fhir fid="PlanDefinition.action.textEquivalent" definition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically.">
                            <type value="string"/>
                            <mapping identity="workflow" map="Definition.description"/>
                        </fhir>
                    </element>
                    <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">routine | urgent | asap | stat</desc>
                        <fhir fid="PlanDefinition.action.priority" definition="Indicates how quickly the action should be addressed with respect to other actions.">
                            <type value="code"/>
                            <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Code representing the meaning of the action or sub-actions</desc>
                        <fhir fid="PlanDefinition.action.code" definition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for the section of a documentation template.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="reason" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Why the action should be performed</desc>
                        <fhir fid="PlanDefinition.action.reason" definition="A description of why this action is necessary or appropriate." comment="This is different than the clinical evidence documentation, it's an actual business description of the reason for performing the action.">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting documentation for the intended performer of the action</desc>
                        <fhir fid="PlanDefinition.action.documentation" definition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.">
                            <type value="RelatedArtifact"/>
                        </fhir>
                    </element>
                    <element name="goalId" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What goals this action supports</desc>
                        <fhir fid="PlanDefinition.action.goalId" definition="Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.">
                            <type value="id"/>
                        </fhir>
                    </element>
                    <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of individual the action is focused on</desc>
                        <fhir fid="PlanDefinition.action.subject[x]" definition="A code or group definition that describes the intended subject of the action and its children, if any."
                            comment="The subject of an action overrides the subject at a parent action or on the root of the PlanDefinition if specified.&#xA;&#xA;In addition, because the subject needs to be resolved during realization, use of subjects in actions (or in the ActivityDefinition referenced by the action) resolves based on the set of subjects supplied in context and by type (i.e. the patient subject would resolve to a resource of type Patient)."
                            requirements="Multiple steps in a protocol often have different groups of steps that are focused on testing different things. The subject of an action specifies the focus of the action and any child actions.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            </type>
                            <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for a plan definition (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                            <mapping identity="workflow" map="Definition.subject"/>
                        </fhir>
                        <element name="subjectCodeableConcept">
                            <fhir fid="PlanDefinition.action.subjectCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="subjectReference">
                            <fhir fid="PlanDefinition.action.subjectReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="trigger" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">When the action should be triggered</desc>
                        <fhir fid="PlanDefinition.action.trigger" definition="A description of when the action should be triggered.">
                            <type value="TriggerDefinition"/>
                        </fhir>
                    </element>
                    <element name="condition" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Whether or not the action is applicable</desc>
                        <fhir fid="PlanDefinition.action.condition" definition="An expression that describes applicability criteria or start/stop conditions for the action." comment="When multiple conditions of the same kind are present, the effects are combined using AND semantics, so the overall condition is true only if all the conditions are true.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">applicability | start | stop</desc>
                            <fhir fid="PlanDefinition.action.condition.kind" definition="The kind of condition." comment="Applicability criteria are used to determine immediate applicability when a plan definition is applied to a given context. Start and stop criteria are carried through application and used to describe enter/exit criteria for an action.">
                                <type value="code"/>
                                <binding displayName="ActionConditionKind" strength="required" description="Defines the kinds of conditions that can appear on actions." valueSet="2.16.840.1.113883.4.642.3.815" canonicalUri="http://hl7.org/fhir/ValueSet/action-condition-kind|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Boolean-valued expression</desc>
                            <fhir fid="PlanDefinition.action.condition.expression" definition="An expression that returns true or false, indicating whether the condition is satisfied." comment="The expression may be inlined or may be a reference to a named expression within a logic library referenced by the library element.">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="input" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Input data requirements</desc>
                        <fhir fid="PlanDefinition.action.input" definition="Defines input data requirements for the action.">
                            <type value="DataRequirement"/>
                        </fhir>
                    </element>
                    <element name="output" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Output data definition</desc>
                        <fhir fid="PlanDefinition.action.output" definition="Defines the outputs of the action, if any.">
                            <type value="DataRequirement"/>
                        </fhir>
                    </element>
                    <element name="relatedAction" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Relationship to another action</desc>
                        <fhir fid="PlanDefinition.action.relatedAction" definition="A relationship to another action such as &#34;before&#34; or &#34;30-60 minutes after start of&#34;." comment="When an action depends on multiple actions, the meaning is that all actions are dependencies, rather than that any of the actions are a dependency.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="actionId" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">What action is this related to</desc>
                            <fhir fid="PlanDefinition.action.relatedAction.actionId" definition="The element id of the related action.">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="relationship" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end</desc>
                            <fhir fid="PlanDefinition.action.relatedAction.relationship" definition="The relationship of this action to the related action.">
                                <type value="code"/>
                                <binding displayName="ActionRelationshipType" strength="required" description="Defines the types of relationships between actions." valueSet="2.16.840.1.113883.4.642.3.813" canonicalUri="http://hl7.org/fhir/ValueSet/action-relationship-type|4.0.1"/>
                            </fhir>
                        </element>
                        <choice name="offset[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Time offset for the relationship</desc>
                            <fhir fid="PlanDefinition.action.relatedAction.offset[x]" definition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.">
                                <type value="Duration"/>
                                <type value="Range"/>
                            </fhir>
                            <element name="offsetDuration">
                                <fhir fid="PlanDefinition.action.relatedAction.offsetDuration">
                                    <type value="Duration"/>
                                </fhir>
                            </element>
                            <element name="offsetRange">
                                <fhir fid="PlanDefinition.action.relatedAction.offsetRange">
                                    <type value="Range"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the action should take place</desc>
                        <fhir fid="PlanDefinition.action.timing[x]" definition="An optional value describing when the action should be performed.">
                            <type value="dateTime"/>
                            <type value="Age"/>
                            <type value="Period"/>
                            <type value="Duration"/>
                            <type value="Range"/>
                            <type value="Timing"/>
                        </fhir>
                        <element name="timingDateTime">
                            <fhir fid="PlanDefinition.action.timingDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="timingAge">
                            <fhir fid="PlanDefinition.action.timingAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="timingPeriod">
                            <fhir fid="PlanDefinition.action.timingPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="timingDuration">
                            <fhir fid="PlanDefinition.action.timingDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="timingRange">
                            <fhir fid="PlanDefinition.action.timingRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="timingTiming">
                            <fhir fid="PlanDefinition.action.timingTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who should participate in the action</desc>
                        <fhir fid="PlanDefinition.action.participant" definition="Indicates who should participate in performing the action described.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">patient | practitioner | related-person | device</desc>
                            <fhir fid="PlanDefinition.action.participant.type" definition="The type of participant in the action.">
                                <type value="code"/>
                                <binding displayName="ActionParticipantType" strength="required" description="The type of participant for the action." valueSet="2.16.840.1.113883.4.642.3.811" canonicalUri="http://hl7.org/fhir/ValueSet/action-participant-type|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">E.g. Nurse, Surgeon, Parent</desc>
                            <fhir fid="PlanDefinition.action.participant.role" definition="The role the participant should play in performing the described action.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Action participant role" strength="example" description="Defines roles played by participants for the action." valueSet="2.16.840.1.113883.4.642.3.796" canonicalUri="http://hl7.org/fhir/ValueSet/action-participant-role"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">create | update | remove | fire-event</desc>
                        <fhir fid="PlanDefinition.action.type" definition="The type of action to perform (create, update, remove).">
                            <type value="CodeableConcept"/>
                            <binding displayName="ActionType" strength="extensible" description="The type of action to be performed." valueSet="2.16.840.1.113883.4.642.3.809" canonicalUri="http://hl7.org/fhir/ValueSet/action-type"/>
                        </fhir>
                    </element>
                    <element name="groupingBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">visual-group | logical-group | sentence-group</desc>
                        <fhir fid="PlanDefinition.action.groupingBehavior" definition="Defines the grouping behavior for the action and its children.">
                            <type value="code"/>
                            <binding displayName="ActionGroupingBehavior" strength="required" description="Defines organization behavior of a group." valueSet="2.16.840.1.113883.4.642.3.799" canonicalUri="http://hl7.org/fhir/ValueSet/action-grouping-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="selectionBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">any | all | all-or-none | exactly-one | at-most-one | one-or-more</desc>
                        <fhir fid="PlanDefinition.action.selectionBehavior" definition="Defines the selection behavior for the action and its children.">
                            <type value="code"/>
                            <binding displayName="ActionSelectionBehavior" strength="required" description="Defines selection behavior of a group." valueSet="2.16.840.1.113883.4.642.3.801" canonicalUri="http://hl7.org/fhir/ValueSet/action-selection-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="requiredBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">must | could | must-unless-documented</desc>
                        <fhir fid="PlanDefinition.action.requiredBehavior" definition="Defines the required behavior for the action.">
                            <type value="code"/>
                            <binding displayName="ActionRequiredBehavior" strength="required" description="Defines expectations around whether an action or action group is required." valueSet="2.16.840.1.113883.4.642.3.803" canonicalUri="http://hl7.org/fhir/ValueSet/action-required-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="precheckBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">yes | no</desc>
                        <fhir fid="PlanDefinition.action.precheckBehavior" definition="Defines whether the action should usually be preselected.">
                            <type value="code"/>
                            <binding displayName="ActionPrecheckBehavior" strength="required" description="Defines selection frequency behavior for an action or group." valueSet="2.16.840.1.113883.4.642.3.805" canonicalUri="http://hl7.org/fhir/ValueSet/action-precheck-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="cardinalityBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">single | multiple</desc>
                        <fhir fid="PlanDefinition.action.cardinalityBehavior" definition="Defines whether the action can be selected multiple times.">
                            <type value="code"/>
                            <binding displayName="ActionCardinalityBehavior" strength="required" description="Defines behavior for an action or a group for how many times that item may be repeated." valueSet="2.16.840.1.113883.4.642.3.807" canonicalUri="http://hl7.org/fhir/ValueSet/action-cardinality-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <choice name="definition[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of the activity to be performed</desc>
                        <fhir fid="PlanDefinition.action.definition[x]" definition="A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken."
                            comment="Note that the definition is optional, and if no definition is specified, a dynamicValue with a root ($this) path can be used to define the entire resource dynamically.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                            </type>
                            <type value="uri"/>
                            <mapping identity="workflow" map="Definition.derivedFrom"/>
                        </fhir>
                        <element name="definitionCanonical">
                            <fhir fid="PlanDefinition.action.definitionCanonical">
                                <type value="canonical"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                            </fhir>
                        </element>
                        <element name="definitionUri">
                            <fhir fid="PlanDefinition.action.definitionUri">
                                <type value="uri"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="transform" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Transform to apply the template</desc>
                        <fhir fid="PlanDefinition.action.transform" definition="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input."
                            comment="Note that when a referenced ActivityDefinition also defines a transform, the transform specified here generally takes precedence. In addition, if both a transform and dynamic values are specific, the dynamic values are applied to the result of the transform.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureMap"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="dynamicValue" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Dynamic aspects of the definition</desc>
                        <fhir fid="PlanDefinition.action.dynamicValue" definition="Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result."
                            comment="Dynamic values are applied in the order in which they are defined in the PlanDefinition resource. Note that when dynamic values are also specified by a referenced ActivityDefinition, the dynamicValues from the ActivityDefinition are applied first, followed by the dynamicValues specified here. In addition, if both a transform and dynamic values are specific, the dynamic values are applied to the result of the transform.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="path" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The path to the element to be set dynamically</desc>
                            <fhir fid="PlanDefinition.action.dynamicValue.path"
                                definition="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details)."
                                comment="To specify the path to the current action being realized, the %action environment variable is available in this path. For example, to specify the description element of the target action, the path would be %action.description. The path attribute contains a [Simple FHIRPath Subset](fhirpath.html#simple) that allows path traversal, but not calculation.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">An expression that provides the dynamic value for the customization</desc>
                            <fhir fid="PlanDefinition.action.dynamicValue.expression" definition="An expression specifying the value of the customized element." comment="The expression may be inlined or may be a reference to a named expression within a logic library referenced by the library element.">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A sub-action</desc>
                        <fhir fid="PlanDefinition.action.action" definition="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.">
                            <mapping identity="workflow" map="{InverseRelationship of Definition.partOf}"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.110" name="Practitioner" displayName="Practitioner" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Practitioner">
            <desc language="en-US">A person who is directly or indirectly involved in the provisioning of healthcare.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to track doctors, staff, locums etc. for both healthcare practitioners, funders, etc.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Practitioner" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="servd" uri="http://www.omg.org/spec/ServD/1.0/" name="ServD"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Practitioner" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A person with a formal responsibility in the provisioning of healthcare or related services</desc>
                <fhir fid="Practitioner" definition="A person who is directly or indirectly involved in the provisioning of healthcare.">
                    <mapping identity="v2" map="PRD (as one example)"/>
                    <mapping identity="rim" map="Role"/>
                    <mapping identity="servd" map="Provider"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An identifier for the person as this agent</desc>
                    <fhir fid="Practitioner.identifier" definition="An identifier that applies to this person in this role." requirements="Often, specific identities are assigned for the agent." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PRD-7 (or XCN.1)"/>
                        <mapping identity="rim" map="./id"/>
                        <mapping identity="servd" map="./Identifiers"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this practitioner's record is in active use</desc>
                    <fhir fid="Practitioner.active" definition="Whether this practitioner's record is in active use." comment="If the practitioner is not in use by one organization, then it should mark the period on the PractitonerRole with an end date (even if they are active) as they may be active in another role."
                        requirements="Need to be able to mark a practitioner record as not to be used because it was created in error." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="./statusCode"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The name(s) associated with the practitioner</desc>
                    <fhir fid="Practitioner.name" definition="The name(s) associated with the practitioner."
                        comment="The selection of the use property should ensure that there is a single usual name specified, and others use the nickname (alias), old, or other values as appropriate.  &#xD;&#xD;In general, select the value to be used in the ResourceReference.display based on this:&#xD;&#xD;1. There is more than 1 name&#xD;2. Use = usual&#xD;3. Period is current to the date of the usage&#xD;4. Use = official&#xD;5. Other order as decided by internal business rules."
                        requirements="The name(s) that a Practitioner is known by. Where there are multiple, the name that the practitioner is usually known as should be used in the display." isSummary="true">
                        <type value="HumanName"/>
                        <mapping identity="v2" map="XCN Components"/>
                        <mapping identity="rim" map="./name"/>
                        <mapping identity="servd" map="./PreferredName (GivenNames, FamilyName, TitleCode)"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the practitioner (that apply to all roles)</desc>
                    <fhir fid="Practitioner.telecom" definition="A contact detail for the practitioner, e.g. a telephone number or an email address."
                        comment="Person may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently and to help with identification.  These typically will have home numbers, or mobile numbers that are not role specific."
                        requirements="Need to know how to reach a practitioner independent to any roles the practitioner may have." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="v2" map="PRT-15, STF-10, ROL-12"/>
                        <mapping identity="rim" map="./telecom"/>
                        <mapping identity="servd" map="./ContactPoints"/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Address(es) of the practitioner that are not role specific (typically home address)</desc>
                    <fhir fid="Practitioner.address" definition="Address(es) of the practitioner that are not role specific (typically home address). &#xD;Work addresses are not typically entered in this property as they are usually role dependent."
                        comment="The PractitionerRole does not have an address value on it, as it is expected that the location property be used for this purpose (which has an address)."
                        requirements="The home/mailing address of the practitioner is often required for employee administration purposes, and also for some rostering services where the start point (practitioners home) can be used in calculations." isSummary="true">
                        <type value="Address"/>
                        <mapping identity="v2" map="ORC-24, STF-11, ROL-11, PRT-14"/>
                        <mapping identity="rim" map="./addr"/>
                        <mapping identity="servd" map="./Addresses"/>
                    </fhir>
                </element>
                <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">male | female | other | unknown</desc>
                    <fhir fid="Practitioner.gender" definition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." requirements="Needed to address the person correctly." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                        <mapping identity="v2" map="STF-5"/>
                        <mapping identity="rim" map="./administrativeGender"/>
                        <mapping identity="servd" map="./GenderCode"/>
                    </fhir>
                </element>
                <element name="birthDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date on which the practitioner was born</desc>
                    <fhir fid="Practitioner.birthDate" definition="The date of birth for the practitioner." requirements="Needed for identification." isSummary="true">
                        <type value="date"/>
                        <mapping identity="v2" map="STF-6"/>
                        <mapping identity="rim" map="./birthTime"/>
                        <mapping identity="servd" map="(not represented in ServD)"/>
                    </fhir>
                </element>
                <element name="photo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Image of the person</desc>
                    <fhir fid="Practitioner.photo" definition="Image of the person." requirements="Many EHR systems have the capability to capture an image of patients and personnel. Fits with newer social media usage too.">
                        <type value="Attachment"/>
                        <mapping identity="rim" map="./subjectOf/ObservationEvent[code=&#34;photo&#34;]/value"/>
                        <mapping identity="servd" map="./ImageURI (only supports the URI reference)"/>
                    </fhir>
                </element>
                <element name="qualification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Certification, licenses, or training pertaining to the provision of care</desc>
                    <fhir fid="Practitioner.qualification" definition="The official certifications, training, and licenses that authorize or otherwise pertain to the provision of care by the practitioner.  For example, a medical license issued by a medical board authorizing the practitioner to practice medicine within a certian locality.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="CER?"/>
                        <mapping identity="rim" map=".playingEntity.playingRole[classCode=QUAL].code"/>
                        <mapping identity="servd" map="./Qualifications"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">An identifier for this qualification for the practitioner</desc>
                        <fhir fid="Practitioner.qualification.identifier" definition="An identifier that applies to this person's qualification in this role." requirements="Often, specific identities are assigned for the qualification.">
                            <type value="Identifier"/>
                            <mapping identity="rim" map=".playingEntity.playingRole[classCode=QUAL].id"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Coded representation of the qualification</desc>
                        <fhir fid="Practitioner.qualification.code" definition="Coded representation of the qualification.">
                            <type value="CodeableConcept"/>
                            <binding displayName="v2 table 0360, Version 2.7" strength="example" description="Specific qualification the practitioner has to provide a service." canonicalUri="http://terminology.hl7.org/ValueSet/v2-2.7-0360"/>
                            <mapping identity="rim" map=".playingEntity.playingRole[classCode=QUAL].code"/>
                            <mapping identity="servd" map="./Qualifications.Value"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Period during which the qualification is valid</desc>
                        <fhir fid="Practitioner.qualification.period" definition="Period during which the qualification is valid." requirements="Qualifications are often for a limited period of time, and can be revoked.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".playingEntity.playingRole[classCode=QUAL].effectiveTime"/>
                            <mapping identity="servd" map="./Qualifications.StartDate and ./Qualifications.EndDate"/>
                        </fhir>
                    </element>
                    <element name="issuer" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Organization that regulates and issues the qualification</desc>
                        <fhir fid="Practitioner.qualification.issuer" definition="Organization that regulates and issues the qualification.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map=".playingEntity.playingRole[classCode=QUAL].scoper"/>
                        </fhir>
                    </element>
                </element>
                <element name="communication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A language the practitioner can use in patient communication</desc>
                    <fhir fid="Practitioner.communication" definition="A language the practitioner can use in patient communication." comment="The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems code this but instead have it as free text. Hence CodeableConcept instead of code as the data type."
                        requirements="Knowing which language a practitioner speaks can help in facilitating communication with patients.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                        <mapping identity="v2" map="PID-15, NK1-20, LAN-2"/>
                        <mapping identity="rim" map="./languageCommunication"/>
                        <mapping identity="servd" map="./Languages.LanguageSpokenCode"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.111" name="PractitionerRole" displayName="PractitionerRole" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/PractitionerRole">
            <desc language="en-US">A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to track services that a healthcare provider is able to provide at an organization's location, and the services that they can perform there.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="PractitionerRole" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="servd" uri="http://www.omg.org/spec/ServD/1.0/" name="ServD"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="PractitionerRole" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Roles/organizations the practitioner is associated with</desc>
                <fhir fid="PractitionerRole" definition="A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.">
                    <mapping identity="v2" map="PRD (as one example)"/>
                    <mapping identity="rim" map="Role"/>
                    <mapping identity="servd" map="ServiceSiteProvider"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifiers that are specific to a role/location</desc>
                    <fhir fid="PractitionerRole.identifier" definition="Business Identifiers that are specific to a role/location." requirements="Often, specific identities are assigned for the agent." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="PRD-7 (or XCN.1)"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="servd" map="./Identifiers"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this practitioner role record is in active use</desc>
                    <fhir fid="PractitionerRole.active" definition="Whether this practitioner role record is in active use." comment="If this value is false, you may refer to the period to see when the role was in active use. If there is no period specified, no inference can be made about when it was active."
                        requirements="Need to be able to mark a practitioner role record as not to be used because it was created in error, or otherwise no longer in active use." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="STF-7"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The period during which the practitioner is authorized to perform in these role(s)</desc>
                    <fhir fid="PractitionerRole.period" definition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." requirements="Even after the agencies is revoked, the fact that it existed must still be recorded." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="PRD-8/9 / PRA-5.4"/>
                        <mapping identity="rim" map=".performance[@typeCode &lt;= 'PPRF'].ActDefinitionOrEvent.effectiveTime"/>
                        <mapping identity="servd" map="(ServD maps Practitioners and Organizations via another entity, so this concept is not available)"/>
                    </fhir>
                </element>
                <element name="practitioner" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Practitioner that is able to provide the defined services for the organization</desc>
                    <fhir fid="PractitionerRole.practitioner" definition="Practitioner that is able to provide the defined services for the organization." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                        </type>
                        <mapping identity="rim" map=".player"/>
                    </fhir>
                </element>
                <element name="organization" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization where the roles are available</desc>
                    <fhir fid="PractitionerRole.organization" definition="The organization where the Practitioner performs the roles associated." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="rim" map=".scoper"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Roles which this practitioner may perform</desc>
                    <fhir fid="PractitionerRole.code" definition="Roles which this practitioner is authorized to perform for the organization." comment="A person may have more than one role." requirements="Need to know what authority the practitioner has - what can they do?" isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practitioner role" strength="example" description="The role a person plays representing an organization." valueSet="2.16.840.1.113883.4.642.3.439" canonicalUri="http://hl7.org/fhir/ValueSet/practitioner-role"/>
                        <mapping identity="v2" map="PRD-1 / STF-18  / PRA-3  / PRT-4  / ROL-3 / ORC-12 / OBR-16 / PV1-7 / PV1-8 / PV1-9 / PV1-17"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="servd" map="(ServD maps Practitioners and Organizations via another entity, so this concept is not available)"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific specialty of the practitioner</desc>
                    <fhir fid="PractitionerRole.specialty" definition="Specific specialty of the practitioner." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="Specific specialty associated with the agency." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="v2" map="PRA-5"/>
                        <mapping identity="rim" map=".player.HealthCareProvider[@classCode = 'PROV'].code"/>
                        <mapping identity="servd" map="./Specialty"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The location(s) at which this practitioner provides care</desc>
                    <fhir fid="PractitionerRole.location" definition="The location(s) at which this practitioner provides care." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".performance.ActDefinitionOrEvent.ServiceDeliveryLocation[@classCode = 'SDLOC']"/>
                        <mapping identity="servd" map="(ServD maps Practitioners and Organizations via another entity, so this concept is not available)&lt;br/&gt; However these are accessed via the Site.ServiceSite.ServiceSiteProvider record. (The Site has the location)"/>
                    </fhir>
                </element>
                <element name="healthcareService" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The list of healthcare services that this worker provides for this role's Organization/Location(s)</desc>
                    <fhir fid="PractitionerRole.healthcareService" definition="The list of healthcare services that this worker provides for this role's Organization/Location(s).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="v2" map="EDU-2 / AFF-3"/>
                        <mapping identity="rim" map=".player.QualifiedEntity[@classCode = 'QUAL'].code"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details that are specific to the role/location/service</desc>
                    <fhir fid="PractitionerRole.telecom" definition="Contact details that are specific to the role/location/service." requirements="Often practitioners have a dedicated line for each location (or service) that they work at, and need to be able to define separate contact details for each of these." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="rim" map=".telecom"/>
                    </fhir>
                </element>
                <element name="availableTime" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Times the Service Site is available</desc>
                    <fhir fid="PractitionerRole.availableTime" definition="A collection of times the practitioner is available or performing this role at the location and/or healthcareservice." comment="More detailed availability information may be provided in associated Schedule/Slot resources.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="daysOfWeek" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">mon | tue | wed | thu | fri | sat | sun</desc>
                        <fhir fid="PractitionerRole.availableTime.daysOfWeek" definition="Indicates which days of the week are available between the start and end Times.">
                            <type value="code"/>
                            <binding displayName="DaysOfWeek" strength="required" description="The days of the week." valueSet="2.16.840.1.113883.4.642.3.512" canonicalUri="http://hl7.org/fhir/ValueSet/days-of-week|4.0.1"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="allDay" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Always available? e.g. 24 hour service</desc>
                        <fhir fid="PractitionerRole.availableTime.allDay" definition="Is this always available? (hence times are irrelevant) e.g. 24 hour service.">
                            <type value="boolean"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="availableStartTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Opening time of day (ignored if allDay = true)</desc>
                        <fhir fid="PractitionerRole.availableTime.availableStartTime" definition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." comment="The timezone is expected to be for where this HealthcareService is provided at.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                    <element name="availableEndTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Closing time of day (ignored if allDay = true)</desc>
                        <fhir fid="PractitionerRole.availableTime.availableEndTime" definition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." comment="The timezone is expected to be for where this HealthcareService is provided at.">
                            <type value="time"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="notAvailable" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Not available during this time due to provided reason</desc>
                    <fhir fid="PractitionerRole.notAvailable" definition="The practitioner is not available or performing this role during this period of time due to the provided reason.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reason presented to the user explaining why time not available</desc>
                        <fhir fid="PractitionerRole.notAvailable.description" definition="The reason that can be presented to the user as to why this time is not available.">
                            <type value="string"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="during" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Service not available from this date</desc>
                        <fhir fid="PractitionerRole.notAvailable.during" definition="Service is not available (seasonally or for a public holiday) from this date.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                    </element>
                </element>
                <element name="availabilityExceptions" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Description of availability exceptions</desc>
                    <fhir fid="PractitionerRole.availabilityExceptions" definition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.">
                        <type value="string"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Technical endpoints providing access to services operated for the practitioner with this role</desc>
                    <fhir fid="PractitionerRole.endpoint" definition="Technical endpoints providing access to services operated for the practitioner with this role."
                        requirements="Organizations have multiple systems that provide various services and ,ay also be different for practitioners too.&#xD;&#xD;So the endpoint satisfies the need to be able to define the technical connection details for how to connect to them, and for what purpose.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Endpoint"/>
                        </type>
                        <mapping identity="rim" map="n/a"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.112" name="Procedure" displayName="Procedure" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Procedure">
            <desc language="en-US">An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Procedure" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Procedure" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">An action that is being or was performed on a patient</desc>
                <fhir fid="Procedure" definition="An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Procedure[moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Identifiers for this procedure</desc>
                    <fhir fid="Procedure.identifier" definition="Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server."
                        comment="This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and Person resource instances might share the same social insurance number."
                        requirements="Allows identification of the procedure as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="Some combination of ORC-2 / ORC-3 / OBR-2 / OBR-3 / IPC-1 / IPC-2 / IPC-3 / IPC-4"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="Procedure.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Measure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/OperationDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                        </type>
                        <mapping identity="workflow" map="Event.instantiatesCanonical"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="Procedure.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, order set or other definition that is adhered to in whole or in part by this Procedure." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiatesUri"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A request for this procedure</desc>
                    <fhir fid="Procedure.basedOn" definition="A reference to a resource that contains details of the request for this procedure." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[classCode=(various e.g. PROC, OBS, PCPR, ACT,  moodCode=RQO].code"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="Procedure.partOf" definition="A larger event of which this particular procedure is a component or step."
                        comment="The MedicationAdministration resource has a partOf reference to Procedure, but this is not a circular reference.   For example, the anesthesia MedicationAdministration is part of the surgical Procedure (MedicationAdministration.partOf = Procedure).  For example, the procedure to insert the IV port for an IV medication administration is part of the medication administration (Procedure.partOf = MedicationAdministration)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=SBADM or PROC or OBS, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown</desc>
                    <fhir fid="Procedure.status" definition="A code specifying the state of the procedure. Generally, this will be the in-progress or completed state."
                        comment="The &#34;unknown&#34; code is not to be used to convey other statuses.  The &#34;unknown&#34; code should be used when one of the statuses applies, but the authoring system doesn't know the current state of the procedure.&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="EventStatus" strength="required" description="A code specifying the state of the procedure." valueSet="2.16.840.1.113883.4.642.3.109" canonicalUri="http://hl7.org/fhir/ValueSet/event-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="Procedure.statusReason" definition="Captures the reason for the current state of the procedure." comment="This is generally only used for &#34;exception&#34; statuses such as &#34;not-done&#34;, &#34;suspended&#34; or &#34;aborted&#34;. The reason for performing the event at all is captured in reasonCode, not here." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Not Performed Reason (SNOMED-CT)" strength="example" description="A code that identifies the reason a procedure was not performed." valueSet="2.16.840.1.113883.4.642.3.431" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-not-performed-reason"/>
                        <mapping identity="workflow" map="Event.statusReason"/>
                        <mapping identity="rim" map=".reason.Observation.value"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Classification of the procedure</desc>
                    <fhir fid="Procedure.category" definition="A code that classifies the procedure for searching, sorting and display purposes (e.g. &#34;Surgical Procedure&#34;)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Category Codes (SNOMED CT)" strength="example" description="A code that classifies a procedure for searching, sorting and display purposes." valueSet="2.16.840.1.113883.4.642.3.430" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;EVN&#34;].code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identification of the procedure</desc>
                    <fhir fid="Procedure.code" definition="The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. &#34;Laparoscopic Appendectomy&#34;)." requirements="0..1 to account for primarily narrative only resources." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Codes (SNOMED CT)" strength="example" description="A code to identify a specific procedure ." valueSet="2.16.840.1.113883.4.642.3.427" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-code"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="OBR-44/OBR-45"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who the procedure was performed on</desc>
                    <fhir fid="Procedure.subject" definition="The person, animal or group on which the procedure was performed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="Procedure.encounter" definition="The Encounter during which this Procedure was created or performed or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="performed[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the procedure was performed</desc>
                    <fhir fid="Procedure.performed[x]" definition="Estimated or actual date, date-time, period, or age when the procedure was performed.  Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured."
                        comment="Age is generally used when the patient reports an age at which the procedure was performed. Range is generally used when the patient reports an age range when the procedure was performed, such as sometime between 20-25 years old.  dateTime supports a range of precision due to some procedures being reported as past procedures that might not have millisecond precision while other procedures performed and documented during the encounter might have more precise UTC timestamps with timezone."
                        isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="string"/>
                        <type value="Age"/>
                        <type value="Range"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="OBR-7"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="performedDateTime">
                        <fhir fid="Procedure.performedDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="performedPeriod">
                        <fhir fid="Procedure.performedPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="performedString">
                        <fhir fid="Procedure.performedString">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="performedAge">
                        <fhir fid="Procedure.performedAge">
                            <type value="Age"/>
                        </fhir>
                    </element>
                    <element name="performedRange">
                        <fhir fid="Procedure.performedRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recorder" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who recorded the procedure</desc>
                    <fhir fid="Procedure.recorder" definition="Individual who recorded the record and takes responsibility for its content." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="asserter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person who asserts this procedure</desc>
                    <fhir fid="Procedure.asserter" definition="Individual who is making the procedure statement." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The people who performed the procedure</desc>
                    <fhir fid="Procedure.performer" definition="Limited to &#34;real&#34; people rather than equipment." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF]"/>
                    </fhir>
                    <element name="function" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of performance</desc>
                        <fhir fid="Procedure.performer.function" definition="Distinguishes the type of involvement of the performer in the procedure. For example, surgeon, anaesthetist, endoscopist." requirements="Allows disambiguation of the types of involvement of different performers." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Procedure Performer Role Codes" strength="example" description="A code that identifies the role of a performer of the procedure." valueSet="2.16.840.1.113883.4.642.3.433" canonicalUri="http://hl7.org/fhir/ValueSet/performer-role"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="v2" map="Some combination of STF-18 / PRA-3 / PRT-4 / ROL-3 / ORC-12 / OBR-16 / PV1-7 / PV1-8 / PV1-9 / PV1-17 / OBX-25"/>
                            <mapping identity="rim" map=".functionCode"/>
                        </fhir>
                    </element>
                    <element name="actor" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The reference to the practitioner</desc>
                        <fhir fid="Procedure.performer.actor" definition="The practitioner who was involved in the procedure." requirements="A reference to Device supports use cases, such as pacemakers." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="v2" map="ORC-19/PRT-5"/>
                            <mapping identity="rim" map=".role"/>
                        </fhir>
                    </element>
                    <element name="onBehalfOf" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Organization the device or practitioner was acting for</desc>
                        <fhir fid="Procedure.performer.onBehalfOf" definition="The organization the device or practitioner was acting on behalf of." requirements="Practitioners and Devices can be associated with multiple organizations.  This element indicates which organization they were acting on behalf of when performing the action.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map=".scoper"/>
                        </fhir>
                    </element>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the procedure happened</desc>
                    <fhir fid="Procedure.location" definition="The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant." requirements="Ties a procedure to where the records are likely kept." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role[classCode=SDLOC]"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coded reason procedure performed</desc>
                    <fhir fid="Procedure.reasonCode" definition="The coded reason why the procedure was performed. This may be a coded entity of some type, or may simply be present as text."
                        comment="Use Procedure.reasonCode when a code sufficiently describes the reason.  Use Procedure.reasonReference when referencing a resource, which allows more information to be conveyed, such as onset date. Procedure.reasonCode and Procedure.reasonReference are not meant to be duplicative.  For a single reason, either Procedure.reasonCode or Procedure.reasonReference can be used.  Procedure.reasonCode may be a summary code, or Procedure.reasonReference may be used to reference a very precise definition of the reason using Condition | Observation | Procedure | DiagnosticReport | DocumentReference.  Both Procedure.reasonCode and Procedure.reasonReference can be used if they are describing different reasons for the procedure."
                        isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Reason Codes" strength="example" description="A code that identifies the reason a procedure is  required." valueSet="2.16.840.1.113883.4.642.3.432" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-reason"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The justification that the procedure was performed</desc>
                    <fhir fid="Procedure.reasonReference" definition="The justification of why the procedure was performed."
                        comment="It is possible for a procedure to be a reason (such as C-Section) for another procedure (such as an epidural). Other examples include endoscopy for dilatation and biopsy (a combination of diagnostic and therapeutic use). &#xA;Use Procedure.reasonCode when a code sufficiently describes the reason.  Use Procedure.reasonReference when referencing a resource, which allows more information to be conveyed, such as onset date. Procedure.reasonCode and Procedure.reasonReference are not meant to be duplicative.  For a single reason, either Procedure.reasonCode or Procedure.reasonReference can be used.  Procedure.reasonCode may be a summary code, or Procedure.reasonReference may be used to reference a very precise definition of the reason using Condition | Observation | Procedure | DiagnosticReport | DocumentReference.  Both Procedure.reasonCode and Procedure.reasonReference can be used if they are describing different reasons for the procedure."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Target body sites</desc>
                    <fhir fid="Procedure.bodySite" definition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion."
                        comment="If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [procedure-targetbodystructure](extension-procedure-targetbodystructure.html)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="v2" map="OBX-20"/>
                        <mapping identity="rim" map=".targetSiteCode"/>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The result of procedure</desc>
                    <fhir fid="Procedure.outcome" definition="The outcome of the procedure - did it resolve the reasons for the procedure being performed?" comment="If outcome contains narrative text only, it can be captured using the CodeableConcept.text." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Outcome Codes (SNOMED CT)" strength="example" description="An outcome of a procedure - whether it was resolved or otherwise." valueSet="2.16.840.1.113883.4.642.3.428" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-outcome"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=OUT].target.text"/>
                    </fhir>
                </element>
                <element name="report" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Any report resulting from the procedure</desc>
                    <fhir fid="Procedure.report" definition="This could be a histology result, pathology report, surgical report, etc." comment="There could potentially be multiple reports - e.g. if this was a procedure which took multiple biopsies resulting in a number of anatomical pathology reports.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Composition"/>
                        </type>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="complication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Complication following the procedure</desc>
                    <fhir fid="Procedure.complication" definition="Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues."
                        comment="If complications are only expressed by the narrative text, they can be captured using the CodeableConcept.text.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Codes describing complications that resulted from a procedure." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=OUTC].target[classCode=OBS, code=&#34;complication&#34;, moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="complicationDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A condition that is a result of the procedure</desc>
                    <fhir fid="Procedure.complicationDetail" definition="Any complications that occurred during the procedure, or in the immediate post-performance period." requirements="This is used to document a condition that is a result of the procedure, not the condition that was the reason for the procedure.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=OUTC].target[classCode=OBS, code=&#34;complication&#34;, moodCode=EVN].value"/>
                    </fhir>
                </element>
                <element name="followUp" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instructions for follow up</desc>
                    <fhir fid="Procedure.followUp" definition="If the procedure required specific follow up - e.g. removal of sutures. The follow up may be represented as a simple note or could potentially be more complex, in which case the CarePlan resource can be used.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Follow up Codes (SNOMED CT)" strength="example" description="Specific follow up required for a procedure e.g. removal of sutures." valueSet="2.16.840.1.113883.4.642.3.429" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-followup"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=ACT, moodCode=INT].code"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional information about the procedure</desc>
                    <fhir fid="Procedure.note" definition="Any other notes and comments about the procedure.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
                <element name="focalDevice" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Manipulated, implanted, or removed device</desc>
                    <fhir fid="Procedure.focalDevice" definition="A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=DEV].role[classCode=MANU]"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Kind of change to device</desc>
                        <fhir fid="Procedure.focalDevice.action" definition="The kind of change that happened to the device during the procedure.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Procedure Device Action Codes" strength="preferred" description="A kind of change that happened to the device during the procedure." valueSet="2.16.840.1.113883.4.642.3.425" canonicalUri="http://hl7.org/fhir/ValueSet/device-action"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;procedure device action&#34;].value=:procedure device action codes"/>
                        </fhir>
                    </element>
                    <element name="manipulated" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Device that was changed</desc>
                        <fhir fid="Procedure.focalDevice.manipulated" definition="The device that was manipulated (changed) during the procedure.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <mapping identity="rim" map=".participation[typeCode=DEV].role[classCode=SDLOC]"/>
                        </fhir>
                    </element>
                </element>
                <element name="usedReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Items used during procedure</desc>
                    <fhir fid="Procedure.usedReference" definition="Identifies medications, devices and any other substance used as part of the procedure." comment="For devices actually implanted or removed, use Procedure.device." requirements="Used for tracking contamination, etc.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=DEV].role[classCode=MANU] or&#xA;.participation[typeCode=CSM].role[classCode=ADMM] (for Medication or Substance)"/>
                    </fhir>
                </element>
                <element name="usedCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Coded items used during the procedure</desc>
                    <fhir fid="Procedure.usedCode" definition="Identifies coded items that were used as part of the procedure." comment="For devices actually implanted or removed, use Procedure.device.">
                        <type value="CodeableConcept"/>
                        <binding displayName="FHIR Device Types" strength="example" description="Codes describing items used during a procedure." valueSet="2.16.840.1.113883.4.642.3.208" canonicalUri="http://hl7.org/fhir/ValueSet/device-kind"/>
                        <mapping identity="rim" map="participation[typeCode=Dev].role[classCode=MANU]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.113" name="Provenance" displayName="Provenance" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Provenance">
            <desc language="en-US">Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important
                records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Provenance" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w3c.prov" uri="http://www.w3.org/ns/prov" name="W3C PROV"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="fhirauditevent" uri="http://hl7.org/fhir/auditevent" name="FHIR AuditEvent Mapping"/>
            </fhir>
            <element name="Provenance" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Who, What, When for a set of resources</desc>
                <fhir fid="Provenance"
                    definition="Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."
                    comment="Some parties may be duplicated between the target resource and its provenance.  For instance, the prescriber is usually (but not always) the author of the prescription resource. This resource is defined with close consideration for W3C Provenance.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="ControlAct[isNormalAct() and subsumes(CACT, classCode) and moodCode=EVN]"/>
                    <mapping identity="w3c.prov" map="Activity"/>
                </fhir>
                <element name="target" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Target Reference(s) (usually version specific)</desc>
                    <fhir fid="Provenance.target" definition="The Reference(s) that were generated or updated by  the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity."
                        comment="Target references are usually version specific, but might not be, if a version has not been assigned or if the provenance information is part of the set of resources being maintained (i.e. a document). When using the RESTful API, the identity of the resource might not be known (especially not the version specific one); the client may either submit the resource first, and then the provenance, or it may submit both using a single transaction. See the notes on transaction for further discussion."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map="./outboundRelationship[isNormalActRelationship() and typeCode=SUBJ]/target  OR  ./participation[isNormalParticipation() and typeCode=SBJ]/role  OR  ./participation[isNormalParticipation() and typeCode=SBJ]/role[isNormalRole()]/player"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.entity.reference"/>
                        <mapping identity="w3c.prov" map="Entity Created/Updated"/>
                    </fhir>
                </element>
                <choice name="occurred[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the activity occurred</desc>
                    <fhir fid="Provenance.occurred[x]" definition="The period during which the activity occurred." comment="The period can be a little arbitrary; where possible, the time should correspond to human assessment of the activity time.">
                        <type value="Period"/>
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurred[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map="./effectiveTime[type=IVL_TS]"/>
                        <mapping identity="w3c.prov" map="Activity.startTime &amp; Activity.endTime"/>
                    </fhir>
                    <element name="occurredPeriod">
                        <fhir fid="Provenance.occurredPeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurredDateTime">
                        <fhir fid="Provenance.occurredDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                </choice>
                <element name="recorded" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">When the activity was recorded / updated</desc>
                    <fhir fid="Provenance.recorded" definition="The instant of time at which the activity was recorded." comment="This can be a little different from the time stamp on the resource if there is a delay between recording the event and updating the provenance and target resource." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="unique(./participation[isNormalParticipation() and typeCode=AUT]/time[type=TS])"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.recorded"/>
                        <mapping identity="w3c.prov" map="Activity.when"/>
                    </fhir>
                </element>
                <element name="policy" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Policy or plan the activity was defined by</desc>
                    <fhir fid="Provenance.policy" definition="Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc."
                        comment="For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.">
                        <type value="uri"/>
                        <mapping identity="rim" map="./inboundRelationship[isNormalActRelationship() and typeCode=&#34;SUBJ&#34;]/source[isNormalAct and subsumes(POLICY, classCode) and moodCode=EVN]/text[typeCode='ED'/tel"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.agent.policy"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the activity occurred, if relevant</desc>
                    <fhir fid="Provenance.location" definition="Where the activity occurred, if relevant.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Event.location"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map="unique(./participation[isNormalParticipation() and typeCode=LOC]/role[isNormalRole() and subsumes(SDLOC, classCode)]/player[isNormalEntity and classCode=&#34;LOC&#34; and determinerCode=&#34;INST&#34;]"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.agent.location"/>
                        <mapping identity="w3c.prov" map="Activity.location"/>
                    </fhir>
                </element>
                <element name="reason" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reason the activity is occurring</desc>
                    <fhir fid="Provenance.reason" definition="The reason that the activity was taking place.">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetPurposeOfUse" strength="extensible" description="The reason the activity took place." valueSet="2.16.840.1.113883.1.11.20448" canonicalUri="http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map="unique(./reasonCode)"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.purposeOfEvent"/>
                        <mapping identity="w3c.prov" map="Activity.Activity"/>
                    </fhir>
                </element>
                <element name="activity" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Activity that occurred</desc>
                    <fhir fid="Provenance.activity" definition="An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Provenance activity type" strength="extensible" description="The activity that took place." valueSet="2.16.840.1.113883.4.642.3.438" canonicalUri="http://hl7.org/fhir/ValueSet/provenance-activity-type"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map="Act.code"/>
                        <mapping identity="w3c.prov" map="Activity.Activity"/>
                    </fhir>
                </element>
                <element name="agent" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Actor involved</desc>
                    <fhir fid="Provenance.agent" definition="An actor taking a role in an activity  for which it can be assigned some degree of responsibility for the activity taking place." comment="Several agents may be associated (i.e. has some responsibility for an activity) with an activity and vice-versa."
                        requirements="An agent can be a person, an organization, software, device, or other entities that may be ascribed responsibility.">
                        <type value="BackboneElement"/>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.who"/>
                        <mapping identity="rim" map="./participation[isNormalParticipation()]  OR  ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.agent"/>
                        <mapping identity="w3c.prov" map="Agent"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How the agent participated</desc>
                        <fhir fid="Provenance.agent.type" definition="The participation the agent had with respect to the activity." comment="For example: author, performer, enterer, attester, etc." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Provenance participant type" strength="extensible" description="The type of participation that a provenance agent played with respect to the activity." valueSet="2.16.840.1.113883.4.642.3.1003" canonicalUri="http://hl7.org/fhir/ValueSet/provenance-agent-type"/>
                            <mapping identity="workflow" map="Event.performer.function"/>
                            <mapping identity="rim" map=".role"/>
                            <mapping identity="fhirauditevent" map="AuditEvent.agent.type"/>
                            <mapping identity="w3c.prov" map="Agent.Attribution"/>
                        </fhir>
                    </element>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What the agents role was</desc>
                        <fhir fid="Provenance.agent.role" definition="The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity." comment="For example: doctor, nurse, clerk, etc.">
                            <type value="CodeableConcept"/>
                            <binding displayName="SecurityRoleType" strength="example" description="The role that a provenance agent played with respect to the activity." valueSet="2.16.840.1.113883.4.642.3.978" canonicalUri="http://hl7.org/fhir/ValueSet/security-role-type"/>
                            <mapping identity="rim" map=".typecode"/>
                            <mapping identity="fhirauditevent" map="AuditEvent.agent.role"/>
                        </fhir>
                    </element>
                    <element name="who" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Who participated</desc>
                        <fhir fid="Provenance.agent.who" definition="The individual, device or organization that participated in the event." comment="whoIdentity should be used when the agent is not a Resource type." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="workflow" map="Event.performer.actor"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="onBehalfOf" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who the agent is representing</desc>
                        <fhir fid="Provenance.agent.onBehalfOf" definition="The individual, device, or organization for whom the change was made." comment="onBehalfOfIdentity should be used when the agent is not a Resource type.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map="Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]"/>
                        </fhir>
                    </element>
                </element>
                <element name="entity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An entity used in this activity</desc>
                    <fhir fid="Provenance.entity" definition="An entity used in this activity.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="./subjectOf"/>
                        <mapping identity="fhirauditevent" map="AuditEvent.entity"/>
                        <mapping identity="w3c.prov" map="Entity"/>
                    </fhir>
                    <element name="role" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">derivation | revision | quotation | source | removal</desc>
                        <fhir fid="Provenance.entity.role" definition="How the entity was used during the activity." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ProvenanceEntityRole" strength="required" description="How an entity was used in an activity." valueSet="2.16.840.1.113883.4.642.3.436" canonicalUri="http://hl7.org/fhir/ValueSet/provenance-entity-role|4.0.1"/>
                            <mapping identity="rim" map="./typeCode"/>
                            <mapping identity="fhirauditevent" map="AuditEvent.entity.lifecycle"/>
                            <mapping identity="w3c.prov" map="Entity.role"/>
                        </fhir>
                    </element>
                    <element name="what" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Identity of entity</desc>
                        <fhir fid="Provenance.entity.what" definition="Identity of the  Entity used. May be a logical or physical uri and maybe absolute or relative." comment="whatIdentity should be used for entities that are not a Resource type." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                            <mapping identity="rim" map="./text/reference"/>
                            <mapping identity="fhirauditevent" map="AuditEvent.entity.reference"/>
                            <mapping identity="w3c.prov" map="Entity.Identity"/>
                        </fhir>
                    </element>
                    <element name="agent" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Entity is attributed to this agent</desc>
                        <fhir fid="Provenance.entity.agent" definition="The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity."
                            comment="A usecase where one Provenance.entity.agent is used where the Entity that was used in the creation/updating of the Target, is not in the context of the same custodianship as the Target, and thus the meaning of Provenance.entity.agent is to say that the entity referenced is managed elsewhere and that this Agent provided access to it.  This would be similar to where the Entity being referenced is managed outside FHIR, such as through HL7 v2, v3, or XDS. This might be where the Entity being referenced is managed in another FHIR resource server. Thus it explains the Provenance of that Entity's use in the context of this Provenance activity.">
                            <mapping identity="rim" map="./author/role"/>
                        </fhir>
                    </element>
                </element>
                <element name="signature" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Signature on target</desc>
                    <fhir fid="Provenance.signature" definition="A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.">
                        <type value="Signature"/>
                        <mapping identity="rim" map="./signatureText"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.114" name="Questionnaire" displayName="Questionnaire" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Questionnaire">
            <desc language="en-US">A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">To support structured, hierarchical registration of data gathered using digital forms and other questionnaires. Questionnaires provide greater control over presentation and allow capture of data in a domain-independent way (i.e. capturing information that would otherwise require multiple distinct types of resources).</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Questionnaire" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Questionnaire" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A structured set of questions</desc>
                <fhir fid="Questionnaire" definition="A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.">
                    <mapping identity="workflow" map="Definition"/>
                    <mapping identity="rim" map="Observation[moodCode=DEF]"/>
                    <constraint key="que-2" severity="error" human="The link ids for groups and questions must be unique within the questionnaire" expression="descendants().linkId.isDistinct()" xpath="count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value))" source=""/>
                    <constraint key="que-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this questionnaire, represented as a URI (globally unique)</desc>
                    <fhir fid="Questionnaire.url"
                        definition="An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers."
                        comment="The name of the referenced questionnaire can be conveyed using the http://hl7.org/fhir/StructureDefinition/display extension." requirements="…  This is the id that will be used to link a QuestionnaireResponse to the Questionnaire the response is for." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier[scope=BUSN;reliability=ISS]"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the questionnaire</desc>
                    <fhir fid="Questionnaire.identifier" definition="A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this questionnaire outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the questionnaire</desc>
                    <fhir fid="Questionnaire.version"
                        definition="The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different questionnaire instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the questionnaire with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this questionnaire (computer friendly)</desc>
                    <fhir fid="Questionnaire.name" definition="A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this questionnaire (human friendly)</desc>
                    <fhir fid="Questionnaire.title" definition="A short, descriptive, user-friendly title for the questionnaire." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                        <mapping identity="rim" map=".title"/>
                    </fhir>
                </element>
                <element name="derivedFrom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates protocol or definition</desc>
                    <fhir fid="Questionnaire.derivedFrom" definition="The URL of a Questionnaire that this Questionnaire is based on." requirements="Allows a Questionnaire to be created based on another Questionnaire.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                        </type>
                        <mapping identity="workflow" map="Definition.derivedFrom"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DRIV].target[classCode=OBS, moodCode=DEFN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="Questionnaire.status" definition="The status of this questionnaire. Enables tracking the life-cycle of the content." comment="Allows filtering of questionnaires that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="Questionnaire.experimental" definition="A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of questionnaires that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level questionnaire." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="subjectType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Resource that can be subject of QuestionnaireResponse</desc>
                    <fhir fid="Questionnaire.subjectType" definition="The types of subjects that can be the subject of responses created for the questionnaire." comment="If none are specified, then the subject is unlimited." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                        <mapping identity="workflow" map="Definition.subject[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=META].target[classCode=OBS, moodCode=DEFN, isCriterion=true].participation.role.classCode"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="Questionnaire.date" definition="The date  (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the questionnaire. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="Questionnaire.publisher" definition="The name of the organization or individual that published the questionnaire."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the questionnaire is the organization or individual primarily responsible for the maintenance and upkeep of the questionnaire. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the questionnaire. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the questionnaire.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="Questionnaire.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                        <mapping identity="rim" map=".participation[typeCode=CALLBCK].role"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the questionnaire</desc>
                    <fhir fid="Questionnaire.description" definition="A free text natural language description of the questionnaire from a consumer's perspective."
                        comment="This description can be used to capture details such as why the questionnaire was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the questionnaire as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the questionnaire is presumed to be the predominant language in the place the questionnaire was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="Questionnaire.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for questionnaire (if applicable)</desc>
                    <fhir fid="Questionnaire.jurisdiction" definition="A legal or geographic region in which the questionnaire is intended to be used." comment="It may be possible for the questionnaire to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this questionnaire is defined</desc>
                    <fhir fid="Questionnaire.purpose" definition="Explanation of why this questionnaire is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the questionnaire. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this questionnaire.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".reasonCode.text"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="Questionnaire.copyright" definition="A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire." requirements="Consumers must be able to determine any legal restrictions on the use of the questionnaire and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the questionnaire was approved by publisher</desc>
                    <fhir fid="Questionnaire.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;approval&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the questionnaire was last reviewed</desc>
                    <fhir fid="Questionnaire.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;SUBJ&#34;; subsetCode=&#34;RECENT&#34;].act[classCode=CACT;moodCode=EVN;code=&#34;review&#34;].effectiveTime"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the questionnaire is expected to be used</desc>
                    <fhir fid="Questionnaire.effectivePeriod" definition="The period during which the questionnaire content was or is planned to be in active use."
                        comment="The effective period for a questionnaire  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the questionnaire are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="rim" map="N/A (to add?)"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Concept that represents the overall questionnaire</desc>
                    <fhir fid="Questionnaire.code" definition="An identifier for this question or group of questions in a particular terminology such as LOINC." requirements="Allows linking of the complete Questionnaire resources to formal terminologies.  It's common for &#34;panels&#34; of questions to be identified by a code." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="Questionnaire Question Codes" strength="example" description="Codes for questionnaires, groups and individual questions." valueSet="2.16.840.1.113883.4.642.3.443" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-questions"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Questions and sections within the Questionnaire</desc>
                    <fhir fid="Questionnaire.item" definition="A particular question, question grouping or display text that is part of the questionnaire." comment="The content of the questionnaire is constructed from an ordered, hierarchical collection of items.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=OBS, moodCode=DEF]"/>
                        <constraint key="que-9" severity="error" human="Read-only can't be specified for &#34;display&#34; items" expression="type!='display' or readOnly.empty()" xpath="not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')])" source=""/>
                        <constraint key="que-8" severity="error" human="Initial values can't be specified for groups or display items" expression="(type!='group' and type!='display') or initial.empty()" xpath="not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')])" source=""/>
                        <constraint key="que-6" severity="error" human="Required and repeat aren't permitted for display items" expression="type!='display' or (required.empty() and repeats.empty())" xpath="not(f:type/@value='display' and (f:required or f:repeats))" source=""/>
                        <constraint key="que-5" severity="error" human="Only 'choice' and 'open-choice' items can have answerValueSet" expression="(type ='choice' or type = 'open-choice' or type = 'decimal' or type = 'integer' or type = 'date' or type = 'dateTime' or type = 'time' or type = 'string' or type = 'quantity') or (answerValueSet.empty() and answerOption.empty())"
                            xpath="f:type/@value=('choice','open-choice','decimal','integer','date','dateTime','time','string','quantity',') or not(f:answerOption or f:answerValueSet)" source=""/>
                        <constraint key="que-4" severity="error" human="A question cannot have both answerOption and answerValueSet" expression="answerOption.empty() or answerValueSet.empty()" xpath="not(f:answerValueSet and f:answerOption)" source=""/>
                        <constraint key="que-3" severity="error" human="Display items cannot have a &#34;code&#34; asserted" expression="type!='display' or code.empty()" xpath="not(f:type/@value='display' and f:code)" source=""/>
                        <constraint key="que-10" severity="error" human="Maximum length can only be declared for simple question types" expression="(type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url' | 'open-choice')) or maxLength.empty()" xpath="f:type/@value=('boolean', 'decimal', 'integer', 'open-choice', 'string', 'text', 'url') or not(f:maxLength)" source=""/>
                        <constraint key="que-1" severity="error" human="Group items must have nested items, display items cannot have nested items" expression="(type='group' implies item.empty().not()) and (type.trace('type')='display' implies item.trace('item').empty())" xpath="not((f:type/@value='group' and not(f:item)) or (f:type/@value='display' and f:item))" source=""/>
                        <constraint key="que-13" severity="error" human="Can only have multiple initial values for repeating items" expression="repeats=true or initial.count() &lt;= 1" xpath="f:repeats/@value='true' or count(f:initial)&lt;=1" source=""/>
                        <constraint key="que-11" severity="error" human="If one or more answerOption is present, initial[x] must be missing" expression="answerOption.empty() or initial.empty()" xpath="not(f:answerOption) or not(count(f:*[starts-with(local-name(.), 'initial')]))" source=""/>
                        <constraint key="que-12" severity="error" human="If there are more than one enableWhen, enableBehavior must be specified" expression="enableWhen.count() &gt; 2 implies enableBehavior.exists()" xpath="not(f:answerOption) or not(count(f:*[starts-with(local-name(.), 'initial')]))" source=""/>
                    </fhir>
                    <element name="linkId" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Unique id for item in questionnaire</desc>
                        <fhir fid="Questionnaire.item.linkId" definition="An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource." comment="This ''can'' be a meaningful identifier (e.g. a LOINC code) but is not intended to have any meaning.  GUIDs or sequential numbers are appropriate here."
                            requirements="[QuestionnaireResponse](questionnaireresponse.html#) does not require omitted items to be included and may have some items that repeat, so linkage based on position alone is not sufficient.">
                            <type value="string"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">ElementDefinition - details for the item</desc>
                        <fhir fid="Questionnaire.item.definition"
                            definition="This element is a URI that refers to an [ElementDefinition](elementdefinition.html) that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value:&#xA;&#xA;* code (ElementDefinition.code) &#xA;* type (ElementDefinition.type) &#xA;* required (ElementDefinition.min) &#xA;* repeats (ElementDefinition.max) &#xA;* maxLength (ElementDefinition.maxLength) &#xA;* answerValueSet (ElementDefinition.binding)&#xA;* options (ElementDefinition.binding)."
                            comment="The uri refers to an ElementDefinition in a [StructureDefinition](structuredefinition.html#) and always starts with the [canonical URL](references.html#canonical) for the target resource. When referring to a StructureDefinition, a fragment identifier is used to specify the element definition by its id [Element.id](element-definitions.html#Element.id). E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]. In the absence of a fragment identifier, the first/root element definition in the target is the matching element definition."
                            requirements="A common pattern is to define a set of data elements and then build multiple questionnaires for different circumstances to gather the data. This element provides traceability to the common definition and allows the content for the question to come from the underlying definition.">
                            <type value="uri"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=INST].target[classCode=OBS, moodCode=DEF]"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Corresponding concept for this item in a terminology</desc>
                        <fhir fid="Questionnaire.item.code" definition="A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers)." comment="The value may come from the ElementDefinition referred to by .definition." requirements="Allows linking of groups of questions to formal terminologies.">
                            <type value="Coding"/>
                            <binding displayName="Questionnaire Question Codes" strength="example" description="Codes for questionnaires, groups and individual questions." valueSet="2.16.840.1.113883.4.642.3.443" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-questions"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <element name="prefix" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">E.g. "1(a)", "2.5.3"</desc>
                        <fhir fid="Questionnaire.item.prefix" definition="A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire."
                            comment="These are generally unique within a questionnaire, though this is not guaranteed. Some questionnaires may have multiple questions with the same label with logic to control which gets exposed.  Typically, these won't be used for &#34;display&#34; items, though such use is not prohibited.  Systems SHOULD NOT generate their own prefixes if prefixes are defined for any items within a Questionnaire."
                            requirements="Separating the label from the question text allows improved rendering.  Also, instructions will often refer to specific prefixes, so there's a need for the questionnaire design to have control over what labels are used.">
                            <type value="string"/>
                            <mapping identity="rim" map="Not supported"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Primary text for the item</desc>
                        <fhir fid="Questionnaire.item.text" definition="The name of a section, the text of a question or text content for a display item."
                            comment="When using this element to represent the name of a section, use group type item and also make sure to limit the text element to a short string suitable for display as a section heading.  Group item instructions should be included as a display type item within the group.">
                            <type value="string"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">group | display | boolean | decimal | integer | date | dateTime +</desc>
                        <fhir fid="Questionnaire.item.type" definition="The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.)."
                            comment="Additional constraints on the type of answer can be conveyed by extensions. The value may come from the ElementDefinition referred to by .definition." requirements="Defines the format in which the user is to be prompted for the answer.">
                            <type value="code"/>
                            <binding displayName="QuestionnaireItemType" strength="required" description="Distinguishes groups from questions and display text and indicates data type for questions." valueSet="2.16.840.1.113883.4.642.3.444" canonicalUri="http://hl7.org/fhir/ValueSet/item-type|4.0.1"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="enableWhen" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Only allow data when</desc>
                        <fhir fid="Questionnaire.item.enableWhen" definition="A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true."
                            comment="If multiple repetitions of this extension are present, the item should be enabled when the condition for *any* of the repetitions is true.  I.e. treat &#34;enableWhen&#34;s as being joined by an &#34;or&#34; clause.  This element is a modifier because if enableWhen is present for an item, &#34;required&#34; is ignored unless one of the enableWhen conditions is met. When an item is disabled, all of its descendants are disabled, regardless of what their own enableWhen logic might evaluate to."
                            requirements="Allows questionnaires to adapt based on answers to other questions. E.g. If physical gender is specified as a male, no need to capture pregnancy history.  Also allows conditional display of instructions or groups of questions." isModifier="true">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            <constraint key="que-7" severity="error" human="If the operator is 'exists', the value must be a boolean" expression="operator = 'exists' implies (answer is Boolean)" xpath="f:operator/@value != 'exists' or exists(f:answerBoolean)" source=""/>
                        </fhir>
                        <element name="question" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Question that determines whether item is enabled</desc>
                            <fhir fid="Questionnaire.item.enableWhen.question" definition="The linkId for the question whose answer (or lack of answer) governs whether this item is enabled."
                                comment="If multiple question occurrences are present for the same question (same linkId), then this refers to the nearest question occurrence reachable by tracing first the &#34;ancestor&#34; axis and then the &#34;preceding&#34; axis and then the &#34;following&#34; axis.">
                                <type value="string"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                        </element>
                        <element name="operator" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">exists | = | != | &gt; | &lt; | &gt;= | &lt;=</desc>
                            <fhir fid="Questionnaire.item.enableWhen.operator" definition="Specifies the criteria by which the question is enabled.">
                                <type value="code"/>
                                <binding displayName="QuestionnaireItemOperator" strength="required" description="The criteria by which a question is enabled." valueSet="2.16.840.1.113883.4.642.3.1005" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-enable-operator|4.0.1"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                        </element>
                        <choice name="answer[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Value for question comparison based on operator</desc>
                            <fhir fid="Questionnaire.item.enableWhen.answer[x]" definition="A value that the referenced question is tested using the specified operator in order for the item to be enabled.">
                                <type value="boolean"/>
                                <type value="decimal"/>
                                <type value="integer"/>
                                <type value="date"/>
                                <type value="dateTime"/>
                                <type value="time"/>
                                <type value="string"/>
                                <type value="Coding"/>
                                <type value="Quantity"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                                <binding displayName="Questionnaire Answer Codes" strength="example" description="Allowed values to answer questions." valueSet="2.16.840.1.113883.4.642.3.446" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-answers"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                            <element name="answerBoolean">
                                <fhir fid="Questionnaire.item.enableWhen.answerBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="answerDecimal">
                                <fhir fid="Questionnaire.item.enableWhen.answerDecimal">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="answerInteger">
                                <fhir fid="Questionnaire.item.enableWhen.answerInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="answerDate">
                                <fhir fid="Questionnaire.item.enableWhen.answerDate">
                                    <type value="date"/>
                                </fhir>
                            </element>
                            <element name="answerDateTime">
                                <fhir fid="Questionnaire.item.enableWhen.answerDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="answerTime">
                                <fhir fid="Questionnaire.item.enableWhen.answerTime">
                                    <type value="time"/>
                                </fhir>
                            </element>
                            <element name="answerString">
                                <fhir fid="Questionnaire.item.enableWhen.answerString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="answerCoding">
                                <fhir fid="Questionnaire.item.enableWhen.answerCoding">
                                    <type value="Coding"/>
                                </fhir>
                            </element>
                            <element name="answerQuantity">
                                <fhir fid="Questionnaire.item.enableWhen.answerQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="answerReference">
                                <fhir fid="Questionnaire.item.enableWhen.answerReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="enableBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">all | any</desc>
                        <fhir fid="Questionnaire.item.enableBehavior" definition="Controls how multiple enableWhen values are interpreted -  whether all or any must be true." comment="This element must be specified if more than one enableWhen value is provided.">
                            <type value="code"/>
                            <binding displayName="EnableWhenBehavior" strength="required" description="Controls how multiple enableWhen values are interpreted -  whether all or any must be true." valueSet="2.16.840.1.113883.4.642.3.1007" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior|4.0.1"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="required" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the item must be included in data results</desc>
                        <fhir fid="Questionnaire.item.required" definition="An indication, if true, that the item must be present in a &#34;completed&#34; QuestionnaireResponse.  If false, the item may be skipped when answering the questionnaire."
                            comment="Questionnaire.item.required only has meaning for elements that are conditionally enabled with enableWhen if the condition evaluates to true.  If an item that contains other items is marked as required, that does not automatically make the contained elements required (though required groups must contain at least one child element). The value may come from the ElementDefinition referred to by .definition.">
                            <type value="boolean"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="repeats" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the item may repeat</desc>
                        <fhir fid="Questionnaire.item.repeats" definition="An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups."
                            comment="If a question is marked as repeats=true, then multiple answers can be provided for the question in the corresponding QuestionnaireResponse.  When rendering the questionnaire, it is up to the rendering software whether to render the question text for each answer repetition (i.e. &#34;repeat the question&#34;) or to simply allow entry/selection of multiple answers for the question (repeat the answers).  Which is most appropriate visually may depend on the type of answer as well as whether there are nested items.&#xA;&#xA;The resulting QuestionnaireResponse will be populated the same way regardless of rendering - one 'question' item with multiple answer values.&#xA;&#xA; The value may come from the ElementDefinition referred to by .definition."
                            requirements="Items may be used to create set of (related) questions that can be repeated to give multiple answers to such a set.">
                            <type value="boolean"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="readOnly" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Don't allow human editing</desc>
                        <fhir fid="Questionnaire.item.readOnly" definition="An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire." comment="The value of readOnly elements can be established by asserting  extensions for defaultValues, linkages that support pre-population and/or extensions that support calculation based on other answers."
                            requirements="Allows certain information to be phrased (and rendered) as a question and an answer, while keeping users from changing it.  May also be useful for preventing changes to pre-populated portions of a questionnaire, for calculated values, etc.">
                            <type value="boolean"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="maxLength" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">No more than this many characters</desc>
                        <fhir fid="Questionnaire.item.maxLength" definition="The maximum number of characters that are permitted in the answer to be considered a &#34;valid&#34; QuestionnaireResponse."
                            comment="For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data. The value may come from the ElementDefinition referred to by .definition.">
                            <type value="integer"/>
                            <mapping identity="v2" map="N/A"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="answerValueSet" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Valueset containing permitted answers</desc>
                        <fhir fid="Questionnaire.item.answerValueSet" definition="A reference to a value set containing a list of codes representing permitted answers for a &#34;choice&#34; or &#34;open-choice&#34; question."
                            comment="LOINC defines many useful value sets for questionnaire responses. See [LOINC Answer Lists](loinc.html#alist). The value may come from the ElementDefinition referred to by .definition.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                            </type>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                    </element>
                    <element name="answerOption" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Permitted answer</desc>
                        <fhir fid="Questionnaire.item.answerOption" definition="One of the permitted answers for a &#34;choice&#34; or &#34;open-choice&#34; question." comment="This element can be used when the value set machinery of answerValueSet is deemed too cumbersome or when there's a need to capture possible answers that are not codes.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                        <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Answer value</desc>
                            <fhir fid="Questionnaire.item.answerOption.value[x]" definition="A potential answer that's allowed as the answer to this question." comment="The data type of the value must agree with the item.type.">
                                <type value="integer"/>
                                <type value="date"/>
                                <type value="time"/>
                                <type value="string"/>
                                <type value="Coding"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                                <binding displayName="Questionnaire Answer Codes" strength="example" description="Allowed values to answer questions." valueSet="2.16.840.1.113883.4.642.3.446" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-answers"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                            <element name="valueInteger">
                                <fhir fid="Questionnaire.item.answerOption.valueInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="valueDate">
                                <fhir fid="Questionnaire.item.answerOption.valueDate">
                                    <type value="date"/>
                                </fhir>
                            </element>
                            <element name="valueTime">
                                <fhir fid="Questionnaire.item.answerOption.valueTime">
                                    <type value="time"/>
                                </fhir>
                            </element>
                            <element name="valueString">
                                <fhir fid="Questionnaire.item.answerOption.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueCoding">
                                <fhir fid="Questionnaire.item.answerOption.valueCoding">
                                    <type value="Coding"/>
                                </fhir>
                            </element>
                            <element name="valueReference">
                                <fhir fid="Questionnaire.item.answerOption.valueReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="initialSelected" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Whether option is selected by default</desc>
                            <fhir fid="Questionnaire.item.answerOption.initialSelected" definition="Indicates whether the answer value is selected when the list of possible answers is initially shown." comment="Use this instead of initial[v] if answerValueSet is present.">
                                <type value="boolean"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="initial" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Initial value(s) when item is first rendered</desc>
                        <fhir fid="Questionnaire.item.initial" definition="One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input."
                            comment="The user is allowed to change the value and override the default (unless marked as read-only). If the user doesn't change the value, then this initial value will be persisted when the QuestionnaireResponse is initially created.  Note that initial values can influence results.  The data type of initial[x] must agree with the item.type, and only repeating items can have more then one initial value."
                            requirements="In some workflows, having defaults saves time.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                        </fhir>
                        <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Actual value for initializing the question</desc>
                            <fhir fid="Questionnaire.item.initial.value[x]" definition="The actual value to for an initial answer." comment="The type of the initial value must be consistent with the type of the item.">
                                <type value="boolean"/>
                                <type value="decimal"/>
                                <type value="integer"/>
                                <type value="date"/>
                                <type value="dateTime"/>
                                <type value="time"/>
                                <type value="string"/>
                                <type value="uri"/>
                                <type value="Attachment"/>
                                <type value="Coding"/>
                                <type value="Quantity"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                                <binding displayName="Questionnaire Answer Codes" strength="example" description="Allowed values to answer questions." valueSet="2.16.840.1.113883.4.642.3.446" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-answers"/>
                                <mapping identity="rim" map="N/A - MIF rather than RIM level"/>
                            </fhir>
                            <element name="valueBoolean">
                                <fhir fid="Questionnaire.item.initial.valueBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="valueDecimal">
                                <fhir fid="Questionnaire.item.initial.valueDecimal">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="valueInteger">
                                <fhir fid="Questionnaire.item.initial.valueInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="valueDate">
                                <fhir fid="Questionnaire.item.initial.valueDate">
                                    <type value="date"/>
                                </fhir>
                            </element>
                            <element name="valueDateTime">
                                <fhir fid="Questionnaire.item.initial.valueDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="valueTime">
                                <fhir fid="Questionnaire.item.initial.valueTime">
                                    <type value="time"/>
                                </fhir>
                            </element>
                            <element name="valueString">
                                <fhir fid="Questionnaire.item.initial.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueUri">
                                <fhir fid="Questionnaire.item.initial.valueUri">
                                    <type value="uri"/>
                                </fhir>
                            </element>
                            <element name="valueAttachment">
                                <fhir fid="Questionnaire.item.initial.valueAttachment">
                                    <type value="Attachment"/>
                                </fhir>
                            </element>
                            <element name="valueCoding">
                                <fhir fid="Questionnaire.item.initial.valueCoding">
                                    <type value="Coding"/>
                                </fhir>
                            </element>
                            <element name="valueQuantity">
                                <fhir fid="Questionnaire.item.initial.valueQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="valueReference">
                                <fhir fid="Questionnaire.item.initial.valueReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Nested questionnaire items</desc>
                        <fhir fid="Questionnaire.item.item" definition="Text, questions and other groups to be nested beneath a question or group." comment="There is no specified limit to the depth of nesting.  However, Questionnaire authors are encouraged to consider the impact on the user and user interface of overly deep nesting." requirements="Reports can consist of complex nested groups.">
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.115" name="QuestionnaireResponse" displayName="QuestionnaireResponse" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse">
            <desc language="en-US">A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">To support structured, hierarchical reporting of data gathered using digital forms and other questionnaires.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="QuestionnaireResponse" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="QuestionnaireResponse" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A structured set of questions and their answers</desc>
                <fhir fid="QuestionnaireResponse" definition="A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to."
                    comment="The QuestionnaireResponse contains enough information about the questions asked and their organization that it can be interpreted somewhat independently from the Questionnaire it is based on.  I.e. You don't need access to the Questionnaire in order to extract basic information from a QuestionnaireResponse.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Observation[moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Unique id for this set of answers</desc>
                    <fhir fid="QuestionnaireResponse.identifier" definition="A business identifier assigned to a particular completed (or partially completed) questionnaire." requirements="Used for tracking, registration and other business purposes." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request fulfilled by this QuestionnaireResponse</desc>
                    <fhir fid="QuestionnaireResponse.basedOn" definition="The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression."
                        requirements="Supports traceability of responsibility for the action and allows linkage of an action to the recommendations acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of this action</desc>
                    <fhir fid="QuestionnaireResponse.partOf" definition="A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of."
                        comment="Composition of questionnaire responses will be handled by the parent questionnaire having answers that reference the child questionnaire.  For relationships to referrals, and other types of requests, use basedOn." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Procedure"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="questionnaire" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Form being answered</desc>
                    <fhir fid="QuestionnaireResponse.questionnaire" definition="The Questionnaire that defines and organizes the questions for which answers are being provided."
                        comment="If a QuestionnaireResponse references a Questionnaire, then the QuestionnaireResponse structure must be consistent with the Questionnaire (i.e. questions must be organized into the same groups, nested questions must still be nested, etc.)."
                        requirements="Needed to allow editing of the questionnaire response in a manner that enforces the constraints of the original form." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Questionnaire"/>
                        </type>
                        <mapping identity="workflow" map="Event.instantiates"/>
                        <mapping identity="rim" map="./outboundRelationship[typeCode=INST]/target[classCode=OBS, moodCode=DEFN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">in-progress | completed | amended | entered-in-error | stopped</desc>
                    <fhir fid="QuestionnaireResponse.status" definition="The position of the questionnaire response within its overall lifecycle." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="The information on Questionnaire resources  may possibly be gathered during multiple sessions and altered after considered being finished." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="QuestionnaireResponseStatus" strength="required" description="Lifecycle status of the questionnaire response." canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-answers-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode (also whether there's a revisionControlAct - and possibly mood to distinguish &#34;in-progress&#34; from &#34;published)"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The subject of the questions</desc>
                    <fhir fid="QuestionnaireResponse.subject" definition="The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information."
                        comment="If the Questionnaire declared a subjectType, the resource pointed to by this element must be an instance of one of the listed types." requirements="Allows linking the answers to the individual the answers describe.  May also affect access control." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter created as part of</desc>
                    <fhir fid="QuestionnaireResponse.encounter" definition="The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated."
                        comment="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter. A questionnaire that was initiated during an encounter but not fully completed during the encounter would still generally be associated with the encounter."
                        requirements="Provides context for the information that was captured.  May also affect access control." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="authored" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date the answers were gathered</desc>
                    <fhir fid="QuestionnaireResponse.authored" definition="The date and/or time that this set of answers were last changed."
                        comment="May be different from the lastUpdateTime of the resource itself, because that reflects when the data was known to the server, not when the data was captured.&#xA;&#xA;This element is optional to allow for systems that might not know the value, however it SHOULD be populated if possible."
                        requirements="Clinicians need to be able to check the date that the information in the questionnaire was collected, to derive the context of the answers." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Person who received and recorded the answers</desc>
                    <fhir fid="QuestionnaireResponse.author" definition="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system."
                        comment="Mapping a subject's answers to multiple choice options and determining what to put in the textual answer is a matter of interpretation.  Authoring by device would indicate that some portion of the questionnaire had been auto-populated."
                        requirements="Need to know who interpreted the subject's answers to the questions in the questionnaire, and selected the appropriate options for answers." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The person who answered the questions</desc>
                    <fhir fid="QuestionnaireResponse.source" definition="The person who answered the questions about the subject." comment="If not specified, no inference can be made about who provided the data." requirements="When answering questions about a subject that is minor, incapable of answering or an animal, another human source may answer the questions." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.source"/>
                        <mapping identity="rim" map=".participation[typeCode=INF].role"/>
                    </fhir>
                </element>
                <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Groups and questions</desc>
                    <fhir fid="QuestionnaireResponse.item" definition="A group or question item from the original questionnaire for which answers are provided."
                        comment="Groups cannot have answers and therefore must nest directly within item. When dealing with questions, nesting must occur within each answer because some questions may have multiple answers (and the nesting occurs for each answer).">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=OBS, moodCode=EVN]"/>
                        <constraint key="qrs-1" severity="error" human="Nested item can't be beneath both item and answer" expression="(answer.exists() and item.exists()).not()" xpath="not(exists(f:answer) and exists(f:item))" source=""/>
                    </fhir>
                    <element name="linkId" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Pointer to specific item from Questionnaire</desc>
                        <fhir fid="QuestionnaireResponse.item.linkId" definition="The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource." requirements="Items can repeat in the answers, so a direct 1..1 correspondence by position might not exist - requiring correspondence by identifier.">
                            <type value="string"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target[classCode=OBS, moodCode=DEFN].id"/>
                        </fhir>
                    </element>
                    <element name="definition" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">ElementDefinition - details for the item</desc>
                        <fhir fid="QuestionnaireResponse.item.definition" definition="A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item."
                            comment="The ElementDefinition must be in a [StructureDefinition](structuredefinition.html#), and must have a fragment identifier that identifies the specific data element by its id (Element.id). E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x].&#xA;&#xA;There is no need for this element if the item pointed to by the linkId has a definition listed."
                            requirements="A common pattern is to define a set of data elements, and then build multiple different questionnaires for different circumstances to gather the data. This element provides traceability to the common definition.">
                            <type value="uri"/>
                            <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target[classCode=OBS, moodCode=DEFN].code"/>
                        </fhir>
                    </element>
                    <element name="text" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name for group or question text</desc>
                        <fhir fid="QuestionnaireResponse.item.text" definition="Text that is displayed above the contents of the group or as the text of the question being answered." requirements="Allows the questionnaire response to be read without access to the questionnaire.">
                            <type value="string"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                    <element name="answer" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The response(s) to the question</desc>
                        <fhir fid="QuestionnaireResponse.item.answer" definition="The respondent's answer(s) to the question." comment="The value is nested because we cannot have a repeating structure that has variable type.">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map=".value[type=LIST_ANY]"/>
                        </fhir>
                        <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Single-valued answer to the question</desc>
                            <fhir fid="QuestionnaireResponse.item.answer.value[x]" definition="The answer (or one of the answers) provided by the respondent to the question."
                                comment="More complex structures (Attachment, Resource and Quantity) will typically be limited to electronic forms that can expose an appropriate user interface to capture the components and enforce the constraints of a complex data type.  Additional complex types can be introduced through extensions. Must match the datatype specified by Questionnaire.item.type in the corresponding Questionnaire."
                                requirements="Ability to retain a single-valued answer to a question.">
                                <type value="boolean"/>
                                <type value="decimal"/>
                                <type value="integer"/>
                                <type value="date"/>
                                <type value="dateTime"/>
                                <type value="time"/>
                                <type value="string"/>
                                <type value="uri"/>
                                <type value="Attachment"/>
                                <type value="Coding"/>
                                <type value="Quantity"/>
                                <type value="Reference">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </type>
                                <binding displayName="Questionnaire Answer Codes" strength="example" description="Code indicating the response provided for a question." valueSet="2.16.840.1.113883.4.642.3.446" canonicalUri="http://hl7.org/fhir/ValueSet/questionnaire-answers"/>
                                <mapping identity="rim" map=".item"/>
                            </fhir>
                            <element name="valueBoolean">
                                <fhir fid="QuestionnaireResponse.item.answer.valueBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="valueDecimal">
                                <fhir fid="QuestionnaireResponse.item.answer.valueDecimal">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="valueInteger">
                                <fhir fid="QuestionnaireResponse.item.answer.valueInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="valueDate">
                                <fhir fid="QuestionnaireResponse.item.answer.valueDate">
                                    <type value="date"/>
                                </fhir>
                            </element>
                            <element name="valueDateTime">
                                <fhir fid="QuestionnaireResponse.item.answer.valueDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                            <element name="valueTime">
                                <fhir fid="QuestionnaireResponse.item.answer.valueTime">
                                    <type value="time"/>
                                </fhir>
                            </element>
                            <element name="valueString">
                                <fhir fid="QuestionnaireResponse.item.answer.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueUri">
                                <fhir fid="QuestionnaireResponse.item.answer.valueUri">
                                    <type value="uri"/>
                                </fhir>
                            </element>
                            <element name="valueAttachment">
                                <fhir fid="QuestionnaireResponse.item.answer.valueAttachment">
                                    <type value="Attachment"/>
                                </fhir>
                            </element>
                            <element name="valueCoding">
                                <fhir fid="QuestionnaireResponse.item.answer.valueCoding">
                                    <type value="Coding"/>
                                </fhir>
                            </element>
                            <element name="valueQuantity">
                                <fhir fid="QuestionnaireResponse.item.answer.valueQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="valueReference">
                                <fhir fid="QuestionnaireResponse.item.answer.valueReference">
                                    <type value="Reference"/>
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Nested groups and questions</desc>
                            <fhir fid="QuestionnaireResponse.item.answer.item" definition="Nested groups and/or questions found within this particular answer." requirements="It is useful to have &#34;sub-questions&#34;, questions which normally appear when certain answers are given and which collect additional details.">
                                <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=OBS, moodCode=EVN]"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="item" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Nested questionnaire response items</desc>
                        <fhir fid="QuestionnaireResponse.item.item" definition="Questions or sub-groups nested beneath a question or group." requirements="Reports can consist of complex nested groups.">
                            <mapping identity="rim" map=".outboundRelationship[typeCode=COMP].target[classCode=OBS, moodCode=EVN]"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.116" name="RelatedPerson" displayName="RelatedPerson" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/RelatedPerson">
            <desc language="en-US">Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to track persons related to the patient or the healthcare process.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="RelatedPerson" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="RelatedPerson" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A person that is related to a patient, but who is not a direct target of care</desc>
                <fhir fid="RelatedPerson" definition="Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.">
                    <mapping identity="rim" map="role"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A human identifier for this person</desc>
                    <fhir fid="RelatedPerson.identifier" definition="Identifier for a person within a particular scope." requirements="People are known by a variety of ids. Some institutions maintain several, and most collect identifiers for exchange with other organizations concerning the patient. Examples are national person identifier and local identifier." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="NK1-33"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this related person's record is in active use</desc>
                    <fhir fid="RelatedPerson.active" definition="Whether this related person record is in active use." comment="This element is labeled as a modifier because it may be used to mark that the resource was created in error." requirements="Need to be able to mark a related person record as not to be used, such as if it was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The patient this person is related to</desc>
                    <fhir fid="RelatedPerson.patient" definition="The patient this person is related to." requirements="We need to know which patient this RelatedPerson is related to." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="v2" map="PID-3"/>
                        <mapping identity="rim" map="scoper[classCode=PSN|ANM and determinerCode='INSTANCE']/playedRole[classCode='PAT']/id"/>
                    </fhir>
                </element>
                <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The nature of the relationship</desc>
                    <fhir fid="RelatedPerson.relationship" definition="The nature of the relationship between a patient and the related person." requirements="We need to know the relationship with the patient since it influences the interpretation of the information attributed to this person." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Patient relationship type" strength="preferred" description="The nature of the relationship between a patient and the related person." valueSet="2.16.840.1.113883.4.642.3.449" canonicalUri="http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="NK1-3"/>
                        <mapping identity="rim" map="code"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A name associated with the person</desc>
                    <fhir fid="RelatedPerson.name" definition="A name associated with the person." requirements="Related persons need to be identified by name, but it is uncommon to need details about multiple other names for that person." isSummary="true">
                        <type value="HumanName"/>
                        <mapping identity="v2" map="NK1-2"/>
                        <mapping identity="rim" map="name"/>
                    </fhir>
                </element>
                <element name="telecom" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A contact detail for the person</desc>
                    <fhir fid="RelatedPerson.telecom" definition="A contact detail for the person, e.g. a telephone number or an email address." comment="Person may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently, and also to help with identification."
                        requirements="People have (primary) ways to contact them in some way such as phone, email." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="v2" map="NK1-5 / NK1-6 / NK1-40"/>
                        <mapping identity="rim" map="telecom"/>
                    </fhir>
                </element>
                <element name="gender" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">male | female | other | unknown</desc>
                    <fhir fid="RelatedPerson.gender" definition="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." requirements="Needed for identification of the person, in combination with (at least) name and birth date." isSummary="true">
                        <type value="code"/>
                        <binding displayName="AdministrativeGender" strength="required" description="The gender of a person used for administrative purposes." valueSet="2.16.840.1.113883.4.642.3.1" canonicalUri="http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"/>
                        <mapping identity="v2" map="NK1-15"/>
                        <mapping identity="rim" map="administrativeGender"/>
                    </fhir>
                </element>
                <element name="birthDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date on which the related person was born</desc>
                    <fhir fid="RelatedPerson.birthDate" definition="The date on which the related person was born." isSummary="true">
                        <type value="date"/>
                        <mapping identity="rim" map="player.birthTime"/>
                    </fhir>
                </element>
                <element name="address" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Address where the related person can be contacted or visited</desc>
                    <fhir fid="RelatedPerson.address" definition="Address where the related person can be contacted or visited." requirements="Need to keep track where the related person can be contacted per postal mail or visited." isSummary="true">
                        <type value="Address"/>
                        <mapping identity="v2" map="NK1-4"/>
                        <mapping identity="rim" map="addr"/>
                    </fhir>
                </element>
                <element name="photo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Image of the person</desc>
                    <fhir fid="RelatedPerson.photo" definition="Image of the person." requirements="Many EHR systems have the capability to capture an image of persons. Fits with newer social media usage too.">
                        <type value="Attachment"/>
                        <mapping identity="v2" map="OBX-5 - needs a profile"/>
                        <mapping identity="rim" map="player[classCode='PSN' and determinerCode='INSTANCE']/desc"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Period of time that this relationship is considered valid</desc>
                    <fhir fid="RelatedPerson.period" definition="The period of time during which this relationship is or was active. If there are no dates defined, then the interval is unknown.">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="communication" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A language which may be used to communicate with about the patient's health</desc>
                    <fhir fid="RelatedPerson.communication" definition="A language which may be used to communicate with about the patient's health."
                        comment="If no language is specified, this *implies* that the default local language is spoken.  If you need to convey proficiency for multiple modes, then you need multiple RelatedPerson.Communication associations.   If the RelatedPerson does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required."
                        requirements="If a related person does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="LanguageCommunication"/>
                    </fhir>
                    <element name="language" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The language which can be used to communicate with the patient about his or her health</desc>
                        <fhir fid="RelatedPerson.communication.language" definition="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. &#34;en&#34; for English, or &#34;en-US&#34; for American English versus &#34;en-EN&#34; for England English."
                            comment="The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type." requirements="Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                            <mapping identity="rim" map="player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code"/>
                        </fhir>
                    </element>
                    <element name="preferred" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Language preference indicator</desc>
                        <fhir fid="RelatedPerson.communication.preferred" definition="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." comment="This language is specifically identified for communicating healthcare information."
                            requirements="People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.">
                            <type value="boolean"/>
                            <mapping identity="rim" map="preferenceInd"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.117" name="RequestGroup" displayName="RequestGroup" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/RequestGroup">
            <desc language="en-US">A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="RequestGroup" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="RequestGroup" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A group of related requests</desc>
                <fhir fid="RequestGroup" definition="A group of related requests that can be used to capture intended activities that have inter-dependencies such as &#34;give this medication after that one&#34;.">
                    <mapping identity="workflow" map="Request"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business identifier</desc>
                    <fhir fid="RequestGroup.identifier" definition="Allows a service to provide a unique, business identifier for the request." requirements="Allows identification of the request as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="RequestGroup.instantiatesCanonical" definition="A canonical URL referencing a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." isSummary="true">
                        <type value="canonical"/>
                        <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="RequestGroup.instantiatesUri" definition="A URL referencing an externally defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this request." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiatesUri"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills plan, proposal, or order</desc>
                    <fhir fid="RequestGroup.basedOn" definition="A plan, proposal or order that is fulfilled in whole or in part by this request." requirements="Allows tracing of authorization for the request and tracking whether proposals/recommendations were acted upon.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request(s) replaced by this request</desc>
                    <fhir fid="RequestGroup.replaces" definition="Completed or terminated request(s) whose function is taken by this new request." comment="The replacement could be because the initial request was immediately rejected (due to an issue) or because the previous request was completed, but the need for the action described by the request remains ongoing."
                        requirements="Allows tracing the continuation of a therapy or administrative process instantiated through multiple requests.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                    </fhir>
                </element>
                <element name="groupIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Composite request this is part of</desc>
                    <fhir fid="RequestGroup.groupIdentifier" definition="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition, prescription or similar form."
                        comment="Requests are linked either by a &#34;basedOn&#34; relationship (i.e. one request is fulfilling another) or by having a common requisition.  Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation."
                        requirements="Some business processes need to know if multiple items were ordered as part of the same &#34;prescription&#34; or &#34;requisition&#34; for billing or other purposes." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="RequestGroup.status" definition="The current state of the request. For request groups, the status reflects the status of all the requests in the group." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="Codes identifying the lifecycle stage of a request." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="RequestGroup.intent" definition="Indicates the level of authority/intentionality associated with the request and where the request fits into the workflow chain." requirements="Proposals/recommendations, plans and orders all use the same structure and can exist in the same fulfillment chain." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestIntent" strength="required" description="Codes indicating the degree of authority/intentionality associated with a request." valueSet="2.16.840.1.113883.4.642.3.113" canonicalUri="http://hl7.org/fhir/ValueSet/request-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="RequestGroup.priority" definition="Indicates how quickly the request should be addressed with respect to other requests." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What's being requested/ordered</desc>
                    <fhir fid="RequestGroup.code" definition="A code that identifies what the overall request group is." comment="This element can be used to provide a code that captures the meaning of the request group as a whole, as opposed to the code of the action element, which captures the meaning of the individual actions within the request group." isSummary="true">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who the request group is about</desc>
                    <fhir fid="RequestGroup.subject" definition="The subject for which the request group was created.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Created as part of</desc>
                    <fhir fid="RequestGroup.encounter" definition="Describes the context of the request group, if any.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                    </fhir>
                </element>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the request group was authored</desc>
                    <fhir fid="RequestGroup.authoredOn" definition="Indicates when the request group was created.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Device or practitioner that authored the request group</desc>
                    <fhir fid="RequestGroup.author" definition="Provides a reference to the author of the request group.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the request group is needed</desc>
                    <fhir fid="RequestGroup.reasonCode" definition="Describes the reason for the request group in coded or textual form.">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the request group is needed</desc>
                    <fhir fid="RequestGroup.reasonReference" definition="Indicates another resource whose existence justifies this request group.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional notes about the response</desc>
                    <fhir fid="RequestGroup.note" definition="Provides a mechanism to communicate additional information about the response.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                    </fhir>
                </element>
                <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Proposed actions, if any</desc>
                    <fhir fid="RequestGroup.action" definition="The actions, if any, produced by the evaluation of the artifact.">
                        <type value="BackboneElement"/>
                        <constraint key="rqg-1" severity="error" human="Must have resource or action but not both" expression="resource.exists() != action.exists()" xpath="exists(f:resource) != exists(f:action)" source=""/>
                    </fhir>
                    <element name="prefix" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">User-visible prefix for the action (e.g. 1. or A.)</desc>
                        <fhir fid="RequestGroup.action.prefix" definition="A user-visible prefix for the action.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">User-visible title</desc>
                        <fhir fid="RequestGroup.action.title" definition="The title of the action displayed to a user.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Short description of the action</desc>
                        <fhir fid="RequestGroup.action.description" definition="A short description of the action used to provide a summary to display to the user." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="textEquivalent" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system</desc>
                        <fhir fid="RequestGroup.action.textEquivalent" definition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that might not be capable of interpreting it dynamically." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">routine | urgent | asap | stat</desc>
                        <fhir fid="RequestGroup.action.priority" definition="Indicates how quickly the action should be addressed with respect to other actions.">
                            <type value="code"/>
                            <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                            <mapping identity="workflow" map="Request.priority"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Code representing the meaning of the action or sub-actions</desc>
                        <fhir fid="RequestGroup.action.code" definition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a section of a documentation template.">
                            <type value="CodeableConcept"/>
                            <mapping identity="workflow" map="Request.code"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting documentation for the intended performer of the action</desc>
                        <fhir fid="RequestGroup.action.documentation" definition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.">
                            <type value="RelatedArtifact"/>
                            <mapping identity="workflow" map="Request.supportingInfo"/>
                        </fhir>
                    </element>
                    <element name="condition" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Whether or not the action is applicable</desc>
                        <fhir fid="RequestGroup.action.condition" definition="An expression that describes applicability criteria, or start/stop conditions for the action." comment="When multiple conditions of the same kind are present, the effects are combined using AND semantics, so the overall condition is true only if all of the conditions are true.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">applicability | start | stop</desc>
                            <fhir fid="RequestGroup.action.condition.kind" definition="The kind of condition." comment="Applicability criteria are used to determine immediate applicability when a plan definition is applied to a given context. Start and stop criteria are carried through application and used to describe enter/exit criteria for an action.">
                                <type value="code"/>
                                <binding displayName="ActionConditionKind" strength="required" description="The kind of condition for the action." valueSet="2.16.840.1.113883.4.642.3.815" canonicalUri="http://hl7.org/fhir/ValueSet/action-condition-kind|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Boolean-valued expression</desc>
                            <fhir fid="RequestGroup.action.condition.expression" definition="An expression that returns true or false, indicating whether or not the condition is satisfied." comment="The expression may be inlined, or may be a reference to a named expression within a logic library referenced by the library element.">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="relatedAction" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Relationship to another action</desc>
                        <fhir fid="RequestGroup.action.relatedAction" definition="A relationship to another action such as &#34;before&#34; or &#34;30-60 minutes after start of&#34;.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="actionId" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">What action this is related to</desc>
                            <fhir fid="RequestGroup.action.relatedAction.actionId" definition="The element id of the action this is related to.">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="relationship" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end</desc>
                            <fhir fid="RequestGroup.action.relatedAction.relationship" definition="The relationship of this action to the related action.">
                                <type value="code"/>
                                <binding displayName="ActionRelationshipType" strength="required" description="Defines the types of relationships between actions." valueSet="2.16.840.1.113883.4.642.3.813" canonicalUri="http://hl7.org/fhir/ValueSet/action-relationship-type|4.0.1"/>
                            </fhir>
                        </element>
                        <choice name="offset[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Time offset for the relationship</desc>
                            <fhir fid="RequestGroup.action.relatedAction.offset[x]" definition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.">
                                <type value="Duration"/>
                                <type value="Range"/>
                            </fhir>
                            <element name="offsetDuration">
                                <fhir fid="RequestGroup.action.relatedAction.offsetDuration">
                                    <type value="Duration"/>
                                </fhir>
                            </element>
                            <element name="offsetRange">
                                <fhir fid="RequestGroup.action.relatedAction.offsetRange">
                                    <type value="Range"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <choice name="timing[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the action should take place</desc>
                        <fhir fid="RequestGroup.action.timing[x]" definition="An optional value describing when the action should be performed.">
                            <type value="dateTime"/>
                            <type value="Age"/>
                            <type value="Period"/>
                            <type value="Duration"/>
                            <type value="Range"/>
                            <type value="Timing"/>
                            <mapping identity="workflow" map="Request.occurrence[x]"/>
                        </fhir>
                        <element name="timingDateTime">
                            <fhir fid="RequestGroup.action.timingDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="timingAge">
                            <fhir fid="RequestGroup.action.timingAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="timingPeriod">
                            <fhir fid="RequestGroup.action.timingPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="timingDuration">
                            <fhir fid="RequestGroup.action.timingDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="timingRange">
                            <fhir fid="RequestGroup.action.timingRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="timingTiming">
                            <fhir fid="RequestGroup.action.timingTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Who should perform the action</desc>
                        <fhir fid="RequestGroup.action.participant" definition="The participant that should perform or be responsible for this action.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <mapping identity="workflow" map="Request.performer"/>
                            <mapping identity="w5" map="FiveWs.actor"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">create | update | remove | fire-event</desc>
                        <fhir fid="RequestGroup.action.type" definition="The type of action to perform (create, update, remove).">
                            <type value="CodeableConcept"/>
                            <binding displayName="ActionType" strength="extensible" description="The type of action to be performed." valueSet="2.16.840.1.113883.4.642.3.809" canonicalUri="http://hl7.org/fhir/ValueSet/action-type"/>
                        </fhir>
                    </element>
                    <element name="groupingBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">visual-group | logical-group | sentence-group</desc>
                        <fhir fid="RequestGroup.action.groupingBehavior" definition="Defines the grouping behavior for the action and its children.">
                            <type value="code"/>
                            <binding displayName="ActionGroupingBehavior" strength="required" description="Defines organization behavior of a group." valueSet="2.16.840.1.113883.4.642.3.799" canonicalUri="http://hl7.org/fhir/ValueSet/action-grouping-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="selectionBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">any | all | all-or-none | exactly-one | at-most-one | one-or-more</desc>
                        <fhir fid="RequestGroup.action.selectionBehavior" definition="Defines the selection behavior for the action and its children.">
                            <type value="code"/>
                            <binding displayName="ActionSelectionBehavior" strength="required" description="Defines selection behavior of a group." valueSet="2.16.840.1.113883.4.642.3.801" canonicalUri="http://hl7.org/fhir/ValueSet/action-selection-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="requiredBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">must | could | must-unless-documented</desc>
                        <fhir fid="RequestGroup.action.requiredBehavior" definition="Defines expectations around whether an action is required.">
                            <type value="code"/>
                            <binding displayName="ActionRequiredBehavior" strength="required" description="Defines expectations around whether an action or action group is required." valueSet="2.16.840.1.113883.4.642.3.803" canonicalUri="http://hl7.org/fhir/ValueSet/action-required-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="precheckBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">yes | no</desc>
                        <fhir fid="RequestGroup.action.precheckBehavior" definition="Defines whether the action should usually be preselected.">
                            <type value="code"/>
                            <binding displayName="ActionPrecheckBehavior" strength="required" description="Defines selection frequency behavior for an action or group." valueSet="2.16.840.1.113883.4.642.3.805" canonicalUri="http://hl7.org/fhir/ValueSet/action-precheck-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="cardinalityBehavior" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">single | multiple</desc>
                        <fhir fid="RequestGroup.action.cardinalityBehavior" definition="Defines whether the action can be selected multiple times.">
                            <type value="code"/>
                            <binding displayName="ActionCardinalityBehavior" strength="required" description="Defines behavior for an action or a group for how many times that item may be repeated." valueSet="2.16.840.1.113883.4.642.3.807" canonicalUri="http://hl7.org/fhir/ValueSet/action-cardinality-behavior|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The target of the action</desc>
                        <fhir fid="RequestGroup.action.resource" definition="The resource that is the target of the action (e.g. CommunicationRequest)." comment="The target resource SHALL be a [Request](request.html) resource with a Request.intent set to &#34;option&#34;.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="action" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Sub action</desc>
                        <fhir fid="RequestGroup.action.action" definition="Sub actions."/>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.118" name="ResearchDefinition" displayName="ResearchDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ResearchDefinition">
            <desc language="en-US">The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ResearchDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ResearchDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A research context or question</desc>
                <fhir fid="ResearchDefinition" definition="The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="rsd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this research definition, represented as a URI (globally unique)</desc>
                    <fhir fid="ResearchDefinition.url"
                        definition="An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the research definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the research definition</desc>
                    <fhir fid="ResearchDefinition.identifier" definition="A formal identifier that is used to identify this research definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this research definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the research definition</desc>
                    <fhir fid="ResearchDefinition.version"
                        definition="The identifier that is used to identify this version of the research definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different research definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the research definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this research definition (computer friendly)</desc>
                    <fhir fid="ResearchDefinition.name" definition="A natural language name identifying the research definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this research definition (human friendly)</desc>
                    <fhir fid="ResearchDefinition.title" definition="A short, descriptive, user-friendly title for the research definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="shortTitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Title for use in informal contexts</desc>
                    <fhir fid="ResearchDefinition.shortTitle" definition="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary." requirements="Need to be able to reference the content by a short description, but still provide a longer, more formal title for the content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the ResearchDefinition</desc>
                    <fhir fid="ResearchDefinition.subtitle" definition="An explanatory or alternate title for the ResearchDefinition giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ResearchDefinition.status" definition="The status of this research definition. Enables tracking the life-cycle of the content." comment="Allows filtering of research definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ResearchDefinition.experimental" definition="A Boolean value to indicate that this research definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of research definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level research definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device</desc>
                    <fhir fid="ResearchDefinition.subject[x]" definition="The intended subjects for the ResearchDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchDefinition can be anything."
                        comment="The subject of the ResearchDefinition is critical in interpreting the criteria definitions, as the logic in the ResearchDefinitions is evaluated with respect to a particular subject. This corresponds roughly to the notion of a Compartment in that it limits what content is available based on its relationship to the subject. In CQL, this corresponds to the context declaration.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for the research (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                        <mapping identity="workflow" map="Definition.subject"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="ResearchDefinition.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="ResearchDefinition.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ResearchDefinition.date" definition="The date  (and optionally time) when the research definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the research definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ResearchDefinition.publisher" definition="The name of the organization or individual that published the research definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the research definition is the organization or individual primarily responsible for the maintenance and upkeep of the research definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the research definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the research definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ResearchDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the research definition</desc>
                    <fhir fid="ResearchDefinition.description" definition="A free text natural language description of the research definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the research definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the research definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the research definition is presumed to be the predominant language in the place the research definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="ResearchDefinition.comment" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ResearchDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for research definition (if applicable)</desc>
                    <fhir fid="ResearchDefinition.jurisdiction" definition="A legal or geographic region in which the research definition is intended to be used." comment="It may be possible for the research definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this research definition is defined</desc>
                    <fhir fid="ResearchDefinition.purpose" definition="Explanation of why this research definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the research definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this research definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the ResearchDefinition</desc>
                    <fhir fid="ResearchDefinition.usage" definition="A detailed description, from a clinical perspective, of how the ResearchDefinition is used.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ResearchDefinition.copyright" definition="A copyright statement relating to the research definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research definition." requirements="Consumers must be able to determine any legal restrictions on the use of the research definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research definition was approved by publisher</desc>
                    <fhir fid="ResearchDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research definition was last reviewed</desc>
                    <fhir fid="ResearchDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research definition is expected to be used</desc>
                    <fhir fid="ResearchDefinition.effectivePeriod" definition="The period during which the research definition content was or is planned to be in active use."
                        comment="The effective period for a research definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the research definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the ResearchDefinition, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="ResearchDefinition.topic" definition="Descriptive topics related to the content of the ResearchDefinition. Topics provide a high-level categorization grouping types of ResearchDefinitions that can be useful for filtering and searching."
                        requirements="Repositories must be able to determine how to categorize the ResearchDefinition so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="ResearchDefinition.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="ResearchDefinition.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="ResearchDefinition.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="ResearchDefinition.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="ResearchDefinition.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="ResearchDefinitions must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="library" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Logic used by the ResearchDefinition</desc>
                    <fhir fid="ResearchDefinition.library" definition="A reference to a Library resource containing the formal logic used by the ResearchDefinition.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Library"/>
                        </type>
                    </fhir>
                </element>
                <element name="population" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What population?</desc>
                    <fhir fid="ResearchDefinition.population" definition="A reference to a ResearchElementDefinition resource that defines the population for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What exposure?</desc>
                    <fhir fid="ResearchDefinition.exposure" definition="A reference to a ResearchElementDefinition resource that defines the exposure for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposureAlternative" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What alternative exposure state?</desc>
                    <fhir fid="ResearchDefinition.exposureAlternative" definition="A reference to a ResearchElementDefinition resource that defines the exposureAlternative for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What outcome?</desc>
                    <fhir fid="ResearchDefinition.outcome" definition="A reference to a ResearchElementDefinition resomece that defines the outcome for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.119" name="ResearchElementDefinition" displayName="ResearchElementDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition">
            <desc language="en-US">The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <purpose language="en-US">Need to be able to define and reuse the definition of individual elements of a research question.</purpose>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ResearchElementDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="ResearchElementDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A population, intervention, or exposure definition</desc>
                <fhir fid="ResearchElementDefinition" definition="The ResearchElementDefinition resource describes a &#34;PICO&#34; element that knowledge (evidence, assertion, recommendation) is about."
                    comment="PICO stands for Population (the population within which exposures are being compared), Intervention (the conditional state or exposure state being described for its effect on outcomes), Comparison (the alternative conditional state or alternative exposure state being compared against), and Outcome (the result or effect of the intervention in the population).">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="red-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this research element definition, represented as a URI (globally unique)</desc>
                    <fhir fid="ResearchElementDefinition.url"
                        definition="An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the research element definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the research element definition</desc>
                    <fhir fid="ResearchElementDefinition.identifier" definition="A formal identifier that is used to identify this research element definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this research element definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the research element definition</desc>
                    <fhir fid="ResearchElementDefinition.version"
                        definition="The identifier that is used to identify this version of the research element definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the research element definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts."
                        comment="There may be different research element definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the research element definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this research element definition (computer friendly)</desc>
                    <fhir fid="ResearchElementDefinition.name" definition="A natural language name identifying the research element definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this research element definition (human friendly)</desc>
                    <fhir fid="ResearchElementDefinition.title" definition="A short, descriptive, user-friendly title for the research element definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="shortTitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Title for use in informal contexts</desc>
                    <fhir fid="ResearchElementDefinition.shortTitle" definition="The short title provides an alternate title for use in informal descriptive contexts where the full, formal title is not necessary." requirements="Need to be able to reference the content by a short description, but still provide a longer, more formal title for the content." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subtitle" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Subordinate title of the ResearchElementDefinition</desc>
                    <fhir fid="ResearchElementDefinition.subtitle" definition="An explanatory or alternate title for the ResearchElementDefinition giving additional information about its content.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ResearchElementDefinition.status" definition="The status of this research element definition. Enables tracking the life-cycle of the content." comment="Allows filtering of research element definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ResearchElementDefinition.experimental" definition="A Boolean value to indicate that this research element definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of research element definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level research element definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <choice name="subject[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device</desc>
                    <fhir fid="ResearchElementDefinition.subject[x]" definition="The intended subjects for the ResearchElementDefinition. If this element is not provided, a Patient subject is assumed, but the subject of the ResearchElementDefinition can be anything."
                        comment="The subject of the ResearchElementDefinition is critical in interpreting the criteria definitions, as the logic in the ResearchElementDefinitions is evaluated with respect to a particular subject. This corresponds roughly to the notion of a Compartment in that it limits what content is available based on its relationship to the subject. In CQL, this corresponds to the context declaration.">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <binding displayName="Subject type" strength="extensible" description="The possible types of subjects for a measure (E.g. Patient, Practitioner, Organization, Location, etc.)." valueSet="2.16.840.1.113883.4.642.3.775" canonicalUri="http://hl7.org/fhir/ValueSet/subject-type"/>
                        <mapping identity="workflow" map="Definition.subject"/>
                    </fhir>
                    <element name="subjectCodeableConcept">
                        <fhir fid="ResearchElementDefinition.subjectCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subjectReference">
                        <fhir fid="ResearchElementDefinition.subjectReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </fhir>
                    </element>
                </choice>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ResearchElementDefinition.date" definition="The date  (and optionally time) when the research element definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the research element definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the research element definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ResearchElementDefinition.publisher" definition="The name of the organization or individual that published the research element definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the research element definition is the organization or individual primarily responsible for the maintenance and upkeep of the research element definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the research element definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the research element definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ResearchElementDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the research element definition</desc>
                    <fhir fid="ResearchElementDefinition.description" definition="A free text natural language description of the research element definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the research element definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the research element definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the research element definition is presumed to be the predominant language in the place the research element definition was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="ResearchElementDefinition.comment" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ResearchElementDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate research element definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for research element definition (if applicable)</desc>
                    <fhir fid="ResearchElementDefinition.jurisdiction" definition="A legal or geographic region in which the research element definition is intended to be used." comment="It may be possible for the research element definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this research element definition is defined</desc>
                    <fhir fid="ResearchElementDefinition.purpose" definition="Explanation of why this research element definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the research element definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this research element definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="usage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Describes the clinical usage of the ResearchElementDefinition</desc>
                    <fhir fid="ResearchElementDefinition.usage" definition="A detailed description, from a clinical perspective, of how the ResearchElementDefinition is used.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ResearchElementDefinition.copyright" definition="A copyright statement relating to the research element definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the research element definition."
                        requirements="Consumers must be able to determine any legal restrictions on the use of the research element definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research element definition was approved by publisher</desc>
                    <fhir fid="ResearchElementDefinition.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research element definition was last reviewed</desc>
                    <fhir fid="ResearchElementDefinition.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the research element definition is expected to be used</desc>
                    <fhir fid="ResearchElementDefinition.effectivePeriod" definition="The period during which the research element definition content was or is planned to be in active use."
                        comment="The effective period for a research element definition  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the research element definition are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the ResearchElementDefinition, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="ResearchElementDefinition.topic" definition="Descriptive topics related to the content of the ResearchElementDefinition. Topics provide a high-level categorization grouping types of ResearchElementDefinitions that can be useful for filtering and searching."
                        requirements="Repositories must be able to determine how to categorize the ResearchElementDefinition so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="ResearchElementDefinition.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="ResearchElementDefinition.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="ResearchElementDefinition.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="ResearchElementDefinition.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="ResearchElementDefinition.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="ResearchElementDefinitions must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="library" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Logic used by the ResearchElementDefinition</desc>
                    <fhir fid="ResearchElementDefinition.library" definition="A reference to a Library resource containing the formal logic used by the ResearchElementDefinition.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Library"/>
                        </type>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">population | exposure | outcome</desc>
                    <fhir fid="ResearchElementDefinition.type" definition="The type of research element, a population, an exposure, or an outcome." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResearchElementType" strength="required" description="The possible types of research elements (E.g. Population, Exposure, Outcome)." valueSet="2.16.840.1.113883.4.642.3.1341" canonicalUri="http://hl7.org/fhir/ValueSet/research-element-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="variableType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">dichotomous | continuous | descriptive</desc>
                    <fhir fid="ResearchElementDefinition.variableType" definition="The type of the outcome (e.g. Dichotomous, Continuous, or Descriptive).">
                        <type value="code"/>
                        <binding displayName="EvidenceVariableType" strength="required" description="The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive)." valueSet="2.16.840.1.113883.4.642.3.1343" canonicalUri="http://hl7.org/fhir/ValueSet/variable-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="characteristic" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">What defines the members of the research element</desc>
                    <fhir fid="ResearchElementDefinition.characteristic" definition="A characteristic that defines the members of the research element. Multiple characteristics are applied with &#34;and&#34; semantics."
                        comment="Characteristics can be defined flexibly to accommodate different use cases for membership criteria, ranging from simple codes, all the way to using an expression language to express the criteria." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="definition[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">What code or expression defines members?</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.definition[x]" definition="Define members of the research element using Codes (such as condition, medication, or observation), Expressions ( using an expression language such as FHIRPath or CQL) or DataRequirements (such as Diabetes diagnosis onset in the last year)."
                            requirements="Need to be able to define members in simple codes when the membership aligns well with terminology, with common criteria such as observations in a value set or lab tests within a year, or with expression language to support criteria that do not fit in the above." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                            </type>
                            <type value="Expression"/>
                            <type value="DataRequirement"/>
                        </fhir>
                        <element name="definitionCodeableConcept">
                            <fhir fid="ResearchElementDefinition.characteristic.definitionCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="definitionCanonical">
                            <fhir fid="ResearchElementDefinition.characteristic.definitionCanonical">
                                <type value="canonical"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                            </fhir>
                        </element>
                        <element name="definitionExpression">
                            <fhir fid="ResearchElementDefinition.characteristic.definitionExpression">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="definitionDataRequirement">
                            <fhir fid="ResearchElementDefinition.characteristic.definitionDataRequirement">
                                <type value="DataRequirement"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="usageContext" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">What code/value pairs define members?</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.usageContext" definition="Use UsageContext to define the members of the population, such as Age Ranges, Genders, Settings." requirements="Need to be able to define members more structurally when more information can be communicated such as age range.">
                            <type value="UsageContext"/>
                        </fhir>
                    </element>
                    <element name="exclude" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the characteristic includes or excludes members</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.exclude" definition="When true, members with this characteristic are excluded from the element.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="unitOfMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What unit is the outcome described in?</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.unitOfMeasure" definition="Specifies the UCUM unit for the outcome.">
                            <type value="CodeableConcept"/>
                            <binding displayName="UCUM Codes" strength="required" description="Unified Code for Units of Measure (UCUM)." valueSet="2.16.840.1.113883.4.642.3.912" canonicalUri="http://hl7.org/fhir/ValueSet/ucum-units|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="studyEffectiveDescription" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What time period does the study cover</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveDescription" definition="A narrative description of the time period the study covers.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="studyEffective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What time period does the study cover</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.studyEffective[x]" definition="Indicates what effective period the study covers.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <type value="Duration"/>
                            <type value="Timing"/>
                        </fhir>
                        <element name="studyEffectiveDateTime">
                            <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="studyEffectivePeriod">
                            <fhir fid="ResearchElementDefinition.characteristic.studyEffectivePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="studyEffectiveDuration">
                            <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="studyEffectiveTiming">
                            <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="studyEffectiveTimeFromStart" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Observation time from study start</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveTimeFromStart" definition="Indicates duration from the study initiation.">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                    <element name="studyEffectiveGroupMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.studyEffectiveGroupMeasure" definition="Indicates how elements are aggregated within the study effective period.">
                            <type value="code"/>
                            <binding displayName="GroupMeasure" strength="required" description="Possible group measure aggregates (E.g. Mean, Median)." valueSet="2.16.840.1.113883.4.642.3.1345" canonicalUri="http://hl7.org/fhir/ValueSet/group-measure|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="participantEffectiveDescription" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What time period do participants cover</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveDescription" definition="A narrative description of the time period the study covers.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="participantEffective[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What time period do participants cover</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.participantEffective[x]" definition="Indicates what effective period the study covers.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <type value="Duration"/>
                            <type value="Timing"/>
                        </fhir>
                        <element name="participantEffectiveDateTime">
                            <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="participantEffectivePeriod">
                            <fhir fid="ResearchElementDefinition.characteristic.participantEffectivePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="participantEffectiveDuration">
                            <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="participantEffectiveTiming">
                            <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="participantEffectiveTimeFromStart" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Observation time from study start</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveTimeFromStart" definition="Indicates duration from the participant's study entry.">
                            <type value="Duration"/>
                        </fhir>
                    </element>
                    <element name="participantEffectiveGroupMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median</desc>
                        <fhir fid="ResearchElementDefinition.characteristic.participantEffectiveGroupMeasure" definition="Indicates how elements are aggregated within the study effective period.">
                            <type value="code"/>
                            <binding displayName="GroupMeasure" strength="required" description="Possible group measure aggregates (E.g. Mean, Median)." valueSet="2.16.840.1.113883.4.642.3.1345" canonicalUri="http://hl7.org/fhir/ValueSet/group-measure|4.0.1"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.120" name="ResearchStudy" displayName="ResearchStudy" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ResearchStudy">
            <desc language="en-US">A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the
                gathering of information about human or animal subjects.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ResearchStudy" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="BRIDG5.1" uri="https://bridgmodel.nci.nih.gov" name="BRIDG 5.1 Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="clinicaltrials-gov" uri="http://clinicaltrials.gov" name="ClinicalTrials.gov Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="ResearchStudy" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Investigation to increase healthcare-related patient-independent knowledge</desc>
                <fhir fid="ResearchStudy"
                    definition="A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects."
                    comment="Need to make sure we encompass public health studies.">
                    <mapping identity="BRIDG5.1" map="ObservationalStudyProtocolVersion; Study;&#xA;StudyProtocolVersion"/>
                    <mapping identity="v2" map="OBX"/>
                    <mapping identity="rim" map="Observation[classCode=CLNTRL, moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for study</desc>
                    <fhir fid="ResearchStudy.identifier" definition="Identifiers assigned to this research study by the sponsor or other systems." requirements="Allows identification of the research study as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="clinicaltrials-gov" map="Organization's Unique Protocol ID; Secondary IDs"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="BRIDG5.1" map="No BRIDG mapping (although there is  DocumentVersion.identifier &gt; StudyProtocolDocumentVersion, this is arguably a different semantic)"/>
                        <mapping identity="rim" map=".identifier"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this study</desc>
                    <fhir fid="ResearchStudy.title" definition="A short, descriptive user-friendly label for the study." isSummary="true">
                        <type value="string"/>
                        <mapping identity="clinicaltrials-gov" map="Brief Title"/>
                        <mapping identity="BRIDG5.1" map="No BRIDG mapping (although there is  StudyProtocolDocumentVersionPublicTitle this is arguably a different semantic: title of a document vs title of a research study)"/>
                    </fhir>
                </element>
                <element name="protocol" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Steps followed in executing study</desc>
                    <fhir fid="ResearchStudy.protocol" definition="The set of steps expected to be performed as part of the execution of the study." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                        </type>
                        <mapping identity="clinicaltrials-gov" map="Interventions; Arm/Intervention Cross-Reference"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolDocumentVersionPublicTitle.name"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of larger study</desc>
                    <fhir fid="ResearchStudy.partOf" definition="A larger research study of which this particular study is a component or step." requirements="Allows breaking a study into components (e.g. by study site) each with their own PI, status, enrollment, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/>
                        </type>
                        <mapping identity="BRIDG5.1" map="CompanionStudyRelationship"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn</desc>
                    <fhir fid="ResearchStudy.status" definition="The current state of the study." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResearchStudyStatus" strength="required" description="Codes that convey the current status of the research study." valueSet="2.16.840.1.113883.4.642.3.819" canonicalUri="http://hl7.org/fhir/ValueSet/research-study-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="BRIDG5.1" map="StudyOverallStatus.code"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="primaryPurposeType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility</desc>
                    <fhir fid="ResearchStudy.primaryPurposeType" definition="The type of study based upon the intent of the study's activities. A classification of the intent of the study." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyPrimaryPurposeType" strength="extensible" description="Codes for the main intent of the study." valueSet="2.16.840.1.113883.4.642.3.827" canonicalUri="http://hl7.org/fhir/ValueSet/research-study-prim-purp-type"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolVersion.primaryPurposeTypeCode"/>
                    </fhir>
                </element>
                <element name="phase" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4</desc>
                    <fhir fid="ResearchStudy.phase" definition="The stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyPhase" strength="example" description="Codes for the stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation." valueSet="2.16.840.1.113883.4.642.3.821" canonicalUri="http://hl7.org/fhir/ValueSet/research-study-phase"/>
                        <mapping identity="clinicaltrials-gov" map="Study Phase"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolVersion.phaseCode"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Classifications for the study</desc>
                    <fhir fid="ResearchStudy.category" definition="Codes categorizing the type of study such as investigational vs. observational, type of blinding, type of randomization, safety vs. efficacy, etc." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyCategory" strength="example" description="Codes that describe the type of research study.  E.g. Study phase, Interventional/Observational, blinding type, etc."/>
                        <mapping identity="clinicaltrials-gov" map="Study Type; Primary Purpose; Interventional Model; Masking; Allocation; study Classification; Observational Study Model; Time Perspective; Biospecimen Retention"/>
                        <mapping identity="BRIDG5.1" map="InterventionalStudyProtocolVersion; InterventionalStudyProtocol.allocationCode; InterventionalStudyProtocol.blindedRoleCode; InterventionalStudyProtocol.blindingSchemaCode; InterventionalStudyProtocol.controlTypeCode"/>
                    </fhir>
                </element>
                <element name="focus" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Drugs, devices, etc. under study</desc>
                    <fhir fid="ResearchStudy.focus" definition="The medication(s), food(s), therapy(ies), device(s) or other concerns or interventions that the study is seeking to gain more information about." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyFocus" strength="example" description="Codes for medications, devices and other interventions."/>
                        <mapping identity="clinicaltrials-gov" map="Focus of Study"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="BRIDG5.1" map="InterventionalStudyProtocol.interventionTypeCode"/>
                    </fhir>
                </element>
                <element name="condition" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Condition being studied</desc>
                    <fhir fid="ResearchStudy.condition" definition="The condition that is the focus of the study.  For example, In a study to examine risk factors for Lupus, might have as an inclusion criterion &#34;healthy volunteer&#34;, but the target condition code would be a Lupus SNOMED code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Condition/Problem/Diagnosis Codes" strength="example" description="Identification of the condition or diagnosis." valueSet="2.16.840.1.113883.4.642.3.161" canonicalUri="http://hl7.org/fhir/ValueSet/condition-code"/>
                        <mapping identity="clinicaltrials-gov" map="Conditions"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="BRIDG5.1" map="StudyCondition.code"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the study</desc>
                    <fhir fid="ResearchStudy.contact" definition="Contact details to assist a user in learning more about or engaging with the study." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="clinicaltrials-gov" map="Central Contact; Central Contact Backup; Overall Study Officials; Facility Contact &amp; Backup (if Study tied to only one location); Investigators"/>
                        <mapping identity="BRIDG5.1" map="PointOfContact &gt; Project &gt; Research Project &gt; Study &gt; StudyProtocol &gt; StudyProtocolVersion"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">References and dependencies</desc>
                    <fhir fid="ResearchStudy.relatedArtifact" definition="Citations, references and other related documents.">
                        <type value="RelatedArtifact"/>
                        <mapping identity="clinicaltrials-gov" map="Citations, Links, Available Study Data/Documents"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolDocument, StudyProtocolDocumentVersion"/>
                    </fhir>
                </element>
                <element name="keyword" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used to search for the study</desc>
                    <fhir fid="ResearchStudy.keyword" definition="Key terms to aid in searching for or filtering the study." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyKeyword" strength="example" description="Words associated with the study that may be useful in discovery."/>
                        <mapping identity="clinicaltrials-gov" map="Keywords"/>
                        <mapping identity="BRIDG5.1" map="DocumentVersion.keywordCode; DocumentVersion.keywordText"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Geographic region(s) for study</desc>
                    <fhir fid="ResearchStudy.location" definition="Indicates a country, state or other region where the study is taking place." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolVersion.participatingLocationCode"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What this is study doing</desc>
                    <fhir fid="ResearchStudy.description" definition="A full description of how the study is being conducted.">
                        <type value="markdown"/>
                        <mapping identity="clinicaltrials-gov" map="Detailed Description"/>
                        <mapping identity="BRIDG5.1" map="StudyProtocolDocumentVersion.publicDescription"/>
                    </fhir>
                </element>
                <element name="enrollment" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Inclusion &amp; exclusion criteria</desc>
                    <fhir fid="ResearchStudy.enrollment" definition="Reference to a Group that defines the criteria for and quantity of subjects participating in the study.  E.g. &#34; 200 female Europeans between the ages of 20 and 45 with early onset diabetes&#34;."
                        comment="The Group referenced should not generally enumerate specific subjects.  Subjects will be linked to the study using the ResearchSubject resource." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="clinicaltrials-gov" map="Enrollment; Number of Groups/Cohorts (= number of &#34;enrollment&#34; instances); Groups (Group/Cohort Label = Group.name; Group/Cohort Description = Group.description); Eligibility (Group criteria)"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="BRIDG5.1" map="InterventionalStudyProtocol.interventionGroupQuantity"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the study began and ended</desc>
                    <fhir fid="ResearchStudy.period" definition="Identifies the start date and the expected (or actual, depending on status) end date for the study." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="clinicaltrials-gov" map="Study Start Date (start); Study Completion Date (end)"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="BRIDG5.1" map="ProjectConduct.dateRange; StudyProtocolVersion.plannedDuration"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="sponsor" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Organization that initiates and is legally responsible for the study</desc>
                    <fhir fid="ResearchStudy.sponsor" definition="An organization that initiates the investigation and is legally responsible for the study." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="clinicaltrials-gov" map="Sponsor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="BRIDG5.1" map="RegulatoryApplicationSponsor; StudyLegalSponsor; StudyProtocolVersion.responsiblePartyCode"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="principalInvestigator" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Researcher who oversees multiple aspects of the study</desc>
                    <fhir fid="ResearchStudy.principalInvestigator" definition="A researcher in a study who oversees multiple aspects of the study, such as concept development, protocol writing, protocol submission for IRB approval, participant recruitment, informed consent, data collection, analysis, interpretation and presentation." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="clinicaltrials-gov" map="Principal Investigator"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="BRIDG5.1" map="StudyInvestigator"/>
                    </fhir>
                </element>
                <element name="site" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Facility where study activities are conducted</desc>
                    <fhir fid="ResearchStudy.site" definition="A facility in which study activities are conducted." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="clinicaltrials-gov" map="Facility"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="BRIDG5.1" map="PlannedStudySite; StudySite"/>
                    </fhir>
                </element>
                <element name="reasonStopped" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design</desc>
                    <fhir fid="ResearchStudy.reasonStopped" definition="A description and/or code explaining the premature termination of the study." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="ResearchStudyReasonStopped" strength="example" description="Codes for why the study ended prematurely." valueSet="2.16.840.1.113883.4.642.3.825" canonicalUri="http://hl7.org/fhir/ValueSet/research-study-reason-stopped"/>
                        <mapping identity="clinicaltrials-gov" map="Why Study Stopped"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="BRIDG5.1" map="StudyOverallStatus.studyStoppedReasonCode"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the study</desc>
                    <fhir fid="ResearchStudy.note" definition="Comments made about the study by the performer, subject or other participants.">
                        <type value="Annotation"/>
                        <mapping identity="BRIDG5.1" map="No BRIDG mapping"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                    </fhir>
                </element>
                <element name="arm" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Defined path through the study for a subject</desc>
                    <fhir fid="ResearchStudy.arm" definition="Describes an expected sequence of events for one of the participants of a study.  E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out, follow-up.">
                        <type value="BackboneElement"/>
                        <mapping identity="clinicaltrials-gov" map="Arms"/>
                        <mapping identity="BRIDG5.1" map="Arm"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Label for study arm</desc>
                        <fhir fid="ResearchStudy.arm.name" definition="Unique, human-readable label for this arm of the study.">
                            <type value="string"/>
                            <mapping identity="clinicaltrials-gov" map="Arm Label"/>
                            <mapping identity="BRIDG5.1" map="Arm.name"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Categorization of study arm</desc>
                        <fhir fid="ResearchStudy.arm.type" definition="Categorization of study arm, e.g. experimental, active comparator, placebo comparater.">
                            <type value="CodeableConcept"/>
                            <mapping identity="clinicaltrials-gov" map="Arm Type"/>
                            <mapping identity="BRIDG5.1" map="Arm.typeCode"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Short explanation of study path</desc>
                        <fhir fid="ResearchStudy.arm.description" definition="A succinct description of the path through the study that would be followed by a subject adhering to this arm.">
                            <type value="string"/>
                            <mapping identity="clinicaltrials-gov" map="Arm Description"/>
                            <mapping identity="BRIDG5.1" map="Arm.description"/>
                        </fhir>
                    </element>
                </element>
                <element name="objective" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A goal for the study</desc>
                    <fhir fid="ResearchStudy.objective" definition="A goal that the study is aiming to achieve in terms of a scientific question to be answered by the analysis of data collected during the study.">
                        <type value="BackboneElement"/>
                        <mapping identity="BRIDG5.1" map="StudyObjective"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Label for the objective</desc>
                        <fhir fid="ResearchStudy.objective.name" definition="Unique, human-readable label for this objective of the study.">
                            <type value="string"/>
                            <mapping identity="BRIDG5.1" map="No BRIDG mapping (BRIDG has a description, but not a name)"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">primary | secondary | exploratory</desc>
                        <fhir fid="ResearchStudy.objective.type" definition="The kind of study objective.">
                            <type value="CodeableConcept"/>
                            <binding displayName="ResearchStudyObjectiveType" strength="preferred" description="Codes for the kind of study objective." valueSet="2.16.840.1.113883.4.642.3.823" canonicalUri="http://hl7.org/fhir/ValueSet/research-study-objective-type"/>
                            <mapping identity="BRIDG5.1" map="StudyObjective.typeCode"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.121" name="ResearchSubject" displayName="ResearchSubject" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ResearchSubject">
            <desc language="en-US">A physical entity which is the primary unit of operational and/or administrative interest in a study.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ResearchSubject" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="BRIDG5.1" uri="https://bridgmodel.nci.nih.gov" name="BRIDG 5.1 Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="ResearchSubject" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Physical entity which is the primary unit of interest in the study</desc>
                <fhir fid="ResearchSubject" definition="A physical entity which is the primary unit of operational and/or administrative interest in a study." comment="Need to make sure we encompass public health studies.">
                    <mapping identity="BRIDG5.1" map="StudySubject"/>
                    <mapping identity="v2" map="OBX"/>
                    <mapping identity="rim" map="Observation[classCode=CLNTRL, moodCode=EVN]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for research subject in a study</desc>
                    <fhir fid="ResearchSubject.identifier" definition="Identifiers assigned to this research subject for a study." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="BRIDG5.1" map="StudySubject &gt; Subject.identifier"/>
                        <mapping identity="rim" map=".identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn</desc>
                    <fhir fid="ResearchSubject.status" definition="The current state of the subject." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResearchSubjectStatus" strength="required" description="Indicates the progression of a study subject through a study." valueSet="2.16.840.1.113883.4.642.3.829" canonicalUri="http://hl7.org/fhir/ValueSet/research-subject-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="BRIDG5.1" map="StudySubject.statusCode"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Start and end of participation</desc>
                    <fhir fid="ResearchSubject.period" definition="The dates the subject began and ended their participation in the study." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="BRIDG5.1" map="PerformedStudySubjectMilestone.studyReferenceDateRange"/>
                    </fhir>
                </element>
                <element name="study" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Study subject is part of</desc>
                    <fhir fid="ResearchSubject.study" definition="Reference to the study the subject is participating in." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ResearchStudy"/>
                        </type>
                        <mapping identity="BRIDG5.1" map="StudySubjectProtocolVersionRelationship"/>
                    </fhir>
                </element>
                <element name="individual" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who is part of study</desc>
                    <fhir fid="ResearchSubject.individual" definition="The record of the person or animal who is involved in the study." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="BRIDG5.1" map="StudySubject"/>
                    </fhir>
                </element>
                <element name="assignedArm" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What path should be followed</desc>
                    <fhir fid="ResearchSubject.assignedArm" definition="The name of the arm in the study the subject is expected to follow as part of this study.">
                        <type value="string"/>
                        <mapping identity="BRIDG5.1" map="Arm &gt; ExperimentalUnit &gt; BiologicEntity &gt; Subject &gt; StudySubject"/>
                    </fhir>
                </element>
                <element name="actualArm" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What path was followed</desc>
                    <fhir fid="ResearchSubject.actualArm" definition="The name of the arm in the study the subject actually followed as part of this study.">
                        <type value="string"/>
                        <mapping identity="BRIDG5.1" map="Arm &gt; ExperimentalUnit &gt; BiologicEntity &gt; Subject &gt; StudySubject"/>
                    </fhir>
                </element>
                <element name="consent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Agreement to participate in study</desc>
                    <fhir fid="ResearchSubject.consent" definition="A record of the patient's informed agreement to participate in the study.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Consent"/>
                        </type>
                        <mapping identity="BRIDG5.1" map="ResearchStudy.consent is related to PerformedStudySubjectMilestone.informedConsentIndicator in that the informedConsentIndicator can be derived from the data in the Consent resource."/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.122" name="RiskAssessment" displayName="RiskAssessment" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/RiskAssessment">
            <desc language="en-US">An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="RiskAssessment" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="openehr" uri="http://openehr.org" name="Open EHR Archetype Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="RiskAssessment" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Potential outcomes for a subject with likelihood</desc>
                <fhir fid="RiskAssessment" definition="An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="v2" map="N/A"/>
                    <mapping identity="rim" map="Observation[classCode=OBS, moodCode=EVN, code=&#34;Risk Assessment&#34;]"/>
                    <mapping identity="openehr" map="OpenEHR-EHR-EVALUATION.risk.v1"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier for the assessment</desc>
                    <fhir fid="RiskAssessment.identifier" definition="Business identifier assigned to the risk assessment." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                        <mapping identity="openehr" map="Workflow Identifier"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Request fulfilled by this assessment</desc>
                    <fhir fid="RiskAssessment.basedOn" definition="A reference to the request that is fulfilled by this risk assessment.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Part of this occurrence</desc>
                    <fhir fid="RiskAssessment.parent" definition="A reference to a resource that this risk assessment is part of, such as a Procedure.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">registered | preliminary | final | amended +</desc>
                    <fhir fid="RiskAssessment.status" definition="The status of the RiskAssessment, using the same statuses as an Observation." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ObservationStatus" strength="required" description="The status of the risk assessment; e.g. preliminary, final, amended, etc." valueSet="2.16.840.1.113883.4.642.3.400" canonicalUri="http://hl7.org/fhir/ValueSet/observation-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Evaluation mechanism</desc>
                    <fhir fid="RiskAssessment.method" definition="The algorithm, process or mechanism used to evaluate the risk." requirements="The method can influence the results of the assessment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="RiskAssessmentMethod" strength="example" description="The mechanism or algorithm used to make the assessment; e.g. TIMI, PRISM, Cardiff Type 2 diabetes, etc."/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".methodCode"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of assessment</desc>
                    <fhir fid="RiskAssessment.code" definition="The type of the risk assessment performed." isSummary="true">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who/what does assessment apply to?</desc>
                    <fhir fid="RiskAssessment.subject" definition="The patient or group the risk assessment applies to." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="openehr" map="Subject of Care"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where was assessment performed?</desc>
                    <fhir fid="RiskAssessment.encounter" definition="The encounter where the assessment was performed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Event.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN]"/>
                    </fhir>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When was assessment made?</desc>
                    <fhir fid="RiskAssessment.occurrence[x]" definition="The date (and possibly time) the risk assessment was performed." requirements="The assessment results lose validity the more time elapses from when they are first made." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="RiskAssessment.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="RiskAssessment.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                </choice>
                <element name="condition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Condition assessed</desc>
                    <fhir fid="RiskAssessment.condition" definition="For assessments or prognosis specific to a particular condition, indicates the condition being assessed." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who did assessment?</desc>
                    <fhir fid="RiskAssessment.performer" definition="The provider or software application that performed the assessment." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=PFM].role[classCode=ASSIGNED]"/>
                        <mapping identity="openehr" map="Information Provider"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the assessment was necessary?</desc>
                    <fhir fid="RiskAssessment.reasonCode" definition="The reason the risk assessment was performed.">
                        <type value="CodeableConcept"/>
                        <mapping identity="workflow" map="Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the assessment was necessary?</desc>
                    <fhir fid="RiskAssessment.reasonReference" definition="Resources supporting the reason the risk assessment was performed.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="basis" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information used in assessment</desc>
                    <fhir fid="RiskAssessment.basis" definition="Indicates the source data considered as part of the assessment (for example, FamilyHistory, Observations, Procedures, Conditions, etc.).">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DRIV].target"/>
                        <mapping identity="openehr" map="Risk Factor; Link to Evidence"/>
                    </fhir>
                </element>
                <element name="prediction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Outcome predicted</desc>
                    <fhir fid="RiskAssessment.prediction" definition="Describes the expected outcome for the subject." comment="Multiple repetitions can be used to identify the same type of outcome in different timeframes as well as different types of outcomes.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=VALUE].target[classCod=OBS, moodCode=RISK]"/>
                        <constraint key="ras-2" severity="error" human="Must be &lt;= 100" expression="probability is decimal implies (probability as decimal) &lt;= 100" xpath="not(f:probabilityDecimal) or f:probabilityDecimal/@value &lt;= 100" source=""/>
                    </fhir>
                    <element name="outcome" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Possible outcome for the subject</desc>
                        <fhir fid="RiskAssessment.prediction.outcome" definition="One of the potential outcomes for the patient (e.g. remission, death,  a particular condition).">
                            <type value="CodeableConcept"/>
                            <binding displayName="RiskAssessmentOutcome" strength="example" description="The condition or other outcome; e.g. death, remission, amputation, infection, etc."/>
                            <mapping identity="rim" map=".value"/>
                            <mapping identity="openehr" map="Risk"/>
                        </fhir>
                    </element>
                    <choice name="probability[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Likelihood of specified outcome</desc>
                        <fhir fid="RiskAssessment.prediction.probability[x]" definition="Indicates how likely the outcome is (in the specified timeframe)." comment="If range is used, it represents the lower and upper bounds of certainty; e.g. 40-60%  Decimal values are expressed as percentages as well (max = 100).">
                            <type value="decimal"/>
                            <type value="Range"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;probability&#34;].value"/>
                            <mapping identity="openehr" map="Category"/>
                            <constraint key="ras-1" severity="error" human="low and high must be percentages, if present" expression="(low.empty() or ((low.code = '%') and (low.system = %ucum))) and (high.empty() or ((high.code = '%') and (high.system = %ucum)))"
                                xpath="(not(f:low) or f:low[f:code/@value='%' and f:system/@value='http://unitsofmeasure.org']) and (not(f:high) or f:high[f:code/@value='%' and f:system/@value='http://unitsofmeasure.org'])" source=""/>
                        </fhir>
                        <element name="probabilityDecimal">
                            <fhir fid="RiskAssessment.prediction.probabilityDecimal">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="probabilityRange">
                            <fhir fid="RiskAssessment.prediction.probabilityRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="qualitativeRisk" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Likelihood of specified outcome as a qualitative value</desc>
                        <fhir fid="RiskAssessment.prediction.qualitativeRisk" definition="Indicates how likely the outcome is (in the specified timeframe), expressed as a qualitative value (e.g. low, medium, or high).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Risk Probability" strength="example" description="The likelihood of the occurrence of a specified outcome." valueSet="2.16.840.1.113883.4.642.3.450" canonicalUri="http://hl7.org/fhir/ValueSet/risk-probability"/>
                        </fhir>
                    </element>
                    <element name="relativeRisk" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Relative likelihood</desc>
                        <fhir fid="RiskAssessment.prediction.relativeRisk" definition="Indicates the risk for this particular subject (with their specific characteristics) divided by the risk of the population in general.  (Numbers greater than 1 = higher risk than the population, numbers less than 1 = lower risk.)." requirements="Absolute risk is less meaningful than relative risk.">
                            <type value="decimal"/>
                            <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;relative risk&#34;].value"/>
                        </fhir>
                    </element>
                    <choice name="when[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Timeframe or age range</desc>
                        <fhir fid="RiskAssessment.prediction.when[x]" definition="Indicates the period of time or age range of the subject to which the specified probability applies." comment="If not specified, the risk applies &#34;over the subject's lifespan&#34;.">
                            <type value="Period"/>
                            <type value="Range"/>
                            <mapping identity="rim" map=".effectiveTime or .inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;age&#34;].value"/>
                        </fhir>
                        <element name="whenPeriod">
                            <fhir fid="RiskAssessment.prediction.whenPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="whenRange">
                            <fhir fid="RiskAssessment.prediction.whenRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="rationale" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Explanation of prediction</desc>
                        <fhir fid="RiskAssessment.prediction.rationale" definition="Additional information explaining the basis for the prediction.">
                            <type value="string"/>
                            <mapping identity="rim" map=".reasonCode.text"/>
                            <mapping identity="openehr" map="Rationale"/>
                        </fhir>
                    </element>
                </element>
                <element name="mitigation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">How to reduce risk</desc>
                    <fhir fid="RiskAssessment.mitigation" definition="A description of the steps that might be taken to reduce the identified risk(s)." requirements="One of the main reasons for assessing risks is to identify whether interventional steps are needed to reduce risk.">
                        <type value="string"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=MTGT].target[classCode=ACT, moodCode=EVN].text"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments on the risk assessment</desc>
                    <fhir fid="RiskAssessment.note" definition="Additional comments about the risk assessment.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Event.note"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.123" name="RiskEvidenceSynthesis" displayName="RiskEvidenceSynthesis" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/RiskEvidenceSynthesis">
            <desc language="en-US">The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="RiskEvidenceSynthesis" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="RiskEvidenceSynthesis" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A quantified estimate of risk based on a body of evidence</desc>
                <fhir fid="RiskEvidenceSynthesis" definition="The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.">
                    <mapping identity="workflow" map="Definition"/>
                    <constraint key="rvs-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this risk evidence synthesis, represented as a URI (globally unique)</desc>
                    <fhir fid="RiskEvidenceSynthesis.url"
                        definition="An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the risk evidence synthesis to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the risk evidence synthesis</desc>
                    <fhir fid="RiskEvidenceSynthesis.identifier" definition="A formal identifier that is used to identify this risk evidence synthesis when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this risk evidence synthesis outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the risk evidence synthesis</desc>
                    <fhir fid="RiskEvidenceSynthesis.version"
                        definition="The identifier that is used to identify this version of the risk evidence synthesis when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the risk evidence synthesis author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different risk evidence synthesis instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the risk evidence synthesis with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this risk evidence synthesis (computer friendly)</desc>
                    <fhir fid="RiskEvidenceSynthesis.name" definition="A natural language name identifying the risk evidence synthesis. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this risk evidence synthesis (human friendly)</desc>
                    <fhir fid="RiskEvidenceSynthesis.title" definition="A short, descriptive, user-friendly title for the risk evidence synthesis." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="RiskEvidenceSynthesis.status" definition="The status of this risk evidence synthesis. Enables tracking the life-cycle of the content." comment="Allows filtering of risk evidence synthesiss that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="RiskEvidenceSynthesis.date" definition="The date  (and optionally time) when the risk evidence synthesis was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the risk evidence synthesis changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the risk evidence synthesis. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="RiskEvidenceSynthesis.publisher" definition="The name of the organization or individual that published the risk evidence synthesis."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the risk evidence synthesis is the organization or individual primarily responsible for the maintenance and upkeep of the risk evidence synthesis. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the risk evidence synthesis. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the risk evidence synthesis.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="RiskEvidenceSynthesis.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the risk evidence synthesis</desc>
                    <fhir fid="RiskEvidenceSynthesis.description" definition="A free text natural language description of the risk evidence synthesis from a consumer's perspective."
                        comment="This description can be used to capture details such as why the risk evidence synthesis was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the risk evidence synthesis as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the risk evidence synthesis is presumed to be the predominant language in the place the risk evidence synthesis was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Used for footnotes or explanatory notes</desc>
                    <fhir fid="RiskEvidenceSynthesis.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                        <type value="Annotation"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="RiskEvidenceSynthesis.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate risk evidence synthesis instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for risk evidence synthesis (if applicable)</desc>
                    <fhir fid="RiskEvidenceSynthesis.jurisdiction" definition="A legal or geographic region in which the risk evidence synthesis is intended to be used." comment="It may be possible for the risk evidence synthesis to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="RiskEvidenceSynthesis.copyright" definition="A copyright statement relating to the risk evidence synthesis and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the risk evidence synthesis."
                        requirements="Consumers must be able to determine any legal restrictions on the use of the risk evidence synthesis and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="approvalDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the risk evidence synthesis was approved by publisher</desc>
                    <fhir fid="RiskEvidenceSynthesis.approvalDate" definition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." comment="The 'date' element may be more recent than the approval date because of minor changes or editorial corrections.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.approvalDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="lastReviewDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the risk evidence synthesis was last reviewed</desc>
                    <fhir fid="RiskEvidenceSynthesis.lastReviewDate" definition="The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date." comment="If specified, this date follows the original approval date."
                        requirements="Gives a sense of how &#34;current&#34; the content is.  Resources that have not been reviewed in a long time may have a risk of being less appropriate/relevant.">
                        <type value="date"/>
                        <mapping identity="workflow" map="Definition.lastReviewDate"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="effectivePeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the risk evidence synthesis is expected to be used</desc>
                    <fhir fid="RiskEvidenceSynthesis.effectivePeriod" definition="The period during which the risk evidence synthesis content was or is planned to be in active use."
                        comment="The effective period for a risk evidence synthesis  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015."
                        requirements="Allows establishing a transition before a resource comes into effect and also allows for a sunsetting  process when new versions of the risk evidence synthesis are or are expected to be used instead." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Definition.effectivePeriod"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="topic" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The category of the EffectEvidenceSynthesis, such as Education, Treatment, Assessment, etc.</desc>
                    <fhir fid="RiskEvidenceSynthesis.topic" definition="Descriptive topics related to the content of the RiskEvidenceSynthesis. Topics provide a high-level categorization grouping types of EffectEvidenceSynthesiss that can be useful for filtering and searching."
                        requirements="Repositories must be able to determine how to categorize the RiskEvidenceSynthesis so that it can be found by topical searches.">
                        <type value="CodeableConcept"/>
                        <binding displayName="DefinitionTopic" strength="example" description="High-level categorization of the definition, used for searching, sorting, and filtering." valueSet="2.16.840.1.113883.4.642.3.794" canonicalUri="http://hl7.org/fhir/ValueSet/definition-topic"/>
                    </fhir>
                </element>
                <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who authored the content</desc>
                    <fhir fid="RiskEvidenceSynthesis.author" definition="An individiual or organization primarily involved in the creation and maintenance of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT]"/>
                    </fhir>
                </element>
                <element name="editor" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who edited the content</desc>
                    <fhir fid="RiskEvidenceSynthesis.editor" definition="An individual or organization primarily responsible for internal coherence of the content.">
                        <type value="ContactDetail"/>
                    </fhir>
                </element>
                <element name="reviewer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who reviewed the content</desc>
                    <fhir fid="RiskEvidenceSynthesis.reviewer" definition="An individual or organization primarily responsible for review of some aspect of the content.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="endorser" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who endorsed the content</desc>
                    <fhir fid="RiskEvidenceSynthesis.endorser" definition="An individual or organization responsible for officially endorsing the content for use in some setting.">
                        <type value="ContactDetail"/>
                        <mapping identity="rim" map=".participation[typeCode=VRF] {not clear whether VRF best corresponds to reviewer or endorser}"/>
                    </fhir>
                </element>
                <element name="relatedArtifact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional documentation, citations, etc.</desc>
                    <fhir fid="RiskEvidenceSynthesis.relatedArtifact" definition="Related artifacts such as additional documentation, justification, or bibliographic references." comment="Each related artifact is either an attachment, or a reference to another resource, but not both."
                        requirements="RiskEvidenceSynthesiss must be able to provide enough information for consumers of the content (and/or interventions or results produced by the content) to be able to determine and understand the justification for and evidence in support of the content.">
                        <type value="RelatedArtifact"/>
                    </fhir>
                </element>
                <element name="synthesisType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of synthesis</desc>
                    <fhir fid="RiskEvidenceSynthesis.synthesisType" definition="Type of synthesis eg meta-analysis.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SynthesisType" strength="extensible" description="Types of combining results from a body of evidence (eg. summary data meta-analysis)." valueSet="2.16.840.1.113883.4.642.3.1347" canonicalUri="http://hl7.org/fhir/ValueSet/synthesis-type"/>
                    </fhir>
                </element>
                <element name="studyType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Type of study</desc>
                    <fhir fid="RiskEvidenceSynthesis.studyType" definition="Type of study eg randomized trial.">
                        <type value="CodeableConcept"/>
                        <binding displayName="StudyType" strength="extensible" description="Types of research studies (types of research methods)." valueSet="2.16.840.1.113883.4.642.3.1349" canonicalUri="http://hl7.org/fhir/ValueSet/study-type"/>
                    </fhir>
                </element>
                <element name="population" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What population?</desc>
                    <fhir fid="RiskEvidenceSynthesis.population" definition="A reference to a EvidenceVariable resource that defines the population for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="exposure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What exposure?</desc>
                    <fhir fid="RiskEvidenceSynthesis.exposure" definition="A reference to a EvidenceVariable resource that defines the exposure for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="outcome" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What outcome?</desc>
                    <fhir fid="RiskEvidenceSynthesis.outcome" definition="A reference to a EvidenceVariable resomece that defines the outcome for the research." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/EvidenceVariable"/>
                        </type>
                    </fhir>
                </element>
                <element name="sampleSize" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What sample size was involved?</desc>
                    <fhir fid="RiskEvidenceSynthesis.sampleSize" definition="A description of the size of the sample involved in the synthesis.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of sample size</desc>
                        <fhir fid="RiskEvidenceSynthesis.sampleSize.description" definition="Human-readable summary of sample size.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="numberOfStudies" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How many studies?</desc>
                        <fhir fid="RiskEvidenceSynthesis.sampleSize.numberOfStudies" definition="Number of studies included in this evidence synthesis.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="numberOfParticipants" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How many participants?</desc>
                        <fhir fid="RiskEvidenceSynthesis.sampleSize.numberOfParticipants" definition="Number of participants included in this evidence synthesis.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                </element>
                <element name="riskEstimate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What was the estimated risk</desc>
                    <fhir fid="RiskEvidenceSynthesis.riskEstimate" definition="The estimated risk of the outcome." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Description of risk estimate</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.description" definition="Human-readable summary of risk estimate.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of risk estimate</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.type" definition="Examples include proportion and mean.">
                            <type value="CodeableConcept"/>
                            <binding displayName="RiskEstimateType" strength="extensible" description="Whether the risk estimate is dichotomous, continuous or qualitative and the specific type of risk estimate (eg proportion or median)." valueSet="2.16.840.1.113883.4.642.3.1363" canonicalUri="http://hl7.org/fhir/ValueSet/risk-estimate-type"/>
                        </fhir>
                    </element>
                    <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Point estimate</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.value" definition="The point estimate of the risk estimate.">
                            <type value="decimal"/>
                        </fhir>
                    </element>
                    <element name="unitOfMeasure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">What unit is the outcome described in?</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.unitOfMeasure" definition="Specifies the UCUM unit for the outcome.">
                            <type value="CodeableConcept"/>
                            <binding displayName="UCUM Codes" strength="required" description="Unified Code for Units of Measure (UCUM)." valueSet="2.16.840.1.113883.4.642.3.912" canonicalUri="http://hl7.org/fhir/ValueSet/ucum-units|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="denominatorCount" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Sample size for group measured</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.denominatorCount" definition="The sample size for the group that was measured for this risk estimate.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="numeratorCount" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Number with the outcome</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.numeratorCount" definition="The number of group members with the outcome of interest.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="precisionEstimate" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">How precise the estimate is</desc>
                        <fhir fid="RiskEvidenceSynthesis.riskEstimate.precisionEstimate" definition="A description of the precision of the estimate for the effect.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of precision estimate</desc>
                            <fhir fid="RiskEvidenceSynthesis.riskEstimate.precisionEstimate.type" definition="Examples include confidence interval and interquartile range.">
                                <type value="CodeableConcept"/>
                                <binding displayName="PrecisionEstimateType" strength="extensible" description="Method of reporting variability of estimates, such as confidence intervals, interquartile range or standard deviation." valueSet="2.16.840.1.113883.4.642.3.1357" canonicalUri="http://hl7.org/fhir/ValueSet/precision-estimate-type"/>
                            </fhir>
                        </element>
                        <element name="level" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Level of confidence interval</desc>
                            <fhir fid="RiskEvidenceSynthesis.riskEstimate.precisionEstimate.level" definition="Use 95 for a 95% confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="from" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Lower bound</desc>
                            <fhir fid="RiskEvidenceSynthesis.riskEstimate.precisionEstimate.from" definition="Lower bound of confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="to" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Upper bound</desc>
                            <fhir fid="RiskEvidenceSynthesis.riskEstimate.precisionEstimate.to" definition="Upper bound of confidence interval.">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="certainty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">How certain is the risk</desc>
                    <fhir fid="RiskEvidenceSynthesis.certainty" definition="A description of the certainty of the risk estimate.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="rating" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Certainty rating</desc>
                        <fhir fid="RiskEvidenceSynthesis.certainty.rating" definition="A rating of the certainty of the effect estimate.">
                            <type value="CodeableConcept"/>
                            <binding displayName="QualityOfEvidenceRating" strength="extensible" description="The quality of the evidence described. The code system used specifies the quality scale used to grade this evidence source while the code specifies the actual quality score (represented as a coded value) associated with the evidence." valueSet="2.16.840.1.113883.4.642.3.1020"
                                canonicalUri="http://hl7.org/fhir/ValueSet/evidence-quality"/>
                        </fhir>
                    </element>
                    <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Used for footnotes or explanatory notes</desc>
                        <fhir fid="RiskEvidenceSynthesis.certainty.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                            <type value="Annotation"/>
                        </fhir>
                    </element>
                    <element name="certaintySubcomponent" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A component that contributes to the overall certainty</desc>
                        <fhir fid="RiskEvidenceSynthesis.certainty.certaintySubcomponent" definition="A description of a component of the overall certainty.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type of subcomponent of certainty rating</desc>
                            <fhir fid="RiskEvidenceSynthesis.certainty.certaintySubcomponent.type" definition="Type of subcomponent of certainty rating.">
                                <type value="CodeableConcept"/>
                                <binding displayName="CertaintySubcomponentType" strength="extensible" description="The subcomponent classification of quality of evidence rating systems." valueSet="2.16.840.1.113883.4.642.3.1359" canonicalUri="http://hl7.org/fhir/ValueSet/certainty-subcomponent-type"/>
                            </fhir>
                        </element>
                        <element name="rating" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Subcomponent certainty rating</desc>
                            <fhir fid="RiskEvidenceSynthesis.certainty.certaintySubcomponent.rating" definition="A rating of a subcomponent of rating certainty.">
                                <type value="CodeableConcept"/>
                                <binding displayName="CertaintySubcomponentRating" strength="extensible" description="The quality rating of the subcomponent of a quality of evidence rating." valueSet="2.16.840.1.113883.4.642.3.1361" canonicalUri="http://hl7.org/fhir/ValueSet/certainty-subcomponent-rating"/>
                            </fhir>
                        </element>
                        <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Used for footnotes or explanatory notes</desc>
                            <fhir fid="RiskEvidenceSynthesis.certainty.certaintySubcomponent.note" definition="A human-readable string to clarify or explain concepts about the resource.">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.124" name="Schedule" displayName="Schedule" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Schedule">
            <desc language="en-US">A container for slots of time that may be available for booking appointments.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Schedule" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="ical" uri="http://ietf.org/rfc/2445" name="iCalendar"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Schedule" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A container for slots of time that may be available for booking appointments</desc>
                <fhir fid="Schedule" definition="A container for slots of time that may be available for booking appointments.">
                    <mapping identity="rim" map="n/a"/>
                    <mapping identity="ical"
                        map="BEGIN:VFREEBUSY  ???  END:VFREEBUSY (If your fhir server provides this information via calDAV, then you may want to include addressing information in a URL section, and with the search, a DTSTART and DTEND component can be included to indicate the range of time that has been covered in the collection of slots, where these overlap the resources period values. For all slots that reference this resource, include a FREEBUSY row for each slot)"
                    />
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this item</desc>
                    <fhir fid="Schedule.identifier" definition="External Ids for this item." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="ical" map="UID"/>
                    </fhir>
                </element>
                <element name="active" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether this schedule is in active use</desc>
                    <fhir fid="Schedule.active" definition="Whether this schedule record is in active use or should not be used (such as was entered in error)." comment="This element is labeled as a modifier because it may be used to mark that the resource was created in error." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="serviceCategory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">High-level category</desc>
                    <fhir fid="Schedule.serviceCategory" definition="A broad categorization of the service that is to be performed during this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service category" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.516" canonicalUri="http://hl7.org/fhir/ValueSet/service-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="serviceType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specific service</desc>
                    <fhir fid="Schedule.serviceType" definition="The specific service that is to be performed during this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service type" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.518" canonicalUri="http://hl7.org/fhir/ValueSet/service-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="ical" map="n/a"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Type of specialty needed</desc>
                    <fhir fid="Schedule.specialty" definition="The specialty of a practitioner that would be required to perform the service requested in this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="Additional details about where the content was created (e.g. clinical specialty)." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="actor" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Resource(s) that availability information is being provided for</desc>
                    <fhir fid="Schedule.actor" definition="Slots that reference this schedule resource provide the availability details to these referenced resource(s)."
                        comment="The capacity to support multiple referenced resource types should be used in cases where the specific resources themselves cannot be scheduled without the other, and thus only make sense to the system exposing them as a group. Common examples of this are where the combination of a practitioner and a room (Location) are always required by a system." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="ical" map="ATTENDEE:MAILTO:john_public@host2.com This can be populated with a value from the referenced resource"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="planningHorizon" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Period of time covered by schedule</desc>
                    <fhir fid="Schedule.planningHorizon" definition="The period of time that the slots that reference this Schedule resource cover (even if none exist). These  cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a &#34;template&#34; for planning outside these dates."
                        isSummary="true">
                        <type value="Period"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="ical" map="DTSTART:20131201T003000Z DTEND:2014030101T003000Z"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Comments on availability</desc>
                    <fhir fid="Schedule.comment" definition="Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.">
                        <type value="string"/>
                        <mapping identity="ical" map="COMMENT:(comment) If there is no comment, then the line can be excluded from the iCalendar entry"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.125" name="SearchParameter" displayName="SearchParameter" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SearchParameter">
            <desc language="en-US">A search parameter that defines a named search item that can be used to search/filter on a resource.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SearchParameter" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="SearchParameter" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Search parameter for a resource</desc>
                <fhir fid="SearchParameter" definition="A search parameter that defines a named search item that can be used to search/filter on a resource." comment="In FHIR, search is not performed directly on a resource (by XML or JSON path), but on a named parameter that maps into the resource content.">
                    <mapping identity="v2" map="n/a"/>
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="spd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                    <constraint key="spd-1" severity="error" human="If an xpath is present, there SHALL be an xpathUsage" expression="xpath.empty() or xpathUsage.exists()" xpath="not(exists(f:xpath)) or exists(f:xpathUsage)" source=""/>
                    <constraint key="spd-2" severity="error" human="Search parameters can only have chain names when the search parameter type is 'reference'" expression="chain.empty() or type = 'reference'" xpath="not(exists(f:chain)) or (f:type/@value = 'reference')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this search parameter, represented as a URI (globally unique)</desc>
                    <fhir fid="SearchParameter.url"
                        definition="An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the search parameter to be referenced by a single globally unique identifier. To allow referencing and reusing search parameter definitions under other names on operational systems (in case of name clash)." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the search parameter</desc>
                    <fhir fid="SearchParameter.version"
                        definition="The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different search parameter instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the search parameter with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this search parameter (computer friendly)</desc>
                    <fhir fid="SearchParameter.name" definition="A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="derivedFrom" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Original definition for the search parameter</desc>
                    <fhir fid="SearchParameter.derivedFrom"
                        definition="Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter."
                        comment="The intent of this is that a server can designate that it provides support for a search parameter defined in the specification itself (e.g.  [`value-quantity`](http://hl7.org/fhir/SearchParameter/Observation-value-quantity), but detail how it is supported by the server.">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SearchParameter"/>
                        </type>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="SearchParameter.status" definition="The status of this search parameter. Enables tracking the life-cycle of the content." comment="Allows filtering of search parameters that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="SearchParameter.experimental" definition="A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of search parameters that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level search parameter." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="SearchParameter.date" definition="The date  (and optionally time) when the search parameter was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the search parameter. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="SearchParameter.publisher" definition="The name of the organization or individual that published the search parameter."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the search parameter is the organization or individual primarily responsible for the maintenance and upkeep of the search parameter. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the search parameter. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the search parameter.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="SearchParameter.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the search parameter</desc>
                    <fhir fid="SearchParameter.description" definition="And how it used."
                        comment="This description can be used to capture details such as why the search parameter was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the search parameter as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the search parameter is presumed to be the predominant language in the place the search parameter was created)."
                        isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="SearchParameter.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate search parameter instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for search parameter (if applicable)</desc>
                    <fhir fid="SearchParameter.jurisdiction" definition="A legal or geographic region in which the search parameter is intended to be used." comment="It may be possible for the search parameter to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this search parameter is defined</desc>
                    <fhir fid="SearchParameter.purpose" definition="Explanation of why this search parameter is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the search parameter. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this search parameter.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Code used in URL</desc>
                    <fhir fid="SearchParameter.code" definition="The code used in the URL or the parameter name in a parameters resource for this search parameter." comment="For maximum compatibility, use only lowercase ASCII characters." isSummary="true">
                        <type value="code"/>
                    </fhir>
                </element>
                <element name="base" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">The resource type(s) this search parameter applies to</desc>
                    <fhir fid="SearchParameter.base" definition="The base resource type(s) that this search parameter can be used against."
                        comment="A search parameter must always apply to at least one resource type. When search parameters apply to more than one resource type, they can be used against any of the listed resource types, or in a cross-type search (see [Cross Resource Search](http.html#xres-search))." isSummary="true">
                        <type value="code"/>
                        <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">number | date | string | token | reference | composite | quantity | uri | special</desc>
                    <fhir fid="SearchParameter.type" definition="The type of value that a search parameter may contain, and how the content is interpreted." isSummary="true">
                        <type value="code"/>
                        <binding displayName="SearchParamType" strength="required" description="Data types allowed to be used for search parameters." valueSet="2.16.840.1.113883.4.642.3.11" canonicalUri="http://hl7.org/fhir/ValueSet/search-param-type|4.0.1"/>
                    </fhir>
                </element>
                <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">FHIRPath expression that extracts the values</desc>
                    <fhir fid="SearchParameter.expression" definition="A FHIRPath expression that returns a set of elements for the search parameter."
                        comment="Note that the elements returned by the expression are sometimes complex elements where logic is required to determine quite how to handle them; e.g. CodeableConcepts may contain text and/or multiple codings, where the codings themselves contain a code and a system. For composite search parameters, the outcome of the expression must a collection of base elements from which the composites are derived.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="xpath" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">XPath that extracts the values</desc>
                    <fhir fid="SearchParameter.xpath" definition="An XPath expression that returns a set of elements for the search parameter."
                        comment="Note that the elements returned by the XPath are sometimes complex elements where logic is required to determine quite how to handle them; e.g. CodeableConcepts may contain text and/or multiple codings, where the codings themselves contain a code and a system.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="xpathUsage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">normal | phonetic | nearby | distance | other</desc>
                    <fhir fid="SearchParameter.xpathUsage" definition="How the search parameter relates to the set of elements returned by evaluating the xpath query.">
                        <type value="code"/>
                        <binding displayName="XPathUsageType" strength="required" description="How a search parameter relates to the set of elements returned by evaluating its xpath query." valueSet="2.16.840.1.113883.4.642.3.635" canonicalUri="http://hl7.org/fhir/ValueSet/search-xpath-usage|4.0.1"/>
                    </fhir>
                </element>
                <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Types of resource (if a resource reference)</desc>
                    <fhir fid="SearchParameter.target" definition="Types of resource (if a resource is referenced).">
                        <type value="code"/>
                        <binding displayName="ResourceType" strength="required" description="One of the resource types defined as part of this version of FHIR." valueSet="2.16.840.1.113883.4.642.3.27" canonicalUri="http://hl7.org/fhir/ValueSet/resource-types|4.0.1"/>
                    </fhir>
                </element>
                <element name="multipleOr" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Allow multiple values per parameter (or)</desc>
                    <fhir fid="SearchParameter.multipleOr" definition="Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="multipleAnd" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Allow multiple parameters (and)</desc>
                    <fhir fid="SearchParameter.multipleAnd" definition="Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="comparator" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">eq | ne | gt | lt | ge | le | sa | eb | ap</desc>
                    <fhir fid="SearchParameter.comparator" definition="Comparators supported for the search parameter." comment="If no comparators are listed, clients should not expect servers to support any comparators.">
                        <type value="code"/>
                        <binding displayName="SearchComparator" strength="required" description="What Search Comparator Codes are supported in search." valueSet="2.16.840.1.113883.4.642.3.637" canonicalUri="http://hl7.org/fhir/ValueSet/search-comparator|4.0.1"/>
                    </fhir>
                </element>
                <element name="modifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">missing | exact | contains | not | text | in | not-in | below | above | type | identifier | ofType</desc>
                    <fhir fid="SearchParameter.modifier" definition="A modifier supported for the search parameter.">
                        <type value="code"/>
                        <binding displayName="SearchModifierCode" strength="required" description="A supported modifier for a search parameter." valueSet="2.16.840.1.113883.4.642.3.639" canonicalUri="http://hl7.org/fhir/ValueSet/search-modifier-code|4.0.1"/>
                    </fhir>
                </element>
                <element name="chain" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Chained names supported</desc>
                    <fhir fid="SearchParameter.chain"
                        definition="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type."
                        comment="Systems are not required to list all the chain names they support, but if they don't list them, clients might not know to use them.">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="component" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">For Composite resources to define the parts</desc>
                    <fhir fid="SearchParameter.component" definition="Used to define the parts of a composite search parameter.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="definition" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Defines how the part works</desc>
                        <fhir fid="SearchParameter.component.definition" definition="The definition of the search parameter that describes this part.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SearchParameter"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Subexpression relative to main expression</desc>
                        <fhir fid="SearchParameter.component.expression" definition="A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression." comment="This expression overrides the expression in the definition and extracts the index values from the outcome of the composite expression.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.126" name="ServiceRequest" displayName="ServiceRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ServiceRequest">
            <desc language="en-US">A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ServiceRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="quick" uri="http://siframework.org/cqf" name="Quality Improvement and Clinical Knowledge (QUICK)"/>
            </fhir>
            <element name="ServiceRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A request for a service to be performed</desc>
                <fhir fid="ServiceRequest" definition="A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="v2" map="ORC"/>
                    <mapping identity="rim" map="Act[moodCode&lt;=INT]"/>
                    <constraint key="prr-1" severity="error" human="orderDetail SHALL only be present if code is present" expression="orderDetail.empty() or code.exists()" xpath="exists(f:code) or not(exists(f:orderDetail))" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Identifiers assigned to this order</desc>
                    <fhir fid="ServiceRequest.identifier" definition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller."
                        comment="The identifier.type element is used to distinguish between the identifiers assigned by the orderer (known as the 'Placer' in HL7 v2) and the producer of the observations in response to the order (known as the 'Filler' in HL7 v2).  For further discussion and examples see the resource notes section below." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC.2, ORC.3, RF1-6 / RF1-11,"/>
                        <mapping identity="rim" map=".identifier"/>
                        <mapping identity="quick" map="ClinicalStatement.identifier"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates FHIR protocol or definition</desc>
                    <fhir fid="ServiceRequest.instantiatesCanonical" definition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest."
                        comment="Note: This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)).  It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types.  For example, multiple Patient and a Person resource instance might share the same social insurance number."
                        isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PlanDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Request.instantiatesCanonical"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Instantiates external protocol or definition</desc>
                    <fhir fid="ServiceRequest.instantiatesUri" definition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest." comment="This might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Request.instantiatesUri"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What request fulfills</desc>
                    <fhir fid="ServiceRequest.basedOn" definition="Plan/proposal/order fulfilled by this request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn"/>
                        <mapping identity="v2" map="ORC.8 (plus others)"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="replaces" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What request replaces</desc>
                    <fhir fid="ServiceRequest.replaces" definition="The request takes the place of the referenced completed or terminated request(s)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="workflow" map="Request.replaces"/>
                        <mapping identity="v2" map="Handled by message location of ORC (ORC.1=RO or RU)"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RPLC].target"/>
                    </fhir>
                </element>
                <element name="requisition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Composite Request ID</desc>
                    <fhir fid="ServiceRequest.requisition" definition="A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier."
                        comment="Requests are linked either by a &#34;basedOn&#34; relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation."
                        requirements="Some business processes need to know if multiple items were ordered as part of the same &#34;requisition&#34; for billing or other purposes." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                        <mapping identity="v2" map="ORC.4"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[moodCode=INT].identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | on-hold | revoked | completed | entered-in-error | unknown</desc>
                    <fhir fid="ServiceRequest.status" definition="The status of the order."
                        comment="The status is generally fully in the control of the requester - they determine whether the order is draft or active and, after it has been activated, competed, cancelled or suspended. States relating to the activities of the performer are reflected on either the corresponding event (see [Event Pattern](event.html) for general discussion) or using the [Task](task.html) resource."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestStatus" strength="required" description="The status of a service order." valueSet="2.16.840.1.113883.4.642.3.111" canonicalUri="http://hl7.org/fhir/ValueSet/request-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="ORC.5,RF1-1"/>
                        <mapping identity="rim" map=".status"/>
                        <mapping identity="quick" map="Action.currentStatus"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="ServiceRequest.intent" definition="Whether the request is a proposal, plan, an original order or a reflex order." comment="This element is labeled as a modifier because the intent alters when and how the resource is actually applicable." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="RequestIntent" strength="required" description="The kind of service request." valueSet="2.16.840.1.113883.4.642.3.113" canonicalUri="http://hl7.org/fhir/ValueSet/request-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Classification of service</desc>
                    <fhir fid="ServiceRequest.category" definition="A code that classifies the service for searching, sorting and display purposes (e.g. &#34;Surgical Procedure&#34;)." comment="There may be multiple axis of categorization depending on the context or use case for retrieving or displaying the resource.  The level of granularity is defined by the category concepts in the value set."
                        requirements="Used for filtering what service request are retrieved and displayed." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service Request Category Codes" strength="example" description="Classification of the requested service." valueSet="2.16.840.1.113883.4.642.3.434" canonicalUri="http://hl7.org/fhir/ValueSet/servicerequest-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="RF1-5"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=&#34;COMP].target[classCode=&#34;LIST&#34;, moodCode=&#34;INT&#34;].code"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="ServiceRequest.priority" definition="Indicates how quickly the ServiceRequest should be addressed with respect to other requests." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="TQ1.9, RF1-2"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <element name="doNotPerform" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">True if service/procedure should not be performed</desc>
                    <fhir fid="ServiceRequest.doNotPerform" definition="Set this to true if the record is saying that the service/procedure should NOT be performed."
                        comment="In general, only the code and timeframe will be present, though occasional additional qualifiers such as body site or even performer could be included to narrow the scope of the prohibition.  If the ServiceRequest.code and ServiceRequest.doNotPerform both contain negation, that will reinforce prohibition and should not have a double negative interpretation."
                        requirements="Used for do not ambulate, do not elevate head of bed, do not flush NG tube, do not take blood pressure on a certain arm, etc." isModifier="true" isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Request.doNotPerform"/>
                        <mapping identity="rim" map=".actionNegationInd"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What is being requested/ordered</desc>
                    <fhir fid="ServiceRequest.code" definition="A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested."
                        comment="Many laboratory and radiology procedure codes embed the specimen/organ system in the test order name, for example,  serum or serum/plasma glucose, or a chest x-ray. The specimen might not be recorded separately from the test code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Codes (SNOMED CT)" strength="example"
                            description="Codes for tests or services that can be carried out by a designated individual, organization or healthcare service.  For laboratory, LOINC is  (preferred)[http://build.fhir.org/terminologies.html#preferred] and a valueset using LOINC Order codes is available [here](valueset-diagnostic-requests.html)." valueSet="2.16.840.1.113883.4.642.3.427"
                            canonicalUri="http://hl7.org/fhir/ValueSet/procedure-code"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="PR1-3 / OBR-4  (varies by domain)"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="quick" map="Procedure.procedureCode"/>
                    </fhir>
                </element>
                <element name="orderDetail" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional order information</desc>
                    <fhir fid="ServiceRequest.orderDetail" definition="Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied."
                        comment="For information from the medical record intended to support the delivery of the requested services, use the `supportingInformation` element." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service Request Order Details Codes" strength="example" description="Codified order entry details which are based on order context." valueSet="2.16.840.1.113883.4.642.3.435" canonicalUri="http://hl7.org/fhir/ValueSet/servicerequest-orderdetail"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="quick" map="Procedure.procedureCode"/>
                    </fhir>
                </element>
                <choice name="quantity[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Service amount</desc>
                    <fhir fid="ServiceRequest.quantity[x]" definition="An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction)." requirements="When ordering a service the number of service items may need to be specified separately from the the service item."
                        isSummary="true">
                        <type value="Quantity"/>
                        <type value="Ratio"/>
                        <type value="Range"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".quantity"/>
                    </fhir>
                    <element name="quantityQuantity">
                        <fhir fid="ServiceRequest.quantityQuantity">
                            <type value="Quantity"/>
                        </fhir>
                    </element>
                    <element name="quantityRatio">
                        <fhir fid="ServiceRequest.quantityRatio">
                            <type value="Ratio"/>
                        </fhir>
                    </element>
                    <element name="quantityRange">
                        <fhir fid="ServiceRequest.quantityRange">
                            <type value="Range"/>
                        </fhir>
                    </element>
                </choice>
                <element name="subject" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Individual or Entity the service is ordered for</desc>
                    <fhir fid="ServiceRequest.subject" definition="On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        <mapping identity="quick" map="ClinicalStatement.subject"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Encounter in which the request was created</desc>
                    <fhir fid="ServiceRequest.encounter" definition="An encounter that provides additional information about the healthcare context in which this request is made." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.encounter"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=COMP].source[classCode&lt;=PCPR, moodCode=EVN]"/>
                        <mapping identity="quick" map="ClinicalStatement.encounter"/>
                    </fhir>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When service should occur</desc>
                    <fhir fid="ServiceRequest.occurrence[x]" definition="The date/time at which the requested service should occur." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="v2" map="TQ1/TQ2, OBR-7/OBR-8"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                        <mapping identity="quick" map="Procedure.procedureSchedule"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="ServiceRequest.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="ServiceRequest.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurrenceTiming">
                        <fhir fid="ServiceRequest.occurrenceTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                </choice>
                <choice name="asNeeded[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Preconditions for service</desc>
                    <fhir fid="ServiceRequest.asNeeded[x]" definition="If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example &#34;pain&#34;, &#34;on flare-up&#34;, etc." isSummary="true">
                        <type value="boolean"/>
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Medication As Needed Reason Codes" strength="example" description="A coded concept identifying the pre-condition that should hold prior to performing a procedure.  For example &#34;pain&#34;, &#34;on flare-up&#34;, etc." valueSet="2.16.840.1.113883.4.642.3.96" canonicalUri="http://hl7.org/fhir/ValueSet/medication-as-needed-reason"/>
                        <mapping identity="rim" map="boolean: precondition.negationInd (inversed - so negationInd = true means asNeeded=false CodeableConcept: precondition.observationEventCriterion[code=&#34;Assertion&#34;].value"/>
                        <mapping identity="quick" map="Proposal.prnReason.reason"/>
                    </fhir>
                    <element name="asNeededBoolean">
                        <fhir fid="ServiceRequest.asNeededBoolean">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="asNeededCodeableConcept">
                        <fhir fid="ServiceRequest.asNeededCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </choice>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date request signed</desc>
                    <fhir fid="ServiceRequest.authoredOn" definition="When the request transitioned to being actionable." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="ORC.9,  RF1-7 / RF1-9"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                        <mapping identity="quick" map="Proposal.proposedAtTime"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who/what is requesting service</desc>
                    <fhir fid="ServiceRequest.requester" definition="The individual who initiated the request and has responsibility for its activation." comment="This not the dispatcher, but rather who is the authorizer.  This element is not intended to handle delegation which would generally be managed through the Provenance resource." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ORC.12, PRT"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                        <mapping identity="quick" map="ClinicalStatement.statementAuthor"/>
                    </fhir>
                </element>
                <element name="performerType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Performer role</desc>
                    <fhir fid="ServiceRequest.performerType" definition="Desired type of performer for doing the requested service." comment="This is a  role, not  a participation type.  In other words, does not describe the task but describes the capacity.  For example, “compounding pharmacy”, “psychiatrist” or “internal referral”." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Participant Roles" strength="example" description="Indicates specific responsibility of an individual within the care team, such as &#34;Primary physician&#34;, &#34;Team coordinator&#34;, &#34;Caregiver&#34;, etc." valueSet="2.16.840.1.113883.4.642.3.152" canonicalUri="http://hl7.org/fhir/ValueSet/participant-role"/>
                        <mapping identity="workflow" map="Request.performerType"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT, RF!-3"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=KIND].code"/>
                    </fhir>
                </element>
                <element name="performer" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Requested performer</desc>
                    <fhir fid="ServiceRequest.performer" definition="The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc."
                        comment="If multiple performers are present, it is interpreted as a list of *alternative* performers without any preference regardless of order.  If order of preference is needed use the [request-performerOrder extension](extension-request-performerorder.html).  Use CareTeam to represent a group of performers (for example, Practitioner A *and* Practitioner B)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT, Practitioner: PRD-2/PRD-7 where PRD-3 = RT; Organization: PRD-10 where PRD-3 = RT"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="locationCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Requested location</desc>
                    <fhir fid="ServiceRequest.locationCode" definition="The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="V3 Value SetServiceDeliveryLocationRoleType" strength="example" description="A location type where services are delivered." valueSet="2.16.840.1.113883.1.11.17660" canonicalUri="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role[scoper.determinerCode=KIND].code"/>
                    </fhir>
                </element>
                <element name="locationReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Requested location</desc>
                    <fhir fid="ServiceRequest.locationReference" definition="A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Explanation/Justification for procedure or service</desc>
                    <fhir fid="ServiceRequest.reasonCode" definition="An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`."
                        comment="This element represents why the referral is being made and may be used to decide how the service will be performed, or even if it will be performed at all.   Use `CodeableConcept.text` element if the data is free (uncoded) text as shown in the [CT Scan example](servicerequest-example-di.html)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Reason Codes" strength="example" description="Diagnosis or problem codes justifying the reason for requesting the service investigation." valueSet="2.16.840.1.113883.4.642.3.432" canonicalUri="http://hl7.org/fhir/ValueSet/procedure-reason"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16, RF1-10"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Explanation/Justification for service or service</desc>
                    <fhir fid="ServiceRequest.reasonReference" definition="Indicates another resource that provides a justification for why this service is being requested.   May relate to the resources referred to in `supportingInfo`."
                        comment="This element represents why the referral is being made and may be used to decide how the service will be performed, or even if it will be performed at all.    To be as specific as possible,  a reference to  *Observation* or *Condition* should be used if available.  Otherwise when referencing  *DiagnosticReport*  it should contain a finding  in `DiagnosticReport.conclusion` and/or `DiagnosticReport.conclusionCode`.   When using a reference to *DocumentReference*, the target document should contain clear findings language providing the relevant reason for this service request.  Use  the CodeableConcept text element in `ServiceRequest.reasonCode` if the data is free (uncoded) text as shown in the [CT Scan example](servicerequest-example-di.html)."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated insurance coverage</desc>
                    <fhir fid="ServiceRequest.insurance" definition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                        </type>
                        <mapping identity="workflow" map="Request.insurance"/>
                        <mapping identity="v2" map="IN1/IN2"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COVBY].target"/>
                    </fhir>
                </element>
                <element name="supportingInfo" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional clinical information</desc>
                    <fhir fid="ServiceRequest.supportingInfo"
                        definition="Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as &#34;ask at order entry questions (AOEs)&#34;.  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements."
                        comment="To represent information about how the services are to be delivered use the `instructions` element.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.supportingInfo"/>
                        <mapping identity="v2" map="Accompanying segments"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=PERT].target"/>
                    </fhir>
                </element>
                <element name="specimen" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Procedure Samples</desc>
                    <fhir fid="ServiceRequest.specimen" definition="One or more specimens that the laboratory procedure will use."
                        comment="Many diagnostic procedures need a specimen, but the request itself is not actually about the specimen. This element is for when the diagnostic is requested on already existing specimens and the request points to the specimen it applies to.    Conversely, if the request is entered first with an unknown specimen, then the [Specimen](specimen.html) resource points to the ServiceRequest."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                        </type>
                        <mapping identity="v2" map="SPM"/>
                        <mapping identity="rim" map=".participation[typeCode=SPC].role"/>
                    </fhir>
                </element>
                <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Location on Body</desc>
                    <fhir fid="ServiceRequest.bodySite" definition="Anatomic location where the procedure should be performed. This is the target site."
                        comment="Only used if not implicit in the code found in ServiceRequest.code.  If the use case requires BodySite to be handled as a separate resource instead of an inline coded element (e.g. to identify and track separately)  then use the standard extension [procedure-targetBodyStructure](extension-procedure-targetbodystructure.html)."
                        requirements="Knowing where the procedure is performed is important for tracking if multiple sites are possible." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                        <mapping identity="v2" map="SPM"/>
                        <mapping identity="rim" map="targetSiteCode"/>
                        <mapping identity="quick" map="Procedure.targetBodySite"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments</desc>
                    <fhir fid="ServiceRequest.note" definition="Any other notes and comments made about the service request. For example, internal billing notes.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=ANNGEN, moodCode=EVN].value[xsi:type=ST]"/>
                        <mapping identity="quick" map="ClinicalStatement.additionalText"/>
                    </fhir>
                </element>
                <element name="patientInstruction" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Patient or consumer-oriented instructions</desc>
                    <fhir fid="ServiceRequest.patientInstruction" definition="Instructions in terms that are understood by the patient or consumer." isSummary="true">
                        <type value="string"/>
                        <mapping identity="v2" map="NTE"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="relevantHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request provenance</desc>
                    <fhir fid="ServiceRequest.relevantHistory" definition="Key events in the history of the request."
                        comment="This might not include provenances for all versions of the request – only those deemed “relevant” or important.&#xD;This SHALL NOT include the Provenance associated with this current version of the resource.  (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update.  Until then, it can be queried directly as the Provenance that points to this version using _revinclude&#xD;All Provenances should have some historical version of this Request as their subject.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="workflow" map="Request.relevantHistory"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.127" name="Slot" displayName="Slot" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Slot">
            <desc language="en-US">A slot of time on a schedule that may be available for booking appointments.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Slot" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="ical" uri="http://ietf.org/rfc/2445" name="iCalendar"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Slot" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A slot of time on a schedule that may be available for booking appointments</desc>
                <fhir fid="Slot" definition="A slot of time on a schedule that may be available for booking appointments.">
                    <mapping identity="rim" map="n/a"/>
                    <mapping identity="ical" map="(refer to the Availability resource for the header mapping details)"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Ids for this item</desc>
                    <fhir fid="Slot.identifier" definition="External Ids for this item." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="serviceCategory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A broad categorization of the service that is to be performed during this appointment</desc>
                    <fhir fid="Slot.serviceCategory" definition="A broad categorization of the service that is to be performed during this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service category" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.516" canonicalUri="http://hl7.org/fhir/ValueSet/service-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="serviceType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource</desc>
                    <fhir fid="Slot.serviceType" definition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Service type" strength="example" description="" valueSet="2.16.840.1.113883.4.642.3.518" canonicalUri="http://hl7.org/fhir/ValueSet/service-type"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="specialty" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The specialty of a practitioner that would be required to perform the service requested in this appointment</desc>
                    <fhir fid="Slot.specialty" definition="The specialty of a practitioner that would be required to perform the service requested in this appointment." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Practice Setting Code Value Set" strength="preferred" description="Additional details about where the content was created (e.g. clinical specialty)." valueSet="2.16.840.1.113883.3.88.12.80.72" canonicalUri="http://hl7.org/fhir/ValueSet/c80-practice-codes"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="appointmentType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The style of appointment or patient that may be booked in the slot (not service type)</desc>
                    <fhir fid="Slot.appointmentType" definition="The style of appointment or patient that may be booked in the slot (not service type)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v2 Appointment Reason Codes" strength="preferred" description="" canonicalUri="http://terminology.hl7.org/ValueSet/v2-0276"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="schedule" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The schedule resource that this slot defines an interval of status information</desc>
                    <fhir fid="Slot.schedule" definition="The schedule resource that this slot defines an interval of status information." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Schedule"/>
                        </type>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">busy | free | busy-unavailable | busy-tentative | entered-in-error</desc>
                    <fhir fid="Slot.status" definition="busy | free | busy-unavailable | busy-tentative | entered-in-error." isSummary="true">
                        <type value="code"/>
                        <binding displayName="SlotStatus" strength="required" description="The free/busy status of the slot." valueSet="2.16.840.1.113883.4.642.3.482" canonicalUri="http://hl7.org/fhir/ValueSet/slotstatus|4.0.1"/>
                        <mapping identity="ical" map="FREEBUSY;FBTYPE=(freeBusyType):19980314T233000Z/19980315T003000Z If the freeBusyType is BUSY, then this value can be excluded"/>
                    </fhir>
                </element>
                <element name="start" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date/Time that the slot is to begin</desc>
                    <fhir fid="Slot.start" definition="Date/Time that the slot is to begin." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="ical" map="FREEBUSY;FBTYPE=FREE:(start)/19980315T003000Z If the freeBusyType is BUSY, then this value can be excluded"/>
                    </fhir>
                </element>
                <element name="end" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date/Time that the slot is to conclude</desc>
                    <fhir fid="Slot.end" definition="Date/Time that the slot is to conclude." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="ical" map="FREEBUSY:19980314T233000Z/(end) If the freeBusyType is BUSY, then this value can be excluded (as shown)"/>
                    </fhir>
                </element>
                <element name="overbooked" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">This slot has already been overbooked, appointments are unlikely to be accepted for this time</desc>
                    <fhir fid="Slot.overbooked" definition="This slot has already been overbooked, appointments are unlikely to be accepted for this time.">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Comments on the slot to describe any extended information. Such as custom constraints on the slot</desc>
                    <fhir fid="Slot.comment" definition="Comments on the slot to describe any extended information. Such as custom constraints on the slot.">
                        <type value="string"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.128" name="Specimen" displayName="Specimen" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Specimen">
            <desc language="en-US">A sample to be used for analysis.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Specimen" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Specimen" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Sample for analysis</desc>
                <fhir fid="Specimen" definition="A sample to be used for analysis.">
                    <mapping identity="rim" map="Role[classCode=SPEC]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External Identifier</desc>
                    <fhir fid="Specimen.identifier" definition="Id for specimen." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="SPM-2"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="accessionIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifier assigned by the lab</desc>
                    <fhir fid="Specimen.accessionIdentifier" definition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="SPM-30 (v2.7+)"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].act[classCode=ACSN, moodCode=EVN].id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">available | unavailable | unsatisfactory | entered-in-error</desc>
                    <fhir fid="Specimen.status" definition="The availability of the specimen." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="SpecimenStatus" strength="required" description="Codes providing the status/availability of a specimen." valueSet="2.16.840.1.113883.4.642.3.471" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="SPM-20"/>
                        <mapping identity="rim" map="status"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of material that forms the specimen</desc>
                    <fhir fid="Specimen.type" definition="The kind of material that forms the specimen." comment="The type can change the way that a specimen is handled and drives what kind of analyses can properly be performed on the specimen. It is frequently used in diagnostic work flow decision making systems." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v2 Specimen Type" strength="example" description="The type of the specimen." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0487"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="SPM-4 and possibly SPM-5"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="subject" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device</desc>
                    <fhir fid="Specimen.subject" definition="Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device." requirements="Must know the subject context." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".scoper  or  .scoper.playsRole"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="receivedTime" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The time when specimen was received for processing</desc>
                    <fhir fid="Specimen.receivedTime" definition="Time when specimen was received for processing or testing." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="SPM-18"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].act[code=SPCREC, moodCode=EVN].effectiveTime"/>
                    </fhir>
                </element>
                <element name="parent" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specimen from which this specimen originated</desc>
                    <fhir fid="Specimen.parent" definition="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen."
                        comment="The parent specimen could be the source from which the current specimen is derived by some processing step (e.g. an aliquot or isolate or extracted nucleic acids from clinical samples) or one of many specimens that were combined to create a pooled sample.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Specimen"/>
                        </type>
                        <mapping identity="rim" map=".scoper (if parent) .player.scopesRole[classCode=SPEC].player (if child)"/>
                    </fhir>
                </element>
                <element name="request" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Why the specimen was collected</desc>
                    <fhir fid="Specimen.request" definition="Details concerning a service request that required a specimen to be collected." comment="The request may be explicit or implied such with a ServiceRequest that requires a blood draw.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC? OBR-2/3?"/>
                        <mapping identity="rim" map="outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="collection" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Collection details</desc>
                    <fhir fid="Specimen.collection" definition="Details concerning the specimen collection.">
                        <type value="BackboneElement"/>
                        <mapping identity="v2" map="SPM-14"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].act[classCode=SPECCOLLECT, moodCode=EVN]"/>
                    </fhir>
                    <element name="collector" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Who collected the specimen</desc>
                        <fhir fid="Specimen.collection.collector" definition="Person who collected the specimen." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.actor"/>
                            <mapping identity="v2" map="PRT"/>
                            <mapping identity="rim" map=".participation[typeCode=PFM].role"/>
                        </fhir>
                    </element>
                    <choice name="collected[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Collection time</desc>
                        <fhir fid="Specimen.collection.collected[x]" definition="Time when specimen was collected from subject - the physiologically relevant time." isSummary="true">
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <mapping identity="w5" map="FiveWs.init"/>
                            <mapping identity="v2" map="SPM-17"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                        <element name="collectedDateTime">
                            <fhir fid="Specimen.collection.collectedDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="collectedPeriod">
                            <fhir fid="Specimen.collection.collectedPeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How long it took to collect specimen</desc>
                        <fhir fid="Specimen.collection.duration" definition="The span of time over which the collection of a specimen occurred." isSummary="true">
                            <type value="Duration"/>
                            <mapping identity="w5" map="FiveWs.init"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The quantity of specimen collected</desc>
                        <fhir fid="Specimen.collection.quantity" definition="The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="SPM-12"/>
                            <mapping identity="rim" map=".participation[typeCode=SBJ].role[classCode=SPEC].player.quantity"/>
                        </fhir>
                    </element>
                    <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Technique used to perform collection</desc>
                        <fhir fid="Specimen.collection.method" definition="A coded value specifying the technique that is used to perform the procedure.">
                            <type value="CodeableConcept"/>
                            <binding displayName="FHIR Specimen Collection Method" strength="example" description="The  technique that is used to perform the procedure." valueSet="2.16.840.1.113883.4.642.3.468" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-collection-method"/>
                            <mapping identity="v2" map="SPM-7"/>
                            <mapping identity="rim" map=".methodCode"/>
                        </fhir>
                    </element>
                    <element name="bodySite" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Anatomical collection site</desc>
                        <fhir fid="Specimen.collection.bodySite" definition="Anatomical location from which the specimen was collected (if subject is a patient). This is the target site.  This element is not used for environmental specimens."
                            comment="If the use case requires  BodySite to be handled as a separate resource instead of an inline coded element (e.g. to identify and track separately)  then use the standard extension [bodySite](extension-bodysite.html).">
                            <type value="CodeableConcept"/>
                            <binding displayName="SNOMED CT Body Structures" strength="example" description="Codes describing anatomical locations. May include laterality." valueSet="2.16.840.1.113883.4.642.3.141" canonicalUri="http://hl7.org/fhir/ValueSet/body-site"/>
                            <mapping identity="v2" map="SPM-8 and SPM-9"/>
                            <mapping identity="rim" map=".targetSiteCode"/>
                        </fhir>
                    </element>
                    <choice name="fastingStatus[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether or how long patient abstained from food and/or drink</desc>
                        <fhir fid="Specimen.collection.fastingStatus[x]" definition="Abstinence or reduction from some or all food, drink, or both, for a period of time prior to sample collection."
                            comment="Representing fasting status using this element is preferred to representing it with an observation using a 'pre-coordinated code'  such as  LOINC 2005-7 (Calcium [Moles/​time] in 2 hour Urine --12 hours fasting), or  using  a component observation ` such as `Observation.component code`  = LOINC 49541-6 (Fasting status - Reported)."
                            requirements="Many diagnostic tests require fasting  to facilitate accurate interpretation." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="Duration"/>
                            <binding displayName="v2 Relevant Clincial Information" strength="extensible" description="Codes describing the fasting status of the patient." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0916"/>
                            <mapping identity="v2" map="OBR-"/>
                        </fhir>
                        <element name="fastingStatusCodeableConcept">
                            <fhir fid="Specimen.collection.fastingStatusCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="fastingStatusDuration">
                            <fhir fid="Specimen.collection.fastingStatusDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="processing" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Processing and processing step details</desc>
                    <fhir fid="Specimen.processing" definition="Details concerning processing and processing steps for the specimen.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].act[code=SPCTRT, moodCode=EVN]"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Textual description of procedure</desc>
                        <fhir fid="Specimen.processing.description" definition="Textual description of procedure.">
                            <type value="string"/>
                            <mapping identity="rim" map=".text"/>
                        </fhir>
                    </element>
                    <element name="procedure" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Indicates the treatment step applied to the specimen</desc>
                        <fhir fid="Specimen.processing.procedure" definition="A coded value specifying the procedure used to process the specimen.">
                            <type value="CodeableConcept"/>
                            <binding displayName="Specimen processing procedure" strength="example" description="Type indicating the technique used to process the specimen." valueSet="2.16.840.1.113883.4.642.3.469" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-processing-procedure"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <element name="additive" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Material used in the processing step</desc>
                        <fhir fid="Specimen.processing.additive" definition="Material used in the processing step.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                            <mapping identity="v2" map="SPM-6"/>
                            <mapping identity="rim" map=".participation[typeCode=CSM].role[classCode=ADTV].code"/>
                        </fhir>
                    </element>
                    <choice name="time[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Date and time of specimen processing</desc>
                        <fhir fid="Specimen.processing.time[x]" definition="A record of the time or period when the specimen processing occurred.  For example the time of sample fixation or the period of time the sample was in formalin.">
                            <type value="dateTime"/>
                            <type value="Period"/>
                            <mapping identity="rim" map=".effectiveTime"/>
                        </fhir>
                        <element name="timeDateTime">
                            <fhir fid="Specimen.processing.timeDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="timePeriod">
                            <fhir fid="Specimen.processing.timePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="container" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Direct container of specimen (tube/slide, etc.)</desc>
                    <fhir fid="Specimen.container" definition="The container holding the specimen.  The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".player.scopingRole[classCode=CONT].scoper"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Id for the container</desc>
                        <fhir fid="Specimen.container.identifier" definition="Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances." isSummary="true">
                            <type value="Identifier"/>
                            <mapping identity="v2" map="SAC-3"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Textual description of the container</desc>
                        <fhir fid="Specimen.container.description" definition="Textual description of the container.">
                            <type value="string"/>
                            <mapping identity="rim" map=".desc"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Kind of container directly associated with specimen</desc>
                        <fhir fid="Specimen.container.type" definition="The type of container associated with the specimen (e.g. slide, aliquot, etc.).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Specimen Container Type" strength="example" description="Type of specimen container." valueSet="2.16.840.1.113883.4.642.3.470" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-container-type"/>
                            <mapping identity="v2" map="SPM-27"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <element name="capacity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Container volume or size</desc>
                        <fhir fid="Specimen.container.capacity" definition="The capacity (volume or other measure) the container may contain.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="one of: SAC 16, SAC17 and SAC 20, or SAC 21 and SAC 20"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                    <element name="specimenQuantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quantity of specimen within container</desc>
                        <fhir fid="Specimen.container.specimenQuantity" definition="The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type.">
                            <type value="Quantity"/>
                            <mapping identity="v2" map="SAC-23 (value) SAC-24 (units"/>
                            <mapping identity="rim" map=".playedRole[classCode=CONT].quantity"/>
                        </fhir>
                    </element>
                    <choice name="additive[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additive associated with container</desc>
                        <fhir fid="Specimen.container.additive[x]" definition="Introduced substance to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                            <binding displayName="v2 Additive" strength="example" description="Substance added to specimen container." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0371"/>
                            <mapping identity="v2" map="SAC-27"/>
                            <mapping identity="rim" map=".scopesRole[classCode=ADTV].player"/>
                        </fhir>
                        <element name="additiveCodeableConcept">
                            <fhir fid="Specimen.container.additiveCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="additiveReference">
                            <fhir fid="Specimen.container.additiveReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="condition" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">State of the specimen</desc>
                    <fhir fid="Specimen.condition" definition="A mode or state of being that describes the nature of the specimen." comment="Specimen condition is an observation made about the specimen.  It's a point-in-time assessment.  It can be used to assess its quality or appropriateness for a specific test."
                        requirements="The specimen condition can be used to assess its quality or appropriateness for a specific test." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v2 Specimen Condition" strength="extensible" description="Codes describing the state of the specimen." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0493"/>
                        <mapping identity="v2" map="SPM-24"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments</desc>
                    <fhir fid="Specimen.note" definition="To communicate any details or issues about the specimen or during the specimen collection. (for example: broken vial, sent with patient, frozen).">
                        <type value="Annotation"/>
                        <mapping identity="v2" map="OBX"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.129" name="SpecimenDefinition" displayName="SpecimenDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SpecimenDefinition">
            <desc language="en-US">A kind of specimen with associated set of requirements.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SpecimenDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SpecimenDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Kind of specimen</desc>
                <fhir fid="SpecimenDefinition" definition="A kind of specimen with associated set of requirements.">
                    <mapping identity="v2" map="OM4"/>
                    <mapping identity="rim" map="Role[classCode=SPEC]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business identifier of a kind of specimen</desc>
                    <fhir fid="SpecimenDefinition.identifier" definition="A business identifier associated with the kind of specimen." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="typeCollected" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Kind of material to collect</desc>
                    <fhir fid="SpecimenDefinition.typeCollected" definition="The kind of material to be collected." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="v2 Specimen Type" strength="example" description="The type of the specimen to be collected." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0487"/>
                        <mapping identity="v2" map="OM4-6"/>
                    </fhir>
                </element>
                <element name="patientPreparation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Patient preparation for collection</desc>
                    <fhir fid="SpecimenDefinition.patientPreparation" definition="Preparation of the patient for specimen collection." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Patient preparation prior specimen collection" strength="example" description="Checks on the patient prior specimen collection." valueSet="2.16.840.1.113883.4.642.3.1399" canonicalUri="http://hl7.org/fhir/ValueSet/prepare-patient-prior-specimen-collection"/>
                        <mapping identity="v2" map="OM1-37"/>
                    </fhir>
                </element>
                <element name="timeAspect" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Time aspect for collection</desc>
                    <fhir fid="SpecimenDefinition.timeAspect" definition="Time aspect of specimen collection (duration or offset)." isSummary="true">
                        <type value="string"/>
                        <mapping identity="v2" map="OM1-43, OM1-44"/>
                    </fhir>
                </element>
                <element name="collection" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specimen collection procedure</desc>
                    <fhir fid="SpecimenDefinition.collection" definition="The action to be performed for collecting the specimen." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Specimen collection methods" strength="example" description="The action to collect a type of specimen." valueSet="2.16.840.1.113883.4.642.3.1398" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-collection"/>
                    </fhir>
                </element>
                <element name="typeTested" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Specimen in container intended for testing by lab</desc>
                    <fhir fid="SpecimenDefinition.typeTested" definition="Specimen conditioned in a container as expected by the testing laboratory.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="isDerived" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Primary or secondary specimen</desc>
                        <fhir fid="SpecimenDefinition.typeTested.isDerived" definition="Primary of secondary specimen.">
                            <type value="boolean"/>
                            <mapping identity="v2" map="OM4-2"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Type of intended specimen</desc>
                        <fhir fid="SpecimenDefinition.typeTested.type" definition="The kind of specimen conditioned for testing expected by lab.">
                            <type value="CodeableConcept"/>
                            <binding displayName="v2 Specimen Type" strength="example" description="The type of specimen conditioned in a container for lab testing." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0487"/>
                        </fhir>
                    </element>
                    <element name="preference" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">preferred | alternate</desc>
                        <fhir fid="SpecimenDefinition.typeTested.preference" definition="The preference for this type of conditioned specimen.">
                            <type value="code"/>
                            <binding displayName="SpecimenContainedPreference" strength="required" description="Degree of preference of a type of conditioned specimen." valueSet="2.16.840.1.113883.4.642.3.852" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-contained-preference|4.0.1"/>
                            <mapping identity="v2" map="OM4-16"/>
                        </fhir>
                    </element>
                    <element name="container" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The specimen's container</desc>
                        <fhir fid="SpecimenDefinition.typeTested.container" definition="The specimen's container.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="material" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Container material</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.material" definition="The type of material of the container.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Types of material for specimen containers" strength="example" description="Types of material for specimen containers." valueSet="2.16.840.1.113883.4.642.3.1400" canonicalUri="http://hl7.org/fhir/ValueSet/container-material"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Kind of container associated with the kind of specimen</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.type" definition="The type of container used to contain this kind of specimen.">
                                <type value="CodeableConcept"/>
                                <binding displayName="Specimen Container Type" strength="example" description="Type of specimen container." valueSet="2.16.840.1.113883.4.642.3.470" canonicalUri="http://hl7.org/fhir/ValueSet/specimen-container-type"/>
                            </fhir>
                        </element>
                        <element name="cap" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Color of container cap</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.cap" definition="Color of container cap." requirements="From ISO 6710-2017 Table F.1 Recommended colour codes.">
                                <type value="CodeableConcept"/>
                                <binding displayName="ContainerCap" strength="example" description="Color of the container cap." valueSet="2.16.840.1.113883.4.642.3.850" canonicalUri="http://hl7.org/fhir/ValueSet/container-cap"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Container description</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.description" definition="The textual description of the kind of container.">
                                <type value="string"/>
                                <mapping identity="v2" map="OM4-3"/>
                            </fhir>
                        </element>
                        <element name="capacity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Container capacity</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.capacity" definition="The capacity (volume or other measure) of this kind of container.">
                                <type value="Quantity"/>
                                <mapping identity="v2" map="OM4-4, OM4-5"/>
                            </fhir>
                        </element>
                        <choice name="minimumVolume[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Minimum volume</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.minimumVolume[x]" definition="The minimum volume to be conditioned in the container.">
                                <type value="Quantity"/>
                                <type value="string"/>
                                <mapping identity="v2" map="OM4-11"/>
                            </fhir>
                            <element name="minimumVolumeQuantity">
                                <fhir fid="SpecimenDefinition.typeTested.container.minimumVolumeQuantity">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                            <element name="minimumVolumeString">
                                <fhir fid="SpecimenDefinition.typeTested.container.minimumVolumeString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </choice>
                        <element name="additive" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Additive associated with container</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.additive" definition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.">
                                <type value="BackboneElement"/>
                                <mapping identity="v2" map="OM4-7"/>
                            </fhir>
                            <choice name="additive[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Additive associated with container</desc>
                                <fhir fid="SpecimenDefinition.typeTested.container.additive.additive[x]" definition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.">
                                    <type value="CodeableConcept"/>
                                    <type value="Reference">
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                    </type>
                                    <binding displayName="v2 Additive" strength="example" description="Substance added to specimen container." canonicalUri="http://terminology.hl7.org/ValueSet/v2-0371"/>
                                    <mapping identity="v2" map="OM4-7"/>
                                </fhir>
                                <element name="additiveCodeableConcept">
                                    <fhir fid="SpecimenDefinition.typeTested.container.additive.additiveCodeableConcept">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="additiveReference">
                                    <fhir fid="SpecimenDefinition.typeTested.container.additive.additiveReference">
                                        <type value="Reference"/>
                                        <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                    </fhir>
                                </element>
                            </choice>
                        </element>
                        <element name="preparation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Specimen container preparation</desc>
                            <fhir fid="SpecimenDefinition.typeTested.container.preparation" definition="Special processing that should be applied to the container for this kind of specimen.">
                                <type value="string"/>
                                <mapping identity="v2" map="OM4-8"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="requirement" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specimen requirements</desc>
                        <fhir fid="SpecimenDefinition.typeTested.requirement" definition="Requirements for delivery and special handling of this kind of conditioned specimen.">
                            <type value="string"/>
                            <mapping identity="v2" map="OM4-12"/>
                        </fhir>
                    </element>
                    <element name="retentionTime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specimen retention time</desc>
                        <fhir fid="SpecimenDefinition.typeTested.retentionTime" definition="The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.">
                            <type value="Duration"/>
                            <mapping identity="v2" map="OM4-14"/>
                        </fhir>
                    </element>
                    <element name="rejectionCriterion" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Rejection criterion</desc>
                        <fhir fid="SpecimenDefinition.typeTested.rejectionCriterion" definition="Criterion for rejection of the specimen in its container by the laboratory.">
                            <type value="CodeableConcept"/>
                            <binding displayName="RejectionCriterion" strength="example" description="Criterion for rejection of the specimen by laboratory." valueSet="2.16.840.1.113883.4.642.3.856" canonicalUri="http://hl7.org/fhir/ValueSet/rejection-criteria"/>
                            <mapping identity="v2" map="OM1-39"/>
                        </fhir>
                    </element>
                    <element name="handling" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Specimen handling before testing</desc>
                        <fhir fid="SpecimenDefinition.typeTested.handling" definition="Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="temperatureQualifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Temperature qualifier</desc>
                            <fhir fid="SpecimenDefinition.typeTested.handling.temperatureQualifier" definition="It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.">
                                <type value="CodeableConcept"/>
                                <binding displayName="HandlingConditionSet" strength="example" description="Set of handling instructions prior testing of the specimen." valueSet="2.16.840.1.113883.4.642.3.854" canonicalUri="http://hl7.org/fhir/ValueSet/handling-condition"/>
                                <mapping identity="v2" map="OM4-15"/>
                            </fhir>
                        </element>
                        <element name="temperatureRange" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Temperature range</desc>
                            <fhir fid="SpecimenDefinition.typeTested.handling.temperatureRange" definition="The temperature interval for this set of handling instructions.">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="maxDuration" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Maximum preservation time</desc>
                            <fhir fid="SpecimenDefinition.typeTested.handling.maxDuration" definition="The maximum time interval of preservation of the specimen with these conditions.">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="instruction" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Preservation instruction</desc>
                            <fhir fid="SpecimenDefinition.typeTested.handling.instruction" definition="Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.130" name="StructureDefinition" displayName="StructureDefinition" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/StructureDefinition">
            <desc language="en-US">A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="StructureDefinition" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="iso11179" uri="http://metadata-standards.org/11179/" name="ISO 11179"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="StructureDefinition" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Structural Definition</desc>
                <fhir fid="StructureDefinition" definition="A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="sdf-9" severity="error" human="In any snapshot or differential, no label, code or requirements on an element without a &#34;.&#34; in the path (e.g. the first element)"
                        expression="children().element.where(path.contains('.').not()).label.empty() and children().element.where(path.contains('.').not()).code.empty() and children().element.where(path.contains('.').not()).requirements.empty()"
                        xpath="not(exists(f:snapshot/f:element[not(contains(f:path/@value, '.')) and (f:label or f:code or f:requirements)])) and not(exists(f:differential/f:element[not(contains(f:path/@value, '.')) and (f:label or f:code or f:requirements)]))" source=""/>
                    <constraint key="sdf-15a" severity="error" human="If the first element in a differential has no &#34;.&#34; in the path and it's not a logical model, it has no type" expression="(kind!='logical'  and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty()"
                        xpath="f:kind/@value='logical' or not(f:differential/f:element[1][not(contains(f:path/@value, '.'))]/f:type)" source=""/>
                    <constraint key="sdf-19" severity="error" human="FHIR Specification models only use FHIR defined types"
                        expression="url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (differential.element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) and snapshot.element.type.code.all(matches('^[a-zA-Z0-9\\.]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')))"
                        xpath="not(starts-with(f:url/@value, 'http://hl7.org/fhir/StructureDefinition')) or count(f:differential/f:element/f:type/f:code[@value and not(matches(string(@value), '^[a-zA-Z0-9\.]+$'))]|f:snapshot/f:element/f:type/f:code[@value and not(matches(string(@value), '^[a-zA-Z0-9]+$\.'))]) =0" source=""/>
                    <constraint key="sdf-16" severity="error" human="All element definitions must have unique ids (snapshot)" expression="snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()" xpath="count(f:snapshot/f:element)=count(f:snapshot/f:element/@id) and (count(f:snapshot/f:element)=count(distinct-values(f:snapshot/f:element/@id)))" source=""/>
                    <constraint key="sdf-15" severity="error" human="The first element in a snapshot has no type unless model is a logical model." expression="kind!='logical' implies snapshot.element.first().type.empty()" xpath="f:kind/@value='logical' or not(f:snapshot/f:element[1]/f:type)" source=""/>
                    <constraint key="sdf-18" severity="error" human="Context Invariants can only be used for extensions" expression="contextInvariant.exists() implies type = 'Extension'" xpath="not(exists(f:contextInvariant)) or (f:type/@value = 'Extension')" source=""/>
                    <constraint key="sdf-17" severity="error" human="All element definitions must have unique ids (diff)" expression="differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()" xpath="count(f:differential/f:element)=count(f:differential/f:element/@id) and (count(f:differential/f:element)=count(distinct-values(f:differential/f:element/@id)))"
                        source=""/>
                    <constraint key="sdf-23" severity="error" human="No slice name on root" expression="(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())" xpath="count(*[self::snapshot or self::differential]/f:element[not(contains(f:path/@value, '.')) and f:sliceName])=0" source=""/>
                    <constraint key="sdf-11" severity="error" human="If there's a type, its content must match the path name in the first element of a snapshot" expression="kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type" xpath="(f:kind/@value = 'logical') or not(exists(f:snapshot)) or (f:type/@value = f:snapshot/f:element[1]/f:path/@value)" source=""/>
                    <constraint key="sdf-22" severity="error" human="FHIR Specification models never have default values" expression="url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty())"
                        xpath="not(starts-with(f:url/@value, 'http://hl7.org/fhir/StructureDefinition')) or (not(exists(f:snapshot/f:element/*[starts-with(local-name(), 'defaultValue')])) and not(exists(f:differential/f:element/*[starts-with(local-name(), 'defaultValue')])))" source=""/>
                    <constraint key="sdf-14" severity="error" human="All element definitions must have an id" expression="snapshot.element.all(id.exists()) and differential.element.all(id.exists())" xpath="count(*/f:element)=count(*/f:element/@id)" source=""/>
                    <constraint key="sdf-1" severity="error" human="Element paths must be unique unless the structure is a constraint" expression="derivation = 'constraint' or snapshot.element.select(path).isDistinct()" xpath="(f:derivation/@value = 'constraint') or (count(f:snapshot/f:element) = count(distinct-values(f:snapshot/f:element/f:path/@value)))" source=""/>
                    <constraint key="sdf-21" severity="error" human="Default values can only be specified on specializations" expression="differential.element.defaultValue.exists() implies (derivation = 'specialization')" xpath="not(exists(f:differential/f:element/*[starts-with(local-name(), 'defaultValue')])) or (f:derivation/@value = 'specialization')" source=""/>
                    <constraint key="sdf-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                    <constraint key="sdf-6" severity="error" human="A structure must have either a differential, or a snapshot (or both)" expression="snapshot.exists() or differential.exists()" xpath="exists(f:snapshot) or exists(f:differential)" source=""/>
                    <constraint key="sdf-5" severity="error" human="If the structure defines an extension then the structure must have context information" expression="type != 'Extension' or derivation = 'specialization' or (context.exists())" xpath="not(f:type/@value = 'extension') or (f:derivation/@value = 'specialization') or (exists(f:context))" source=""/>
                    <constraint key="sdf-4" severity="error" human="If the structure is not abstract, then there SHALL be a baseDefinition" expression="abstract = true or baseDefinition.exists()" xpath="(f:abstract/@value=true()) or exists(f:baseDefinition)" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this structure definition, represented as a URI (globally unique)</desc>
                    <fhir fid="StructureDefinition.url"
                        definition="An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the structure definition to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the structure definition</desc>
                    <fhir fid="StructureDefinition.identifier" definition="A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this structure definition outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="iso11179" map="Identifier part"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the structure definition</desc>
                    <fhir fid="StructureDefinition.version"
                        definition="The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different structure definition instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the structure definition with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                        <mapping identity="iso11179" map="Version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this structure definition (computer friendly)</desc>
                    <fhir fid="StructureDefinition.name" definition="A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.Some Examples: &#xA;&#xA;* O2SatObservation&#xA;* PresentationReport&#xA;* Immunization2&#xA;* AcmeAdmissionRecordOld." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this structure definition (human friendly)</desc>
                    <fhir fid="StructureDefinition.title" definition="A short, descriptive, user-friendly title for the structure definition." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.Applications don't have to use this name but can always fall back to it. The title also corresponds to the label for the root element."
                        isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="StructureDefinition.status" definition="The status of this structure definition. Enables tracking the life-cycle of the content." comment="Allows filtering of structure definitions that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="iso11179" map="Registration status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="StructureDefinition.experimental" definition="A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of structure definitions that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level structure definition." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="iso11179" map="Registration status"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="StructureDefinition.date" definition="The date  (and optionally time) when the structure definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the structure definition. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="StructureDefinition.publisher" definition="The name of the organization or individual that published the structure definition."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the structure definition is the organization or individual primarily responsible for the maintenance and upkeep of the structure definition. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the structure definition. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the structure definition.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                        <mapping identity="iso11179" map="Registration Authority"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="StructureDefinition.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the structure definition</desc>
                    <fhir fid="StructureDefinition.description" definition="A free text natural language description of the structure definition from a consumer's perspective."
                        comment="This description can be used to capture details such as why the structure definition was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the structure definition as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the structure definition is presumed to be the predominant language in the place the structure definition was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="StructureDefinition.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for structure definition (if applicable)</desc>
                    <fhir fid="StructureDefinition.jurisdiction" definition="A legal or geographic region in which the structure definition is intended to be used." comment="It may be possible for the structure definition to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this structure definition is defined</desc>
                    <fhir fid="StructureDefinition.purpose" definition="Explanation of why this structure definition is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the structure definition. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this structure definition.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="StructureDefinition.copyright" definition="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition." requirements="Consumers must be able to determine any legal restrictions on the use of the structure definition and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="keyword" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Assist with indexing and finding</desc>
                    <fhir fid="StructureDefinition.keyword" definition="A set of key words or terms from external terminologies that may be used to assist with indexing and searching of templates nby describing the use of this structure definition, or the content it describes." requirements="Assist in searching for appropriate StructureDefinitions." isSummary="true">
                        <type value="Coding"/>
                        <binding displayName="Structure Definition Use Codes / Keywords" strength="extensible" description="Codes for the meaning of the defined structure (SNOMED CT and LOINC codes, as an example)." valueSet="2.16.840.1.113883.4.642.3.1190" canonicalUri="http://hl7.org/fhir/ValueSet/definition-use"/>
                        <mapping identity="iso11179" map="keywords"/>
                    </fhir>
                </element>
                <element name="fhirVersion" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">FHIR Version this StructureDefinition targets</desc>
                    <fhir fid="StructureDefinition.fhirVersion" definition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 4.0.1. for this version."
                        comment="A StructureDefinition does not need to specify the target it applies to as StructureDefinitions will often be valid across multiple versions of FHIR. FHIR tooling can determine whether a StructureDefinition is consistent with a particular StructureDefinition if desired." isSummary="true">
                        <type value="code"/>
                        <binding displayName="FHIRVersion" strength="required" description="All published FHIR Versions." valueSet="2.16.840.1.113883.4.642.3.1309" canonicalUri="http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1"/>
                    </fhir>
                </element>
                <element name="mapping" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External specification that the content is mapped to</desc>
                    <fhir fid="StructureDefinition.mapping" definition="An external specification that the content is mapped to.">
                        <type value="BackboneElement"/>
                        <constraint key="sdf-2" severity="error" human="Must have at least a name or a uri (or both)" expression="name.exists() or uri.exists()" xpath="exists(f:uri) or exists(f:name)" source=""/>
                    </fhir>
                    <element name="identity" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Internal id when this mapping is used</desc>
                        <fhir fid="StructureDefinition.mapping.identity" definition="An Internal id that is used to identify this mapping set when specific mappings are made." comment="The specification is described once, with general comments, and then specific mappings are made that reference this declaration.">
                            <type value="id"/>
                        </fhir>
                    </element>
                    <element name="uri" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifies what this mapping refers to</desc>
                        <fhir fid="StructureDefinition.mapping.uri" definition="An absolute URI that identifies the specification that this mapping is expressed to." comment="A formal identity for the specification being mapped to helps with identifying maps consistently.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Names what this mapping refers to</desc>
                        <fhir fid="StructureDefinition.mapping.name" definition="A name for the specification that is being mapped to.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Versions, Issues, Scope limitations etc.</desc>
                        <fhir fid="StructureDefinition.mapping.comment" definition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">primitive-type | complex-type | resource | logical</desc>
                    <fhir fid="StructureDefinition.kind" definition="Defines the kind of structure that this definition is describing." isSummary="true">
                        <type value="code"/>
                        <binding displayName="StructureDefinitionKind" strength="required" description="Defines the type of structure that a definition is describing." valueSet="2.16.840.1.113883.4.642.3.668" canonicalUri="http://hl7.org/fhir/ValueSet/structure-definition-kind|4.0.1"/>
                    </fhir>
                </element>
                <element name="abstract" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Whether the structure is abstract</desc>
                    <fhir fid="StructureDefinition.abstract" definition="Whether structure this definition describes is abstract or not  - that is, whether the structure is not intended to be instantiated. For Resources and Data types, abstract types will never be exchanged  between systems."
                        comment="Abstract Resources cannot be instantiated - a concrete sub-type must be used. Abstract datatypes and extensions cannot be used in an instance. For logical models, the exact implication of &#34;abstract&#34; will rest with the author, depending how the logical model is used. Flagging a constraint structure as abstract conveys design intent but makes no difference to how the structure definition is handled. Note that inline declared elements that are given the type &#34;Element&#34; in the StructureDefinition, but have children described, are anonymous concrete types that specialize Element."
                        isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="context" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">If an extension, where it can be used in instances</desc>
                    <fhir fid="StructureDefinition.context" definition="Identifies the types of resource or data type elements to which the extension can be applied." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">fhirpath | element | extension</desc>
                        <fhir fid="StructureDefinition.context.type" definition="Defines how to interpret the expression that defines what the context of the extension is." isSummary="true">
                            <type value="code"/>
                            <binding displayName="ExtensionContextType" strength="required" description="How an extension context is interpreted." valueSet="2.16.840.1.113883.4.642.3.1012" canonicalUri="http://hl7.org/fhir/ValueSet/extension-context-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Where the extension can be used in instances</desc>
                        <fhir fid="StructureDefinition.context.expression" definition="An expression that defines where an extension can be used in resources." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="contextInvariant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">FHIRPath invariants - when the extension can be used</desc>
                    <fhir fid="StructureDefinition.contextInvariant" definition="A set of rules as FHIRPath Invariants about when the extension can be used (e.g. co-occurrence variants for the extension). All the rules must be true."
                        comment="The rules are only evaluated when the extension is present. When evaluating the invariant, the FHIRPath focus is the element that holds the extension, and %extension refers to the extension itself." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Type defined or constrained by this structure</desc>
                    <fhir fid="StructureDefinition.type"
                        definition="The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type).  References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. &#34;string&#34; is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models."
                        comment="Note that in the case of constraints, the type could be determined by chasing through the baseDefinition references until a concrete structure (derivation = specialization) is reached, or by looking at the path of the first element in the snapshot - if present - but providing the type directly makes for simpler tooling and indexing. &#xA;&#xA;The type must match the elements defined in the differential and the snapshot. For all FHIR defined types, the path name of the element will start with the type name. For logical models, where the type is a URL, the type name SHOULD start with the tail of the type URL where required."
                        isSummary="true">
                        <type value="uri"/>
                        <binding displayName="FHIRDefinedType" strength="extensible" description="Either a resource or a data type, including logical model types." valueSet="2.16.840.1.113883.4.642.3.24" canonicalUri="http://hl7.org/fhir/ValueSet/defined-types"/>
                    </fhir>
                </element>
                <element name="baseDefinition" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Definition that this type is constrained/specialized from</desc>
                    <fhir fid="StructureDefinition.baseDefinition" definition="An absolute URI that is the base structure from which this type is derived, either by specialization or constraint."
                        comment="If differential constraints are specified in this structure, they are applied to the base in a &#34;differential&#34; fashion. If there is no base, then the differential constraints cannot be provided (snapshot only). Differential structures are useful for the editing perspective, and snapshot structures are suitable for operational use. The FHIR Project provides a number of tools/services to populate snapshots from differential constraints. Logical Models have a base of &#34;Element&#34; or another logical model."
                        isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                        </type>
                    </fhir>
                </element>
                <element name="derivation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">specialization | constraint - How relates to base definition</desc>
                    <fhir fid="StructureDefinition.derivation" definition="How the type relates to the baseDefinition."
                        comment="If the definition is a specialization, then it adds new elements in the differential, and the snapshot includes the inherited elements.  If the definition is a constraint, then it cannot define new elements, it can only make new rules about existing content (see [Profiling Resources](profiling.html#resources))." isSummary="true">
                        <type value="code"/>
                        <binding displayName="TypeDerivationRule" strength="required" description="How a type relates to its baseDefinition." valueSet="2.16.840.1.113883.4.642.3.673" canonicalUri="http://hl7.org/fhir/ValueSet/type-derivation-rule|4.0.1"/>
                    </fhir>
                </element>
                <element name="snapshot" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Snapshot view of the structure</desc>
                    <fhir fid="StructureDefinition.snapshot" definition="A snapshot view is expressed in a standalone form that can be used and interpreted without considering the base StructureDefinition.">
                        <type value="BackboneElement"/>
                        <constraint key="sdf-8" severity="error" human="All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models" expression="(%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&amp;'.'))"
                            xpath="f:element[1]/f:path/@value=parent::f:StructureDefinition/f:type/@value and count(f:element[position()!=1])=count(f:element[position()!=1][starts-with(f:path/@value, concat(ancestor::f:StructureDefinition/f:type/@value, '.'))])" source=""/>
                        <constraint key="sdf-3" severity="error" human="Each element definition in a snapshot must have a formal definition and cardinalities" expression="element.all(definition.exists() and min.exists() and max.exists())" xpath="count(f:element) = count(f:element[exists(f:definition) and exists(f:min) and exists(f:max)])" source=""/>
                        <constraint key="sdf-8b" severity="error" human="All snapshot elements must have a base definition" expression="element.all(base.exists())" xpath="count(f:element) = count(f:element/f:base)" source=""/>
                    </fhir>
                    <element name="element" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Definition of elements in the resource (if no StructureDefinition)</desc>
                        <fhir fid="StructureDefinition.snapshot.element" definition="Captures constraints on each element within the resource.">
                            <type value="ElementDefinition"/>
                            <mapping identity="iso11179" map="--"/>
                            <constraint key="sdf-10" severity="error" human="provide either a binding reference or a description (or both)" expression="binding.empty() or binding.valueSet.exists() or binding.description.exists()" xpath="not(exists(f:binding)) or exists(f:binding/f:valueSet) or exists(f:binding/f:description)" source=""/>
                        </fhir>
                    </element>
                </element>
                <element name="differential" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Differential view of the structure</desc>
                    <fhir fid="StructureDefinition.differential" definition="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.">
                        <type value="BackboneElement"/>
                        <constraint key="sdf-20" severity="error" human="No slicing on the root element" expression="element.where(path.contains('.').not()).slicing.empty()" xpath="not(f:element[1]/f:slicing)" source=""/>
                        <constraint key="sdf-8a" severity="error" human="In any differential, all the elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models"
                            expression="(%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().empty() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\..*','')&amp;'.')))"
                            xpath="count(f:element)=count(f:element[f:path/@value=ancestor::f:StructureDefinition/f:type/@value or starts-with(f:path/@value, concat(ancestor::f:StructureDefinition/f:type/@value, '.'))])" source=""/>
                    </fhir>
                    <element name="element" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Definition of elements in the resource (if no StructureDefinition)</desc>
                        <fhir fid="StructureDefinition.differential.element" definition="Captures constraints on each element within the resource.">
                            <type value="ElementDefinition"/>
                            <mapping identity="iso11179" map="--"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.131" name="StructureMap" displayName="StructureMap" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/StructureMap">
            <desc language="en-US">A Map of relationships between 2 structures that can be used to transform data.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="StructureMap" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="StructureMap" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A Map of relationships between 2 structures that can be used to transform data</desc>
                <fhir fid="StructureMap" definition="A Map of relationships between 2 structures that can be used to transform data.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="smp-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this structure map, represented as a URI (globally unique)</desc>
                    <fhir fid="StructureMap.url"
                        definition="An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the structure map to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the structure map</desc>
                    <fhir fid="StructureMap.identifier" definition="A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this structure map outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the structure map</desc>
                    <fhir fid="StructureMap.version"
                        definition="The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different structure map instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the structure map with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this structure map (computer friendly)</desc>
                    <fhir fid="StructureMap.name" definition="A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this structure map (human friendly)</desc>
                    <fhir fid="StructureMap.title" definition="A short, descriptive, user-friendly title for the structure map." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="StructureMap.status" definition="The status of this structure map. Enables tracking the life-cycle of the content." comment="Allows filtering of structure maps that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="StructureMap.experimental" definition="A Boolean value to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of structure maps that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level structure map." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="StructureMap.date" definition="The date  (and optionally time) when the structure map was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the structure map. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="StructureMap.publisher" definition="The name of the organization or individual that published the structure map."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the structure map is the organization or individual primarily responsible for the maintenance and upkeep of the structure map. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the structure map. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the structure map.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="StructureMap.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the structure map</desc>
                    <fhir fid="StructureMap.description" definition="A free text natural language description of the structure map from a consumer's perspective."
                        comment="This description can be used to capture details such as why the structure map was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the structure map as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the structure map is presumed to be the predominant language in the place the structure map was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="StructureMap.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure map instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for structure map (if applicable)</desc>
                    <fhir fid="StructureMap.jurisdiction" definition="A legal or geographic region in which the structure map is intended to be used." comment="It may be possible for the structure map to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this structure map is defined</desc>
                    <fhir fid="StructureMap.purpose" definition="Explanation of why this structure map is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the structure map. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this structure map.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="StructureMap.copyright" definition="A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure map." requirements="Consumers must be able to determine any legal restrictions on the use of the structure map and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="structure" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Structure Definition used by this map</desc>
                    <fhir fid="StructureMap.structure" definition="A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced." comment="It is not necessary for a structure map to identify any dependent structures, though not listing them may restrict its usefulness." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Canonical reference to structure definition</desc>
                        <fhir fid="StructureMap.structure.url" definition="The canonical reference to the structure." isSummary="true">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureDefinition"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">source | queried | target | produced</desc>
                        <fhir fid="StructureMap.structure.mode" definition="How the referenced structure is used in this mapping." isSummary="true">
                            <type value="code"/>
                            <binding displayName="StructureMapModelMode" strength="required" description="How the referenced structure is used in this mapping." valueSet="2.16.840.1.113883.4.642.3.675" canonicalUri="http://hl7.org/fhir/ValueSet/map-model-mode|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="alias" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name for type in this map</desc>
                        <fhir fid="StructureMap.structure.alias" definition="The name used for this type in the map." comment="This is needed if both types have the same name (e.g. version conversion)." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Documentation on use of structure</desc>
                        <fhir fid="StructureMap.structure.documentation" definition="Documentation that describes how the structure is used in the mapping.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="import" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Other maps used by this map (canonical URLs)</desc>
                    <fhir fid="StructureMap.import" definition="Other maps used by this map (canonical URLs)." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/StructureMap"/>
                        </type>
                    </fhir>
                </element>
                <element name="group" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Named sections for reader convenience</desc>
                    <fhir fid="StructureMap.group" definition="Organizes the mapping into manageable chunks for human review/ease of maintenance." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Human-readable label</desc>
                        <fhir fid="StructureMap.group.name" definition="A unique name for the group for the convenience of human readers." isSummary="true">
                            <type value="id"/>
                        </fhir>
                    </element>
                    <element name="extends" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Another group that this group adds rules to</desc>
                        <fhir fid="StructureMap.group.extends" definition="Another group that this group adds rules to." isSummary="true">
                            <type value="id"/>
                        </fhir>
                    </element>
                    <element name="typeMode" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">none | types | type-and-types</desc>
                        <fhir fid="StructureMap.group.typeMode" definition="If this is the default rule set to apply for the source type or this combination of types." comment="Not applicable if the underlying model is untyped. There can only be one default mapping for any particular type combination." isSummary="true">
                            <type value="code"/>
                            <binding displayName="StructureMapGroupTypeMode" strength="required" description="If this is the default rule set to apply for the source type, or this combination of types." valueSet="2.16.840.1.113883.4.642.3.687" canonicalUri="http://hl7.org/fhir/ValueSet/map-group-type-mode|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Additional description/explanation for group</desc>
                        <fhir fid="StructureMap.group.documentation" definition="Additional supporting documentation that explains the purpose of the group and the types of mappings within it." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="input" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Named instance provided when invoking the map</desc>
                        <fhir fid="StructureMap.group.input" definition="A name assigned to an instance of data. The instance must be provided when the mapping is invoked." comment="If no inputs are named, then the entry mappings are type based." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Name for this instance of data</desc>
                            <fhir fid="StructureMap.group.input.name" definition="Name for this instance of data." isSummary="true">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Type for this instance of data</desc>
                            <fhir fid="StructureMap.group.input.type" definition="Type for this instance of data." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="mode" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">source | target</desc>
                            <fhir fid="StructureMap.group.input.mode" definition="Mode for this instance of data." isSummary="true">
                                <type value="code"/>
                                <binding displayName="StructureMapInputMode" strength="required" description="Mode for this instance of data." valueSet="2.16.840.1.113883.4.642.3.677" canonicalUri="http://hl7.org/fhir/ValueSet/map-input-mode|4.0.1"/>
                            </fhir>
                        </element>
                        <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Documentation for this instance of data</desc>
                            <fhir fid="StructureMap.group.input.documentation" definition="Documentation for this instance of data.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="rule" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Transform Rule from source to target</desc>
                        <fhir fid="StructureMap.group.rule" definition="Transform Rule from source to target." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Name of the rule for internal references</desc>
                            <fhir fid="StructureMap.group.rule.name" definition="Name of the rule for internal references." isSummary="true">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="source" minimumMultiplicity="1" maximumMultiplicity="*">
                            <desc language="en-US">Source inputs to the mapping</desc>
                            <fhir fid="StructureMap.group.rule.source" definition="Source inputs to the mapping." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="context" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Type or variable this rule applies to</desc>
                                <fhir fid="StructureMap.group.rule.source.context" definition="Type or variable this rule applies to." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="min" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Specified minimum cardinality</desc>
                                <fhir fid="StructureMap.group.rule.source.min" definition="Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content." isSummary="true">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="max" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Specified maximum cardinality (number or *)</desc>
                                <fhir fid="StructureMap.group.rule.source.max" definition="Specified maximum cardinality for the element - a number or a &#34;*&#34;. This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value)." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Rule only applies if source has this type</desc>
                                <fhir fid="StructureMap.group.rule.source.type" definition="Specified type for the element. This works as a condition on the mapping - use for polymorphic elements." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <choice name="defaultValue[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Default value if no value exists</desc>
                                <fhir fid="StructureMap.group.rule.source.defaultValue[x]" definition="A value to use if there is no existing value in the source object." comment="If there's a default value on an item that can repeat, it will only be used once." isSummary="true">
                                    <type value="base64Binary"/>
                                    <type value="boolean"/>
                                    <type value="canonical"/>
                                    <type value="code"/>
                                    <type value="date"/>
                                    <type value="dateTime"/>
                                    <type value="decimal"/>
                                    <type value="id"/>
                                    <type value="instant"/>
                                    <type value="integer"/>
                                    <type value="markdown"/>
                                    <type value="oid"/>
                                    <type value="positiveInt"/>
                                    <type value="string"/>
                                    <type value="time"/>
                                    <type value="unsignedInt"/>
                                    <type value="uri"/>
                                    <type value="url"/>
                                    <type value="uuid"/>
                                    <type value="Address"/>
                                    <type value="Age"/>
                                    <type value="Annotation"/>
                                    <type value="Attachment"/>
                                    <type value="CodeableConcept"/>
                                    <type value="Coding"/>
                                    <type value="ContactPoint"/>
                                    <type value="Count"/>
                                    <type value="Distance"/>
                                    <type value="Duration"/>
                                    <type value="HumanName"/>
                                    <type value="Identifier"/>
                                    <type value="Money"/>
                                    <type value="Period"/>
                                    <type value="Quantity"/>
                                    <type value="Range"/>
                                    <type value="Ratio"/>
                                    <type value="Reference"/>
                                    <type value="SampledData"/>
                                    <type value="Signature"/>
                                    <type value="Timing"/>
                                    <type value="ContactDetail"/>
                                    <type value="Contributor"/>
                                    <type value="DataRequirement"/>
                                    <type value="Expression"/>
                                    <type value="ParameterDefinition"/>
                                    <type value="RelatedArtifact"/>
                                    <type value="TriggerDefinition"/>
                                    <type value="UsageContext"/>
                                    <type value="Dosage"/>
                                    <type value="Meta"/>
                                </fhir>
                                <element name="defaultValueBase64Binary">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueBase64Binary">
                                        <type value="base64Binary"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueBoolean">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueBoolean">
                                        <type value="boolean"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueCanonical">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueCanonical">
                                        <type value="canonical"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueCode">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueCode">
                                        <type value="code"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDate">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDate">
                                        <type value="date"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDateTime">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDateTime">
                                        <type value="dateTime"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDecimal">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDecimal">
                                        <type value="decimal"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueId">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueId">
                                        <type value="id"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueInstant">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueInstant">
                                        <type value="instant"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueInteger">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueInteger">
                                        <type value="integer"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueMarkdown">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueMarkdown">
                                        <type value="markdown"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueOid">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueOid">
                                        <type value="oid"/>
                                    </fhir>
                                </element>
                                <element name="defaultValuePositiveInt">
                                    <fhir fid="StructureMap.group.rule.source.defaultValuePositiveInt">
                                        <type value="positiveInt"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueString">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueString">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueTime">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueTime">
                                        <type value="time"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueUnsignedInt">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueUnsignedInt">
                                        <type value="unsignedInt"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueUri">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueUri">
                                        <type value="uri"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueUrl">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueUrl">
                                        <type value="url"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueUuid">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueUuid">
                                        <type value="uuid"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueAddress">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueAddress">
                                        <type value="Address"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueAge">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueAge">
                                        <type value="Age"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueAnnotation">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueAnnotation">
                                        <type value="Annotation"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueAttachment">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueAttachment">
                                        <type value="Attachment"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueCodeableConcept">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueCodeableConcept">
                                        <type value="CodeableConcept"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueCoding">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueCoding">
                                        <type value="Coding"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueContactPoint">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueContactPoint">
                                        <type value="ContactPoint"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueCount">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueCount">
                                        <type value="Count"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDistance">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDistance">
                                        <type value="Distance"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDuration">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDuration">
                                        <type value="Duration"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueHumanName">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueHumanName">
                                        <type value="HumanName"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueIdentifier">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueIdentifier">
                                        <type value="Identifier"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueMoney">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueMoney">
                                        <type value="Money"/>
                                    </fhir>
                                </element>
                                <element name="defaultValuePeriod">
                                    <fhir fid="StructureMap.group.rule.source.defaultValuePeriod">
                                        <type value="Period"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueQuantity">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueQuantity">
                                        <type value="Quantity"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueRange">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueRange">
                                        <type value="Range"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueRatio">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueRatio">
                                        <type value="Ratio"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueReference">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueReference">
                                        <type value="Reference"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueSampledData">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueSampledData">
                                        <type value="SampledData"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueSignature">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueSignature">
                                        <type value="Signature"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueTiming">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueTiming">
                                        <type value="Timing"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueContactDetail">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueContactDetail">
                                        <type value="ContactDetail"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueContributor">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueContributor">
                                        <type value="Contributor"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDataRequirement">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDataRequirement">
                                        <type value="DataRequirement"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueExpression">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueExpression">
                                        <type value="Expression"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueParameterDefinition">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueParameterDefinition">
                                        <type value="ParameterDefinition"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueRelatedArtifact">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueRelatedArtifact">
                                        <type value="RelatedArtifact"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueTriggerDefinition">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueTriggerDefinition">
                                        <type value="TriggerDefinition"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueUsageContext">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueUsageContext">
                                        <type value="UsageContext"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueDosage">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueDosage">
                                        <type value="Dosage"/>
                                    </fhir>
                                </element>
                                <element name="defaultValueMeta">
                                    <fhir fid="StructureMap.group.rule.source.defaultValueMeta">
                                        <type value="Meta"/>
                                    </fhir>
                                </element>
                            </choice>
                            <element name="element" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Optional field for this source</desc>
                                <fhir fid="StructureMap.group.rule.source.element" definition="Optional field for this source." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="listMode" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">first | not_first | last | not_last | only_one</desc>
                                <fhir fid="StructureMap.group.rule.source.listMode" definition="How to handle the list mode for this element." isSummary="true">
                                    <type value="code"/>
                                    <binding displayName="StructureMapSourceListMode" strength="required" description="If field is a list, how to manage the source." valueSet="2.16.840.1.113883.4.642.3.683" canonicalUri="http://hl7.org/fhir/ValueSet/map-source-list-mode|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="variable" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Named context for field, if a field is specified</desc>
                                <fhir fid="StructureMap.group.rule.source.variable" definition="Named context for field, if a field is specified." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="condition" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">FHIRPath expression - must be true or the rule does not apply</desc>
                                <fhir fid="StructureMap.group.rule.source.condition" definition="FHIRPath expression  - must be true or the rule does not apply." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="check" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">FHIRPath expression - must be true or the mapping engine throws an error instead of completing</desc>
                                <fhir fid="StructureMap.group.rule.source.check" definition="FHIRPath expression  - must be true or the mapping engine throws an error instead of completing." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="logMessage" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Message to put in log if source exists (FHIRPath)</desc>
                                <fhir fid="StructureMap.group.rule.source.logMessage" definition="A FHIRPath expression which specifies a message to put in the transform log when content matching the source rule is found." comment="This is typically used for recording that something Is not transformed to the target for some reason." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Content to create because of this mapping rule</desc>
                            <fhir fid="StructureMap.group.rule.target" definition="Content to create because of this mapping rule." isSummary="true">
                                <type value="BackboneElement"/>
                                <constraint key="smp-2" severity="error" human="Must have a contextType if you have a context" expression="context.exists() implies contextType.exists()" xpath="not(f:context) or (f:contextType)" source=""/>
                                <constraint key="smp-1" severity="error" human="Can only have an element if you have a context" expression="element.exists() implies context.exists()" xpath="not(f:element) or (f:context)" source=""/>
                            </fhir>
                            <element name="context" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Type or variable this rule applies to</desc>
                                <fhir fid="StructureMap.group.rule.target.context" definition="Type or variable this rule applies to." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="contextType" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">type | variable</desc>
                                <fhir fid="StructureMap.group.rule.target.contextType" definition="How to interpret the context." isSummary="true">
                                    <type value="code"/>
                                    <binding displayName="StructureMapContextType" strength="required" description="How to interpret the context." valueSet="2.16.840.1.113883.4.642.3.679" canonicalUri="http://hl7.org/fhir/ValueSet/map-context-type|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="element" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Field to create in the context</desc>
                                <fhir fid="StructureMap.group.rule.target.element" definition="Field to create in the context." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="variable" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Named context for field, if desired, and a field is specified</desc>
                                <fhir fid="StructureMap.group.rule.target.variable" definition="Named context for field, if desired, and a field is specified." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="listMode" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">first | share | last | collate</desc>
                                <fhir fid="StructureMap.group.rule.target.listMode" definition="If field is a list, how to manage the list." isSummary="true">
                                    <type value="code"/>
                                    <binding displayName="StructureMapTargetListMode" strength="required" description="If field is a list, how to manage the production." valueSet="2.16.840.1.113883.4.642.3.685" canonicalUri="http://hl7.org/fhir/ValueSet/map-target-list-mode|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="listRuleId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Internal rule reference for shared list items</desc>
                                <fhir fid="StructureMap.group.rule.target.listRuleId" definition="Internal rule reference for shared list items." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="transform" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">create | copy +</desc>
                                <fhir fid="StructureMap.group.rule.target.transform" definition="How the data is copied / created." isSummary="true">
                                    <type value="code"/>
                                    <binding displayName="StructureMapTransform" strength="required" description="How data is copied/created." valueSet="2.16.840.1.113883.4.642.3.681" canonicalUri="http://hl7.org/fhir/ValueSet/map-transform|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Parameters to the transform</desc>
                                <fhir fid="StructureMap.group.rule.target.parameter" definition="Parameters to the transform." isSummary="true">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">Parameter value - variable or literal</desc>
                                    <fhir fid="StructureMap.group.rule.target.parameter.value[x]" definition="Parameter value - variable or literal." isSummary="true">
                                        <type value="id"/>
                                        <type value="string"/>
                                        <type value="boolean"/>
                                        <type value="integer"/>
                                        <type value="decimal"/>
                                    </fhir>
                                    <element name="valueId">
                                        <fhir fid="StructureMap.group.rule.target.parameter.valueId">
                                            <type value="id"/>
                                        </fhir>
                                    </element>
                                    <element name="valueString">
                                        <fhir fid="StructureMap.group.rule.target.parameter.valueString">
                                            <type value="string"/>
                                        </fhir>
                                    </element>
                                    <element name="valueBoolean">
                                        <fhir fid="StructureMap.group.rule.target.parameter.valueBoolean">
                                            <type value="boolean"/>
                                        </fhir>
                                    </element>
                                    <element name="valueInteger">
                                        <fhir fid="StructureMap.group.rule.target.parameter.valueInteger">
                                            <type value="integer"/>
                                        </fhir>
                                    </element>
                                    <element name="valueDecimal">
                                        <fhir fid="StructureMap.group.rule.target.parameter.valueDecimal">
                                            <type value="decimal"/>
                                        </fhir>
                                    </element>
                                </choice>
                            </element>
                        </element>
                        <element name="rule" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Rules contained in this rule</desc>
                            <fhir fid="StructureMap.group.rule.rule" definition="Rules contained in this rule." isSummary="true"/>
                        </element>
                        <element name="dependent" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Which other rules to apply in the context of this rule</desc>
                            <fhir fid="StructureMap.group.rule.dependent" definition="Which other rules to apply in the context of this rule." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Name of a rule or group to apply</desc>
                                <fhir fid="StructureMap.group.rule.dependent.name" definition="Name of a rule or group to apply." isSummary="true">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="variable" minimumMultiplicity="1" maximumMultiplicity="*">
                                <desc language="en-US">Variable to pass to the rule or group</desc>
                                <fhir fid="StructureMap.group.rule.dependent.variable" definition="Variable to pass to the rule or group." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Documentation for this instance of data</desc>
                            <fhir fid="StructureMap.group.rule.documentation" definition="Documentation for this instance of data.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.132" name="Subscription" displayName="Subscription" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Subscription">
            <desc language="en-US">The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate
                action.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Subscription" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Subscription" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Server push subscription criteria</desc>
                <fhir fid="Subscription"
                    definition="The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined &#34;channel&#34; so that another system can take an appropriate action.">
                    <mapping identity="rim" map="N/A"/>
                </fhir>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">requested | active | error | off</desc>
                    <fhir fid="Subscription.status" definition="The status of the subscription, which marks the server state for managing the subscription."
                        comment="A client can only submit subscription resources in the requested or off state. Only the server can  move a subscription from requested to active, and then to error. Either the server or the client can turn a subscription off.&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="SubscriptionStatus" strength="required" description="The status of a subscription." valueSet="2.16.840.1.113883.4.642.3.502" canonicalUri="http://hl7.org/fhir/ValueSet/subscription-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for source (e.g. troubleshooting)</desc>
                    <fhir fid="Subscription.contact" definition="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting." isSummary="true">
                        <type value="ContactPoint"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="end" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When to automatically delete the subscription</desc>
                    <fhir fid="Subscription.end" definition="The time for the server to turn the subscription off." comment="The server is permitted to deviate from this time but should observe it." isSummary="true">
                        <type value="instant"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                    </fhir>
                </element>
                <element name="reason" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Description of why this subscription was created</desc>
                    <fhir fid="Subscription.reason" definition="A description of why this subscription is defined." isSummary="true">
                        <type value="string"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                    </fhir>
                </element>
                <element name="criteria" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Rule for server push</desc>
                    <fhir fid="Subscription.criteria" definition="The rules that the server should use to determine when to generate notifications for this subscription." comment="The rules are search criteria (without the [base] part). Like Bundle.entry.request.url, it has no leading &#34;/&#34;." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="error" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Latest error note</desc>
                    <fhir fid="Subscription.error" definition="A record of the last error that occurred when the server processed a notification." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="channel" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The channel on which to report matches to the criteria</desc>
                    <fhir fid="Subscription.channel" definition="Details where to send notifications when resources are received that meet the criteria." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">rest-hook | websocket | email | sms | message</desc>
                        <fhir fid="Subscription.channel.type" definition="The type of channel to send notifications on." isSummary="true">
                            <type value="code"/>
                            <binding displayName="SubscriptionChannelType" strength="required" description="The type of method used to execute a subscription." valueSet="2.16.840.1.113883.4.642.3.500" canonicalUri="http://hl7.org/fhir/ValueSet/subscription-channel-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="endpoint" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Where the channel points to</desc>
                        <fhir fid="Subscription.channel.endpoint" definition="The url that describes the actual end-point to send messages to."
                            comment="For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs)."
                            isSummary="true">
                            <type value="url"/>
                        </fhir>
                    </element>
                    <element name="payload" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">MIME type to send, or omit for no payload</desc>
                        <fhir fid="Subscription.channel.payload" definition="The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type &#34;text/plain&#34; may also be used for Email and SMS subscriptions."
                            comment="Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured." isSummary="true">
                            <type value="code"/>
                            <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="header" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Usage depends on the channel type</desc>
                        <fhir fid="Subscription.channel.header" definition="Additional headers / information to send as part of the notification."
                            comment="Exactly what these mean depend on the channel type. They can convey additional information to the recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.133" name="Substance" displayName="Substance" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Substance">
            <desc language="en-US">A homogeneous material with a definite composition.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Substance" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="orim" uri="http://hl7.org/orim" name="Ontological RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="Substance" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A homogeneous material with a definite composition</desc>
                <fhir fid="Substance" definition="A homogeneous material with a definite composition.">
                    <mapping identity="rim" map="Material"/>
                    <mapping identity="orim" map="fhir:Substance rdfs:subClassOf   rim:Entity, [      a owl:Restriction;     owl:onProperty  rim:Act.classCode;     owl:allValuesFrom  cs:EntityClass\#MAT   ]."/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Unique identifier</desc>
                    <fhir fid="Substance.identifier" definition="Unique identifier for the substance." comment="This identifier is associated with the kind of substance in contrast to the  Substance.instance.identifier which is associated with the package/container." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">active | inactive | entered-in-error</desc>
                    <fhir fid="Substance.status" definition="A code to indicate if the substance is actively used." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="FHIRSubstanceStatus" strength="required" description="A code to indicate if the substance is actively used." valueSet="2.16.840.1.113883.4.642.3.474" canonicalUri="http://hl7.org/fhir/ValueSet/substance-status|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">What class/type of substance this is</desc>
                    <fhir fid="Substance.category" definition="A code that classifies the general type of substance.  This is used  for searching, sorting and display purposes." comment="The level of granularity is defined by the category concepts in the value set.   More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in Substance.code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Substance Category Codes" strength="extensible" description="Category or classification of substance." valueSet="2.16.840.1.113883.4.642.3.476" canonicalUri="http://hl7.org/fhir/ValueSet/substance-category"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">What substance this is</desc>
                    <fhir fid="Substance.code" definition="A code (or set of codes) that identify this substance." comment="This could be a reference to an externally defined code.  It could also be a locally assigned code (e.g. a formulary),  optionally with translations to the standard drug codes." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Substance Code" strength="example" description="Substance codes." valueSet="2.16.840.1.113883.4.642.3.473" canonicalUri="http://hl7.org/fhir/ValueSet/substance-code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code"/>
                        <mapping identity="orim" map="fhir:Substance.code rdfs:subPropertyOf rim:Entity.code"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Textual description of the substance, comments</desc>
                    <fhir fid="Substance.description" definition="A description of the substance - its appearance, handling requirements, and other usage notes." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".player.desc"/>
                    </fhir>
                </element>
                <element name="instance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">If this describes a specific package/container of the substance</desc>
                    <fhir fid="Substance.instance" definition="Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".player.determinerCode"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifier of the package/container</desc>
                        <fhir fid="Substance.instance.identifier" definition="Identifier associated with the package/container (usually a label affixed directly)." isSummary="true">
                            <type value="Identifier"/>
                            <mapping identity="rim" map=".id"/>
                        </fhir>
                    </element>
                    <element name="expiry" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When no longer valid to use</desc>
                        <fhir fid="Substance.instance.expiry" definition="When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry." isSummary="true">
                            <type value="dateTime"/>
                            <mapping identity="rim" map=".expiryTime"/>
                        </fhir>
                    </element>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount of substance in the package</desc>
                        <fhir fid="Substance.instance.quantity" definition="The amount of the substance." isSummary="true">
                            <type value="Quantity"/>
                            <mapping identity="rim" map=".player.quantity"/>
                        </fhir>
                    </element>
                </element>
                <element name="ingredient" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Composition information about the substance</desc>
                    <fhir fid="Substance.ingredient" definition="A substance can be composed of other substances." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".player.scopesRole[classCode=INGR]"/>
                    </fhir>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Optional amount (concentration)</desc>
                        <fhir fid="Substance.ingredient.quantity" definition="The amount of the ingredient in the substance - a concentration ratio." isSummary="true">
                            <type value="Ratio"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                    <choice name="substance[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A component of the substance</desc>
                        <fhir fid="Substance.ingredient.substance[x]" definition="Another substance that is a component of this substance." isSummary="true">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                            <binding displayName="Substance Code" strength="example" description="Substance Ingredient codes." valueSet="2.16.840.1.113883.4.642.3.473" canonicalUri="http://hl7.org/fhir/ValueSet/substance-code"/>
                            <mapping identity="rim" map=".player"/>
                        </fhir>
                        <element name="substanceCodeableConcept">
                            <fhir fid="Substance.ingredient.substanceCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="substanceReference">
                            <fhir fid="Substance.ingredient.substanceReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.134" name="SubstanceNucleicAcid" displayName="SubstanceNucleicAcid" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstanceNucleicAcid">
            <desc language="en-US">Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstanceNucleicAcid" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstanceNucleicAcid" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction</desc>
                <fhir fid="SubstanceNucleicAcid" definition="Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction."/>
                <element name="sequenceType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The type of the sequence shall be specified based on a controlled vocabulary</desc>
                    <fhir fid="SubstanceNucleicAcid.sequenceType" definition="The type of the sequence shall be specified based on a controlled vocabulary." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="numberOfSubunits" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit</desc>
                    <fhir fid="SubstanceNucleicAcid.numberOfSubunits" definition="The number of linear sequences of nucleotides linked through phosphodiester bonds shall be described. Subunits would be strands of nucleic acids that are tightly associated typically through Watson-Crick base pairing. NOTE: If not specified in the reference source, the assumption is that there is 1 subunit."
                        isSummary="true">
                        <type value="integer"/>
                    </fhir>
                </element>
                <element name="areaOfHybridisation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”</desc>
                    <fhir fid="SubstanceNucleicAcid.areaOfHybridisation" definition="The area of hybridisation shall be described if applicable for double stranded RNA or DNA. The number associated with the subunit followed by the number associated to the residue shall be specified in increasing order. The underscore “” shall be used as separator as follows: “Subunitnumber Residue”."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="oligoNucleotideType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">(TBC)</desc>
                    <fhir fid="SubstanceNucleicAcid.oligoNucleotideType" definition="(TBC)." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="subunit" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times</desc>
                    <fhir fid="SubstanceNucleicAcid.subunit" definition="Subunits are listed in order of decreasing length; sequences of the same length will be ordered by molecular weight; subunits that have identical sequences will be repeated multiple times." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="subunit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.subunit" definition="Index of linear sequences of nucleic acids in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="sequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.sequence" definition="Actual nucleotide sequence notation from 5' to 3' end using standard single letter codes. In addition to the base sequence, sugar and type of phosphate or non-phosphate linkage should also be captured." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="length" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The length of the sequence shall be captured</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.length" definition="The length of the sequence shall be captured." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="sequenceAttachment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">(TBC)</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.sequenceAttachment" definition="(TBC)." isSummary="true">
                            <type value="Attachment"/>
                        </fhir>
                    </element>
                    <element name="fivePrime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.fivePrime" definition="The nucleotide present at the 5’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the first position in the sequence. A separate representation would be redundant." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="threePrime" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.threePrime" definition="The nucleotide present at the 3’ terminal shall be specified based on a controlled vocabulary. Since the sequence is represented from the 5' to the 3' end, the 5’ prime nucleotide is the letter at the last position in the sequence. A separate representation would be redundant." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="linkage" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The linkages between sugar residues will also be captured</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.linkage" definition="The linkages between sugar residues will also be captured." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="connectivity" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be
                                specified</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.linkage.connectivity"
                                definition="The entity that links the sugar residues together should also be captured for nearly all naturally occurring nucleic acid the linkage is a phosphate group. For many synthetic oligonucleotides phosphorothioate linkages are often seen. Linkage connectivity is assumed to be 3’-5’. If the linkage is either 3’-3’ or 5’-5’ this should be specified."
                                isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Each linkage will be registered as a fragment and have an ID</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.linkage.identifier" definition="Each linkage will be registered as a fragment and have an ID." isSummary="true">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.linkage.name" definition="Each linkage will be registered as a fragment and have at least one name. A single name shall be assigned to each linkage." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="residueSite" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Residues shall be captured as described in 5.3.6.8.3</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.linkage.residueSite" definition="Residues shall be captured as described in 5.3.6.8.3." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="sugar" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">5.3.6.8.1 Sugar ID (Mandatory)</desc>
                        <fhir fid="SubstanceNucleicAcid.subunit.sugar" definition="5.3.6.8.1 Sugar ID (Mandatory)." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The Substance ID of the sugar or sugar-like component that make up the nucleotide</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.sugar.identifier" definition="The Substance ID of the sugar or sugar-like component that make up the nucleotide." isSummary="true">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The name of the sugar or sugar-like component that make up the nucleotide</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.sugar.name" definition="The name of the sugar or sugar-like component that make up the nucleotide." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="residueSite" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above</desc>
                            <fhir fid="SubstanceNucleicAcid.subunit.sugar.residueSite" definition="The residues that contain a given sugar will be captured. The order of given residues will be captured in the 5‘-3‘direction consistent with the base sequences listed above." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.135" name="SubstancePolymer" displayName="SubstancePolymer" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstancePolymer">
            <desc language="en-US">Todo.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstancePolymer" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstancePolymer" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Todo</desc>
                <fhir fid="SubstancePolymer" definition="Todo."/>
                <element name="class" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.class" definition="Todo." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="geometry" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.geometry" definition="Todo." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="copolymerConnectivity" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.copolymerConnectivity" definition="Todo." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="modification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.modification" definition="Todo." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="monomerSet" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.monomerSet" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="ratioType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.monomerSet.ratioType" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="startingMaterial" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.monomerSet.startingMaterial" definition="Todo." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="material" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.monomerSet.startingMaterial.material" definition="Todo." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.monomerSet.startingMaterial.type" definition="Todo." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="isDefining" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.monomerSet.startingMaterial.isDefining" definition="Todo." isSummary="true">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.monomerSet.startingMaterial.amount" definition="Todo." isSummary="true">
                                <type value="SubstanceAmount"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="repeat" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstancePolymer.repeat" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="numberOfUnits" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.repeat.numberOfUnits" definition="Todo." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="averageMolecularFormula" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.repeat.averageMolecularFormula" definition="Todo." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="repeatUnitAmountType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.repeat.repeatUnitAmountType" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="repeatUnit" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstancePolymer.repeat.repeatUnit" definition="Todo." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="orientationOfPolymerisation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.repeat.repeatUnit.orientationOfPolymerisation" definition="Todo." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="repeatUnit" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.repeat.repeatUnit.repeatUnit" definition="Todo." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.repeat.repeatUnit.amount" definition="Todo." isSummary="true">
                                <type value="SubstanceAmount"/>
                            </fhir>
                        </element>
                        <element name="degreeOfPolymerisation" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.repeat.repeatUnit.degreeOfPolymerisation" definition="Todo." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="degree" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Todo</desc>
                                <fhir fid="SubstancePolymer.repeat.repeatUnit.degreeOfPolymerisation.degree" definition="Todo." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Todo</desc>
                                <fhir fid="SubstancePolymer.repeat.repeatUnit.degreeOfPolymerisation.amount" definition="Todo." isSummary="true">
                                    <type value="SubstanceAmount"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="structuralRepresentation" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Todo</desc>
                            <fhir fid="SubstancePolymer.repeat.repeatUnit.structuralRepresentation" definition="Todo." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Todo</desc>
                                <fhir fid="SubstancePolymer.repeat.repeatUnit.structuralRepresentation.type" definition="Todo." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="representation" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Todo</desc>
                                <fhir fid="SubstancePolymer.repeat.repeatUnit.structuralRepresentation.representation" definition="Todo." isSummary="true">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="attachment" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Todo</desc>
                                <fhir fid="SubstancePolymer.repeat.repeatUnit.structuralRepresentation.attachment" definition="Todo." isSummary="true">
                                    <type value="Attachment"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.136" name="SubstanceProtein" displayName="SubstanceProtein" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstanceProtein">
            <desc language="en-US">A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements
                will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstanceProtein" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstanceProtein" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements
                    will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators</desc>
                <fhir fid="SubstanceProtein"
                    definition="A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators."/>
                <element name="sequenceType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence</desc>
                    <fhir fid="SubstanceProtein.sequenceType" definition="The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="numberOfSubunits" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable</desc>
                    <fhir fid="SubstanceProtein.numberOfSubunits" definition="Number of linear sequences of amino acids linked through peptide bonds. The number of subunits constituting the SubstanceProtein shall be described. It is possible that the number of subunits can be variable." isSummary="true">
                        <type value="integer"/>
                    </fhir>
                </element>
                <element name="disulfideLinkage" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions
                        shall actually contain the amino acid Cysteine at the respective positions</desc>
                    <fhir fid="SubstanceProtein.disulfideLinkage"
                        definition="The disulphide bond between two cysteine residues either on the same subunit or on two different subunits shall be described. The position of the disulfide bonds in the SubstanceProtein shall be listed in increasing order of subunit number and position within subunit followed by the abbreviation of the amino acids involved. The disulfide linkage positions shall actually contain the amino acid Cysteine at the respective positions."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="subunit" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence.
                        Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times</desc>
                    <fhir fid="SubstanceProtein.subunit"
                        definition="This subclause refers to the description of each subunit constituting the SubstanceProtein. A subunit is a linear sequence of amino acids linked through peptide bonds. The Subunit information shall be provided when the finished SubstanceProtein is a complex of multiple sequences; subunits are not used to delineate domains within a single sequence. Subunits are listed in order of decreasing length; sequences of the same length will be ordered by decreasing molecular weight; subunits that have identical sequences will be repeated multiple times."
                        isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="subunit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts</desc>
                        <fhir fid="SubstanceProtein.subunit.subunit" definition="Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="sequence" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids
                            that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence</desc>
                        <fhir fid="SubstanceProtein.subunit.sequence"
                            definition="The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence."
                            isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="length" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Length of linear sequences of amino acids contained in the subunit</desc>
                        <fhir fid="SubstanceProtein.subunit.length" definition="Length of linear sequences of amino acids contained in the subunit." isSummary="true">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="sequenceAttachment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids
                            that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence</desc>
                        <fhir fid="SubstanceProtein.subunit.sequenceAttachment"
                            definition="The sequence information shall be provided enumerating the amino acids from N- to C-terminal end using standard single-letter amino acid codes. Uppercase shall be used for L-amino acids and lowercase for D-amino acids. Transcribed SubstanceProteins will always be described using the translated sequence; for synthetic peptide containing amino acids that are not represented with a single letter code an X should be used within the sequence. The modified amino acids will be distinguished by their position in the sequence."
                            isSummary="true">
                            <type value="Attachment"/>
                        </fhir>
                    </element>
                    <element name="nTerminalModificationId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID</desc>
                        <fhir fid="SubstanceProtein.subunit.nTerminalModificationId" definition="Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="nTerminalModification" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified</desc>
                        <fhir fid="SubstanceProtein.subunit.nTerminalModification" definition="The name of the fragment modified at the N-terminal of the SubstanceProtein shall be specified." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="cTerminalModificationId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID</desc>
                        <fhir fid="SubstanceProtein.subunit.cTerminalModificationId" definition="Unique identifier for molecular fragment modification based on the ISO 11238 Substance ID." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="cTerminalModification" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The modification at the C-terminal shall be specified</desc>
                        <fhir fid="SubstanceProtein.subunit.cTerminalModification" definition="The modification at the C-terminal shall be specified." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.137" name="SubstanceReferenceInformation" displayName="SubstanceReferenceInformation" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstanceReferenceInformation">
            <desc language="en-US">Todo.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstanceReferenceInformation" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstanceReferenceInformation" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Todo</desc>
                <fhir fid="SubstanceReferenceInformation" definition="Todo."/>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstanceReferenceInformation.comment" definition="Todo." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="gene" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstanceReferenceInformation.gene" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="geneSequenceOrigin" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.gene.geneSequenceOrigin" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="gene" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.gene.gene" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.gene.source" definition="Todo." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="geneElement" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstanceReferenceInformation.geneElement" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.geneElement.type" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="element" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.geneElement.element" definition="Todo." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.geneElement.source" definition="Todo." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="classification" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstanceReferenceInformation.classification" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="domain" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.classification.domain" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="classification" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.classification.classification" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="subtype" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.classification.subtype" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.classification.source" definition="Todo." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Todo</desc>
                    <fhir fid="SubstanceReferenceInformation.target" definition="Todo." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="target" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.target" definition="Todo." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.type" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="interaction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.interaction" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="organism" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.organism" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="organismType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.organismType" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <choice name="amount[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.amount[x]" definition="Todo." isSummary="true">
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="string"/>
                        </fhir>
                        <element name="amountQuantity">
                            <fhir fid="SubstanceReferenceInformation.target.amountQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="amountRange">
                            <fhir fid="SubstanceReferenceInformation.target.amountRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="amountString">
                            <fhir fid="SubstanceReferenceInformation.target.amountString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="amountType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.amountType" definition="Todo." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Todo</desc>
                        <fhir fid="SubstanceReferenceInformation.target.source" definition="Todo." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.138" name="SubstanceSourceMaterial" displayName="SubstanceSourceMaterial" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstanceSourceMaterial">
            <desc language="en-US">Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary
                as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance
                information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstanceSourceMaterial" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstanceSourceMaterial" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled
                    vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at
                    the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex</desc>
                <fhir fid="SubstanceSourceMaterial"
                    definition="Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex."/>
                <element name="sourceMaterialClass" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">General high level classification of the source material specific to the origin of the material</desc>
                    <fhir fid="SubstanceSourceMaterial.sourceMaterialClass" definition="General high level classification of the source material specific to the origin of the material." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="sourceMaterialType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent</desc>
                    <fhir fid="SubstanceSourceMaterial.sourceMaterialType" definition="The type of the source material shall be specified based on a controlled vocabulary. For vaccines, this subclause refers to the class of infectious agent." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="sourceMaterialState" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The state of the source material when extracted</desc>
                    <fhir fid="SubstanceSourceMaterial.sourceMaterialState" definition="The state of the source material when extracted." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="organismId" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The unique identifier associated with the source material parent organism shall be specified</desc>
                    <fhir fid="SubstanceSourceMaterial.organismId" definition="The unique identifier associated with the source material parent organism shall be specified." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="organismName" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The organism accepted Scientific name shall be provided based on the organism taxonomy</desc>
                    <fhir fid="SubstanceSourceMaterial.organismName" definition="The organism accepted Scientific name shall be provided based on the organism taxonomy." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="parentSubstanceId" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant)</desc>
                    <fhir fid="SubstanceSourceMaterial.parentSubstanceId" definition="The parent of the herbal drug Ginkgo biloba, Leaf is the substance ID of the substance (fresh) of Ginkgo biloba L. or Ginkgo biloba L. (Whole plant)." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="parentSubstanceName" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The parent substance of the Herbal Drug, or Herbal preparation</desc>
                    <fhir fid="SubstanceSourceMaterial.parentSubstanceName" definition="The parent substance of the Herbal Drug, or Herbal preparation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="countryOfOrigin" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate</desc>
                    <fhir fid="SubstanceSourceMaterial.countryOfOrigin"
                        definition="The country where the plant material is harvested or the countries where the plasma is sourced from as laid down in accordance with the Plasma Master File. For “Plasma-derived substances” the attribute country of origin provides information about the countries used for the manufacturing of the Cryopoor plama or Crioprecipitate." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="geographicalLocation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The place/region where the plant is harvested or the places/regions where the animal source material has its habitat</desc>
                    <fhir fid="SubstanceSourceMaterial.geographicalLocation" definition="The place/region where the plant is harvested or the places/regions where the animal source material has its habitat." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="developmentStage" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum)</desc>
                    <fhir fid="SubstanceSourceMaterial.developmentStage" definition="Stage of life for animals, plants, insects and microorganisms. This information shall be provided only when the substance is significantly different in these stages (e.g. foetal bovine serum)." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="fractionDescription" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts,
                        such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels</desc>
                    <fhir fid="SubstanceSourceMaterial.fractionDescription"
                        definition="Many complex materials are fractions of parts of plants, animals, or minerals. Fraction elements are often necessary to define both Substances and Specified Group 1 Substances. For substances derived from Plants, fraction information will be captured at the Substance information level ( . Oils, Juices and Exudates). Additional information for Extracts, such as extraction solvent composition, will be captured at the Specified Substance Group 1 information level. For plasma-derived products fraction information will be captured at the Substance and the Specified Substance Group 1 levels."
                        isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="fraction" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">This element is capturing information about the fraction of a plant part, or human plasma for fractionation</desc>
                        <fhir fid="SubstanceSourceMaterial.fractionDescription.fraction" definition="This element is capturing information about the fraction of a plant part, or human plasma for fractionation." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="materialType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1</desc>
                        <fhir fid="SubstanceSourceMaterial.fractionDescription.materialType" definition="The specific type of the material constituting the component. For Herbal preparations the particulars of the extracts (liquid/dry) is described in Specified Substance Group 1." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
                <element name="organism" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf</desc>
                    <fhir fid="SubstanceSourceMaterial.organism" definition="This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., Leaf." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="family" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The family of an organism shall be specified</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.family" definition="The family of an organism shall be specified." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="genus" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.genus" definition="The genus of an organism shall be specified; refers to the Latin epithet of the genus element of the plant/animal scientific name; it is present in names for genera, species and infraspecies." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="species" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.species" definition="The species of an organism shall be specified; refers to the Latin epithet of the species of the plant/animal; it is present in names for species and infraspecies." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="intraspecificType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The Intraspecific type of an organism shall be specified</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.intraspecificType" definition="The Intraspecific type of an organism shall be specified." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="intraspecificDescription" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.intraspecificDescription" definition="The intraspecific description of an organism shall be specified based on a controlled vocabulary. For Influenza Vaccine, the intraspecific description shall contain the syntax of the antigen in line with the WHO convention." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="author" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">4.9.13.6.1 Author type (Conditional)</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.author" definition="4.9.13.6.1 Author type (Conditional)." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="authorType" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.author.authorType"
                                definition="The type of author of an organism species shall be specified. The parenthetical author of an organism species refers to the first author who published the plant/animal name (of any rank). The primary author of an organism species refers to the first author(s), who validly published the plant/animal name." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="authorDescription" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank)</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.author.authorDescription" definition="The author of an organism species shall be specified. The author year of an organism shall also be specified when applicable; refers to the year in which the first author(s) published the infraspecific plant/animal name (of any rank)." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="hybrid" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">4.9.13.8.1 Hybrid species maternal organism ID (Optional)</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.hybrid" definition="4.9.13.8.1 Hybrid species maternal organism ID (Optional)." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="maternalOrganismId" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.hybrid.maternalOrganismId" definition="The identifier of the maternal species constituting the hybrid organism shall be specified based on a controlled vocabulary. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="maternalOrganismName" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.hybrid.maternalOrganismName" definition="The name of the maternal species constituting the hybrid organism shall be specified. For plants, the parents aren’t always known, and it is unlikely that it will be known which is maternal and which is paternal." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="paternalOrganismId" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.hybrid.paternalOrganismId" definition="The identifier of the paternal species constituting the hybrid organism shall be specified based on a controlled vocabulary." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="paternalOrganismName" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The name of the paternal species constituting the hybrid organism shall be specified</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.hybrid.paternalOrganismName" definition="The name of the paternal species constituting the hybrid organism shall be specified." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="hybridType" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The hybrid type of an organism shall be specified</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.hybrid.hybridType" definition="The hybrid type of an organism shall be specified." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="organismGeneral" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">4.9.13.7.1 Kingdom (Conditional)</desc>
                        <fhir fid="SubstanceSourceMaterial.organism.organismGeneral" definition="4.9.13.7.1 Kingdom (Conditional)." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="kingdom" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The kingdom of an organism shall be specified</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.organismGeneral.kingdom" definition="The kingdom of an organism shall be specified." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="phylum" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The phylum of an organism shall be specified</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.organismGeneral.phylum" definition="The phylum of an organism shall be specified." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="class" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The class of an organism shall be specified</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.organismGeneral.class" definition="The class of an organism shall be specified." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="order" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The order of an organism shall be specified,</desc>
                            <fhir fid="SubstanceSourceMaterial.organism.organismGeneral.order" definition="The order of an organism shall be specified,." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="partDescription" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">To do</desc>
                    <fhir fid="SubstanceSourceMaterial.partDescription" definition="To do." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="part" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Entity of anatomical origin of source material within an organism</desc>
                        <fhir fid="SubstanceSourceMaterial.partDescription.part" definition="Entity of anatomical origin of source material within an organism." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="partLocation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply</desc>
                        <fhir fid="SubstanceSourceMaterial.partDescription.partLocation" definition="The detailed anatomic location when the part can be extracted from different anatomical locations of the organism. Multiple alternative locations may apply." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.139" name="SubstanceSpecification" displayName="SubstanceSpecification" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification">
            <desc language="en-US">The detailed description of a substance, typically at a level beyond what is used for prescribing.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SubstanceSpecification" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="SubstanceSpecification" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">The detailed description of a substance, typically at a level beyond what is used for prescribing</desc>
                <fhir fid="SubstanceSpecification" definition="The detailed description of a substance, typically at a level beyond what is used for prescribing."/>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Identifier by which this substance is known</desc>
                    <fhir fid="SubstanceSpecification.identifier" definition="Identifier by which this substance is known." isSummary="true">
                        <type value="Identifier"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">High level categorization, e.g. polymer or nucleic acid</desc>
                    <fhir fid="SubstanceSpecification.type" definition="High level categorization, e.g. polymer or nucleic acid." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Status of substance within the catalogue e.g. approved</desc>
                    <fhir fid="SubstanceSpecification.status" definition="Status of substance within the catalogue e.g. approved." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="domain" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If the substance applies to only human or veterinary use</desc>
                    <fhir fid="SubstanceSpecification.domain" definition="If the substance applies to only human or veterinary use." isSummary="true">
                        <type value="CodeableConcept"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Textual description of the substance</desc>
                    <fhir fid="SubstanceSpecification.description" definition="Textual description of the substance." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Supporting literature</desc>
                    <fhir fid="SubstanceSpecification.source" definition="Supporting literature." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                    </fhir>
                </element>
                <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Textual comment about this record of a substance</desc>
                    <fhir fid="SubstanceSpecification.comment" definition="Textual comment about this record of a substance." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="moiety" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Moiety, for structural modifications</desc>
                    <fhir fid="SubstanceSpecification.moiety" definition="Moiety, for structural modifications." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="role" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Role that the moiety is playing</desc>
                        <fhir fid="SubstanceSpecification.moiety.role" definition="Role that the moiety is playing." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifier by which this moiety substance is known</desc>
                        <fhir fid="SubstanceSpecification.moiety.identifier" definition="Identifier by which this moiety substance is known." isSummary="true">
                            <type value="Identifier"/>
                        </fhir>
                    </element>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Textual name for this moiety substance</desc>
                        <fhir fid="SubstanceSpecification.moiety.name" definition="Textual name for this moiety substance." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="stereochemistry" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Stereochemistry type</desc>
                        <fhir fid="SubstanceSpecification.moiety.stereochemistry" definition="Stereochemistry type." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="opticalActivity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Optical activity type</desc>
                        <fhir fid="SubstanceSpecification.moiety.opticalActivity" definition="Optical activity type." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="molecularFormula" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Molecular formula</desc>
                        <fhir fid="SubstanceSpecification.moiety.molecularFormula" definition="Molecular formula." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="amount[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quantitative value for this moiety</desc>
                        <fhir fid="SubstanceSpecification.moiety.amount[x]" definition="Quantitative value for this moiety." isSummary="true">
                            <type value="Quantity"/>
                            <type value="string"/>
                        </fhir>
                        <element name="amountQuantity">
                            <fhir fid="SubstanceSpecification.moiety.amountQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="amountString">
                            <fhir fid="SubstanceSpecification.moiety.amountString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">General specifications for this substance, including how it is related to other substances</desc>
                    <fhir fid="SubstanceSpecification.property" definition="General specifications for this substance, including how it is related to other substances." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A category for this property, e.g. Physical, Chemical, Enzymatic</desc>
                        <fhir fid="SubstanceSpecification.property.category" definition="A category for this property, e.g. Physical, Chemical, Enzymatic." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Property type e.g. viscosity, pH, isoelectric point</desc>
                        <fhir fid="SubstanceSpecification.property.code" definition="Property type e.g. viscosity, pH, isoelectric point." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="parameters" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1)</desc>
                        <fhir fid="SubstanceSpecification.property.parameters" definition="Parameters that were used in the measurement of a property (e.g. for viscosity: measured at 20C with a pH of 7.1)." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <choice name="definingSubstance[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol)</desc>
                        <fhir fid="SubstanceSpecification.property.definingSubstance[x]" definition="A substance upon which a defining property depends (e.g. for solubility: in water, in alcohol)." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </type>
                            <type value="CodeableConcept"/>
                        </fhir>
                        <element name="definingSubstanceReference">
                            <fhir fid="SubstanceSpecification.property.definingSubstanceReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            </fhir>
                        </element>
                        <element name="definingSubstanceCodeableConcept">
                            <fhir fid="SubstanceSpecification.property.definingSubstanceCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </choice>
                    <choice name="amount[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Quantitative value for this property</desc>
                        <fhir fid="SubstanceSpecification.property.amount[x]" definition="Quantitative value for this property." isSummary="true">
                            <type value="Quantity"/>
                            <type value="string"/>
                        </fhir>
                        <element name="amountQuantity">
                            <fhir fid="SubstanceSpecification.property.amountQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="amountString">
                            <fhir fid="SubstanceSpecification.property.amountString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="referenceInformation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">General information detailing this substance</desc>
                    <fhir fid="SubstanceSpecification.referenceInformation" definition="General information detailing this substance." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceReferenceInformation"/>
                        </type>
                    </fhir>
                </element>
                <element name="structure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Structural information</desc>
                    <fhir fid="SubstanceSpecification.structure" definition="Structural information." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="stereochemistry" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Stereochemistry type</desc>
                        <fhir fid="SubstanceSpecification.structure.stereochemistry" definition="Stereochemistry type." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="opticalActivity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Optical activity type</desc>
                        <fhir fid="SubstanceSpecification.structure.opticalActivity" definition="Optical activity type." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="molecularFormula" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Molecular formula</desc>
                        <fhir fid="SubstanceSpecification.structure.molecularFormula" definition="Molecular formula." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="molecularFormulaByMoiety" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot</desc>
                        <fhir fid="SubstanceSpecification.structure.molecularFormulaByMoiety" definition="Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="isotope" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio</desc>
                        <fhir fid="SubstanceSpecification.structure.isotope" definition="Applicable for single substances that contain a radionuclide or a non-natural isotopic ratio." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Substance identifier for each non-natural or radioisotope</desc>
                            <fhir fid="SubstanceSpecification.structure.isotope.identifier" definition="Substance identifier for each non-natural or radioisotope." isSummary="true">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Substance name for each non-natural or radioisotope</desc>
                            <fhir fid="SubstanceSpecification.structure.isotope.name" definition="Substance name for each non-natural or radioisotope." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="substitution" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The type of isotopic substitution present in a single substance</desc>
                            <fhir fid="SubstanceSpecification.structure.isotope.substitution" definition="The type of isotopic substitution present in a single substance." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="halfLife" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Half life - for a non-natural nuclide</desc>
                            <fhir fid="SubstanceSpecification.structure.isotope.halfLife" definition="Half life - for a non-natural nuclide." isSummary="true">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="molecularWeight" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The molecular weight or weight range (for proteins, polymers or nucleic acids)</desc>
                            <fhir fid="SubstanceSpecification.structure.isotope.molecularWeight" definition="The molecular weight or weight range (for proteins, polymers or nucleic acids)." isSummary="true">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The method by which the molecular weight was determined</desc>
                                <fhir fid="SubstanceSpecification.structure.isotope.molecularWeight.method" definition="The method by which the molecular weight was determined." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Type of molecular weight such as exact, average (also known as. number average), weight average</desc>
                                <fhir fid="SubstanceSpecification.structure.isotope.molecularWeight.type" definition="Type of molecular weight such as exact, average (also known as. number average), weight average." isSummary="true">
                                    <type value="CodeableConcept"/>
                                </fhir>
                            </element>
                            <element name="amount" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field</desc>
                                <fhir fid="SubstanceSpecification.structure.isotope.molecularWeight.amount" definition="Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field." isSummary="true">
                                    <type value="Quantity"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                    <element name="molecularWeight" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The molecular weight or weight range (for proteins, polymers or nucleic acids)</desc>
                        <fhir fid="SubstanceSpecification.structure.molecularWeight" definition="The molecular weight or weight range (for proteins, polymers or nucleic acids)." isSummary="true"/>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting literature</desc>
                        <fhir fid="SubstanceSpecification.structure.source" definition="Supporting literature." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="representation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Molecular structural representation</desc>
                        <fhir fid="SubstanceSpecification.structure.representation" definition="Molecular structural representation." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The type of structure (e.g. Full, Partial, Representative)</desc>
                            <fhir fid="SubstanceSpecification.structure.representation.type" definition="The type of structure (e.g. Full, Partial, Representative)." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="representation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX</desc>
                            <fhir fid="SubstanceSpecification.structure.representation.representation" definition="The structural representation as text string in a format e.g. InChI, SMILES, MOLFILE, CDX." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="attachment" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">An attached file with the structural representation</desc>
                            <fhir fid="SubstanceSpecification.structure.representation.attachment" definition="An attached file with the structural representation." isSummary="true">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Codes associated with the substance</desc>
                    <fhir fid="SubstanceSpecification.code" definition="Codes associated with the substance." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The specific code</desc>
                        <fhir fid="SubstanceSpecification.code.code" definition="The specific code." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Status of the code assignment</desc>
                        <fhir fid="SubstanceSpecification.code.status" definition="Status of the code assignment." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="statusDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The date at which the code status is changed as part of the terminology maintenance</desc>
                        <fhir fid="SubstanceSpecification.code.statusDate" definition="The date at which the code status is changed as part of the terminology maintenance." isSummary="true">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="comment" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Any comment can be provided in this field, if necessary</desc>
                        <fhir fid="SubstanceSpecification.code.comment" definition="Any comment can be provided in this field, if necessary." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting literature</desc>
                        <fhir fid="SubstanceSpecification.code.source" definition="Supporting literature." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Names applicable to this substance</desc>
                    <fhir fid="SubstanceSpecification.name" definition="Names applicable to this substance." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The actual name</desc>
                        <fhir fid="SubstanceSpecification.name.name" definition="The actual name." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Name type</desc>
                        <fhir fid="SubstanceSpecification.name.type" definition="Name type." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The status of the name</desc>
                        <fhir fid="SubstanceSpecification.name.status" definition="The status of the name." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="preferred" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If this is the preferred name for this substance</desc>
                        <fhir fid="SubstanceSpecification.name.preferred" definition="If this is the preferred name for this substance." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="language" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Language of the name</desc>
                        <fhir fid="SubstanceSpecification.name.language" definition="Language of the name." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="domain" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive</desc>
                        <fhir fid="SubstanceSpecification.name.domain" definition="The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">The jurisdiction where this name applies</desc>
                        <fhir fid="SubstanceSpecification.name.jurisdiction" definition="The jurisdiction where this name applies." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="synonym" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A synonym of this name</desc>
                        <fhir fid="SubstanceSpecification.name.synonym" definition="A synonym of this name." isSummary="true"/>
                    </element>
                    <element name="translation" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">A translation for this name</desc>
                        <fhir fid="SubstanceSpecification.name.translation" definition="A translation for this name." isSummary="true"/>
                    </element>
                    <element name="official" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Details of the official nature of this name</desc>
                        <fhir fid="SubstanceSpecification.name.official" definition="Details of the official nature of this name." isSummary="true">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="authority" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Which authority uses this official name</desc>
                            <fhir fid="SubstanceSpecification.name.official.authority" definition="Which authority uses this official name." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The status of the official name</desc>
                            <fhir fid="SubstanceSpecification.name.official.status" definition="The status of the official name." isSummary="true">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Date of official name change</desc>
                            <fhir fid="SubstanceSpecification.name.official.date" definition="Date of official name change." isSummary="true">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting literature</desc>
                        <fhir fid="SubstanceSpecification.name.source" definition="Supporting literature." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="molecularWeight" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The molecular weight or weight range (for proteins, polymers or nucleic acids)</desc>
                    <fhir fid="SubstanceSpecification.molecularWeight" definition="The molecular weight or weight range (for proteins, polymers or nucleic acids)." isSummary="true"/>
                </element>
                <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A link between this substance and another, with details of the relationship</desc>
                    <fhir fid="SubstanceSpecification.relationship" definition="A link between this substance and another, with details of the relationship." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <choice name="substance[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A pointer to another substance, as a resource or just a representational code</desc>
                        <fhir fid="SubstanceSpecification.relationship.substance[x]" definition="A pointer to another substance, as a resource or just a representational code." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </type>
                            <type value="CodeableConcept"/>
                        </fhir>
                        <element name="substanceReference">
                            <fhir fid="SubstanceSpecification.relationship.substanceReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSpecification"/>
                            </fhir>
                        </element>
                        <element name="substanceCodeableConcept">
                            <fhir fid="SubstanceSpecification.relationship.substanceCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="relationship" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">For example "salt to parent", "active moiety", "starting material"</desc>
                        <fhir fid="SubstanceSpecification.relationship.relationship" definition="For example &#34;salt to parent&#34;, &#34;active moiety&#34;, &#34;starting material&#34;." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="isDefining" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships</desc>
                        <fhir fid="SubstanceSpecification.relationship.isDefining" definition="For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships." isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <choice name="amount[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other</desc>
                        <fhir fid="SubstanceSpecification.relationship.amount[x]" definition="A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other." isSummary="true">
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="Ratio"/>
                            <type value="string"/>
                        </fhir>
                        <element name="amountQuantity">
                            <fhir fid="SubstanceSpecification.relationship.amountQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="amountRange">
                            <fhir fid="SubstanceSpecification.relationship.amountRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="amountRatio">
                            <fhir fid="SubstanceSpecification.relationship.amountRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="amountString">
                            <fhir fid="SubstanceSpecification.relationship.amountString">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </choice>
                    <element name="amountRatioLowLimit" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">For use when the numeric</desc>
                        <fhir fid="SubstanceSpecification.relationship.amountRatioLowLimit" definition="For use when the numeric." isSummary="true">
                            <type value="Ratio"/>
                        </fhir>
                    </element>
                    <element name="amountType" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">An operator for the amount, for example "average", "approximately", "less than"</desc>
                        <fhir fid="SubstanceSpecification.relationship.amountType" definition="An operator for the amount, for example &#34;average&#34;, &#34;approximately&#34;, &#34;less than&#34;." isSummary="true">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="source" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supporting literature</desc>
                        <fhir fid="SubstanceSpecification.relationship.source" definition="Supporting literature." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="nucleicAcid" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Data items specific to nucleic acids</desc>
                    <fhir fid="SubstanceSpecification.nucleicAcid" definition="Data items specific to nucleic acids." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceNucleicAcid"/>
                        </type>
                    </fhir>
                </element>
                <element name="polymer" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Data items specific to polymers</desc>
                    <fhir fid="SubstanceSpecification.polymer" definition="Data items specific to polymers." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstancePolymer"/>
                        </type>
                    </fhir>
                </element>
                <element name="protein" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Data items specific to proteins</desc>
                    <fhir fid="SubstanceSpecification.protein" definition="Data items specific to proteins." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceProtein"/>
                        </type>
                    </fhir>
                </element>
                <element name="sourceMaterial" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Material or taxonomic/anatomical source for the substance</desc>
                    <fhir fid="SubstanceSpecification.sourceMaterial" definition="Material or taxonomic/anatomical source for the substance." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SubstanceSourceMaterial"/>
                        </type>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.140" name="SupplyDelivery" displayName="SupplyDelivery" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SupplyDelivery">
            <desc language="en-US">Record of delivery of what is supplied.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SupplyDelivery" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="SupplyDelivery" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Delivery of bulk Supplies</desc>
                <fhir fid="SupplyDelivery" definition="Record of delivery of what is supplied.">
                    <mapping identity="workflow" map="Event"/>
                    <mapping identity="rim" map="Supply[moodCode=RQO]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">External identifier</desc>
                    <fhir fid="SupplyDelivery.identifier" definition="Identifier for the supply delivery event that is used to identify it across multiple disparate systems." comment="This identifier is typically assigned by the dispenser, and may be used to reference the delivery when exchanging information about it with other systems.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Event.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fulfills plan, proposal or order</desc>
                    <fhir fid="SupplyDelivery.basedOn" definition="A plan, proposal or order that is fulfilled in whole or in part by this event." requirements="Allows tracing of authorization for the event and tracking whether proposals/recommendations were acted upon." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SupplyRequest"/>
                        </type>
                        <mapping identity="workflow" map="Event.basedOn"/>
                        <mapping identity="v2" map="ORC in proximity to EVN segment"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Part of referenced event</desc>
                    <fhir fid="SupplyDelivery.partOf" definition="A larger event of which this particular event is a component or step." comment="Not to be used to link an event to an Encounter - use Event.context for that.&#xD;&#xD;[The allowed reference resources may be adjusted as appropriate for the event resource]."
                        requirements="E.g. Drug administration as part of a procedure, procedure as part of observation, etc." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/SupplyDelivery"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Contract"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">in-progress | completed | abandoned | entered-in-error</desc>
                    <fhir fid="SupplyDelivery.status" definition="A code specifying the state of the dispense event." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="SupplyDeliveryStatus" strength="required" description="Status of the supply delivery." valueSet="2.16.840.1.113883.4.642.3.700" canonicalUri="http://hl7.org/fhir/ValueSet/supplydelivery-status|4.0.1"/>
                        <mapping identity="workflow" map="Event.status"/>
                        <mapping identity="rim" map=".statusCode, also existence of fulfillment events"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Patient for whom the item is supplied</desc>
                    <fhir fid="SupplyDelivery.patient" definition="A link to a resource representing the person whom the delivered item is for.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Event.subject"/>
                        <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                    </fhir>
                </element>
                <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Category of dispense event</desc>
                    <fhir fid="SupplyDelivery.type" definition="Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Supply Item Type" strength="required" description="The type of supply dispense." valueSet="2.16.840.1.113883.4.642.3.702" canonicalUri="http://hl7.org/fhir/ValueSet/supplydelivery-type|4.0.1"/>
                        <mapping identity="workflow" map="Event.code"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="suppliedItem" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The item that is delivered or supplied</desc>
                    <fhir fid="SupplyDelivery.suppliedItem" definition="The item that is being delivered or has been supplied.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map=".participation[typeCode=PRD].role"/>
                    </fhir>
                    <element name="quantity" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Amount dispensed</desc>
                        <fhir fid="SupplyDelivery.suppliedItem.quantity" definition="The amount of supply that has been dispensed. Includes unit of measure.">
                            <type value="Quantity"/>
                            <mapping identity="rim" map=".quantity"/>
                        </fhir>
                    </element>
                    <choice name="item[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Medication, Substance, or Device supplied</desc>
                        <fhir fid="SupplyDelivery.suppliedItem.item[x]" definition="Identifies the medication, substance or device being dispensed. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.">
                            <type value="CodeableConcept"/>
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </type>
                            <binding displayName="SNOMED CT Supply Item" strength="example" description="The item that was delivered." valueSet="2.16.840.1.113883.4.642.3.699" canonicalUri="http://hl7.org/fhir/ValueSet/supply-item"/>
                            <mapping identity="rim" map=".participation[typeCode=PRD].role"/>
                        </fhir>
                        <element name="itemCodeableConcept">
                            <fhir fid="SupplyDelivery.suppliedItem.itemCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="itemReference">
                            <fhir fid="SupplyDelivery.suppliedItem.itemReference">
                                <type value="Reference"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When event occurred</desc>
                    <fhir fid="SupplyDelivery.occurrence[x]" definition="The date or time(s) the activity occurred." comment="[The list of types may be constrained as appropriate for the type of event]." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="SupplyDelivery.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="SupplyDelivery.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurrenceTiming">
                        <fhir fid="SupplyDelivery.occurrenceTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                </choice>
                <element name="supplier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Dispenser</desc>
                    <fhir fid="SupplyDelivery.supplier" definition="The individual responsible for dispensing the medication, supplier or device.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer"/>
                        <mapping identity="rim" map=".participation[typeCode=PFM].role"/>
                    </fhir>
                </element>
                <element name="destination" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where the Supply was sent</desc>
                    <fhir fid="SupplyDelivery.destination" definition="Identification of the facility/location where the Supply was shipped to, as part of the dispense event.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=DST].role"/>
                    </fhir>
                </element>
                <element name="receiver" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who collected the Supply</desc>
                    <fhir fid="SupplyDelivery.receiver" definition="Identifies the person who picked up the Supply.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="rim" map=".participation[typeCode=RCV].role"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.141" name="SupplyRequest" displayName="SupplyRequest" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/SupplyRequest">
            <desc language="en-US">A record of a request for a medication, substance or device used in the healthcare setting.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="SupplyRequest" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="SupplyRequest" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Request for a medication, substance or device</desc>
                <fhir fid="SupplyRequest" definition="A record of a request for a medication, substance or device used in the healthcare setting.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="v2" map="ORC"/>
                    <mapping identity="rim" map="Act[moodCode&lt;=INT]"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for SupplyRequest</desc>
                    <fhir fid="SupplyRequest.identifier" definition="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server." comment="The identifier.type element is used to distinguish between the identifiers assigned by the requester/placer and the performer/filler."
                        requirements="Allows identification of the request as it is known by various participating systems and in a way that remains consistent across servers." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC.2, ORC.3"/>
                        <mapping identity="rim" map=".identifier"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | suspended +</desc>
                    <fhir fid="SupplyRequest.status" definition="Status of the supply request." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="SupplyRequestStatus" strength="required" description="Status of the supply request." valueSet="2.16.840.1.113883.4.642.3.695" canonicalUri="http://hl7.org/fhir/ValueSet/supplyrequest-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="v2" map="ORC.5"/>
                        <mapping identity="rim" map=".status"/>
                    </fhir>
                </element>
                <element name="category" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The kind of supply (central, non-stock, etc.)</desc>
                    <fhir fid="SupplyRequest.category" definition="Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Supply Type" strength="example" description="Category of supply request." valueSet="2.16.840.1.113883.4.642.3.693" canonicalUri="http://hl7.org/fhir/ValueSet/supplyrequest-kind"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="v2" map="N/A"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="SupplyRequest.priority" definition="Indicates how quickly this SupplyRequest should be addressed with respect to other requests." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="Identifies the level of importance to be assigned to actioning the request." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="v2" map="TQ1.9"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <choice name="item[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Medication, Substance, or Device requested to be supplied</desc>
                    <fhir fid="SupplyRequest.item[x]" definition="The item that is requested to be supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list."
                        comment="Note that there's a difference between a prescription - an instruction to take a medication, along with a (sometimes) implicit supply, and an explicit request to supply, with no explicit instructions." isSummary="true">
                        <type value="CodeableConcept"/>
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <binding displayName="SNOMED CT Supply Item" strength="example" description="The item that was requested." valueSet="2.16.840.1.113883.4.642.3.699" canonicalUri="http://hl7.org/fhir/ValueSet/supply-item"/>
                        <mapping identity="workflow" map="Request.code"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                    <element name="itemCodeableConcept">
                        <fhir fid="SupplyRequest.itemCodeableConcept">
                            <type value="CodeableConcept"/>
                        </fhir>
                    </element>
                    <element name="itemReference">
                        <fhir fid="SupplyRequest.itemReference">
                            <type value="Reference"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Medication"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Substance"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </fhir>
                    </element>
                </choice>
                <element name="quantity" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">The requested amount of the item indicated</desc>
                    <fhir fid="SupplyRequest.quantity" definition="The amount that is being ordered of the indicated item." isSummary="true">
                        <type value="Quantity"/>
                        <mapping identity="rim" map=".quantity"/>
                    </fhir>
                </element>
                <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Ordered item details</desc>
                    <fhir fid="SupplyRequest.parameter" definition="Specific parameters for the ordered item.  For example, the size of the indicated item.">
                        <type value="BackboneElement"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="v2" map="Varies by domain"/>
                    </fhir>
                    <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Item detail</desc>
                        <fhir fid="SupplyRequest.parameter.code" definition="A code or string that identifies the device detail being asserted.">
                            <type value="CodeableConcept"/>
                            <binding displayName="ParameterCode" strength="example" description="A code that identifies the device detail."/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Value of detail</desc>
                        <fhir fid="SupplyRequest.parameter.value[x]" definition="The value of the device detail." comment="Range means device should have a value that falls somewhere within the specified range.">
                            <type value="CodeableConcept"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="boolean"/>
                            <mapping identity="w5" map="FiveWs.what[x]"/>
                            <mapping identity="v2" map="Varies by domain"/>
                            <mapping identity="rim" map=".code"/>
                        </fhir>
                        <element name="valueCodeableConcept">
                            <fhir fid="SupplyRequest.parameter.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="SupplyRequest.parameter.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="SupplyRequest.parameter.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="SupplyRequest.parameter.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <choice name="occurrence[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the request should be fulfilled</desc>
                    <fhir fid="SupplyRequest.occurrence[x]" definition="When the request should be fulfilled." isSummary="true">
                        <type value="dateTime"/>
                        <type value="Period"/>
                        <type value="Timing"/>
                        <mapping identity="workflow" map="Request.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.planned"/>
                        <mapping identity="v2" map="Accompanying TQ1/TQ2 segments"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                    <element name="occurrenceDateTime">
                        <fhir fid="SupplyRequest.occurrenceDateTime">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="occurrencePeriod">
                        <fhir fid="SupplyRequest.occurrencePeriod">
                            <type value="Period"/>
                        </fhir>
                    </element>
                    <element name="occurrenceTiming">
                        <fhir fid="SupplyRequest.occurrenceTiming">
                            <type value="Timing"/>
                        </fhir>
                    </element>
                </choice>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the request was made</desc>
                    <fhir fid="SupplyRequest.authoredOn" definition="When the request was made." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="ORC.9"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Individual making the request</desc>
                    <fhir fid="SupplyRequest.requester" definition="The device, practitioner, etc. who initiated the request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="ORC.12"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="supplier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Who is intended to fulfill the request</desc>
                    <fhir fid="SupplyRequest.supplier" definition="Who is intended to fulfill the request." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                        </type>
                        <mapping identity="workflow" map="Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="v2" map="PRT"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The reason why the supply item was requested</desc>
                    <fhir fid="SupplyRequest.reasonCode" definition="The reason why the supply item was requested.">
                        <type value="CodeableConcept"/>
                        <binding displayName="SupplyRequestReason" strength="example" description="The reason why the supply item was requested." valueSet="2.16.840.1.113883.4.642.3.697" canonicalUri="http://hl7.org/fhir/ValueSet/supplyrequest-reason"/>
                        <mapping identity="workflow" map="Request.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The reason why the supply item was requested</desc>
                    <fhir fid="SupplyRequest.reasonReference" definition="The reason why the supply item was requested.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Condition"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Observation"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DiagnosticReport"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/DocumentReference"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="ORC.16"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="deliverFrom" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The origin of the supply</desc>
                    <fhir fid="SupplyRequest.deliverFrom" definition="Where the supply is expected to come from.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="v2" map="PRT"/>
                        <mapping identity="rim" map=".participation"/>
                    </fhir>
                </element>
                <element name="deliverTo" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The destination of the supply</desc>
                    <fhir fid="SupplyRequest.deliverTo" definition="Where the supply is destined to go.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="v2" map="PRT"/>
                        <mapping identity="rim" map=".participation"/>
                    </fhir>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.142" name="Task" displayName="Task" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/Task">
            <desc language="en-US">A task to be performed.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="Task" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="Task" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A task to be performed</desc>
                <fhir fid="Task" definition="A task to be performed.">
                    <mapping identity="workflow" map="Request, Event"/>
                    <mapping identity="rim" map="ControlAct[moodCode=INT]"/>
                    <constraint key="inv-1" severity="error" human="Last modified date must be greater than or equal to authored-on date." expression="lastModified.exists().not() or authoredOn.exists().not() or lastModified &gt;= authoredOn" xpath="not(exists(f:lastModified/@value)) or not(exists(f:authoredOn/@value)) or f:lastModified/@value &gt;= f:authoredOn/@value" source=""/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Task Instance Identifier</desc>
                    <fhir fid="Task.identifier" definition="The business identifier for this task.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier, Event.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map=".id"/>
                    </fhir>
                </element>
                <element name="instantiatesCanonical" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Formal definition of task</desc>
                    <fhir fid="Task.instantiatesCanonical" definition="The URL pointing to a *FHIR*-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task." requirements="Enables a formal definition of how he task is to be performed, enabling automation." isSummary="true">
                        <type value="canonical">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ActivityDefinition"/>
                        </type>
                        <mapping identity="workflow" map="Request.instantiatesCanonical, Event.instantiatesCanonical"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="instantiatesUri" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Formal definition of task</desc>
                    <fhir fid="Task.instantiatesUri" definition="The URL pointing to an *externally* maintained  protocol, guideline, orderset or other definition that is adhered to in whole or in part by this Task." requirements="Enables a formal definition of how he task is to be performed (e.g. using BPMN, BPEL, XPDL or other formal notation to be associated with a task), enabling automation."
                        isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Event.instantiatesUrl"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=DEFN].target"/>
                    </fhir>
                </element>
                <element name="basedOn" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Request fulfilled by this task</desc>
                    <fhir fid="Task.basedOn"
                        definition="BasedOn refers to a higher-level authorization that triggered the creation of the task.  It references a &#34;request&#34; resource such as a ServiceRequest, MedicationRequest, ServiceRequest, CarePlan, etc. which is distinct from the &#34;request&#34; resource the task is seeking to fulfill.  This latter resource is referenced by FocusOn.  For example, based on a ServiceRequest (= BasedOn), a task is created to fulfill a procedureRequest ( = FocusOn ) to collect a specimen from a patient."
                        isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.basedOn, Event.basedOn"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=FLFS].target[moodCode=INT]"/>
                    </fhir>
                </element>
                <element name="groupIdentifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Requisition or grouper id</desc>
                    <fhir fid="Task.groupIdentifier" definition="An identifier that links together multiple tasks and other requests that were created in the same context." requirements="Billing and/or reporting can be linked to whether multiple requests were created as a single unit." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.groupIdentifier"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=INT].id"/>
                    </fhir>
                </element>
                <element name="partOf" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Composite task</desc>
                    <fhir fid="Task.partOf" definition="Task that this particular task is part of." comment="This should usually be 0..1." requirements="Allows tasks to be broken down into sub-steps (and this division can occur independent of the original task)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Task"/>
                        </type>
                        <mapping identity="workflow" map="Event.partOf"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[moodCode=INT]"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | requested | received | accepted | +</desc>
                    <fhir fid="Task.status" definition="The current status of the task." requirements="These states enable coordination of task status with off-the-shelf workflow solutions that support automation of tasks." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="TaskStatus" strength="required" description="The current status of the task." valueSet="2.16.840.1.113883.4.642.3.790" canonicalUri="http://hl7.org/fhir/ValueSet/task-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status, Event.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map=".statusCode"/>
                    </fhir>
                </element>
                <element name="statusReason" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Reason for current status</desc>
                    <fhir fid="Task.statusReason" definition="An explanation as to why this task is held, failed, was refused, etc." comment="This applies to the current status.  Look at the history of the task to see reasons for past statuses." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="TaskStatusReason" strength="example" description="Codes to identify the reason for current status.  These will typically be specific to a particular workflow."/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN, code=&#34;status change&#34;].reasonCode"/>
                    </fhir>
                </element>
                <element name="businessStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">E.g. "Specimen collected", "IV prepped"</desc>
                    <fhir fid="Task.businessStatus" definition="Contains business-specific nuances of the business state." requirements="There's often a need to track substates of a task - this is often variable by specific workflow implementation." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="TaskBusinessStatus" strength="example" description="The domain-specific business-contextual sub-state of the task.  For example: &#34;Blood drawn&#34;, &#34;IV inserted&#34;, &#34;Awaiting physician signature&#34;, etc."/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=&#34;business status&#34;]"/>
                    </fhir>
                </element>
                <element name="intent" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option</desc>
                    <fhir fid="Task.intent" definition="Indicates the &#34;level&#34; of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc." comment="This element is immutable.  Proposed tasks, planned tasks, etc. must be distinct instances.&#xA;&#xA;In most cases, Tasks will have an intent of &#34;order&#34;." isSummary="true">
                        <type value="code"/>
                        <binding displayName="TaskIntent" strength="required" description="Distinguishes whether the task is a proposal, plan or full order." valueSet="2.16.840.1.113883.4.642.3.1240" canonicalUri="http://hl7.org/fhir/ValueSet/task-intent|4.0.1"/>
                        <mapping identity="workflow" map="Request.intent"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                        <mapping identity="rim" map=".moodCode"/>
                    </fhir>
                </element>
                <element name="priority" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">routine | urgent | asap | stat</desc>
                    <fhir fid="Task.priority" definition="Indicates how quickly the Task should be addressed with respect to other requests." requirements="Used to identify the service level expected while performing a task.">
                        <type value="code"/>
                        <binding displayName="Request priority" strength="required" description="The task's priority." valueSet="2.16.840.1.113883.4.642.3.115" canonicalUri="http://hl7.org/fhir/ValueSet/request-priority|4.0.1"/>
                        <mapping identity="workflow" map="Request.priority"/>
                        <mapping identity="w5" map="FiveWs.grade"/>
                        <mapping identity="rim" map=".priorityCode"/>
                    </fhir>
                </element>
                <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Task Type</desc>
                    <fhir fid="Task.code" definition="A name or code (or both) briefly describing what the task involves." comment="The title (eg &#34;My Tasks&#34;, &#34;Outstanding Tasks for Patient X&#34;) should go into the code." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Task Codes" strength="example" description="Codes to identify what the task involves.  These will typically be specific to a particular workflow." valueSet="2.16.840.1.113883.4.642.3.1396" canonicalUri="http://hl7.org/fhir/ValueSet/task-code"/>
                        <mapping identity="workflow" map="Request.code, Event.code"/>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".code"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Human-readable explanation of task</desc>
                    <fhir fid="Task.description" definition="A free-text description of what is to be performed." isSummary="true">
                        <type value="string"/>
                        <mapping identity="rim" map=".text"/>
                    </fhir>
                </element>
                <element name="focus" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">What task is acting on</desc>
                    <fhir fid="Task.focus" definition="The request being actioned or the resource being manipulated by this task." comment="If multiple resources need to be manipulated, use sub-tasks.  (This ensures that status can be tracked independently for each referenced resource.)." requirements="Used to identify the thing to be done." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="w5" map="FiveWs.what[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=SUBJ].target"/>
                    </fhir>
                </element>
                <element name="for" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Beneficiary of the Task</desc>
                    <fhir fid="Task.for" definition="The entity who benefits from the performance of the service specified in the task (e.g., the patient)." requirements="Used to track tasks outstanding for a beneficiary.  Do not use to track the task owner or creator (see owner and creator respectively).  This can also affect access control." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject, Event.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=RCT].role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Healthcare event during which this task originated</desc>
                    <fhir fid="Task.encounter" definition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this task was created." requirements="For some tasks it may be important to know the link between the encounter the task originated within." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.context, Event.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=COMP].source[classCode=PCPR, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="executionPeriod" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Start and end time of execution</desc>
                    <fhir fid="Task.executionPeriod" definition="Identifies the time action was first taken against the task (start) and/or the time final action was taken against the task prior to marking it as completed (end)." isSummary="true">
                        <type value="Period"/>
                        <mapping identity="workflow" map="Event.occurrence[x]"/>
                        <mapping identity="w5" map="FiveWs.done[x]"/>
                        <mapping identity="rim" map=".effectiveTime"/>
                    </fhir>
                </element>
                <element name="authoredOn" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Task Creation Date</desc>
                    <fhir fid="Task.authoredOn" definition="The date and time this task was created." requirements="Most often used along with lastUpdated to track duration of task to supporting monitoring and management.">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].time"/>
                    </fhir>
                </element>
                <element name="lastModified" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Task Last Modified Date</desc>
                    <fhir fid="Task.lastModified" definition="The date and time of last modification to this task." requirements="Used along with history to track task activity and time in a particular task state.  This enables monitoring and management." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ, ].source[classCode=CACT, moodCode=EVN].effectiveTime"/>
                    </fhir>
                </element>
                <element name="requester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Who is asking for task to be done</desc>
                    <fhir fid="Task.requester" definition="The creator of the task." requirements="Identifies who created this task.  May be used by access control mechanisms (e.g., to ensure that only the creator can cancel a task)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="rim" map=".participation[typeCode=AUT].role"/>
                    </fhir>
                </element>
                <element name="performerType" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Requested performer</desc>
                    <fhir fid="Task.performerType" definition="The kind of participant that should perform the task." requirements="Use to distinguish tasks on different activity queues.">
                        <type value="CodeableConcept"/>
                        <binding displayName="Procedure Performer Role Codes" strength="preferred" description="The type(s) of task performers allowed." valueSet="2.16.840.1.113883.4.642.3.433" canonicalUri="http://hl7.org/fhir/ValueSet/performer-role"/>
                        <mapping identity="workflow" map="Event.performer.role, Request.performerType"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role.code"/>
                    </fhir>
                </element>
                <element name="owner" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Responsible individual</desc>
                    <fhir fid="Task.owner" definition="Individual organization or Device currently responsible for task execution." comment="Tasks may be created with an owner not yet identified." requirements="Identifies who is expected to perform this task." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CareTeam"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Device"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                        </type>
                        <mapping identity="workflow" map="Event.performer.actor, Request.performer"/>
                        <mapping identity="w5" map="FiveWs.actor"/>
                        <mapping identity="rim" map=".participation[typeCode=PRF].role"/>
                    </fhir>
                </element>
                <element name="location" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Where task occurs</desc>
                    <fhir fid="Task.location" definition="Principal physical location where the this task is performed." requirements="Ties the event to where the records are likely kept and provides context around the event occurrence (e.g. if it occurred inside or outside a dedicated healthcare setting)." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Location"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonCode, Event.reasonCode"/>
                        <mapping identity="w5" map="FiveWs.where[x]"/>
                        <mapping identity="rim" map=".participation[typeCode=LOC].role"/>
                    </fhir>
                </element>
                <element name="reasonCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why task is needed</desc>
                    <fhir fid="Task.reasonCode" definition="A description or code indicating why this task needs to be performed." comment="This should only be included if there is no focus or if it differs from the reason indicated on the focus.">
                        <type value="CodeableConcept"/>
                        <binding displayName="TaskReason" strength="example" description="Indicates why the task is needed.  E.g. Suspended because patient admitted to hospital."/>
                        <mapping identity="workflow" map="Event.location"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="v2" map="EVN.7"/>
                        <mapping identity="rim" map=".reasonCode"/>
                    </fhir>
                </element>
                <element name="reasonReference" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why task is needed</desc>
                    <fhir fid="Task.reasonReference" definition="A resource reference indicating why this task needs to be performed."
                        comment="Tasks might be justified based on an Observation, a Condition, a past or planned procedure, etc.   This should only be included if there is no focus or if it differs from the reason indicated on the focus.    Use the CodeableConcept text element in `Task.reasonCode` if the data is free (uncoded) text.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                        <mapping identity="workflow" map="Request.reasonReference, Event.reasonReference"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=RSON].target"/>
                    </fhir>
                </element>
                <element name="insurance" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Associated insurance coverage</desc>
                    <fhir fid="Task.insurance" definition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be relevant to the Task.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Coverage"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ClaimResponse"/>
                        </type>
                        <mapping identity="workflow" map="Request.insurance"/>
                        <mapping identity="v2" map="IN1/IN2"/>
                        <mapping identity="rim" map=".outboundRelationship[typeCode=COVBY].target"/>
                    </fhir>
                </element>
                <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Comments made about the task</desc>
                    <fhir fid="Task.note" definition="Free-text information captured about the task as it progresses.">
                        <type value="Annotation"/>
                        <mapping identity="workflow" map="Request.note, Event.note"/>
                        <mapping identity="rim" map=".inboundRelationship[typeCode=SUBJ, ].source[classCode=OBS, moodCode=EVN, code=&#34;annotation&#34;].value(string)"/>
                    </fhir>
                </element>
                <element name="relevantHistory" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Key events in history of the Task</desc>
                    <fhir fid="Task.relevantHistory" definition="Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task."
                        comment="This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed.  The Provenance for the current version can be retrieved with a _revinclude.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Provenance"/>
                        </type>
                        <mapping identity="workflow" map="Request.relevantHistory"/>
                        <mapping identity="rim" map=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"/>
                    </fhir>
                </element>
                <element name="restriction" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Constraints on fulfillment tasks</desc>
                    <fhir fid="Task.restriction" definition="If the Task.focus is a request resource and the task is seeking fulfillment (i.e. is asking for the request to be actioned), this element identifies any limitations on what parts of the referenced request should be actioned." requirements="Sometimes when fulfillment is sought, you don't want full fulfillment.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="Instead of pointing to request, would point to component of request, having these characteristics"/>
                    </fhir>
                    <element name="repetitions" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">How many times to repeat</desc>
                        <fhir fid="Task.restriction.repetitions" definition="Indicates the number of times the requested action should occur." requirements="E.g. order that requests monthly lab tests, fulfillment is sought for 1.">
                            <type value="positiveInt"/>
                            <mapping identity="rim" map=".repeatNumber"/>
                        </fhir>
                    </element>
                    <element name="period" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When fulfillment sought</desc>
                        <fhir fid="Task.restriction.period" definition="Over what time-period is fulfillment sought." comment="Note that period.high is the due date representing the time by which the task should be completed." requirements="E.g. order that authorizes 1 year's services.  Fulfillment is sought for next 3 months.">
                            <type value="Period"/>
                            <mapping identity="rim" map=".effectiveTime(IVL&lt;TS&gt;)"/>
                        </fhir>
                    </element>
                    <element name="recipient" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">For whom is fulfillment sought?</desc>
                        <fhir fid="Task.restriction.recipient" definition="For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/RelatedPerson"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Group"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                            <mapping identity="rim" map=".participation[typeCode=SBJ].role"/>
                        </fhir>
                    </element>
                </element>
                <element name="input" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information used to perform task</desc>
                    <fhir fid="Task.input" definition="Additional information that may be needed in the execution of the task." requirements="Resources and data used to perform the task.  This data is used in the business logic of task execution, and is stored separately because it varies between workflows.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="???"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Label for the input</desc>
                        <fhir fid="Task.input.type" definition="A code or description indicating how the input is intended to be used as part of the task execution." comment="If referencing a BPMN workflow or Protocol, the &#34;system&#34; is the URL for the workflow definition and the code is the &#34;name&#34; of the required input."
                            requirements="Inputs are named to enable task automation to bind data and pass it from one task to the next.">
                            <type value="CodeableConcept"/>
                            <binding displayName="TaskInputParameterType" strength="example" description="Codes to identify types of input parameters.  These will typically be specific to a particular workflow.  E.g. &#34;Comparison source&#34;, &#34;Applicable consent&#34;, &#34;Concomitent Medications&#34;, etc."/>
                            <mapping identity="rim" map="???"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Content to use in performing the task</desc>
                        <fhir fid="Task.input.value[x]" definition="The value of the input parameter as a basic type.">
                            <type value="base64Binary"/>
                            <type value="boolean"/>
                            <type value="canonical"/>
                            <type value="code"/>
                            <type value="date"/>
                            <type value="dateTime"/>
                            <type value="decimal"/>
                            <type value="id"/>
                            <type value="instant"/>
                            <type value="integer"/>
                            <type value="markdown"/>
                            <type value="oid"/>
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <type value="time"/>
                            <type value="unsignedInt"/>
                            <type value="uri"/>
                            <type value="url"/>
                            <type value="uuid"/>
                            <type value="Address"/>
                            <type value="Age"/>
                            <type value="Annotation"/>
                            <type value="Attachment"/>
                            <type value="CodeableConcept"/>
                            <type value="Coding"/>
                            <type value="ContactPoint"/>
                            <type value="Count"/>
                            <type value="Distance"/>
                            <type value="Duration"/>
                            <type value="HumanName"/>
                            <type value="Identifier"/>
                            <type value="Money"/>
                            <type value="Period"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="Ratio"/>
                            <type value="Reference"/>
                            <type value="SampledData"/>
                            <type value="Signature"/>
                            <type value="Timing"/>
                            <type value="ContactDetail"/>
                            <type value="Contributor"/>
                            <type value="DataRequirement"/>
                            <type value="Expression"/>
                            <type value="ParameterDefinition"/>
                            <type value="RelatedArtifact"/>
                            <type value="TriggerDefinition"/>
                            <type value="UsageContext"/>
                            <type value="Dosage"/>
                            <type value="Meta"/>
                            <mapping identity="rim" map="???"/>
                        </fhir>
                        <element name="valueBase64Binary">
                            <fhir fid="Task.input.valueBase64Binary">
                                <type value="base64Binary"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="Task.input.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueCanonical">
                            <fhir fid="Task.input.valueCanonical">
                                <type value="canonical"/>
                            </fhir>
                        </element>
                        <element name="valueCode">
                            <fhir fid="Task.input.valueCode">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="valueDate">
                            <fhir fid="Task.input.valueDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="valueDateTime">
                            <fhir fid="Task.input.valueDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="valueDecimal">
                            <fhir fid="Task.input.valueDecimal">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="valueId">
                            <fhir fid="Task.input.valueId">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="valueInstant">
                            <fhir fid="Task.input.valueInstant">
                                <type value="instant"/>
                            </fhir>
                        </element>
                        <element name="valueInteger">
                            <fhir fid="Task.input.valueInteger">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="valueMarkdown">
                            <fhir fid="Task.input.valueMarkdown">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                        <element name="valueOid">
                            <fhir fid="Task.input.valueOid">
                                <type value="oid"/>
                            </fhir>
                        </element>
                        <element name="valuePositiveInt">
                            <fhir fid="Task.input.valuePositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="Task.input.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueTime">
                            <fhir fid="Task.input.valueTime">
                                <type value="time"/>
                            </fhir>
                        </element>
                        <element name="valueUnsignedInt">
                            <fhir fid="Task.input.valueUnsignedInt">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                        <element name="valueUri">
                            <fhir fid="Task.input.valueUri">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="valueUrl">
                            <fhir fid="Task.input.valueUrl">
                                <type value="url"/>
                            </fhir>
                        </element>
                        <element name="valueUuid">
                            <fhir fid="Task.input.valueUuid">
                                <type value="uuid"/>
                            </fhir>
                        </element>
                        <element name="valueAddress">
                            <fhir fid="Task.input.valueAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="valueAge">
                            <fhir fid="Task.input.valueAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="valueAnnotation">
                            <fhir fid="Task.input.valueAnnotation">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                        <element name="valueAttachment">
                            <fhir fid="Task.input.valueAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="valueCodeableConcept">
                            <fhir fid="Task.input.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueCoding">
                            <fhir fid="Task.input.valueCoding">
                                <type value="Coding"/>
                            </fhir>
                        </element>
                        <element name="valueContactPoint">
                            <fhir fid="Task.input.valueContactPoint">
                                <type value="ContactPoint"/>
                            </fhir>
                        </element>
                        <element name="valueCount">
                            <fhir fid="Task.input.valueCount">
                                <type value="Count"/>
                            </fhir>
                        </element>
                        <element name="valueDistance">
                            <fhir fid="Task.input.valueDistance">
                                <type value="Distance"/>
                            </fhir>
                        </element>
                        <element name="valueDuration">
                            <fhir fid="Task.input.valueDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="valueHumanName">
                            <fhir fid="Task.input.valueHumanName">
                                <type value="HumanName"/>
                            </fhir>
                        </element>
                        <element name="valueIdentifier">
                            <fhir fid="Task.input.valueIdentifier">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="valueMoney">
                            <fhir fid="Task.input.valueMoney">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="valuePeriod">
                            <fhir fid="Task.input.valuePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="Task.input.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="Task.input.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueRatio">
                            <fhir fid="Task.input.valueRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="Task.input.valueReference">
                                <type value="Reference"/>
                            </fhir>
                        </element>
                        <element name="valueSampledData">
                            <fhir fid="Task.input.valueSampledData">
                                <type value="SampledData"/>
                            </fhir>
                        </element>
                        <element name="valueSignature">
                            <fhir fid="Task.input.valueSignature">
                                <type value="Signature"/>
                            </fhir>
                        </element>
                        <element name="valueTiming">
                            <fhir fid="Task.input.valueTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                        <element name="valueContactDetail">
                            <fhir fid="Task.input.valueContactDetail">
                                <type value="ContactDetail"/>
                            </fhir>
                        </element>
                        <element name="valueContributor">
                            <fhir fid="Task.input.valueContributor">
                                <type value="Contributor"/>
                            </fhir>
                        </element>
                        <element name="valueDataRequirement">
                            <fhir fid="Task.input.valueDataRequirement">
                                <type value="DataRequirement"/>
                            </fhir>
                        </element>
                        <element name="valueExpression">
                            <fhir fid="Task.input.valueExpression">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="valueParameterDefinition">
                            <fhir fid="Task.input.valueParameterDefinition">
                                <type value="ParameterDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueRelatedArtifact">
                            <fhir fid="Task.input.valueRelatedArtifact">
                                <type value="RelatedArtifact"/>
                            </fhir>
                        </element>
                        <element name="valueTriggerDefinition">
                            <fhir fid="Task.input.valueTriggerDefinition">
                                <type value="TriggerDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueUsageContext">
                            <fhir fid="Task.input.valueUsageContext">
                                <type value="UsageContext"/>
                            </fhir>
                        </element>
                        <element name="valueDosage">
                            <fhir fid="Task.input.valueDosage">
                                <type value="Dosage"/>
                            </fhir>
                        </element>
                        <element name="valueMeta">
                            <fhir fid="Task.input.valueMeta">
                                <type value="Meta"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
                <element name="output" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information produced as part of task</desc>
                    <fhir fid="Task.output" definition="Outputs produced by the Task." requirements="Resources and data produced during the execution the task.  This data is generated by the business logic of task execution, and is stored separately because it varies between workflows.">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="???"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Label for output</desc>
                        <fhir fid="Task.output.type" definition="The name of the Output parameter." requirements="Outputs are named to enable task automation to bind data and pass it from one task to the next.">
                            <type value="CodeableConcept"/>
                            <binding displayName="TaskOutputParameterType" strength="example" description="Codes to identify types of input parameters.  These will typically be specific to a particular workflow.  E.g. &#34;Identified issues&#34;, &#34;Preliminary results&#34;, &#34;Filler order&#34;, &#34;Final results&#34;, etc."/>
                            <mapping identity="rim" map="???"/>
                        </fhir>
                    </element>
                    <choice name="value[x]" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Result of output</desc>
                        <fhir fid="Task.output.value[x]" definition="The value of the Output parameter as a basic type." requirements="Task outputs can take any form.">
                            <type value="base64Binary"/>
                            <type value="boolean"/>
                            <type value="canonical"/>
                            <type value="code"/>
                            <type value="date"/>
                            <type value="dateTime"/>
                            <type value="decimal"/>
                            <type value="id"/>
                            <type value="instant"/>
                            <type value="integer"/>
                            <type value="markdown"/>
                            <type value="oid"/>
                            <type value="positiveInt"/>
                            <type value="string"/>
                            <type value="time"/>
                            <type value="unsignedInt"/>
                            <type value="uri"/>
                            <type value="url"/>
                            <type value="uuid"/>
                            <type value="Address"/>
                            <type value="Age"/>
                            <type value="Annotation"/>
                            <type value="Attachment"/>
                            <type value="CodeableConcept"/>
                            <type value="Coding"/>
                            <type value="ContactPoint"/>
                            <type value="Count"/>
                            <type value="Distance"/>
                            <type value="Duration"/>
                            <type value="HumanName"/>
                            <type value="Identifier"/>
                            <type value="Money"/>
                            <type value="Period"/>
                            <type value="Quantity"/>
                            <type value="Range"/>
                            <type value="Ratio"/>
                            <type value="Reference"/>
                            <type value="SampledData"/>
                            <type value="Signature"/>
                            <type value="Timing"/>
                            <type value="ContactDetail"/>
                            <type value="Contributor"/>
                            <type value="DataRequirement"/>
                            <type value="Expression"/>
                            <type value="ParameterDefinition"/>
                            <type value="RelatedArtifact"/>
                            <type value="TriggerDefinition"/>
                            <type value="UsageContext"/>
                            <type value="Dosage"/>
                            <type value="Meta"/>
                            <mapping identity="rim" map="???"/>
                        </fhir>
                        <element name="valueBase64Binary">
                            <fhir fid="Task.output.valueBase64Binary">
                                <type value="base64Binary"/>
                            </fhir>
                        </element>
                        <element name="valueBoolean">
                            <fhir fid="Task.output.valueBoolean">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="valueCanonical">
                            <fhir fid="Task.output.valueCanonical">
                                <type value="canonical"/>
                            </fhir>
                        </element>
                        <element name="valueCode">
                            <fhir fid="Task.output.valueCode">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="valueDate">
                            <fhir fid="Task.output.valueDate">
                                <type value="date"/>
                            </fhir>
                        </element>
                        <element name="valueDateTime">
                            <fhir fid="Task.output.valueDateTime">
                                <type value="dateTime"/>
                            </fhir>
                        </element>
                        <element name="valueDecimal">
                            <fhir fid="Task.output.valueDecimal">
                                <type value="decimal"/>
                            </fhir>
                        </element>
                        <element name="valueId">
                            <fhir fid="Task.output.valueId">
                                <type value="id"/>
                            </fhir>
                        </element>
                        <element name="valueInstant">
                            <fhir fid="Task.output.valueInstant">
                                <type value="instant"/>
                            </fhir>
                        </element>
                        <element name="valueInteger">
                            <fhir fid="Task.output.valueInteger">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="valueMarkdown">
                            <fhir fid="Task.output.valueMarkdown">
                                <type value="markdown"/>
                            </fhir>
                        </element>
                        <element name="valueOid">
                            <fhir fid="Task.output.valueOid">
                                <type value="oid"/>
                            </fhir>
                        </element>
                        <element name="valuePositiveInt">
                            <fhir fid="Task.output.valuePositiveInt">
                                <type value="positiveInt"/>
                            </fhir>
                        </element>
                        <element name="valueString">
                            <fhir fid="Task.output.valueString">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="valueTime">
                            <fhir fid="Task.output.valueTime">
                                <type value="time"/>
                            </fhir>
                        </element>
                        <element name="valueUnsignedInt">
                            <fhir fid="Task.output.valueUnsignedInt">
                                <type value="unsignedInt"/>
                            </fhir>
                        </element>
                        <element name="valueUri">
                            <fhir fid="Task.output.valueUri">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="valueUrl">
                            <fhir fid="Task.output.valueUrl">
                                <type value="url"/>
                            </fhir>
                        </element>
                        <element name="valueUuid">
                            <fhir fid="Task.output.valueUuid">
                                <type value="uuid"/>
                            </fhir>
                        </element>
                        <element name="valueAddress">
                            <fhir fid="Task.output.valueAddress">
                                <type value="Address"/>
                            </fhir>
                        </element>
                        <element name="valueAge">
                            <fhir fid="Task.output.valueAge">
                                <type value="Age"/>
                            </fhir>
                        </element>
                        <element name="valueAnnotation">
                            <fhir fid="Task.output.valueAnnotation">
                                <type value="Annotation"/>
                            </fhir>
                        </element>
                        <element name="valueAttachment">
                            <fhir fid="Task.output.valueAttachment">
                                <type value="Attachment"/>
                            </fhir>
                        </element>
                        <element name="valueCodeableConcept">
                            <fhir fid="Task.output.valueCodeableConcept">
                                <type value="CodeableConcept"/>
                            </fhir>
                        </element>
                        <element name="valueCoding">
                            <fhir fid="Task.output.valueCoding">
                                <type value="Coding"/>
                            </fhir>
                        </element>
                        <element name="valueContactPoint">
                            <fhir fid="Task.output.valueContactPoint">
                                <type value="ContactPoint"/>
                            </fhir>
                        </element>
                        <element name="valueCount">
                            <fhir fid="Task.output.valueCount">
                                <type value="Count"/>
                            </fhir>
                        </element>
                        <element name="valueDistance">
                            <fhir fid="Task.output.valueDistance">
                                <type value="Distance"/>
                            </fhir>
                        </element>
                        <element name="valueDuration">
                            <fhir fid="Task.output.valueDuration">
                                <type value="Duration"/>
                            </fhir>
                        </element>
                        <element name="valueHumanName">
                            <fhir fid="Task.output.valueHumanName">
                                <type value="HumanName"/>
                            </fhir>
                        </element>
                        <element name="valueIdentifier">
                            <fhir fid="Task.output.valueIdentifier">
                                <type value="Identifier"/>
                            </fhir>
                        </element>
                        <element name="valueMoney">
                            <fhir fid="Task.output.valueMoney">
                                <type value="Money"/>
                            </fhir>
                        </element>
                        <element name="valuePeriod">
                            <fhir fid="Task.output.valuePeriod">
                                <type value="Period"/>
                            </fhir>
                        </element>
                        <element name="valueQuantity">
                            <fhir fid="Task.output.valueQuantity">
                                <type value="Quantity"/>
                            </fhir>
                        </element>
                        <element name="valueRange">
                            <fhir fid="Task.output.valueRange">
                                <type value="Range"/>
                            </fhir>
                        </element>
                        <element name="valueRatio">
                            <fhir fid="Task.output.valueRatio">
                                <type value="Ratio"/>
                            </fhir>
                        </element>
                        <element name="valueReference">
                            <fhir fid="Task.output.valueReference">
                                <type value="Reference"/>
                            </fhir>
                        </element>
                        <element name="valueSampledData">
                            <fhir fid="Task.output.valueSampledData">
                                <type value="SampledData"/>
                            </fhir>
                        </element>
                        <element name="valueSignature">
                            <fhir fid="Task.output.valueSignature">
                                <type value="Signature"/>
                            </fhir>
                        </element>
                        <element name="valueTiming">
                            <fhir fid="Task.output.valueTiming">
                                <type value="Timing"/>
                            </fhir>
                        </element>
                        <element name="valueContactDetail">
                            <fhir fid="Task.output.valueContactDetail">
                                <type value="ContactDetail"/>
                            </fhir>
                        </element>
                        <element name="valueContributor">
                            <fhir fid="Task.output.valueContributor">
                                <type value="Contributor"/>
                            </fhir>
                        </element>
                        <element name="valueDataRequirement">
                            <fhir fid="Task.output.valueDataRequirement">
                                <type value="DataRequirement"/>
                            </fhir>
                        </element>
                        <element name="valueExpression">
                            <fhir fid="Task.output.valueExpression">
                                <type value="Expression"/>
                            </fhir>
                        </element>
                        <element name="valueParameterDefinition">
                            <fhir fid="Task.output.valueParameterDefinition">
                                <type value="ParameterDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueRelatedArtifact">
                            <fhir fid="Task.output.valueRelatedArtifact">
                                <type value="RelatedArtifact"/>
                            </fhir>
                        </element>
                        <element name="valueTriggerDefinition">
                            <fhir fid="Task.output.valueTriggerDefinition">
                                <type value="TriggerDefinition"/>
                            </fhir>
                        </element>
                        <element name="valueUsageContext">
                            <fhir fid="Task.output.valueUsageContext">
                                <type value="UsageContext"/>
                            </fhir>
                        </element>
                        <element name="valueDosage">
                            <fhir fid="Task.output.valueDosage">
                                <type value="Dosage"/>
                            </fhir>
                        </element>
                        <element name="valueMeta">
                            <fhir fid="Task.output.valueMeta">
                                <type value="Meta"/>
                            </fhir>
                        </element>
                    </choice>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.143" name="TerminologyCapabilities" displayName="TerminologyCapabilities" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/TerminologyCapabilities">
            <desc language="en-US">A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="TerminologyCapabilities" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="TerminologyCapabilities" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A statement of system capabilities</desc>
                <fhir fid="TerminologyCapabilities" definition="A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="tcp-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                    <constraint key="tcp-3" severity="error" human="If kind = instance, implementation must be present and software may be present" expression="(kind != 'instance') or implementation.exists()" xpath="not(f:kind/@value='instance') or exists(f:implementation)" source=""/>
                    <constraint key="tcp-2" severity="error" human="A Capability Statement SHALL have at least one of description, software, or implementation element." expression="(description.count() + software.count() + implementation.count()) &gt; 0" xpath="count(f:software | f:implementation | f:description) &gt; 0" source=""/>
                    <constraint key="tcp-5" severity="error" human="If kind = requirements, implementation and software must be absent" expression="(kind!='requirements') or (implementation.exists().not() and software.exists().not())" xpath="not(f:kind/@value='instance') or (not(exists(f:implementation)) and not(exists(f:software)))" source=""/>
                    <constraint key="tcp-4" severity="error" human="If kind = capability, implementation must be absent, software must be present" expression="(kind != 'capability') or (implementation.exists().not() and software.exists())" xpath=" not(f:kind/@value='instance') or (not(exists(f:implementation)) and exists(f:software))" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this terminology capabilities, represented as a URI (globally unique)</desc>
                    <fhir fid="TerminologyCapabilities.url"
                        definition="An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the terminology capabilities to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the terminology capabilities</desc>
                    <fhir fid="TerminologyCapabilities.version"
                        definition="The identifier that is used to identify this version of the terminology capabilities when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the terminology capabilities author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different terminology capabilities instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the terminology capabilities with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this terminology capabilities (computer friendly)</desc>
                    <fhir fid="TerminologyCapabilities.name" definition="A natural language name identifying the terminology capabilities. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly." requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this terminology capabilities (human friendly)</desc>
                    <fhir fid="TerminologyCapabilities.title" definition="A short, descriptive, user-friendly title for the terminology capabilities." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="TerminologyCapabilities.status" definition="The status of this terminology capabilities. Enables tracking the life-cycle of the content."
                        comment="Allows filtering of terminology capabilitiess that are appropriate for use versus not.This is not intended for use with actual capability statements, but where capability statements are used to describe possible or desired systems." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="TerminologyCapabilities.experimental" definition="A Boolean value to indicate that this terminology capabilities is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of terminology capabilitiess that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level terminology capabilities." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="TerminologyCapabilities.date" definition="The date  (and optionally time) when the terminology capabilities was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the terminology capabilities changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the terminology capabilities. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="TerminologyCapabilities.publisher" definition="The name of the organization or individual that published the terminology capabilities."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the terminology capabilities is the organization or individual primarily responsible for the maintenance and upkeep of the terminology capabilities. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the terminology capabilities. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the terminology capabilities.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="TerminologyCapabilities.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the terminology capabilities</desc>
                    <fhir fid="TerminologyCapabilities.description" definition="A free text natural language description of the terminology capabilities from a consumer's perspective. Typically, this is used when the capability statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP."
                        comment="This description can be used to capture details such as why the terminology capabilities was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the terminology capabilities as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the terminology capabilities is presumed to be the predominant language in the place the terminology capabilities was created).This does not need to be populated if the description is adequately implied by the software or implementation details.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="TerminologyCapabilities.useContext"
                        definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate terminology capabilities instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for terminology capabilities (if applicable)</desc>
                    <fhir fid="TerminologyCapabilities.jurisdiction" definition="A legal or geographic region in which the terminology capabilities is intended to be used." comment="It may be possible for the terminology capabilities to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this terminology capabilities is defined</desc>
                    <fhir fid="TerminologyCapabilities.purpose" definition="Explanation of why this terminology capabilities is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the terminology capabilities. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this terminology capabilities.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="TerminologyCapabilities.copyright" definition="A copyright statement relating to the terminology capabilities and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the terminology capabilities."
                        requirements="Consumers must be able to determine any legal restrictions on the use of the terminology capabilities and/or its content." isSummary="true">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="kind" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">instance | capability | requirements</desc>
                    <fhir fid="TerminologyCapabilities.kind" definition="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind, not instance of software) or a class of implementation (e.g. a desired purchase)." requirements="Allow searching the 3 modes." isSummary="true">
                        <type value="code"/>
                        <binding displayName="CapabilityStatementKind" strength="required" description="How a capability statement is intended to be used." valueSet="2.16.840.1.113883.4.642.3.198" canonicalUri="http://hl7.org/fhir/ValueSet/capability-statement-kind|4.0.1"/>
                    </fhir>
                </element>
                <element name="software" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Software that is covered by this terminology capability statement</desc>
                    <fhir fid="TerminologyCapabilities.software" definition="Software that is covered by this terminology capability statement.  It is used when the statement describes the capabilities of a particular software version, independent of an installation." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">A name the software is known by</desc>
                        <fhir fid="TerminologyCapabilities.software.name" definition="Name the software is known by." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Version covered by this statement</desc>
                        <fhir fid="TerminologyCapabilities.software.version" definition="The version identifier for the software covered by this statement." comment="If possible, a version should be specified, as statements are likely to be different for different versions of software." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="implementation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">If this describes a specific instance</desc>
                    <fhir fid="TerminologyCapabilities.implementation" definition="Identifies a specific implementation instance that is described by the terminology capability statement - i.e. a particular installation, rather than the capabilities of a software program." isSummary="true">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="description" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Describes this specific instance</desc>
                        <fhir fid="TerminologyCapabilities.implementation.description" definition="Information about the specific installation that this terminology capability statement relates to." isSummary="true">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Base URL for the implementation</desc>
                        <fhir fid="TerminologyCapabilities.implementation.url" definition="An absolute base URL for the implementation." isSummary="true">
                            <type value="url"/>
                        </fhir>
                    </element>
                </element>
                <element name="lockedDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Whether lockedDate is supported</desc>
                    <fhir fid="TerminologyCapabilities.lockedDate" definition="Whether the server supports lockedDate." isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="codeSystem" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A code system supported by the server</desc>
                    <fhir fid="TerminologyCapabilities.codeSystem" definition="Identifies a code system that is supported by the server. If there is a no code system URL, then this declares the general assumptions a client can make about support for any CodeSystem resource."
                        comment="The code system - identified by its system URL - may also be declared explicitly as a Code System Resource at /CodeSystem, but it might not be.">
                        <type value="BackboneElement"/>
                        <constraint key="tcp-1" severity="error" human="If there is more than one version, a version code must be defined" expression="version.count() &gt; 1 implies version.all(code.exists())" xpath="(count(f:version) &lt;= 1) or not(exists(f:version[not(f:code)]))" source=""/>
                    </fhir>
                    <element name="uri" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">URI for the Code System</desc>
                        <fhir fid="TerminologyCapabilities.codeSystem.uri" definition="URI for the Code System.">
                            <type value="canonical">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CodeSystem"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="version" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Version of Code System supported</desc>
                        <fhir fid="TerminologyCapabilities.codeSystem.version" definition="For the code system, a list of versions that are supported by the server." comment="Language translations might not be available for all codes.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Version identifier for this version</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.code" definition="For version-less code systems, there should be a single version with no identifier." isSummary="true">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="isDefault" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If this is the default version for this code system</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.isDefault" definition="If this is the default version for this code system." isSummary="true">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="compositional" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If compositional grammar is supported</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.compositional" definition="If the compositional grammar defined by the code system is supported.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="language" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Language Displays supported</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.language" definition="Language Displays supported.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="filter" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Filter Properties supported</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.filter" definition="Filter Properties supported.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Code of the property supported</desc>
                                <fhir fid="TerminologyCapabilities.codeSystem.version.filter.code" definition="Code of the property supported.">
                                    <type value="code"/>
                                </fhir>
                            </element>
                            <element name="op" minimumMultiplicity="1" maximumMultiplicity="*">
                                <desc language="en-US">Operations supported for the property</desc>
                                <fhir fid="TerminologyCapabilities.codeSystem.version.filter.op" definition="Operations supported for the property.">
                                    <type value="code"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="property" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Properties supported for $lookup</desc>
                            <fhir fid="TerminologyCapabilities.codeSystem.version.property" definition="Properties supported for $lookup.">
                                <type value="code"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="subsumption" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether subsumption is supported</desc>
                        <fhir fid="TerminologyCapabilities.codeSystem.subsumption" definition="True if subsumption is supported for this version of the code system.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
                <element name="expansion" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about the [ValueSet/$expand](valueset-operation-expand.html) operation</desc>
                    <fhir fid="TerminologyCapabilities.expansion" definition="Information about the [ValueSet/$expand](valueset-operation-expand.html) operation.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="hierarchical" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the server can return nested value sets</desc>
                        <fhir fid="TerminologyCapabilities.expansion.hierarchical" definition="Whether the server can return nested value sets.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="paging" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether the server supports paging on expansion</desc>
                        <fhir fid="TerminologyCapabilities.expansion.paging" definition="Whether the server supports paging on expansion.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="incomplete" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Allow request for incomplete expansions?</desc>
                        <fhir fid="TerminologyCapabilities.expansion.incomplete" definition="Allow request for incomplete expansions?">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Supported expansion parameter</desc>
                        <fhir fid="TerminologyCapabilities.expansion.parameter" definition="Supported expansion parameter.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Expansion Parameter name</desc>
                            <fhir fid="TerminologyCapabilities.expansion.parameter.name" definition="Expansion Parameter name.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="documentation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Description of support for parameter</desc>
                            <fhir fid="TerminologyCapabilities.expansion.parameter.documentation" definition="Description of support for parameter.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="textFilter" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Documentation about text searching works</desc>
                        <fhir fid="TerminologyCapabilities.expansion.textFilter" definition="Documentation about text searching works." comment="This documentation should cover things like case sensitivity,  use of punctuation if not ignored, what wild cards are supported (if any), whether text is starts with or contains, and whether word order matters.">
                            <type value="markdown"/>
                        </fhir>
                    </element>
                </element>
                <element name="codeSearch" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">explicit | all</desc>
                    <fhir fid="TerminologyCapabilities.codeSearch" definition="The degree to which the server supports the code search parameter on ValueSet, if it is supported." comment="See notes on the [ValueSet](valueset.html#) resource.">
                        <type value="code"/>
                        <binding displayName="CodeSearchSupport" strength="required" description="The degree to which the server supports the code search parameter on ValueSet, if it is supported." valueSet="2.16.840.1.113883.4.642.3.860" canonicalUri="http://hl7.org/fhir/ValueSet/code-search-support|4.0.1"/>
                    </fhir>
                </element>
                <element name="validateCode" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation</desc>
                    <fhir fid="TerminologyCapabilities.validateCode" definition="Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="translations" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether translations are validated</desc>
                        <fhir fid="TerminologyCapabilities.validateCode.translations" definition="Whether translations are validated.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
                <element name="translation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation</desc>
                    <fhir fid="TerminologyCapabilities.translation" definition="Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="needsMap" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether the client must identify the map</desc>
                        <fhir fid="TerminologyCapabilities.translation.needsMap" definition="Whether the client must identify the map.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
                <element name="closure" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about the [ConceptMap/$closure](conceptmap-operation-closure.html) operation</desc>
                    <fhir fid="TerminologyCapabilities.closure" definition="Whether the $closure operation is supported.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="translation" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">If cross-system closure is supported</desc>
                        <fhir fid="TerminologyCapabilities.closure.translation" definition="If cross-system closure is supported.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.144" name="TestReport" displayName="TestReport" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/TestReport">
            <desc language="en-US">A summary of information based on the results of executing a TestScript.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="TestReport" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
            </fhir>
            <element name="TestReport" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Describes the results of a TestScript execution</desc>
                <fhir fid="TestReport" definition="A summary of information based on the results of executing a TestScript.">
                    <mapping identity="rim" map="n/a"/>
                    <mapping identity="objimpl" map="BaseConformance"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">External identifier</desc>
                    <fhir fid="TestReport.identifier" definition="Identifier for the TestScript assigned for external purposes outside the context of FHIR." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Informal name of the executed TestScript</desc>
                    <fhir fid="TestReport.name" definition="A free text natural language name identifying the executed TestScript." comment="Not expected to be globally unique." isSummary="true">
                        <type value="string"/>
                        <mapping identity="objimpl" map="BaseConformance.name"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">completed | in-progress | waiting | stopped | entered-in-error</desc>
                    <fhir fid="TestReport.status" definition="The current state of this test report." comment="The status represents where the execution is currently within the test script execution life cycle.&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="TestReportStatus" strength="required" description="The current status of the test report." valueSet="2.16.840.1.113883.4.642.3.724" canonicalUri="http://hl7.org/fhir/ValueSet/report-status-codes|4.0.1"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="testScript" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Reference to the version-specific TestScript that was executed to produce this TestReport</desc>
                    <fhir fid="TestReport.testScript" definition="Ideally this is an absolute URL that is used to identify the version-specific TestScript that was executed, matching the `TestScript.url`." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/TestScript"/>
                        </type>
                    </fhir>
                </element>
                <element name="result" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">pass | fail | pending</desc>
                    <fhir fid="TestReport.result" definition="The overall result from the execution of the TestScript." comment="The pass and fail result represents a completed test script execution. The pending result represents a test script execution that has not yet started or is currently in progress." isSummary="true">
                        <type value="code"/>
                        <binding displayName="TestReportResult" strength="required" description="The reported execution result." valueSet="2.16.840.1.113883.4.642.3.718" canonicalUri="http://hl7.org/fhir/ValueSet/report-result-codes|4.0.1"/>
                    </fhir>
                </element>
                <element name="score" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The final score (percentage of tests passed) resulting from the execution of the TestScript</desc>
                    <fhir fid="TestReport.score" definition="The final score (percentage of tests passed) resulting from the execution of the TestScript." isSummary="true">
                        <type value="decimal"/>
                    </fhir>
                </element>
                <element name="tester" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the tester producing this report (Organization or individual)</desc>
                    <fhir fid="TestReport.tester" definition="Name of the tester producing this report (Organization or individual)." comment="Usually an organization, but may be an individual. This item SHOULD be populated unless the information is available from context." requirements="Helps establish the &#34;authority/credibility&#34; of the TestReport.  May also allow for contact."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="issued" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the TestScript was executed and this TestReport was generated</desc>
                    <fhir fid="TestReport.issued" definition="When the TestScript was executed and this TestReport was generated." comment="Additional specific dates may be added as extensions." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="objimpl" map="BaseConformance.date"/>
                    </fhir>
                </element>
                <element name="participant" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A participant in the test execution, either the execution engine, a client, or a server</desc>
                    <fhir fid="TestReport.participant" definition="A participant in the test execution, either the execution engine, a client, or a server.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="type" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">test-engine | client | server</desc>
                        <fhir fid="TestReport.participant.type" definition="The type of participant.">
                            <type value="code"/>
                            <binding displayName="TestReportParticipantType" strength="required" description="The type of participant." valueSet="2.16.840.1.113883.4.642.3.722" canonicalUri="http://hl7.org/fhir/ValueSet/report-participant-type|4.0.1"/>
                        </fhir>
                    </element>
                    <element name="uri" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The uri of the participant. An absolute URL is preferred</desc>
                        <fhir fid="TestReport.participant.uri" definition="The uri of the participant. An absolute URL is preferred.">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The display name of the participant</desc>
                        <fhir fid="TestReport.participant.display" definition="The display name of the participant.">
                            <type value="string"/>
                        </fhir>
                    </element>
                </element>
                <element name="setup" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The results of the series of required setup operations before the tests were executed</desc>
                    <fhir fid="TestReport.setup" definition="The results of the series of required setup operations before the tests were executed.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">A setup operation or assert that was executed</desc>
                        <fhir fid="TestReport.setup.action" definition="Action would contain either an operation or an assertion." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                            <constraint key="inv-1" severity="error" human="Setup action SHALL contain either an operation or assert but not both." expression="operation.exists() xor assert.exists()" xpath="(f:operation or f:assert) and not(f:operation and f:assert)" source=""/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The operation to perform</desc>
                            <fhir fid="TestReport.setup.action.operation" definition="The operation performed.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="result" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">pass | skip | fail | warning | error</desc>
                                <fhir fid="TestReport.setup.action.operation.result" definition="The result of this operation.">
                                    <type value="code"/>
                                    <binding displayName="TestReportActionResult" strength="required" description="The results of executing an action." valueSet="2.16.840.1.113883.4.642.3.720" canonicalUri="http://hl7.org/fhir/ValueSet/report-action-result-codes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="message" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A message associated with the result</desc>
                                <fhir fid="TestReport.setup.action.operation.message" definition="An explanatory message associated with the result.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                            <element name="detail" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A link to further details on the result</desc>
                                <fhir fid="TestReport.setup.action.operation.detail" definition="A link to further details on the result.">
                                    <type value="uri"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="assert" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The assertion to perform</desc>
                            <fhir fid="TestReport.setup.action.assert" definition="The results of the assertion performed on the previous operations.">
                                <type value="BackboneElement"/>
                            </fhir>
                            <element name="result" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">pass | skip | fail | warning | error</desc>
                                <fhir fid="TestReport.setup.action.assert.result" definition="The result of this assertion.">
                                    <type value="code"/>
                                    <binding displayName="TestReportActionResult" strength="required" description="The results of executing an action." valueSet="2.16.840.1.113883.4.642.3.720" canonicalUri="http://hl7.org/fhir/ValueSet/report-action-result-codes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="message" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A message associated with the result</desc>
                                <fhir fid="TestReport.setup.action.assert.message" definition="An explanatory message associated with the result.">
                                    <type value="markdown"/>
                                </fhir>
                            </element>
                            <element name="detail" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">A link to further details on the result</desc>
                                <fhir fid="TestReport.setup.action.assert.detail" definition="A link to further details on the result.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="test" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A test executed from the test script</desc>
                    <fhir fid="TestReport.test" definition="A test executed from the test script.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Tracking/logging name of this test</desc>
                        <fhir fid="TestReport.test.name" definition="The name of this test used for tracking/logging purposes by test engines.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Tracking/reporting short description of the test</desc>
                        <fhir fid="TestReport.test.description" definition="A short description of the test used by test engines for tracking and reporting purposes.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">A test operation or assert that was performed</desc>
                        <fhir fid="TestReport.test.action" definition="Action would contain either an operation or an assertion." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                            <constraint key="inv-2" severity="error" human="Test action SHALL contain either an operation or assert but not both." expression="operation.exists() xor assert.exists()" xpath="(f:operation or f:assert) and not(f:operation and f:assert)" source=""/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The operation performed</desc>
                            <fhir fid="TestReport.test.action.operation" definition="An operation would involve a REST request to a server."/>
                        </element>
                        <element name="assert" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The assertion performed</desc>
                            <fhir fid="TestReport.test.action.assert" definition="The results of the assertion performed on the previous operations."/>
                        </element>
                    </element>
                </element>
                <element name="teardown" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The results of running the series of required clean up steps</desc>
                    <fhir fid="TestReport.teardown" definition="The results of the series of operations required to clean up after all the tests were executed (successfully or otherwise).">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">One or more teardown operations performed</desc>
                        <fhir fid="TestReport.teardown.action" definition="The teardown action will only contain an operation." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The teardown operation performed</desc>
                            <fhir fid="TestReport.teardown.action.operation" definition="An operation would involve a REST request to a server."/>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.145" name="TestScript" displayName="TestScript" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/TestScript">
            <desc language="en-US">A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="TestScript" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="TestScript" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Describes a set of tests</desc>
                <fhir fid="TestScript" definition="A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.">
                    <mapping identity="rim" map="n/a"/>
                    <constraint key="tst-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this test script, represented as a URI (globally unique)</desc>
                    <fhir fid="TestScript.url"
                        definition="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the test script to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Additional identifier for the test script</desc>
                    <fhir fid="TestScript.identifier" definition="A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this test script outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the test script</desc>
                    <fhir fid="TestScript.version"
                        definition="The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different test script instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the test script with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Name for this test script (computer friendly)</desc>
                    <fhir fid="TestScript.name" definition="A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation." comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly."
                        requirements="Support human navigation and code generation." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this test script (human friendly)</desc>
                    <fhir fid="TestScript.title" definition="A short, descriptive, user-friendly title for the test script." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="TestScript.status" definition="The status of this test script. Enables tracking the life-cycle of the content." comment="Allows filtering of test scripts that are appropriate for use versus not." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="TestScript.experimental" definition="A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of test scripts that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level test script." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="TestScript.date" definition="The date  (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the test script. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="TestScript.publisher" definition="The name of the organization or individual that published the test script."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the test script is the organization or individual primarily responsible for the maintenance and upkeep of the test script. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the test script. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the test script.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="TestScript.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the test script</desc>
                    <fhir fid="TestScript.description" definition="A free text natural language description of the test script from a consumer's perspective."
                        comment="This description can be used to capture details such as why the test script was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the test script as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the test script is presumed to be the predominant language in the place the test script was created).">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="TestScript.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for test script (if applicable)</desc>
                    <fhir fid="TestScript.jurisdiction" definition="A legal or geographic region in which the test script is intended to be used." comment="It may be possible for the test script to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this test script is defined</desc>
                    <fhir fid="TestScript.purpose" definition="Explanation of why this test script is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the test script. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this test script.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="TestScript.copyright" definition="A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script." requirements="Consumers must be able to determine any legal restrictions on the use of the test script and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="origin" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An abstract server representing a client or sender in a message exchange</desc>
                    <fhir fid="TestScript.origin" definition="An abstract server used in operations within this test script in the origin element."
                        comment="The purpose of this element is to define the profile of an origin element used elsewhere in the script.  Test engines could then use the origin-profile mapping to offer a filtered list of test systems that can serve as the sender for the interaction.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="index" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The index of the abstract origin server starting at 1</desc>
                        <fhir fid="TestScript.origin.index" definition="Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1."
                            comment="A given origin index (e.g. 1) can appear only once in the list (e.g. Origin 1 cannot be specified twice ... once as FormFiller and again as FormProcessor within the same script as that could get confusing during test configuration). &#xA;&#xA;Different origin indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Filler).&#xA;&#xA;The origin indices provided elsewhere in the test script must be one of these origin indices.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="profile" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">FHIR-Client | FHIR-SDC-FormFiller</desc>
                        <fhir fid="TestScript.origin.profile" definition="The type of origin profile the test system supports." comment="Must be a &#34;sender&#34;/&#34;client&#34; profile.">
                            <type value="Coding"/>
                            <binding displayName="Test script profile origin type" strength="extensible" description="The type of origin profile the test system supports." valueSet="2.16.840.1.113883.4.642.3.712" canonicalUri="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types"/>
                        </fhir>
                    </element>
                </element>
                <element name="destination" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">An abstract server representing a destination or receiver in a message exchange</desc>
                    <fhir fid="TestScript.destination" definition="An abstract server used in operations within this test script in the destination element."
                        comment="The purpose of this element is to define the profile of a destination element used elsewhere in the script.  Test engines could then use the destination-profile mapping to offer a filtered list of test systems that can serve as the receiver for the interaction.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="index" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">The index of the abstract destination server starting at 1</desc>
                        <fhir fid="TestScript.destination.index" definition="Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1."
                            comment="A given destination index (e.g. 1) can appear only once in the list (e.g. Destination 1 cannot be specified twice ... once as Form-Manager and again as Form-Processor within the same script as that could get confusing during test configuration). &#xA;&#xA;Different destination indices could play the same actor in the same test script (e.g. You could have two different test systems acting as Form-Manager).&#xA;&#xA;The destination indices provided elsewhere in the test script must be one of these destination indices.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="profile" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor</desc>
                        <fhir fid="TestScript.destination.profile" definition="The type of destination profile the test system supports." comment="Must be a &#34;receiver&#34;/&#34;server&#34; profile.">
                            <type value="Coding"/>
                            <binding displayName="Test script profile destination type" strength="extensible" description="The type of destination profile the test system supports." valueSet="2.16.840.1.113883.4.642.3.714" canonicalUri="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types"/>
                        </fhir>
                    </element>
                </element>
                <element name="metadata" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Required capability that is assumed to function correctly on the FHIR server being tested</desc>
                    <fhir fid="TestScript.metadata" definition="The required capability must exist and are assumed to function correctly on the FHIR server being tested.">
                        <type value="BackboneElement"/>
                        <constraint key="tst-4" severity="error" human="TestScript metadata capability SHALL contain required or validated or both." expression="capability.required.exists() or capability.validated.exists()" xpath="f:capability/f:required or f:capability/f:validated or (f:capability/f:required and f:capability/f:validated)" source=""/>
                    </fhir>
                    <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Links to the FHIR specification</desc>
                        <fhir fid="TestScript.metadata.link" definition="A link to the FHIR specification that this test is covering.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="url" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">URL to the specification</desc>
                            <fhir fid="TestScript.metadata.link.url" definition="URL to a particular requirement or feature within the FHIR specification.">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Short description</desc>
                            <fhir fid="TestScript.metadata.link.description" definition="Short description of the link.">
                                <type value="string"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="capability" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Capabilities that are assumed to function correctly on the FHIR server being tested</desc>
                        <fhir fid="TestScript.metadata.capability" definition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."
                            comment="When the metadata capabilities section is defined at TestScript.metadata or at TestScript.setup.metadata, and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then all the tests in the TestScript are skipped.  When the metadata capabilities section is defined at TestScript.test.metadata and the server's conformance statement does not contain the elements defined in the minimal conformance statement, then only that test is skipped.  The &#34;metadata.capabilities.required&#34; and &#34;metadata.capabilities.validated&#34; elements only indicate whether the capabilities are the primary focus of the test script or not.  They do not impact the skipping logic.  Capabilities whose &#34;metadata.capabilities.validated&#34; flag is true are the primary focus of the test script.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="required" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Are the capabilities required?</desc>
                            <fhir fid="TestScript.metadata.capability.required" definition="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="validated" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Are the capabilities validated?</desc>
                            <fhir fid="TestScript.metadata.capability.validated" definition="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The expected capabilities of the server</desc>
                            <fhir fid="TestScript.metadata.capability.description" definition="Description of the capabilities that this test script is requiring the server to support.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="origin" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Which origin server these requirements apply to</desc>
                            <fhir fid="TestScript.metadata.capability.origin" definition="Which origin server these requirements apply to.">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="destination" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Which server these requirements apply to</desc>
                            <fhir fid="TestScript.metadata.capability.destination" definition="Which server these requirements apply to.">
                                <type value="integer"/>
                            </fhir>
                        </element>
                        <element name="link" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Links to the FHIR specification</desc>
                            <fhir fid="TestScript.metadata.capability.link" definition="Links to the FHIR specification that describes this interaction and the resources involved in more detail.">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="capabilities" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Required Capability Statement</desc>
                            <fhir fid="TestScript.metadata.capability.capabilities" definition="Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped."
                                comment="The conformance statement of the server has to contain at a minimum the contents of the reference pointed to by this element.">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/CapabilityStatement"/>
                                </type>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="fixture" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Fixture in the test script - by reference (uri)</desc>
                    <fhir fid="TestScript.fixture" definition="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="autocreate" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether or not to implicitly create the fixture during setup</desc>
                        <fhir fid="TestScript.fixture.autocreate" definition="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="autodelete" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Whether or not to implicitly delete the fixture during teardown</desc>
                        <fhir fid="TestScript.fixture.autodelete" definition="Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference of the resource</desc>
                        <fhir fid="TestScript.fixture.resource" definition="Reference to the resource (containing the contents of the resource needed for operations)." comment="See http://build.fhir.org/resourcelist.html for complete list of resource types.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                            </type>
                        </fhir>
                    </element>
                </element>
                <element name="profile" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Reference of the validation profile</desc>
                    <fhir fid="TestScript.profile" definition="Reference to the profile to be used for validation." comment="See http://build.fhir.org/resourcelist.html for complete list of resource types.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                </element>
                <element name="variable" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Placeholder for evaluated elements</desc>
                    <fhir fid="TestScript.variable" definition="Variable is set based either on element value in response body or on header field value in the response headers."
                        comment="Variables would be set based either on XPath/JSONPath expressions against fixtures (static and response), or headerField evaluations against response headers. If variable evaluates to nodelist or anything other than a primitive value, then test engine would report an error.  Variables would be used to perform clean replacements in &#34;operation.params&#34;, &#34;operation.requestHeader.value&#34;, and &#34;operation.url&#34; element values during operation calls and in &#34;assert.value&#34; during assertion evaluations. This limits the places that test engines would need to look for placeholders &#34;${}&#34;.  Variables are scoped to the whole script. They are NOT evaluated at declaration. They are evaluated by test engine when used for substitutions in &#34;operation.params&#34;, &#34;operation.requestHeader.value&#34;, and &#34;operation.url&#34; element values during operation calls and in &#34;assert.value&#34; during assertion evaluations.  See example testscript-search.xml.">
                        <type value="BackboneElement"/>
                        <constraint key="tst-3" severity="error" human="Variable can only contain one of expression, headerField or path." expression="expression.empty() or headerField.empty() or path.empty()" xpath="not(f:expression and f:headerField and f:path)" source=""/>
                    </fhir>
                    <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Descriptive name for this variable</desc>
                        <fhir fid="TestScript.variable.name" definition="Descriptive name for this variable." comment="Placeholders would contain the variable name wrapped in ${} in &#34;operation.params&#34;, &#34;operation.requestHeader.value&#34;, and &#34;operation.url&#34; elements.  These placeholders would need to be replaced by the variable value before the operation is executed.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="defaultValue" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Default, hard-coded, or user-defined value for this variable</desc>
                        <fhir fid="TestScript.variable.defaultValue" definition="A default, hard-coded, or user-defined value for this variable." comment="The purpose of this element is to allow for a pre-defined value that can be used as a default or as an override value. Test engines can optionally use this as a placeholder for user-defined execution time values.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Natural language description of the variable</desc>
                        <fhir fid="TestScript.variable.description" definition="A free text natural language description of the variable and its purpose.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The FHIRPath expression against the fixture body</desc>
                        <fhir fid="TestScript.variable.expression" definition="The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified."
                            comment="If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define any combination of expression, headerField and path.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="headerField" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">HTTP header field name for source</desc>
                        <fhir fid="TestScript.variable.headerField" definition="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."
                            comment="If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define both headerField and path.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="hint" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Hint help text for default value to enter</desc>
                        <fhir fid="TestScript.variable.hint" definition="Displayable text string with hint help information to the user when entering a default value.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="path" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">XPath or JSONPath against the fixture body</desc>
                        <fhir fid="TestScript.variable.path" definition="XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified."
                            comment="If headerField is defined, then the variable will be evaluated against the headers that sourceId is pointing to.  If expression or path is defined, then the variable will be evaluated against the fixture body that sourceId is pointing to.  It is an error to define any combination of expression, headerField and path.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="sourceId" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fixture Id of source expression or headerField within this variable</desc>
                        <fhir fid="TestScript.variable.sourceId" definition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable." comment="This can be a statically defined fixture (at the top of the TestScript) or a dynamically set fixture created by responseId of the `action.operation` element.">
                            <type value="id"/>
                        </fhir>
                    </element>
                </element>
                <element name="setup" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A series of required setup operations before tests are executed</desc>
                    <fhir fid="TestScript.setup" definition="A series of required setup operations before tests are executed.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">A setup operation or assert to perform</desc>
                        <fhir fid="TestScript.setup.action" definition="Action would contain either an operation or an assertion." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                            <constraint key="tst-1" severity="error" human="Setup action SHALL contain either an operation or assert but not both." expression="operation.exists() xor assert.exists()" xpath="(f:operation or f:assert) and not(f:operation and f:assert)" source=""/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The setup operation to perform</desc>
                            <fhir fid="TestScript.setup.action.operation" definition="The operation to perform.">
                                <type value="BackboneElement"/>
                                <constraint key="tst-7" severity="error" human="Setup operation SHALL contain either sourceId or targetId or params or url." expression="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' |'search' | 'transaction' | 'history'))"
                                    xpath="f:sourceId or ((f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1)) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" source=""/>
                            </fhir>
                            <element name="type" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The operation code type that will be executed</desc>
                                <fhir fid="TestScript.setup.action.operation.type" definition="Server interaction or operation type." comment="See http://build.fhir.org/http.html for list of server interactions.">
                                    <type value="Coding"/>
                                    <binding displayName="Test script operation code" strength="extensible" description="The allowable operation code types." valueSet="2.16.840.1.113883.4.642.3.704" canonicalUri="http://hl7.org/fhir/ValueSet/testscript-operation-codes"/>
                                </fhir>
                            </element>
                            <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Resource type</desc>
                                <fhir fid="TestScript.setup.action.operation.resource" definition="The type of the resource.  See http://build.fhir.org/resourcelist.html."
                                    comment="If &#34;url&#34; element is specified, then &#34;targetId&#34;, &#34;params&#34;, and &#34;resource&#34; elements will be ignored as &#34;url&#34; element will have everything needed for constructing the request url.  If &#34;params&#34; element is specified, then &#34;targetId&#34; element is ignored. For FHIR operations that require a resource (e.g. &#34;read&#34; and &#34;vread&#34; operations), the &#34;resource&#34; element must be specified when &#34;params&#34; element is specified.  If &#34;url&#34; and &#34;params&#34; elements are absent, then the request url will be constructed from &#34;targetId&#34; fixture if present. For &#34;read&#34; operation, the resource and id values will be extracted from &#34;targetId&#34; fixture and used to construct the url. For &#34;vread&#34; and &#34;history&#34; operations, the versionId value will also be used.">
                                    <type value="code"/>
                                    <binding displayName="FHIRDefinedType" strength="required" description="A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types." valueSet="2.16.840.1.113883.4.642.3.24" canonicalUri="http://hl7.org/fhir/ValueSet/defined-types|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="label" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Tracking/logging operation label</desc>
                                <fhir fid="TestScript.setup.action.operation.label" definition="The label would be used for tracking/logging purposes by test engines." comment="This has no impact on the verification itself.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Tracking/reporting operation description</desc>
                                <fhir fid="TestScript.setup.action.operation.description" definition="The description would be used by test engines for tracking and reporting purposes." comment="This has no impact on the verification itself.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="accept" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Mime type to accept in the payload of the response, with charset etc.</desc>
                                <fhir fid="TestScript.setup.action.operation.accept" definition="The mime-type to use for RESTful operation in the 'Accept' header." comment="If this is specified, then test engine shall set the 'Accept' header to the corresponding value.  If you'd like to explicitly set the 'Accept' to some other value then use the 'requestHeader' element.">
                                    <type value="code"/>
                                    <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="contentType" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Mime type of the request payload contents, with charset etc.</desc>
                                <fhir fid="TestScript.setup.action.operation.contentType" definition="The mime-type to use for RESTful operation in the 'Content-Type' header." comment="If this is specified, then test engine shall set the 'Content-Type' header to the corresponding value.  If you'd like to explicitly set the 'Content-Type' to some other value then use the 'requestHeader' element.">
                                    <type value="code"/>
                                    <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="destination" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Server responding to the request</desc>
                                <fhir fid="TestScript.setup.action.operation.destination" definition="The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section."
                                    comment="If multiple TestScript.destination elements are defined and operation.destination is undefined, test engine will report an error as it cannot determine what destination to use for the exchange.">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="encodeRequestUrl" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Whether or not to send the request url in encoded format</desc>
                                <fhir fid="TestScript.setup.action.operation.encodeRequestUrl" definition="Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="method" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">delete | get | options | patch | post | put | head</desc>
                                <fhir fid="TestScript.setup.action.operation.method" definition="The HTTP method the test engine MUST use for this operation regardless of any other operation details." comment="The primary purpose of the explicit HTTP method is support of  HTTP POST method invocation of the FHIR search. Other uses will include support of negative testing.">
                                    <type value="code"/>
                                    <binding displayName="TestScriptRequestMethodCode" strength="required" description="The allowable request method or HTTP operation codes." valueSet="2.16.840.1.113883.4.642.3.716" canonicalUri="http://hl7.org/fhir/ValueSet/http-operations|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="origin" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Server initiating the request</desc>
                                <fhir fid="TestScript.setup.action.operation.origin" definition="The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section."
                                    comment="If absent, test engine will send the message.  When present, test engine will not send the request message but will wait for the request message to be sent from this origin server.">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="params" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Explicitly defined path parameters</desc>
                                <fhir fid="TestScript.setup.action.operation.params" definition="Path plus parameters after [type].  Used to set parts of the request URL explicitly."
                                    comment="If &#34;url&#34; element is specified, then &#34;targetId&#34;, &#34;params&#34;, and &#34;resource&#34; elements will be ignored as &#34;url&#34; element will have everything needed for constructing the request url.  If &#34;params&#34; element is specified, then &#34;targetId&#34; element is ignored.  For FHIR operations that require a resource (e.g. &#34;read&#34; and &#34;vread&#34; operations), the &#34;resource&#34; element must be specified when &#34;params&#34; element is specified.  If &#34;url&#34; and &#34;params&#34; elements are absent, then the request url will be constructed from &#34;targetId&#34; fixture if present.  For &#34;read&#34; operation, the resource and id values will be extracted from &#34;targetId&#34; fixture and used to construct the url.  For &#34;vread&#34; and &#34;history&#34; operations, the versionId value will also be used.   Test engines would append whatever is specified for &#34;params&#34; to the URL after the resource type without tampering with the string (beyond encoding the URL for HTTP).  The &#34;params&#34; element does not correspond exactly to &#34;search parameters&#34;.  Nor is it the &#34;path&#34;.  It corresponds to the part of the URL that comes after the [type] (when &#34;resource&#34; element is specified); e.g. It corresponds to &#34;/[id]/_history/[vid] {?_format=[mime-type]}&#34; in the following operation: GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]}  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="requestHeader" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Each operation can have one or more header elements</desc>
                                <fhir fid="TestScript.setup.action.operation.requestHeader" definition="Header elements would be used to set HTTP headers."
                                    comment="This gives control to test-script writers to set headers explicitly based on test requirements.  It will allow for testing using:  - &#34;If-Modified-Since&#34; and &#34;If-None-Match&#34; headers.  See http://build.fhir.org/http.html#2.1.0.5.1 - &#34;If-Match&#34; header.  See http://build.fhir.org/http.html#2.1.0.11 - Conditional Create using &#34;If-None-Exist&#34;.  See http://build.fhir.org/http.html#2.1.0.13.1 - Invalid &#34;Content-Type&#34; header for negative testing. - etc.">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="field" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">HTTP header field name</desc>
                                    <fhir fid="TestScript.setup.action.operation.requestHeader.field" definition="The HTTP header field e.g. &#34;Accept&#34;." comment="If header element is specified, then field is required.">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                                <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">HTTP headerfield value</desc>
                                    <fhir fid="TestScript.setup.action.operation.requestHeader.value" definition="The value of the header e.g. &#34;application/fhir+xml&#34;."
                                        comment="If header element is specified, then value is required.  No conversions will be done by the test engine e.g. &#34;xml&#34; to &#34;application/fhir+xml&#34;.  The values will be set in HTTP headers &#34;as-is&#34;.  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                            </element>
                            <element name="requestId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fixture Id of mapped request</desc>
                                <fhir fid="TestScript.setup.action.operation.requestId" definition="The fixture id (maybe new) to map to the request."
                                    comment="If a requestId is supplied, then the resulting request (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by &#34;requestId&#34;.  If requestId is not specified, it is the test engine's responsibility to store the request and use it as the requestId in subsequent assertions when assertion path and/or headerField is specified, direction is equal to request, and the requestId in not specified.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="responseId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fixture Id of mapped response</desc>
                                <fhir fid="TestScript.setup.action.operation.responseId" definition="The fixture id (maybe new) to map to the response."
                                    comment="If a responseId is supplied, and the server responds, then the resulting response (both headers and body) is mapped to the fixture ID (which may be entirely new and previously undeclared) designated by &#34;responseId&#34;.  If responseId is not specified, it is the test engine's responsibility to store the response and use it as the responseId in subsequent assertions when assertion path and/or headerField is specified and the responseId is not specified.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="sourceId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fixture Id of body for PUT and POST requests</desc>
                                <fhir fid="TestScript.setup.action.operation.sourceId" definition="The id of the fixture used as the body of a PUT or POST request.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="targetId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Id of fixture used for extracting the [id], [type], and [vid] for GET requests</desc>
                                <fhir fid="TestScript.setup.action.operation.targetId" definition="Id of fixture used for extracting the [id],  [type], and [vid] for GET requests."
                                    comment="If &#34;url&#34; element is specified, then &#34;targetId&#34;, &#34;params&#34;, and &#34;resource&#34; elements will be ignored as &#34;url&#34; element will have everything needed for constructing the request url.  If &#34;params&#34; element is specified, then &#34;targetId&#34; element is ignored.  For FHIR operations that require a resource (e.g. &#34;read&#34; and &#34;vread&#34; operations), the &#34;resource&#34; element must be specified when &#34;params&#34; element is specified.  If &#34;url&#34; and &#34;params&#34; elements are absent, then the request url will be constructed from &#34;targetId&#34; fixture if present.  For &#34;read&#34; operation, the resource and id values will be extracted from &#34;targetId&#34; fixture and used to construct the url.  For &#34;vread&#34; and &#34;history&#34; operations, the versionId value will also be used.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Request URL</desc>
                                <fhir fid="TestScript.setup.action.operation.url" definition="Complete request URL."
                                    comment="Used to set the request URL explicitly.  If &#34;url&#34; element is defined, then &#34;targetId&#34;, &#34;resource&#34;, and &#34;params&#34; elements will be ignored.  Test engines would use whatever is specified in &#34;url&#34; without tampering with the string (beyond encoding the URL for HTTP).  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before sending the request.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="assert" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The assertion to perform</desc>
                            <fhir fid="TestScript.setup.action.assert" definition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." comment="In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.">
                                <type value="BackboneElement"/>
                                <constraint key="tst-12" severity="error" human="Setup action assert response and responseCode SHALL be empty when direction equals request" expression="(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'"
                                    xpath="((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" source=""/>
                                <constraint key="tst-5" severity="error" human="Only a single assertion SHALL be present within setup action assert element."
                                    expression="extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count()  + validateProfileId.count() &lt;=1)"
                                    xpath="count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId)  &lt;=1" source=""/>
                                <constraint key="tst-10" severity="error" human="Setup action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither." expression="compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())"
                                    xpath="(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" source=""/>
                            </fhir>
                            <element name="label" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Tracking/logging assertion label</desc>
                                <fhir fid="TestScript.setup.action.assert.label" definition="The label would be used for tracking/logging purposes by test engines." comment="This has no impact on the verification itself.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Tracking/reporting assertion description</desc>
                                <fhir fid="TestScript.setup.action.assert.description" definition="The description would be used by test engines for tracking and reporting purposes." comment="This has no impact on the verification itself.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="direction" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">response | request</desc>
                                <fhir fid="TestScript.setup.action.assert.direction" definition="The direction to use for the assertion."
                                    comment="If the direction is specified as &#34;response&#34; (the default), then the processing of this assert is against the received response message. If the direction is specified as &#34;request&#34;, then the processing of this assert is against the sent request message.">
                                    <type value="code"/>
                                    <binding displayName="AssertionDirectionType" strength="required" description="The type of direction to use for assertion." valueSet="2.16.840.1.113883.4.642.3.706" canonicalUri="http://hl7.org/fhir/ValueSet/assert-direction-codes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="compareToSourceId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Id of the source fixture to be evaluated</desc>
                                <fhir fid="TestScript.setup.action.assert.compareToSourceId" definition="Id of the source fixture used as the contents to be evaluated by either the &#34;source/expression&#34; or &#34;sourceId/path&#34; definition.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="compareToSourceExpression" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The FHIRPath expression to evaluate against the source fixture</desc>
                                <fhir fid="TestScript.setup.action.assert.compareToSourceExpression" definition="The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both."
                                    comment="Thefhirpath expression to be evaluated against the expected fixture to compare to. Ignored if &#34;assert.value&#34; is used. The evaluation will be done before the assertion is evaluated.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="compareToSourcePath" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">XPath or JSONPath expression to evaluate against the source fixture</desc>
                                <fhir fid="TestScript.setup.action.assert.compareToSourcePath" definition="XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both."
                                    comment="The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if &#34;assert.value&#34; is used. The evaluation will be done before the assertion is evaluated.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="contentType" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Mime type to compare against the 'Content-Type' header</desc>
                                <fhir fid="TestScript.setup.action.assert.contentType" definition="The mime-type contents to compare against the request or response message 'Content-Type' header."
                                    comment="If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value.  If &#34;assert.sourceId&#34; element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers).  If you'd like to have more control over the string, then use 'assert.headerField' instead.">
                                    <type value="code"/>
                                    <binding displayName="MimeType" strength="required" description="The mime type of an attachment. Any valid mime type is allowed." valueSet="2.16.840.1.113883.4.642.3.1024" canonicalUri="http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="expression" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The FHIRPath expression to be evaluated</desc>
                                <fhir fid="TestScript.setup.action.assert.expression" definition="The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload."
                                    comment="If both &#34;expression&#34; and a &#34;fixtureId&#34; are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId.  If &#34;expression&#34; is specified and a &#34;fixtureId&#34; is not, then the expression will be evaluated against the response body of the last operation.  Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="headerField" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">HTTP header field name</desc>
                                <fhir fid="TestScript.setup.action.assert.headerField" definition="The HTTP header field name e.g. 'Location'."
                                    comment="If &#34;headerField&#34; is specified then &#34;value&#34; must be specified.  If &#34;sourceId&#34; is not specified, then &#34;headerField&#34; will be evaluated against the last operation's response headers.  Test engines are to keep track of the last operation's response body and response headers.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="minimumId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fixture Id of minimum content resource</desc>
                                <fhir fid="TestScript.setup.action.assert.minimumId" definition="The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId."
                                    comment="Asserts that the response contains all the element/content in another fixture pointed to by minimumId.  This can be a statically defined fixture or one that is dynamically set via responseId.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="navigationLinks" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Perform validation on navigation links?</desc>
                                <fhir fid="TestScript.setup.action.assert.navigationLinks" definition="Whether or not the test execution performs validation on the bundle navigation links." comment="Asserts that the Bundle contains first, last, and next links.">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="operator" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval</desc>
                                <fhir fid="TestScript.setup.action.assert.operator" definition="The operator type defines the conditional behavior of the assert. If not defined, the default is equals."
                                    comment="Operators are useful especially for negative testing.  If operator is not specified, then the &#34;equals&#34; operator is assumed; e.g. ```&lt;code&gt;   &lt;assert&gt;  &lt;operator value=&#34;in&#34; /&gt;  &lt;responseCode value=&#34;200,201,204&#34; /&gt;    &lt;/assert&gt;    &lt;assert&gt;  &lt;operator value=&#34;notEquals&#34; /&gt;  &lt;response value=&#34;okay&#34;/&gt;   &lt;/assert&gt;    &lt;assert&gt;  &lt;operator value=&#34;greaterThan&#34; /&gt;    &lt;responseHeader&gt;     &lt;field value=&#34;Content-Length&#34; /&gt;     &lt;value value=&#34;0&#34; /&gt;    &lt;/responseHeader/&gt;   &lt;/assert&gt; &lt;/code&gt; ```.">
                                    <type value="code"/>
                                    <binding displayName="AssertionOperatorType" strength="required" description="The type of operator to use for assertion." valueSet="2.16.840.1.113883.4.642.3.708" canonicalUri="http://hl7.org/fhir/ValueSet/assert-operator-codes|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="path" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">XPath or JSONPath expression</desc>
                                <fhir fid="TestScript.setup.action.assert.path" definition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server."
                                    comment="If both &#34;path&#34; and a &#34;fixtureId&#34; are specified, then the path will be evaluated against the request or response body mapped to the fixtureId.  If &#34;path&#34; is specified and a &#34;fixtureId&#34; is not, then the path will be evaluated against the response body of the last operation.  Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="requestMethod" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">delete | get | options | patch | post | put | head</desc>
                                <fhir fid="TestScript.setup.action.assert.requestMethod" definition="The request method or HTTP operation code to compare against that used by the client system under test." comment="If &#34;requestMethod&#34; is specified then it will be used in place of &#34;value&#34;. The &#34;requestMethod&#34; will evaluate against the last operation's request HTTP operation.">
                                    <type value="code"/>
                                    <binding displayName="TestScriptRequestMethodCode" strength="required" description="The allowable request method or HTTP operation codes." valueSet="2.16.840.1.113883.4.642.3.716" canonicalUri="http://hl7.org/fhir/ValueSet/http-operations|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="requestURL" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Request URL comparison value</desc>
                                <fhir fid="TestScript.setup.action.assert.requestURL" definition="The value to use in a comparison against the request URL path string." comment="If &#34;requestURL&#34; is specified then it will be used in place of &#34;value&#34;. The &#34;requestURL&#34; will evaluate against the last operation's full request URL path string.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="resource" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Resource type</desc>
                                <fhir fid="TestScript.setup.action.assert.resource" definition="The type of the resource.  See http://build.fhir.org/resourcelist.html."
                                    comment="This will be expected resource type in response body e.g. in read, vread, search, etc.  See http://build.fhir.org/resourcelist.html for complete list of resource types; e.g. &lt;assert &gt; &lt;resourceType value=&#34;Patient&#34; &lt;/assert&gt;.">
                                    <type value="code"/>
                                    <binding displayName="FHIRDefinedType" strength="required" description="A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types." valueSet="2.16.840.1.113883.4.642.3.24" canonicalUri="http://hl7.org/fhir/ValueSet/defined-types|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="response" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable</desc>
                                <fhir fid="TestScript.setup.action.assert.response" definition="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable."
                                    comment="This is a shorter way of achieving similar verifications via &#34;assert.responseCode&#34;.  If you need more control, then use &#34;assert.responseCode&#34;  e.g. &lt;assert&gt;  &lt;contentType value=&#34;json&#34; /&gt;  &lt;response value=&#34;okay&#34;/&gt; &lt;/assert&gt;.">
                                    <type value="code"/>
                                    <binding displayName="AssertionResponseTypes" strength="required" description="The type of response code to use for assertion." valueSet="2.16.840.1.113883.4.642.3.710" canonicalUri="http://hl7.org/fhir/ValueSet/assert-response-code-types|4.0.1"/>
                                </fhir>
                            </element>
                            <element name="responseCode" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">HTTP response code to test</desc>
                                <fhir fid="TestScript.setup.action.assert.responseCode" definition="The value of the HTTP response code to be tested."
                                    comment="To be used with &#34;operator&#34; attribute value. Asserts that the response code equals this value if &#34;operator&#34; is not specified.   If the operator is &#34;in&#34; or &#34;notIn&#34; then the responseCode would be a comma-separated list of values e.g. &#34;200,201&#34;. Otherwise, it's expected to be a numeric value.   If &#34;fixture&#34; is not specified, then the &#34;responseBodyId&#34; value of the last operation is assumed.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="sourceId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Fixture Id of source expression or headerField</desc>
                                <fhir fid="TestScript.setup.action.assert.sourceId" definition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against." comment="This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="validateProfileId" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Profile Id of validation profile reference</desc>
                                <fhir fid="TestScript.setup.action.assert.validateProfileId" definition="The ID of the Profile to validate against." comment="The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.">
                                    <type value="id"/>
                                </fhir>
                            </element>
                            <element name="value" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">The value to compare to</desc>
                                <fhir fid="TestScript.setup.action.assert.value" definition="The value to compare to." comment="The string-representation of a number, string, or boolean that is expected.  Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="warningOnly" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Will this assert produce a warning only on error?</desc>
                                <fhir fid="TestScript.setup.action.assert.warningOnly" definition="Whether or not the test execution will produce a warning only on error for this assert."
                                    comment="If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding.  There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn’t do it, we could choose to issue a warning.">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                        </element>
                    </element>
                </element>
                <element name="test" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A test in this script</desc>
                    <fhir fid="TestScript.test" definition="A test in this script.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Tracking/logging name of this test</desc>
                        <fhir fid="TestScript.test.name" definition="The name of this test used for tracking/logging purposes by test engines.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Tracking/reporting short description of the test</desc>
                        <fhir fid="TestScript.test.description" definition="A short description of the test used by test engines for tracking and reporting purposes.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">A test operation or assert to perform</desc>
                        <fhir fid="TestScript.test.action" definition="Action would contain either an operation or an assertion." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                            <constraint key="tst-2" severity="error" human="Test action SHALL contain either an operation or assert but not both." expression="operation.exists() xor assert.exists()" xpath="(f:operation or f:assert) and not(f:operation and f:assert)" source=""/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The setup operation to perform</desc>
                            <fhir fid="TestScript.test.action.operation" definition="An operation would involve a REST request to a server.">
                                <constraint key="tst-8" severity="error" human="Test operation SHALL contain either sourceId or targetId or params or url." expression="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))"
                                    xpath="f:sourceId or (f:targetId or f:url or f:params) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" source=""/>
                            </fhir>
                        </element>
                        <element name="assert" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The setup assertion to perform</desc>
                            <fhir fid="TestScript.test.action.assert" definition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." comment="In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.">
                                <constraint key="tst-11" severity="error" human="Test action assert SHALL contain either compareToSourceId and compareToSourceExpression, compareToSourceId and compareToSourcePath or neither." expression="compareToSourceId.empty() xor (compareToSourceExpression.exists() or compareToSourcePath.exists())"
                                    xpath="(f:compareToSourceId and f:compareToSourceExpression) or (f:compareToSourceId and f:compareToSourcePath) or not(f:compareToSourceId or f:compareToSourceExpression or f:compareToSourcePath)" source=""/>
                                <constraint key="tst-13" severity="error" human="Test action assert response and response and responseCode SHALL be empty when direction equals request" expression="(response.empty() and responseCode.empty() and direction = 'request') or direction.empty() or direction = 'response'"
                                    xpath="((count(f:response) + count(f:responseCode)) = 0 and (f:direction/@value='request')) or (count(f:direction) = 0) or (f:direction/@value='response')" source=""/>
                                <constraint key="tst-6" severity="error" human="Only a single assertion SHALL be present within test action assert element."
                                    expression="extension.exists() or (contentType.count() + expression.count() + headerField.count() + minimumId.count() + navigationLinks.count() + path.count() + requestMethod.count() + resource.count() + responseCode.count() + response.count() + validateProfileId.count() &lt;=1)"
                                    xpath="count(f:contentType) + count(f:expression) + count(f:headerField) + count(f:minimumId) + count(f:navigationLinks) + count(f:path) + count(f:requestMethod) + count(f:resource) + count(f:responseCode) + count(f:response) + count(f:rule) + count(f:ruleset) + count(f:validateProfileId)  &lt;=1" source=""/>
                            </fhir>
                        </element>
                    </element>
                </element>
                <element name="teardown" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">A series of required clean up steps</desc>
                    <fhir fid="TestScript.teardown" definition="A series of operations required to clean up after all the tests are executed (successfully or otherwise).">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="action" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">One or more teardown operations to perform</desc>
                        <fhir fid="TestScript.teardown.action" definition="The teardown action will only contain an operation." comment="An action should contain either an operation or an assertion but not both.  It can contain any number of variables.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="operation" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">The teardown operation to perform</desc>
                            <fhir fid="TestScript.teardown.action.operation" definition="An operation would involve a REST request to a server.">
                                <constraint key="tst-9" severity="error" human="Teardown operation SHALL contain either sourceId or targetId or params or url." expression="sourceId.exists() or (targetId.count() + url.count() + params.count() = 1) or (type.code in ('capabilities' | 'search' | 'transaction' | 'history'))"
                                    xpath="f:sourceId or (f:targetId or f:url or (f:params and f:resource)) and (count(f:targetId) + count(f:url) + count(f:params) =1) or (f:type/f:code/@value='capabilities' or f:type/f:code/@value='search' or f:type/f:code/@value='transaction' or f:type/f:code/@value='history')" source=""/>
                            </fhir>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.146" name="ValueSet" displayName="ValueSet" effectiveDate="2019-11-01T09:29:23" statusCode="active" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/ValueSet">
            <desc language="en-US">A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="ValueSet" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="objimpl" uri="http://hl7.org/fhir/object-implementation" name="Object Implementation Information"/>
            </fhir>
            <element name="ValueSet" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">A set of codes drawn from one or more code systems</desc>
                <fhir fid="ValueSet" definition="A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [CodeSystem](codesystem.html) definitions and their use in [coded elements](terminologies.html).">
                    <mapping identity="rim" map="N/A"/>
                    <constraint key="vsd-0" severity="warning" human="Name should be usable as an identifier for the module by machine processing applications such as code generation" expression="name.matches('[A-Z]([A-Za-z0-9_]){0,254}')" xpath="not(exists(f:name/@value)) or matches(f:name/@value, '[A-Z]([A-Za-z0-9_]){0,254}')" source=""/>
                </fhir>
                <element name="url" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Canonical identifier for this value set, represented as a URI (globally unique)</desc>
                    <fhir fid="ValueSet.url"
                        definition="An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers."
                        comment="Can be a urn:uuid: or a urn:oid: but real http: addresses are preferred.  Multiple instances may share the same URL if they have a distinct version.&#xA;&#xA;The determination of when to create a new version of a resource (same url, new version) vs. defining a new artifact is up to the author.  Considerations for making this decision are found in [Technical and Business Versions](resource.html#versions). &#xA;&#xA;In some cases, the resource can no longer be found at the stated url, but the url itself cannot change. Implementations can use the [meta.source](resource.html#meta) element to indicate where the current master source of the resource can be found."
                        requirements="Allows the value set to be referenced by a single globally unique identifier." isSummary="true">
                        <type value="uri"/>
                        <mapping identity="workflow" map="Definition.url"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Additional identifier for the value set (business identifier)</desc>
                    <fhir fid="ValueSet.identifier" definition="A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance."
                        comment="Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, and can then identify this value set outside of FHIR, where it is not possible to use the logical URI." requirements="Allows externally provided and/or usable business identifiers to be easily associated with the module." isSummary="true">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Definition.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Business version of the value set</desc>
                    <fhir fid="ValueSet.version"
                        definition="The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."
                        comment="There may be different value set instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a reference to a particular business version of the value set with the format [url]|[version]." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.version"/>
                        <mapping identity="w5" map="FiveWs.version"/>
                    </fhir>
                </element>
                <element name="name" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this value set (computer friendly)</desc>
                    <fhir fid="ValueSet.name" definition="A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation."
                        comment="The name is not expected to be globally unique. The name should be a simple alphanumeric type name to ensure that it is machine-processing friendly.A name should be provided unless the value set is a contained resource (e.g. an anonymous value set in a profile). Most registries will require a name." requirements="Support human navigation and code generation."
                        isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="title" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name for this value set (human friendly)</desc>
                    <fhir fid="ValueSet.title" definition="A short, descriptive, user-friendly title for the value set." comment="This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.title"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">draft | active | retired | unknown</desc>
                    <fhir fid="ValueSet.status" definition="The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state."
                        comment="Allows filtering of value sets that are appropriate for use versus not.See also the [valueset-workflowStatus](extension-valueset-workflowstatus.html) extension for additional status information related to the editorial process." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="PublicationStatus" strength="required" description="The lifecycle status of an artifact." valueSet="2.16.840.1.113883.4.642.3.3" canonicalUri="http://hl7.org/fhir/ValueSet/publication-status|4.0.1"/>
                        <mapping identity="workflow" map="Definition.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                    </fhir>
                </element>
                <element name="experimental" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">For testing purposes, not real usage</desc>
                    <fhir fid="ValueSet.experimental" definition="A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." comment="Allows filtering of value sets that are appropriate for use versus not."
                        requirements="Enables experimental content to be developed following the same lifecycle that would be used for a production-level value set." isSummary="true">
                        <type value="boolean"/>
                        <mapping identity="workflow" map="Definition.experimental"/>
                        <mapping identity="w5" map="FiveWs.class"/>
                    </fhir>
                </element>
                <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Date last changed</desc>
                    <fhir fid="ValueSet.date" definition="The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition')."
                        comment="Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the value set. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Definition.date"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="publisher" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Name of the publisher (organization or individual)</desc>
                    <fhir fid="ValueSet.publisher" definition="The name of the organization or individual that published the value set."
                        comment="Usually an organization but may be an individual. The publisher (or steward) of the value set is the organization or individual primarily responsible for the maintenance and upkeep of the value set. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the value set. This item SHOULD be populated unless the information is available from context."
                        requirements="Helps establish the &#34;authority/credibility&#34; of the value set.  May also allow for contact." isSummary="true">
                        <type value="string"/>
                        <mapping identity="workflow" map="Definition.publisher"/>
                        <mapping identity="w5" map="FiveWs.witness"/>
                    </fhir>
                </element>
                <element name="contact" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Contact details for the publisher</desc>
                    <fhir fid="ValueSet.contact" definition="Contact details to assist a user in finding and communicating with the publisher." comment="May be a web site, an email address, a telephone number, etc." isSummary="true">
                        <type value="ContactDetail"/>
                        <mapping identity="workflow" map="Definition.contact"/>
                    </fhir>
                </element>
                <element name="description" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Natural language description of the value set</desc>
                    <fhir fid="ValueSet.description" definition="A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set."
                        comment="This description can be used to capture details such as why the value set was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the value set as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the value set is presumed to be the predominant language in the place the value set was created).The description is not intended to describe the semantics of the Value Set - there are no intrinsic semantics separate from the codes contained in its expansion. The description should capture its intended use, which is needed for ensuring integrity for its use in models across future changes. A description should be provided unless the value set is a contained resource (e.g. an anonymous value set in a profile). Most registries will require a description.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.description"/>
                        <mapping identity="rim" map="N/A"/>
                    </fhir>
                </element>
                <element name="useContext" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The context that the content is intended to support</desc>
                    <fhir fid="ValueSet.useContext" definition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances."
                        comment="When multiple useContexts are specified, there is no expectation that all or any of the contexts apply." requirements="Assist in searching for appropriate content." isSummary="true">
                        <type value="UsageContext"/>
                        <mapping identity="workflow" map="Definition.useContext"/>
                    </fhir>
                </element>
                <element name="jurisdiction" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Intended jurisdiction for value set (if applicable)</desc>
                    <fhir fid="ValueSet.jurisdiction" definition="A legal or geographic region in which the value set is intended to be used." comment="It may be possible for the value set to be used in jurisdictions other than those for which it was originally designed or intended." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Jurisdiction" strength="extensible" description="Countries and regions within which this artifact is targeted for use." valueSet="2.16.840.1.113883.4.642.3.48" canonicalUri="http://hl7.org/fhir/ValueSet/jurisdiction"/>
                        <mapping identity="workflow" map="Definition.jurisdiction"/>
                    </fhir>
                </element>
                <element name="immutable" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Indicates whether or not any change to the content logical definition may occur</desc>
                    <fhir fid="ValueSet.immutable" definition="If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change."
                        comment="Normally immutability is set to 'false', which is the default assumption if it is not populated.  Note that the implication is that if this is set to 'true', there may be only one ValueSet version for this definition. Immutability tends to be set to 'true' in one of two cases: - Where the value set, by the nature of its usage, cannot change.  For example &#34;All specializations of ACT in ActClassCode&#34; - Where there's no safe way to express the &#34;Purpose&#34; such that someone else could safely make changes to the value set definition. Source workflow control must guarantee that the same URI always yields the same definition."
                        isSummary="true">
                        <type value="boolean"/>
                    </fhir>
                </element>
                <element name="purpose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Why this value set is defined</desc>
                    <fhir fid="ValueSet.purpose" definition="Explanation of why this value set is needed and why it has been designed as it has."
                        comment="This element does not describe the usage of the value set. Instead, it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this value set.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.purpose"/>
                        <mapping identity="w5" map="FiveWs.why[x]"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="copyright" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Use and/or publishing restrictions</desc>
                    <fhir fid="ValueSet.copyright" definition="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set."
                        comment="nullFrequently, the copyright differs between the value set and the codes that are included. The copyright statement should clearly differentiate between these when required." requirements="Consumers must be able to determine any legal restrictions on the use of the value set and/or its content.">
                        <type value="markdown"/>
                        <mapping identity="workflow" map="Definition.copyright"/>
                        <mapping identity="objimpl" map="no-gen-base"/>
                    </fhir>
                </element>
                <element name="compose" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Content logical definition of the value set (CLD)</desc>
                    <fhir fid="ValueSet.compose" definition="A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="lockedDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Fixed date for references with no specified version (transitive)</desc>
                        <fhir fid="ValueSet.compose.lockedDate" definition="The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version."
                            comment="With a defined lockedDate the value set is considered &#34;Locked&#34;. Otherwise, the value set may have different expansions as underlying code systems and/or value sets evolve.  The interpretation of lockedDate is often dependent on the context - e.g. a SNOMED CT derived value set with a lockedDate will have a different expansion in USA than in UK.  If a value set specifies a version for include and exclude statements, and also specifies a locked date, the specified versions need to be available that date, or the value set will not be usable."
                            isSummary="true">
                            <type value="date"/>
                            <mapping identity="w5" map="FiveWs.init"/>
                        </fhir>
                    </element>
                    <element name="inactive" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Whether inactive codes are in the value set</desc>
                        <fhir fid="ValueSet.compose.inactive"
                            definition="Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included)."
                            comment="Note that in the FHIR terminology framework, &#34;deprecated&#34; does not mean inactive, but in some code systems, e.g. LOINC, &#34;deprecated&#34; does mean inactive. Code systems should define what codes are considered to be inactive. If this is not clearly defined (including in the FHIR code system resource), then all codes are assumed to be active.&#xA;&#xA;The Value Set Definition specification defines an ActiveOnly element, which is the reverse of this element e.g. (ValueSet.compose.inactive=FALSE) is the same as (VSD.ActiveOnly=TRUE)."
                            isSummary="true">
                            <type value="boolean"/>
                        </fhir>
                    </element>
                    <element name="include" minimumMultiplicity="1" maximumMultiplicity="*">
                        <desc language="en-US">Include one or more codes from a code system or other value set(s)</desc>
                        <fhir fid="ValueSet.compose.include" definition="Include one or more codes from a code system or other value set(s)."
                            comment="All the conditions in an include must be true. If a system is listed, all the codes from the system are listed. If one or more filters are listed, all of the filters must apply. If one or more value sets are listed, the codes must be in all the value sets. E.g. each include is 'include all the codes that meet all these conditions'." isSummary="true">
                            <type value="BackboneElement"/>
                            <mapping identity="rim" map="N/A"/>
                            <constraint key="vsd-2" severity="error" human="A value set with concepts or filters SHALL include a system" expression="(concept.exists() or filter.exists()) implies system.exists()" xpath="not(exists(f:concept) or exists(f:filter)) or exists(f:system)" source=""/>
                            <constraint key="vsd-3" severity="error" human="Cannot have both concept and filter" expression="concept.empty() or filter.empty()" xpath="not(exists(f:concept)) or not(exists(f:filter))" source=""/>
                            <constraint key="vsd-1" severity="error" human="A value set include/exclude SHALL have a value set or a system" expression="valueSet.exists() or system.exists()" xpath="exists(f:valueSet) or exists(f:system)" source=""/>
                        </fhir>
                        <element name="system" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">The system the codes come from</desc>
                            <fhir fid="ValueSet.compose.include.system" definition="An absolute URI which is the code system from which the selected codes come from."
                                comment="If there are no codes or filters, the entire code system is included. Note that the set of codes that are included may contain abstract codes. See ''Coding.system'' for further documentation about the correct value for the system element." isSummary="true">
                                <type value="uri"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                        <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Specific version of the code system referred to</desc>
                            <fhir fid="ValueSet.compose.include.version" definition="The version of the code system that the codes are selected from, or the special version '*' for all versions."
                                comment="This is used when selecting the descendants of a concept - they may change between versions. If no version is specified, then the exact contents of the value set might not be known until a context of use binds it to a particular version. The special value '*' means all versions; It is at server discretion regarding expansions and which versions must be supported."
                                isSummary="true">
                                <type value="string"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                        <element name="concept" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">A concept defined in the system</desc>
                            <fhir fid="ValueSet.compose.include.concept" definition="Specifies a concept to be included or excluded." comment="The list of concepts is considered ordered, though the order might not have any particular significance. Typically, the order of an expansion follows that defined in the compose element.">
                                <type value="BackboneElement"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                            <element name="code" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Code or expression from system</desc>
                                <fhir fid="ValueSet.compose.include.concept.code" definition="Specifies a code for the concept to be included or excluded." comment="Expressions are allowed if defined by the underlying code system.">
                                    <type value="code"/>
                                    <mapping identity="rim" map="N/A"/>
                                </fhir>
                            </element>
                            <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                                <desc language="en-US">Text to display for this code for this value set in this valueset</desc>
                                <fhir fid="ValueSet.compose.include.concept.display" definition="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system."
                                    comment="The value set resource allows for an alternative display to be specified for when this concept is used in this particular value set. See notes in the value set narrative about the correct use of this element.">
                                    <type value="string"/>
                                    <mapping identity="rim" map="N/A"/>
                                </fhir>
                            </element>
                            <element name="designation" minimumMultiplicity="0" maximumMultiplicity="*">
                                <desc language="en-US">Additional representations for this concept</desc>
                                <fhir fid="ValueSet.compose.include.concept.designation" definition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc."
                                    comment="Concepts have both a ```display``` and an array of ```designation```. The display is equivalent to a special designation with an implied ```designation.use``` of &#34;primary code&#34; and a language equal to the [Resource Language](resource.html#language).">
                                    <type value="BackboneElement"/>
                                </fhir>
                                <element name="language" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">Human language of the designation</desc>
                                    <fhir fid="ValueSet.compose.include.concept.designation.language" definition="The language this designation is defined for." comment="In the absence of a language, the resource language applies.">
                                        <type value="code"/>
                                        <binding displayName="Common Languages" strength="preferred" description="A human language." valueSet="2.16.840.1.113883.4.642.3.20" canonicalUri="http://hl7.org/fhir/ValueSet/languages"/>
                                    </fhir>
                                </element>
                                <element name="use" minimumMultiplicity="0" maximumMultiplicity="1">
                                    <desc language="en-US">Types of uses of designations</desc>
                                    <fhir fid="ValueSet.compose.include.concept.designation.use" definition="A code that represents types of uses of designations." comment="If no use is provided, the designation can be assumed to be suitable for general display to a human user.">
                                        <type value="Coding"/>
                                        <binding displayName="Designation Use" strength="extensible" description="Details of how a designation would be used." valueSet="2.16.840.1.113883.4.642.3.264" canonicalUri="http://hl7.org/fhir/ValueSet/designation-use"/>
                                    </fhir>
                                </element>
                                <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                    <desc language="en-US">The text value for this designation</desc>
                                    <fhir fid="ValueSet.compose.include.concept.designation.value" definition="The text value for this designation.">
                                        <type value="string"/>
                                    </fhir>
                                </element>
                            </element>
                        </element>
                        <element name="filter" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Select codes/concepts by their properties (including relationships)</desc>
                            <fhir fid="ValueSet.compose.include.filter" definition="Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true."
                                comment="Selecting codes by specifying filters based on properties is only possible where the underlying code system defines appropriate properties. Note that in some cases, the underlying code system defines the logical concepts but not the literal codes for the concepts. In such cases, the literal definitions may be provided by a third party." isSummary="true">
                                <type value="BackboneElement"/>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                            <element name="property" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">A property/filter defined by the code system</desc>
                                <fhir fid="ValueSet.compose.include.filter.property" definition="A code that identifies a property or a filter defined in the code system." isSummary="true">
                                    <type value="code"/>
                                    <mapping identity="rim" map="N/A"/>
                                </fhir>
                            </element>
                            <element name="op" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists</desc>
                                <fhir fid="ValueSet.compose.include.filter.op" definition="The kind of operation to perform as a part of the filter criteria."
                                    comment="In case filter.property represents a property of the system, the operation applies to the selected property. In case filter.property represents a filter of the system, the operation SHALL match one of the CodeSystem.filter.operator values." isSummary="true">
                                    <type value="code"/>
                                    <binding displayName="FilterOperator" strength="required" description="The kind of operation to perform as a part of a property based filter." valueSet="2.16.840.1.113883.4.642.3.478" canonicalUri="http://hl7.org/fhir/ValueSet/filter-operator|4.0.1"/>
                                    <mapping identity="rim" map="N/A"/>
                                </fhir>
                            </element>
                            <element name="value" minimumMultiplicity="1" maximumMultiplicity="1">
                                <desc language="en-US">Code from the system, or regex criteria, or boolean value for exists</desc>
                                <fhir fid="ValueSet.compose.include.filter.value"
                                    definition="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'."
                                    comment="Use regex matching with care - full regex matching on every SNOMED CT term is prohibitive, for example." isSummary="true">
                                    <type value="string"/>
                                    <mapping identity="rim" map="N/A"/>
                                </fhir>
                            </element>
                        </element>
                        <element name="valueSet" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Select the contents included in this value set</desc>
                            <fhir fid="ValueSet.compose.include.valueSet" definition="Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets."
                                comment="The value set URI is either a logical reference to a defined value set such as a [SNOMED CT reference set](snomedct.html#implicit), or a direct reference to a value set definition using ValueSet.url. The reference might not refer to an actual FHIR ValueSet resource; in this case, whatever is referred to is an implicit definition of a value set that needs to be clear about how versions are resolved."
                                isSummary="true">
                                <type value="canonical">
                                    <targetProfile ref="http://hl7.org/fhir/StructureDefinition/ValueSet"/>
                                </type>
                                <mapping identity="rim" map="N/A"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="exclude" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Explicitly exclude codes from a code system or other value sets</desc>
                        <fhir fid="ValueSet.compose.exclude" definition="Exclude one or more codes from the value set based on code system filters and/or other value sets." comment="Usually this is used to selectively exclude codes that were included by subsumption in the inclusions. Any display names specified for the codes are ignored.">
                            <mapping identity="rim" map="N/A"/>
                        </fhir>
                    </element>
                </element>
                <element name="expansion" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Used when the value set is "expanded"</desc>
                    <fhir fid="ValueSet.expansion" definition="A value set can also be &#34;expanded&#34;, where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed."
                        comment="Expansion is performed to produce a collection of codes that are ready to use for data entry or validation. Value set expansions are always considered to be stateless - they are a record of the set of codes in the value set at a point in time under a given set of conditions, and are not subject to ongoing maintenance.&#xA;&#xA;Expansion.parameter is  a simplified list of parameters - a subset of the features of the [Parameters](parameters.html) resource.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Identifies the value set expansion (business identifier)</desc>
                        <fhir fid="ValueSet.expansion.identifier"
                            definition="An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier."
                            comment="Typically, this uri is a UUID (e.g. urn:uuid:8230ff20-c97a-4167-a59d-dc2cb9df16dd).">
                            <type value="uri"/>
                        </fhir>
                    </element>
                    <element name="timestamp" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Time ValueSet expansion happened</desc>
                        <fhir fid="ValueSet.expansion.timestamp" definition="The time at which the expansion was produced by the expanding system." comment="This SHOULD be a fully populated instant, but in some circumstances, value sets are expanded by hand, and the expansion is published without that precision.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="total" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Total number of codes in the expansion</desc>
                        <fhir fid="ValueSet.expansion.total" definition="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter." comment="Paging only applies to flat expansions.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="offset" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Offset at which this resource starts</desc>
                        <fhir fid="ValueSet.expansion.offset" definition="If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present."
                            comment="Paging only applies to flat expansions. If a filter is applied, the count is the number of concepts that matched the filter, not the number of concepts in an unfiltered view of the expansion.">
                            <type value="integer"/>
                        </fhir>
                    </element>
                    <element name="parameter" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Parameter that controlled the expansion process</desc>
                        <fhir fid="ValueSet.expansion.parameter" definition="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion."
                            comment="The server decides which parameters to include here, but at a minimum, the list SHOULD include all of the parameters that affect the $expand operation. If the expansion will be persisted all of these parameters SHALL be included. If the codeSystem on the server has a specified version then this version SHALL be provided as a parameter in the expansion (note that not all code systems have a version).">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="name" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Name as assigned by the client or server</desc>
                            <fhir fid="ValueSet.expansion.parameter.name" definition="Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process." comment="The names are assigned at the discretion of the server.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <choice name="value[x]" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Value of the named parameter</desc>
                            <fhir fid="ValueSet.expansion.parameter.value[x]" definition="The value of the parameter.">
                                <type value="string"/>
                                <type value="boolean"/>
                                <type value="integer"/>
                                <type value="decimal"/>
                                <type value="uri"/>
                                <type value="code"/>
                                <type value="dateTime"/>
                            </fhir>
                            <element name="valueString">
                                <fhir fid="ValueSet.expansion.parameter.valueString">
                                    <type value="string"/>
                                </fhir>
                            </element>
                            <element name="valueBoolean">
                                <fhir fid="ValueSet.expansion.parameter.valueBoolean">
                                    <type value="boolean"/>
                                </fhir>
                            </element>
                            <element name="valueInteger">
                                <fhir fid="ValueSet.expansion.parameter.valueInteger">
                                    <type value="integer"/>
                                </fhir>
                            </element>
                            <element name="valueDecimal">
                                <fhir fid="ValueSet.expansion.parameter.valueDecimal">
                                    <type value="decimal"/>
                                </fhir>
                            </element>
                            <element name="valueUri">
                                <fhir fid="ValueSet.expansion.parameter.valueUri">
                                    <type value="uri"/>
                                </fhir>
                            </element>
                            <element name="valueCode">
                                <fhir fid="ValueSet.expansion.parameter.valueCode">
                                    <type value="code"/>
                                </fhir>
                            </element>
                            <element name="valueDateTime">
                                <fhir fid="ValueSet.expansion.parameter.valueDateTime">
                                    <type value="dateTime"/>
                                </fhir>
                            </element>
                        </choice>
                    </element>
                    <element name="contains" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Codes in the value set</desc>
                        <fhir fid="ValueSet.expansion.contains" definition="The codes that are contained in the value set expansion.">
                            <type value="BackboneElement"/>
                            <constraint key="vsd-6" severity="error" human="SHALL have a code or a display" expression="code.exists() or display.exists()" xpath="exists(f:code) or exists(f:display)" source=""/>
                            <constraint key="vsd-9" severity="error" human="Must have a code if not abstract" expression="code.exists() or abstract = true" xpath="exists(f:code) or (f:abstract/@value = true())" source=""/>
                            <constraint key="vsd-10" severity="error" human="Must have a system if a code is present" expression="code.empty() or system.exists()" xpath="exists(f:system) or not(exists(f:code))" source=""/>
                        </fhir>
                        <element name="system" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">System value for the code</desc>
                            <fhir fid="ValueSet.expansion.contains.system" definition="An absolute URI which is the code system in which the code for this item in the expansion is defined.">
                                <type value="uri"/>
                            </fhir>
                        </element>
                        <element name="abstract" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If user cannot select this entry</desc>
                            <fhir fid="ValueSet.expansion.contains.abstract" definition="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value."
                                comment="This should not be understood to exclude its use for searching (e.g. by subsumption testing). The client should know whether it is appropriate for the user to select an abstract code or not.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="inactive" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">If concept is inactive in the code system</desc>
                            <fhir fid="ValueSet.expansion.contains.inactive" definition="If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use)."
                                comment="This should only have a value if the concept is inactive.">
                                <type value="boolean"/>
                            </fhir>
                        </element>
                        <element name="version" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Version in which this code/display is defined</desc>
                            <fhir fid="ValueSet.expansion.contains.version"
                                definition="The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged."
                                comment="The exact value of the version string is specified by the system from which the code is derived.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="code" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">Code - if blank, this is not a selectable code</desc>
                            <fhir fid="ValueSet.expansion.contains.code" definition="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.">
                                <type value="code"/>
                            </fhir>
                        </element>
                        <element name="display" minimumMultiplicity="0" maximumMultiplicity="1">
                            <desc language="en-US">User display for the concept</desc>
                            <fhir fid="ValueSet.expansion.contains.display" definition="The recommended display for this item in the expansion.">
                                <type value="string"/>
                            </fhir>
                        </element>
                        <element name="designation" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Additional representations for this item</desc>
                            <fhir fid="ValueSet.expansion.contains.designation" definition="Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation."
                                comment="The designations provided must be based on the value set and code system definitions."/>
                        </element>
                        <element name="contains" minimumMultiplicity="0" maximumMultiplicity="*">
                            <desc language="en-US">Codes contained under this entry</desc>
                            <fhir fid="ValueSet.expansion.contains.contains" definition="Other codes and entries contained under this entry in the hierarchy."
                                comment="If the expansion uses this element, there is  no implication about the logical relationship between them, and the  structure cannot be used for logical inferencing. The structure  exists to provide navigational assistance for helping human users to  locate codes in the expansion."/>
                        </element>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.147" name="VerificationResult" displayName="VerificationResult" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/VerificationResult">
            <desc language="en-US">Describes validation requirements, source(s), status and dates for one or more elements.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="VerificationResult" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
            </fhir>
            <element name="VerificationResult" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Describes validation requirements, source(s), status and dates for one or more elements</desc>
                <fhir fid="VerificationResult" definition="Describes validation requirements, source(s), status and dates for one or more elements."/>
                <element name="target" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">A resource that was validated</desc>
                    <fhir fid="VerificationResult.target" definition="A resource that was validated." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Resource"/>
                        </type>
                    </fhir>
                </element>
                <element name="targetLocation" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The fhirpath location(s) within the resource that was validated</desc>
                    <fhir fid="VerificationResult.targetLocation" definition="The fhirpath location(s) within the resource that was validated." isSummary="true">
                        <type value="string"/>
                    </fhir>
                </element>
                <element name="need" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">none | initial | periodic</desc>
                    <fhir fid="VerificationResult.need" definition="The frequency with which the target must be validated (none; initial; periodic)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Need" strength="preferred" description="The frequency with which the target must be validated." valueSet="2.16.840.1.113883.4.642.3.882" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-need"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">attested | validated | in-process | req-revalid | val-fail | reval-fail</desc>
                    <fhir fid="VerificationResult.status" definition="The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed)." isSummary="true">
                        <type value="code"/>
                        <binding displayName="Status" strength="required" description="The validation status of the target." valueSet="2.16.840.1.113883.4.642.3.884" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-status|4.0.1"/>
                    </fhir>
                </element>
                <element name="statusDate" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">When the validation status was updated</desc>
                    <fhir fid="VerificationResult.statusDate" definition="When the validation status was updated." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="validationType" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">nothing | primary | multiple</desc>
                    <fhir fid="VerificationResult.validationType" definition="What the target is validated against (nothing; primary source; multiple sources)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Validation-type" strength="preferred" description="What the target is validated against." valueSet="2.16.840.1.113883.4.642.3.886" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-validation-type"/>
                    </fhir>
                </element>
                <element name="validationProcess" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)</desc>
                    <fhir fid="VerificationResult.validationProcess" definition="The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Validation-process" strength="example" description="The primary process by which the target is validated." valueSet="2.16.840.1.113883.4.642.3.888" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-validation-process"/>
                    </fhir>
                </element>
                <element name="frequency" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Frequency of revalidation</desc>
                    <fhir fid="VerificationResult.frequency" definition="Frequency of revalidation.">
                        <type value="Timing"/>
                    </fhir>
                </element>
                <element name="lastPerformed" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date/time validation was last completed (including failed validations)</desc>
                    <fhir fid="VerificationResult.lastPerformed" definition="The date/time validation was last completed (including failed validations).">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="nextScheduled" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">The date when target is next validated, if appropriate</desc>
                    <fhir fid="VerificationResult.nextScheduled" definition="The date when target is next validated, if appropriate.">
                        <type value="date"/>
                    </fhir>
                </element>
                <element name="failureAction" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">fatal | warn | rec-only | none</desc>
                    <fhir fid="VerificationResult.failureAction" definition="The result if validation fails (fatal; warning; record only; none)." isSummary="true">
                        <type value="CodeableConcept"/>
                        <binding displayName="Failure-action" strength="preferred" description="The result if validation fails." valueSet="2.16.840.1.113883.4.642.3.890" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-failure-action"/>
                    </fhir>
                </element>
                <element name="primarySource" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the primary source(s) involved in validation</desc>
                    <fhir fid="VerificationResult.primarySource" definition="Information about the primary source(s) involved in validation.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="who" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the primary source</desc>
                        <fhir fid="VerificationResult.primarySource.who" definition="Reference to the primary source.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                            <mapping identity="w5" map="FiveWs.who"/>
                        </fhir>
                    </element>
                    <element name="type" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)</desc>
                        <fhir fid="VerificationResult.primarySource.type" definition="Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Primary-source-type" strength="example" description="Type of the validation primary source." valueSet="2.16.840.1.113883.4.642.3.892" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-primary-source-type"/>
                        </fhir>
                    </element>
                    <element name="communicationMethod" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Method for exchanging information with the primary source</desc>
                        <fhir fid="VerificationResult.primarySource.communicationMethod" definition="Method for communicating with the primary source (manual; API; Push)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="VerificationResult Communication Method" strength="example" description="Method for communicating with the data source (manual; API; Push)." valueSet="2.16.840.1.113883.4.642.3.1401" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-communication-method"/>
                        </fhir>
                    </element>
                    <element name="validationStatus" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">successful | failed | unknown</desc>
                        <fhir fid="VerificationResult.primarySource.validationStatus" definition="Status of the validation of the target against the primary source (successful; failed; unknown).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Validation-status" strength="preferred" description="Status of the validation of the target against the primary source." valueSet="2.16.840.1.113883.4.642.3.894" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-validation-status"/>
                        </fhir>
                    </element>
                    <element name="validationDate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the target was validated against the primary source</desc>
                        <fhir fid="VerificationResult.primarySource.validationDate" definition="When the target was validated against the primary source.">
                            <type value="dateTime"/>
                        </fhir>
                    </element>
                    <element name="canPushUpdates" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">yes | no | undetermined</desc>
                        <fhir fid="VerificationResult.primarySource.canPushUpdates" definition="Ability of the primary source to push updates/alerts (yes; no; undetermined)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Can-push-updates" strength="preferred" description="Ability of the primary source to push updates/alerts." valueSet="2.16.840.1.113883.4.642.3.896" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-can-push-updates"/>
                        </fhir>
                    </element>
                    <element name="pushTypeAvailable" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">specific | any | source</desc>
                        <fhir fid="VerificationResult.primarySource.pushTypeAvailable" definition="Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).">
                            <type value="CodeableConcept"/>
                            <binding displayName="Push-type-available" strength="preferred" description="Type of alerts/updates the primary source can send." valueSet="2.16.840.1.113883.4.642.3.898" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-push-type-available"/>
                        </fhir>
                    </element>
                </element>
                <element name="attestation" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Information about the entity attesting to information</desc>
                    <fhir fid="VerificationResult.attestation" definition="Information about the entity attesting to information.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="who" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The individual or organization attesting to information</desc>
                        <fhir fid="VerificationResult.attestation.who" definition="The individual or organization attesting to information." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="onBehalfOf" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">When the who is asserting on behalf of another (organization or individual)</desc>
                        <fhir fid="VerificationResult.attestation.onBehalfOf" definition="When the who is asserting on behalf of another (organization or individual)." isSummary="true">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="communicationMethod" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The method by which attested information was submitted/retrieved</desc>
                        <fhir fid="VerificationResult.attestation.communicationMethod" definition="The method by which attested information was submitted/retrieved (manual; API; Push)." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="VerificationResult Communication Method" strength="example" description="Method for communicating with the data source (manual; API; Push)." valueSet="2.16.840.1.113883.4.642.3.1401" canonicalUri="http://hl7.org/fhir/ValueSet/verificationresult-communication-method"/>
                        </fhir>
                    </element>
                    <element name="date" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">The date the information was attested to</desc>
                        <fhir fid="VerificationResult.attestation.date" definition="The date the information was attested to." isSummary="true">
                            <type value="date"/>
                        </fhir>
                    </element>
                    <element name="sourceIdentityCertificate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A digital identity certificate associated with the attestation source</desc>
                        <fhir fid="VerificationResult.attestation.sourceIdentityCertificate" definition="A digital identity certificate associated with the attestation source.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="proxyIdentityCertificate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source</desc>
                        <fhir fid="VerificationResult.attestation.proxyIdentityCertificate" definition="A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="proxySignature" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Proxy signature</desc>
                        <fhir fid="VerificationResult.attestation.proxySignature" definition="Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.">
                            <type value="Signature"/>
                        </fhir>
                    </element>
                    <element name="sourceSignature" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Attester signature</desc>
                        <fhir fid="VerificationResult.attestation.sourceSignature" definition="Signed assertion by the attestation source that they have attested to the information.">
                            <type value="Signature"/>
                        </fhir>
                    </element>
                </element>
                <element name="validator" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Information about the entity validating information</desc>
                    <fhir fid="VerificationResult.validator" definition="Information about the entity validating information.">
                        <type value="BackboneElement"/>
                    </fhir>
                    <element name="organization" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Reference to the organization validating information</desc>
                        <fhir fid="VerificationResult.validator.organization" definition="Reference to the organization validating information.">
                            <type value="Reference">
                                <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Organization"/>
                            </type>
                        </fhir>
                    </element>
                    <element name="identityCertificate" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">A digital identity certificate associated with the validator</desc>
                        <fhir fid="VerificationResult.validator.identityCertificate" definition="A digital identity certificate associated with the validator.">
                            <type value="string"/>
                        </fhir>
                    </element>
                    <element name="attestationSignature" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Validator signature</desc>
                        <fhir fid="VerificationResult.validator.attestationSignature" definition="Signed assertion by the validator that they have validated the information.">
                            <type value="Signature"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>
        <template id="2.16.840.1.113883.3.1937.99.60.10.26.148" name="VisionPrescription" displayName="VisionPrescription" effectiveDate="2019-11-01T09:29:23" statusCode="draft" versionLabel="4.0.1" canonicalUri="http://hl7.org/fhir/StructureDefinition/VisionPrescription">
            <desc language="en-US">An authorization for the provision of glasses and/or contact lenses to a patient.</desc>
            <classification type="fhirprofile" format="fhirxml"/>
            <fhir fhirVersion="4.0" kind="resource" abstract="false" type="VisionPrescription" baseDefinition="http://hl7.org/fhir/StructureDefinition/DomainResource" derivation="specialization">
                <mapping identity="workflow" uri="http://hl7.org/fhir/workflow" name="Workflow Pattern"/>
                <mapping identity="rim" uri="http://hl7.org/v3" name="RIM Mapping"/>
                <mapping identity="w5" uri="http://hl7.org/fhir/fivews" name="FiveWs Pattern Mapping"/>
                <mapping identity="v2" uri="http://hl7.org/v2" name="HL7 v2 Mapping"/>
            </fhir>
            <element name="VisionPrescription" minimumMultiplicity="0" maximumMultiplicity="*">
                <desc language="en-US">Prescription for vision correction products for a patient</desc>
                <fhir fid="VisionPrescription" definition="An authorization for the provision of glasses and/or contact lenses to a patient.">
                    <mapping identity="workflow" map="Request"/>
                    <mapping identity="rim" map="CombinedVisionRequest"/>
                </fhir>
                <element name="identifier" minimumMultiplicity="0" maximumMultiplicity="*">
                    <desc language="en-US">Business Identifier for vision prescription</desc>
                    <fhir fid="VisionPrescription.identifier" definition="A unique identifier assigned to this vision prescription." requirements="Allows vision prescriptions to be distinguished and referenced.">
                        <type value="Identifier"/>
                        <mapping identity="workflow" map="Request.identifier"/>
                        <mapping identity="w5" map="FiveWs.identifier"/>
                        <mapping identity="v2" map="ORC-2-Placer Order Number / ORC-3-Filler Order Number"/>
                        <mapping identity="rim" map="id"/>
                    </fhir>
                </element>
                <element name="status" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">active | cancelled | draft | entered-in-error</desc>
                    <fhir fid="VisionPrescription.status" definition="The status of the resource instance." comment="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid."
                        requirements="Need to track the status of the resource as 'draft' resources may undergo further edits while 'active' resources are immutable and may only have their status changed to 'cancelled'." isModifier="true" isSummary="true">
                        <type value="code"/>
                        <binding displayName="Financial Resource Status Codes" strength="required" description="A code specifying the state of the resource instance." valueSet="2.16.840.1.113883.4.642.3.592" canonicalUri="http://hl7.org/fhir/ValueSet/fm-status|4.0.1"/>
                        <mapping identity="workflow" map="Request.status"/>
                        <mapping identity="w5" map="FiveWs.status"/>
                        <mapping identity="rim" map="Act.status"/>
                    </fhir>
                </element>
                <element name="created" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Response creation date</desc>
                    <fhir fid="VisionPrescription.created" definition="The date this resource was created." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                    </fhir>
                </element>
                <element name="patient" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who prescription is for</desc>
                    <fhir fid="VisionPrescription.patient" definition="A resource reference to the person to whom the vision prescription applies." requirements="Needed to identify the patient for whom the vision prescription has been issued." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Patient"/>
                        </type>
                        <mapping identity="workflow" map="Request.subject"/>
                        <mapping identity="w5" map="FiveWs.subject[x]"/>
                        <mapping identity="v2" map="PID-3-Patient ID List"/>
                        <mapping identity="rim" map="subject.role"/>
                        <mapping identity="w5" map="FiveWs.subject"/>
                    </fhir>
                </element>
                <element name="encounter" minimumMultiplicity="0" maximumMultiplicity="1">
                    <desc language="en-US">Created during encounter / admission / stay</desc>
                    <fhir fid="VisionPrescription.encounter" definition="A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued." requirements="Used in some jurisdictions to link clinical events to claim items.">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Encounter"/>
                        </type>
                        <mapping identity="workflow" map="Request.context"/>
                        <mapping identity="w5" map="FiveWs.context"/>
                        <mapping identity="v2" map="PV1-19-Visit Number"/>
                        <mapping identity="rim" map="componentOf.patientEncounter"/>
                    </fhir>
                </element>
                <element name="dateWritten" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">When prescription was authorized</desc>
                    <fhir fid="VisionPrescription.dateWritten" definition="The date (and perhaps time) when the prescription was written." comment="Jurisdictions determine the valid lifetime of a prescription. Typically vision prescriptions are valid for two years from the date written." requirements="Need to record a timestamp for use by both the recipient and the issuer." isSummary="true">
                        <type value="dateTime"/>
                        <mapping identity="workflow" map="Request.authoredOn"/>
                        <mapping identity="w5" map="FiveWs.recorded"/>
                        <mapping identity="v2" map="RXE-32-Original Order Date/Time / ORC-9-Date/Time of Transaction"/>
                        <mapping identity="rim" map="author.time"/>
                    </fhir>
                </element>
                <element name="prescriber" minimumMultiplicity="1" maximumMultiplicity="1">
                    <desc language="en-US">Who authorized the vision prescription</desc>
                    <fhir fid="VisionPrescription.prescriber" definition="The healthcare professional responsible for authorizing the prescription." requirements="Need to record the authorizing practitioner." isSummary="true">
                        <type value="Reference">
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/Practitioner"/>
                            <targetProfile ref="http://hl7.org/fhir/StructureDefinition/PractitionerRole"/>
                        </type>
                        <mapping identity="workflow" map="Request.requester"/>
                        <mapping identity="w5" map="FiveWs.author"/>
                        <mapping identity="v2" map="RXE-13-Ordering Provider's DEA Number / RXO-14-Ordering Provider's DEA Number / RXE-14-Pharmacist/Treatment Supplier's Verifier ID / RXO-15-Pharmacist/Treatment Supplier's Verifier ID / ORC-12-Ordering Provider / PRT-5-Participation Person: PRT-4-Participation='OP' (all but last deprecated)"/>
                        <mapping identity="rim" map="author.role"/>
                    </fhir>
                </element>
                <element name="lensSpecification" minimumMultiplicity="1" maximumMultiplicity="*">
                    <desc language="en-US">Vision lens authorization</desc>
                    <fhir fid="VisionPrescription.lensSpecification" definition="Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals." isSummary="true">
                        <type value="BackboneElement"/>
                        <mapping identity="rim" map="component.supplyEvent"/>
                    </fhir>
                    <element name="product" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">Product to be supplied</desc>
                        <fhir fid="VisionPrescription.lensSpecification.product" definition="Identifies the type of vision correction product which is required for the patient." requirements="Need to identify whether glasses or contacts." isSummary="true">
                            <type value="CodeableConcept"/>
                            <binding displayName="Example Vision Prescription Product Codes" strength="example" description="A coded concept describing the vision products." valueSet="2.16.840.1.113883.4.642.3.658" canonicalUri="http://hl7.org/fhir/ValueSet/vision-product"/>
                            <mapping identity="v2" map="RXE-2-Give Code / RXO-1-Requested Give Code / RXD-2-Dispense/Give Code"/>
                            <mapping identity="rim" map="consumable.role"/>
                        </fhir>
                    </element>
                    <element name="eye" minimumMultiplicity="1" maximumMultiplicity="1">
                        <desc language="en-US">right | left</desc>
                        <fhir fid="VisionPrescription.lensSpecification.eye" definition="The eye for which the lens specification applies." comment="May also appear as OD (oculus dexter) for the right eye and OS (oculus siniter) for the left eye." requirements="Needed to identify which eye the lens specification applies to." isSummary="true">
                            <type value="code"/>
                            <binding displayName="VisionEyes" strength="required" description="A coded concept listing the eye codes." valueSet="2.16.840.1.113883.4.642.3.660" canonicalUri="http://hl7.org/fhir/ValueSet/vision-eye-codes|4.0.1"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="sphere" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Power of the lens</desc>
                        <fhir fid="VisionPrescription.lensSpecification.sphere" definition="Lens power measured in dioptres (0.25 units)." comment="The value is negative for near-sighted and positive for far sighted.&#xA;Often insurance will not cover a lens with power between +75 and -75." requirements="Standard lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="cylinder" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Lens power for astigmatism</desc>
                        <fhir fid="VisionPrescription.lensSpecification.cylinder" definition="Power adjustment for astigmatism measured in dioptres (0.25 units)." requirements="Standard lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="axis" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Lens meridian which contain no power for astigmatism</desc>
                        <fhir fid="VisionPrescription.lensSpecification.axis" definition="Adjustment for astigmatism measured in integer degrees." comment="The limits are +180 and -180 degrees." requirements="Standard lens prescription measures.">
                            <type value="integer"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="prism" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Eye alignment compensation</desc>
                        <fhir fid="VisionPrescription.lensSpecification.prism" definition="Allows for adjustment on two axis." requirements="Standard lens prescription measures.">
                            <type value="BackboneElement"/>
                        </fhir>
                        <element name="amount" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">Amount of adjustment</desc>
                            <fhir fid="VisionPrescription.lensSpecification.prism.amount" definition="Amount of prism to compensate for eye alignment in fractional units." requirements="Standard lens prescription measures.">
                                <type value="decimal"/>
                                <mapping identity="rim" map="n/a"/>
                            </fhir>
                        </element>
                        <element name="base" minimumMultiplicity="1" maximumMultiplicity="1">
                            <desc language="en-US">up | down | in | out</desc>
                            <fhir fid="VisionPrescription.lensSpecification.prism.base" definition="The relative base, or reference lens edge, for the prism." requirements="Standard lens prescription measures.">
                                <type value="code"/>
                                <binding displayName="VisionBase" strength="required" description="A coded concept listing the base codes." valueSet="2.16.840.1.113883.4.642.3.662" canonicalUri="http://hl7.org/fhir/ValueSet/vision-base-codes|4.0.1"/>
                                <mapping identity="rim" map="n/a"/>
                            </fhir>
                        </element>
                    </element>
                    <element name="add" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Added power for multifocal levels</desc>
                        <fhir fid="VisionPrescription.lensSpecification.add" definition="Power adjustment for multifocal lenses measured in dioptres (0.25 units)." requirements="Standard lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="power" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contact lens power</desc>
                        <fhir fid="VisionPrescription.lensSpecification.power" definition="Contact lens power measured in dioptres (0.25 units)." requirements="Standard contact lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="backCurve" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contact lens back curvature</desc>
                        <fhir fid="VisionPrescription.lensSpecification.backCurve" definition="Back curvature measured in millimetres." requirements="Standard contact lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="diameter" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Contact lens diameter</desc>
                        <fhir fid="VisionPrescription.lensSpecification.diameter" definition="Contact lens diameter measured in millimetres." requirements="Standard contact lens prescription measures.">
                            <type value="decimal"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="duration" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Lens wear duration</desc>
                        <fhir fid="VisionPrescription.lensSpecification.duration" definition="The recommended maximum wear period for the lens." requirements="Standard contact lens prescription measures.">
                            <type value="Quantity"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="color" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Color required</desc>
                        <fhir fid="VisionPrescription.lensSpecification.color" definition="Special color or pattern." requirements="Standard contact lens prescription measures.">
                            <type value="string"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="brand" minimumMultiplicity="0" maximumMultiplicity="1">
                        <desc language="en-US">Brand required</desc>
                        <fhir fid="VisionPrescription.lensSpecification.brand" definition="Brand recommendations or restrictions." requirements="Standard lens prescription measures.">
                            <type value="string"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                    <element name="note" minimumMultiplicity="0" maximumMultiplicity="*">
                        <desc language="en-US">Notes for coatings</desc>
                        <fhir fid="VisionPrescription.lensSpecification.note" definition="Notes for special requirements such as coatings and lens materials." requirements="Standard lens prescription measures.">
                            <type value="Annotation"/>
                            <mapping identity="rim" map="n/a"/>
                        </fhir>
                    </element>
                </element>
            </element>
        </template>


        <!-- Vital Signs Measurement -->
        <questionnaireAssociation questionnaireId="2.16.840.1.113883.3.1937.99.60.10.27.1" questionnaireEffectiveDate="2022-02-16T00:00:00">
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.3" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.3--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.80" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.80--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.81" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.81--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.82" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.82--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.83" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.83--20220103000000"/>
        </questionnaireAssociation>
        <questionnaire id="2.16.840.1.113883.3.1937.99.60.10.27.1" effectiveDate="2022-02-16T00:00:00" statusCode="draft" canonicalUri="http://art-decor.org/fhir/Questionnaire/VitalSignsMeasurement">
            <name language="en-US">Vital Signs Measurement</name>
            <desc language="en-US">This is the description for the Vital Signs Measurement Questionnaire</desc>
            <classification>
                <tag>Vital Signs</tag>
                <tag>Patient Surveillance</tag>
            </classification>
            <relationship type="DRIV" ref="2.16.840.1.113883.3.1937.99.60.10.4.2" flexibility="2022-02-16T00:00:00"/>
            <publishingAuthority name="ART-DECOR Open Tools GmbH and ART-DECOR Expert Group">
                <addrLine type="email">support@art-decor.org</addrLine>
                <addrLine type="uri">https://art-decor.org</addrLine>
            </publishingAuthority>
            <code code="85353-1" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org"/>
            <copyright language="en-US">Copyright</copyright>
            <copyright language="nl-NL">Kopierecht</copyright>
            <jurisdiction canonicalUri="urn:iso:std:iso:3166" displayName="Netherlands" codeSystem="1.0.3166.1.2.2" code="NL"/>
            <jurisdiction canonicalUri="urn:iso:std:iso:3166" displayName="United States" codeSystem="1.0.3166.1.2.2" code="US"/>
            <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.3--20220103000000" type="group" required="true" repeats="false">
                <text language="en-US">Vital Signs</text>
                <text language="nl-NL">Vital Signs</text>
                <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.3--20220103000000-help" type="display">
                    <text language="en-US">Set of Vital Signs to be used in the demo project</text>
                    <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                </item>
                <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.80--20220103000000" type="dateTime" required="true" repeats="false">
                    <text language="en-US">Date</text>
                    <text language="nl-NL">Datum</text>
                    <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.80--20220103000000-help" type="display">
                        <text language="en-US">Date when the measurement took place</text>
                        <text language="nl-NL">Datum</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
                <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.81--20220103000000" type="quantity" required="false" repeats="false">
                    <text language="en-US">Body weight</text>
                    <text language="nl-NL">Lichaamsgewicht</text>
                    <code code="29463-7" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org"/>
                    <unitOption code="kg" displayName="kilogram" canonicalUri="http://unitsofmeasure.org"/>
                    <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.81--20220103000000-help" type="display">
                        <text language="en-US">Body weight, measured in kg</text>
                        <text language="nl-NL">Lichaamsgewicht, in kg</text>
                        <itemControl code="help" displayName="Help-Button" canonicalUri="http://hl7.org/fhir/questionnaire-item-control"/>
                    </item>
                </item>
                <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.82--20220103000000" repeats="false" required="false" type="quantity">
                    <text language="en-US">Heart rate</text>
                    <text language="nl-NL">Hartslag</text>
                    <code code="8867-4" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org"/>
                    <unitOption code="/min" displayName="per minute" canonicalUri="http://unitsofmeasure.org"/>
                    <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.82--20220103000000-help" type="display">
                        <text language="en-US">Heart rate</text>
                        <text language="nl-NL">Hartslag</text>
                        <itemControl code="help" displayName="Help-Button" canonicalUri="http://hl7.org/fhir/questionnaire-item-control"/>
                    </item>
                </item>
                <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.83--20220103000000" repeats="false" required="false" type="quantity">
                    <text language="en-US">Body temperature</text>
                    <text language="nl-NL">Lichaamstemeratuur</text>
                    <code code="8310-5" canonicalUri="http://loinc.org"/>
                    <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.83--20220103000000-help" type="display">
                        <text language="en-US">Body temperature</text>
                        <text language="nl-NL">Lichaamstemeratuur</text>
                        <itemControl code="help" displayName="Help-Button" canonicalUri="http://hl7.org/fhir/questionnaire-item-control"/>
                    </item>
                </item>
            </item>
        </questionnaire>
        <!-- Vital Signs Measurement -->
        <questionnaireAssociation questionnaireId="2.16.840.1.113883.3.1937.99.60.10.27.2" questionnaireEffectiveDate="2022-02-16T17:03:16">
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.80" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.80--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.81" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.81--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.82" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.82--20220103000000"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.83" effectiveDate="2022-01-03T00:00:00" elementId="2.16.840.1.113883.3.1937.99.60.10.2.83--20220103000000"/>
        </questionnaireAssociation>
        <questionnaire id="2.16.840.1.113883.3.1937.99.60.10.27.2" effectiveDate="2022-02-16T17:03:16" statusCode="draft" enhanced="true" experimental="true" canonicalUri="http://art-decor.org/fhir/Questionnaire/VitalSignsMeasurement2">
            <name language="en-US">Vital Signs Measurement</name>
            <desc language="en-US">
                <pre> 
    <b> Vital Signs - To be completed by patient</b><br/>
    Date of Measurement    : ___________<br/>
    Body Weight (kg)       : ___________<br/>
    Heart Rate (beats/min) : ___________<br/>
    Body Temperature (C)   : ___________
      </pre>
            </desc>
            <classification>
                <tag>Vital Signs</tag>
                <tag>Patient Surveillance</tag>
            </classification>
            <publishingAuthority name="ART-DECOR Open Tools GmbH and ART-DECOR Expert Group"/>
            <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.80--20220103000000" type="dateTime" required="true" repeats="false">
                <text language="en-US">Date of Measurement</text>
            </item>
            <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.81--20220103000000" type="quantity" required="false" repeats="false">
                <text language="en-US">Body Weight (kg)</text>
                <code code="3141-9" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Body weight Measured"/>
            </item>
            <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.82--20220103000000" type="quantity" required="false" repeats="false">
                <text language="en-US">Heart Rate (beats/min)</text>
                <code code="8867-4" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Heart rate"/>
            </item>
            <item linkId="2.16.840.1.113883.3.1937.99.60.10.2.83--20220103000000" type="quantity" required="false" repeats="false">
                <text language="en-US">Body Temperature (C)</text>
                <code code="8310-5" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Body temperature"/>
            </item>
        </questionnaire>
        <!-- Vital Signs Measurement -->
        <questionnaireAssociation questionnaireId="2.16.840.1.113883.3.1937.99.60.10.27.3" questionnaireEffectiveDate="2022-08-12T21:36:04">
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.3" effectiveDate="2022-01-03T00:00:00" elementId="demo10-dataelement-3"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.80" effectiveDate="2022-01-03T00:00:00" elementId="demo10-dataelement-80"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.81" effectiveDate="2022-01-03T00:00:00" elementId="demo10-dataelement-81"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.82" effectiveDate="2022-01-03T00:00:00" elementId="demo10-dataelement-82"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.83" effectiveDate="2022-01-03T00:00:00" elementId="demo10-dataelement-83"/>
            <concept ref="2.16.840.1.113883.3.1937.99.60.10.2.84" effectiveDate="2022-06-28T10:33:46" elementId="demo10-dataelement-84"/>
        </questionnaireAssociation>
        <questionnaire id="2.16.840.1.113883.3.1937.99.60.10.27.3" effectiveDate="2022-08-12T21:36:04" statusCode="draft" lastModifiedDate="2022-08-12T21:36:04" canonicalUri="http://art-decor.org/fhir/Questionnaire/2.16.840.1.113883.3.1937.99.60.10.27.3--20220812213604" versionLabel="1.0">
            <name language="en-US">Vital Signs Measurement</name>
            <desc language="en-US">Questionnaire for Vital Signs Measurement</desc>
            <relationship type="DRIV" ref="2.16.840.1.113883.3.1937.99.60.10.4.2" flexibility="2022-02-16T00:00:00"/>
            <publishingAuthority name="ART-DECOR Open Tools GmbH and ART-DECOR Expert Group"/>
            <code code="85353-1" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org"/>
            <item linkId="demo10-dataelement-3" type="group" required="true" repeats="false">
                <text language="en-US">Vital Signs</text>
                <item linkId="demo10-dataelement-3-help" type="display">
                    <text language="en-US">Set of Vital Signs to be used in the demo project</text>
                    <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                </item>
                <item linkId="demo10-dataelement-80" type="dateTime" required="false" repeats="false">
                    <text language="en-US">This shall be the dat when the measurement was performed, (not when documented).</text>
                    <item linkId="demo10-dataelement-80-help" type="display">
                        <text language="en-US">Date when the measurement took place</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
                <item linkId="demo10-dataelement-81" type="quantity" required="false" repeats="false">
                    <text language="en-US">Body weight</text>
                    <code code="3141-9" codeSystem="2.16.840.1.113883.6.1" displayName="Body weight Measured" canonicalUri="http://loinc.org"/>
                    <unitOption code="kg" canonicalUri="http://unitsofmeasure.org" displayName="kilogram"/>
                    <item linkId="demo10-dataelement-81-help" type="display">
                        <text language="en-US">Body weight, measured in kg</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
                <item linkId="demo10-dataelement-82" type="quantity" required="false" repeats="false">
                    <text language="en-US">Heart rate</text>
                    <code code="8867-4" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Heart rate"/>
                    <unitOption code="/min" canonicalUri="http://unitsofmeasure.org" displayName="per minute"/>
                    <item linkId="demo10-dataelement-82-help" type="display">
                        <text language="en-US">Heart rate</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
                <item linkId="demo10-dataelement-84" type="string" required="false" repeats="false">
                    <text language="en-US">Pulse rhythm regularity</text>
                    <code code="88104-5" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Rhythmic or arrhythmic heart rate"/>
                    <answerValueSet flexibility="2022-06-10T00:00:00" statusCode="draft" ref="2.16.840.1.113883.3.1937.99.60.10.11.11" name="PulseRhythmsnomed" displayName="Pulse Rhythm (SNOMED)"/>
                    <item linkId="demo10-dataelement-84-help" type="display">
                        <text language="en-US">&lt;p&gt;Place the tips of your first and second finger on the inside of the patient's wrist. Press gently against the pulse. Take your time to note any irregularities in strength or rhythm. If the pulse is regular and strong, &lt;strong&gt;measure the pulse for 30 seconds&lt;/strong&gt;.&lt;/p&gt;</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
                <item linkId="demo10-dataelement-83" type="quantity" required="false" repeats="false">
                    <text language="en-US">Body temperature</text>
                    <code code="8310-5" codeSystem="2.16.840.1.113883.6.1" canonicalUri="http://loinc.org" displayName="Body temperature"/>
                    <unitOption code="C" displayName="°C"/>
                    <item linkId="demo10-dataelement-83-help" type="display">
                        <text language="en-US">Body temperature</text>
                        <itemControl code="help" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Help-Button"/>
                    </item>
                </item>
            </item>
        </questionnaire>
        <!-- Glasgow Coma Score -->
        <questionnaireAssociation questionnaireId="2.16.840.1.113883.3.1937.99.60.10.27.4" questionnaireEffectiveDate="2022-10-12T11:36:04"/>
        <questionnaire id="2.16.840.1.113883.3.1937.99.60.10.27.4" effectiveDate="2022-10-12T11:36:04" statusCode="draft" canonicalUri="http://art-decor.org/fhir/Questionnaire/2.16.840.1.113883.3.1937.99.60.10.4.4--20221012113604">
            <name language="en-US">Glasgow Coma Score</name>
            <publishingAuthority name="FHIR Project team"/>
            <code code="35088-4" codeSystem="2.16.840.1.113883.6.1" displayName="Glasgow coma scale" canonicalUri="http://loinc.org"/>
            <code code="248241002" codeSystem="2.16.840.1.113883.6.96" displayName="Glasgow coma score (observable entity)" canonicalUri="http://snomed.org/sct"/>
            <item linkId="1.1" type="choice">
                <text language="en-US">Verbal</text>
                <code code="9270-0" codeSystem="2.16.840.1.113883.6.1" displayName="Glasgow coma score verbal" canonicalUri="http://loinc.org"/>
                <itemControl code="autocomplete" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Auto-complete"/>
                <answerValueSet ref="1.3.6.1.4.1.12009.10.1.2209" name="LL356-7" displayName="GCS_2_Verbal" flexibility="2023-08-15T00:00:00" canonicalUri="http://loinc.org/vs/LL356-7"/>
                <terminologyServer ref="https://tx.fhir.org/r4"/>
            </item>
            <item linkId="1.2" type="choice">
                <text language="en-US">Motor</text>
                <code code="9268-4" codeSystem="2.16.840.1.113883.6.1" displayName="Glasgow coma score motor" canonicalUri="http://loinc.org"/>
                <itemControl code="autocomplete" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Auto-complete"/>
                <answerValueSet ref="1.3.6.1.4.1.12009.10.1.2215" name="LL357-5" displayName="GCS_3_Motor" flexibility="2023-08-15T00:00:00" canonicalUri="http://loinc.org/vs/LL357-5"/>
                <terminologyServer ref="https://tx.fhir.org/r4"/>
            </item>
            <item linkId="1.3" type="choice">
                <text language="en-US">Eye</text>
                <code code="9267-6" codeSystem="2.16.840.1.113883.6.1" displayName="Glasgow coma score eye opening" canonicalUri="http://loinc.org"/>
                <itemControl code="autocomplete" canonicalUri="http://hl7.org/fhir/questionnaire-item-control" displayName="Auto-complete"/>
                <answerValueSet ref="1.3.6.1.4.1.12009.10.1.2208" name="LL355-9" displayName="GCS_1_Eye" flexibility="2023-08-15T00:00:00" canonicalUri="http://loinc.org/vs/LL355-9"/>
                <terminologyServer ref="https://tx.fhir.org/r4"/>
            </item>
            <item linkId="1.4" type="decimal">
                <text language="en-US">GCS total</text>
                <code code="9269-2" codeSystem="2.16.840.1.113883.6.1" displayName="Glasgow coma score total" canonicalUri="http://loinc.org"/>
                <unitOption code="{score}" codeSystem="2.16.840.1.113883.6.8" displayName="{score}" canonicalUri="http://unitsofmeasure.org"/>
            </item>
        </questionnaire>
        <!-- NSW Government My Personal Health Record -->
        <questionnaireAssociation questionnaireId="2.16.840.1.113883.3.1937.99.60.10.27.5" questionnaireEffectiveDate="2013-02-19T00:00:00"/>
        <questionnaire id="2.16.840.1.113883.3.1937.99.60.10.27.5" effectiveDate="2013-02-19T00:00:00" statusCode="draft" canonicalUri="http://art-decor.org/fhir/Questionnaire/2.16.840.1.113883.3.1937.99.60.10.4.5--20130219000000">
            <name language="en-US">NSW Government My Personal Health Record</name>
            <desc language="en-US">
                <pre> 
        <b> Birth details - To be completed by health professional</b> 
  Name of child: ____________________________________
            Sex: __
            
  Neonatal Information
    Birth Weight (kg): ___________
    Birth Length (cm): ___________
    Vitamin K given  : __
             1st dose: ___________
             2nd dose: ___________
    Hep B given      : __
      Date given     : ___________
    Abnormalities noted at birth:
      _______________________________________________
      </pre>
            </desc>
            <subjectType code="Patient"/>
            <publishingAuthority name="New South Wales Department of Health"/>
            <jurisdiction canonicalUri="urn:iso:std:iso:3166" code="AU"/>
            <item linkId="birthDetails" type="group" readOnly="false" hiddenItem="false">
                <text language="en-US">Birth details - To be completed by health professional</text>
                <item linkId="group" type="group">
                    <text language="en-US">Children</text>
                    <item linkId="nameOfChild" type="string">
                        <text language="en-US">Name of child</text>
                    </item>
                    <item linkId="sex" type="choice">
                        <text language="en-US">Sex</text>
                        <answerValueSet flexibility="2016-06-23T00:00:00" strength="required" statusCode="final" ref="2.16.840.1.113883.1.11.1" name="AdministrativeGender" displayName="Administrative Gender (HL7 V3)"/>
                    </item>
                </item>
                <item linkId="neonatalInformation" type="group">
                    <text language="en-US">Neonatal Information</text>
                    <item linkId="birthWeight" type="decimal">
                        <text language="en-US">Birth weight (kg)</text>
                    </item>
                    <item linkId="birthLength" type="decimal">
                        <text language="en-US">Birth length (cm)</text>
                    </item>
                    <item linkId="vitaminKgiven" type="choice">
                        <text language="en-US">Vitamin K given</text>
                        <answerOption>
                            <valueString value="INJECTION"/>
                        </answerOption>
                        <answerOption>
                            <valueString value="INTRAVENOUS"/>
                        </answerOption>
                        <answerOption>
                            <valueString value="ORAL"/>
                        </answerOption>
                        <item linkId="vitaminKgivenDoses" type="group">
                            <text language="en-US">Doses</text>
                            <item linkId="vitaminKDose1" type="dateTime">
                                <text language="en-US">1st dose when</text>
                            </item>
                            <item linkId="vitaminKDose2" type="dateTime">
                                <text language="en-US">2nd dose when</text>
                            </item>
                        </item>
                    </item>
                    <item linkId="hepBgiven" type="boolean">
                        <text language="en-US">Hep B given y / n</text>
                        <item linkId="hepBgivenDate" type="date">
                            <text language="en-US">Date given</text>
                        </item>
                    </item>
                    <item linkId="abnormalitiesAtBirth" type="string">
                        <text language="en-US">Abnormalities noted at birth</text>
                    </item>
                </item>
            </item>
        </questionnaire>
    </rules>
    <issues>
        <issue id="2.16.840.1.113883.3.1937.99.62.10.6.1" priority="L" displayName="Lage prio" type="RFC">
            <object id="2.16.840.1.113883.3.1937.99.60.10.27.1" effectiveDate="2022-02-16T00:00:00" type="QQ"/>
            <object id="3fec5d40-168b-41de-ac5d-40168bc1dea8" type="QR"/>
            <object id="2.16.840.1.113883.3.1937.99.60.10.27.3" effectiveDate="2022-08-12T21:36:04" type="QQ"/>
            <tracking effectiveDate="2022-02-20T19:03:16" statusCode="open">
                <author id="1">Admin</author>
                <desc language="en-US">This questionnaire needs to be refreshed from its source</desc>
            </tracking>
            <assignment to="3" name="Fritz Expired" effectiveDate="2022-02-20T19:03:17">
                <author id="1">Admin</author>
                <desc language="en-US">Please do the update and then check on the questionnaireresponse to see if it still matches</desc>
            </assignment>
            <tracking effectiveDate="2022-06-27T18:01:57" statusCode="rejected">
                <author id="2">dr Kai Heitmann</author>
                <desc language="en-US" lastTranslated="2022-06-27T18:01:57">rejected -&gt; rejected</desc>
            </tracking>
        </issue>
        <issue id="2.16.840.1.113883.3.1937.99.60.10.6.1" displayName="Operationalization shall be added" priority="N" type="RFC">
            <object id="2.16.840.1.113883.3.1937.99.60.10.2.80" effectiveDate="2022-01-03T00:00:00" type="DE"/>
            <tracking effectiveDate="2022-06-27T18:00:37" labels="" statusCode="open">
                <author id="2">dr Kai Heitmann</author>
                <desc language="en-US" lastTranslated="2022-06-27T18:00:36"><p>For this field, an Operationalization shall be added</p></desc>
            </tracking>
            <assignment effectiveDate="2022-06-27T18:00:56" to="2" name="dr Kai Heitmann"><author id="2">dr Kai Heitmann</author></assignment>
            <tracking effectiveDate="2022-06-27T18:01:05" statusCode="open">
                <author id="2">dr Kai Heitmann</author>
                <desc language="en-US" lastTranslated="2022-06-27T18:01:05"><p>Has been added</p></desc>
            </tracking>
            <tracking effectiveDate="2022-06-27T18:01:11" statusCode="closed">
                <author id="2">dr Kai Heitmann</author>
                <desc language="en-US" lastTranslated="2022-06-27T18:01:11">closed -&gt; closed</desc>
            </tracking>
        </issue>
    </issues>
</decor>
