HL7 FHIR Implementation Guide: Sri Lanka
0.1.0 - STU1

HL7 FHIR Implementation Guide: Sri Lanka, published by Jembi Health Systems. This is not an authorized publication; it is the continuous build for version 0.1.0. This version is based on the current content of https://github.com/jembi/Sri-Lanka and changes regularly. See the Directory of published versions

## : null - TTL Representation

Draft as of 2023-11-10

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    # - resource -------------------------------------------------------------------

     a fhir:StructureMap ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:id [ fhir:v "HIMSPatientQRToLM"] ; #
      fhir:text [
    fhir:status [ fhir:v "generated" ] ;
    fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://openhie.org/fhir/sri-lanka/StructureMap/HIMSPatientQRToLM<span style=\"color: navy\">&quot; = &quot;</span>HIMSPatientQRToLM<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Maps the Patient Registration Questionnaire Response to the HIMS Logical Model data elements</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">&quot; </span><b>alias </b>QResp <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-HIMSPatientRegistrationDataDictionary.html\" title=\"HIMS Patient Registration\">http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSPatientRegistrationDataDictionary</a><span style=\"color: navy\">&quot; </span><b>alias </b>IMMZC <b>as </b><b>target</b>\r\n\r\n<b>group </b>QRespToIMMZC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QResp, <b>target</b> <span style=\"color: maroon\">immzc</span><span style=\"color: navy\"> : </span>IMMZC<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'personalHealthNumber'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.personalHealthNumber = <span style=\"color: maroon\">content</span> <i>&quot;SetPersonalHealthNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForPHN&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'nationalIdentityCard'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.nationalIdentityCard = <span style=\"color: maroon\">content</span> <i>&quot;SetNationalIdentityCardNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForNIC&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'passport'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.passport = <span style=\"color: maroon\">content</span> <i>&quot;SetPassportNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForPassport&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'drivingLicense'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.drivingLicense = <span style=\"color: maroon\">content</span> <i>&quot;SetDrivingLicenseNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForDL&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'seniorCitizenNumber'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.seniorCitizenNumber = <span style=\"color: maroon\">content</span> <i>&quot;SetSeniorCitizenNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForSCN&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer<b> as </b><span style=\"color: maroon\">patientName</span><b> where </b>item.linkId = 'patientName'<span style=\"color: navy\"><b> -&gt; </b></span>immzc.patientName<b> as </b><span style=\"color: maroon\">pat</span><b> then </b>FullNameToIMMZC<span style=\"color: navy\">(</span><span style=\"color: maroon\">patientName</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pat</span><span style=\"color: navy\">)</span> <i>&quot;SetPatientNames&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'sex'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">coding</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        coding.code<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.sex = <span style=\"color: maroon\">content</span> <i>&quot;SetSex&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;ProcessCoding&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForSex&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer<b> as </b><span style=\"color: maroon\">address</span><b> where </b>item.linkId = 'address'<span style=\"color: navy\"><b> -&gt; </b></span>immzc.address<b> as </b><span style=\"color: maroon\">addy</span><b> then </b>AddressToIMMZC<span style=\"color: navy\">(</span><span style=\"color: maroon\">address</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">addy</span><span style=\"color: navy\">)</span> <i>&quot;SetAddresses&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'birthDate'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.birthDate = <span style=\"color: maroon\">content</span> <i>&quot;SetBirthDate&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForBirthDate&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer<b> as </b><span style=\"color: maroon\">contactDetails</span><b> where </b>item.linkId = 'contactDetails'<span style=\"color: navy\"><b> -&gt; </b></span>immzc.contactDetails<b> as </b><span style=\"color: maroon\">contact</span><b> then </b>ContactDetailsIMMZC<span style=\"color: navy\">(</span><span style=\"color: maroon\">contactDetails</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">contact</span><span style=\"color: navy\">)</span> <i>&quot;SetContactDetails&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processItems&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>FullNameToIMMZC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">name</span>, <b>target</b> <span style=\"color: maroon\">immzc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  name.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'firstName'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.firstName = <span style=\"color: maroon\">content</span> <i>&quot;SetFirstName&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForFirstName&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'surname'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.surname = <span style=\"color: maroon\">content</span> <i>&quot;SetSurname&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForSurname&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'firstName'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">firstName</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">firstName</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        item.answer first<b> as </b><span style=\"color: maroon\">answer2</span><b> where </b>item.linkId = 'surname'<b> then</b><span style=\"color: navy\"> {\r\n</span>          answer2.value<b> as </b><span style=\"color: maroon\">surname</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.fullName = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">firstName</span><span style=\"color: navy\">, </span><span style=\"color: blue\">' '</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">surname</span><span style=\"color: navy\">)</span> <i>&quot;SetName&quot;</i><span style=\"color: navy\">;</span>\r\n        <span style=\"color: navy\">}</span> <i>&quot;set&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;set&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForFullName&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processNameItems&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>AddressToIMMZC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">name</span>, <b>target</b> <span style=\"color: maroon\">immzc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  name.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'streetNameAndNr'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.streetNameAndNr = <span style=\"color: maroon\">content</span> <i>&quot;SetStreetNameAndNr&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForStreetNameAndNr&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'city'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.city = <span style=\"color: maroon\">content</span> <i>&quot;SetCity&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForCity&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'state'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.state = <span style=\"color: maroon\">content</span> <i>&quot;SetState&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForState&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'country'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.country = <span style=\"color: maroon\">content</span> <i>&quot;SetCountry&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForCountry&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'postalCode'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.postalCode = <span style=\"color: maroon\">content</span> <i>&quot;SetPostalCode&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForPostalCode&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processAddressItems&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>ContactDetailsIMMZC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">name</span>, <b>target</b> <span style=\"color: maroon\">immzc</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  name.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'mobileNumber'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.mobileNumber = <span style=\"color: maroon\">content</span> <i>&quot;SetMobileNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForMobileNumber&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'landline'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immzc.landline = <span style=\"color: maroon\">content</span> <i>&quot;SetLandline&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForLandline&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processContactDetailsItems&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      ] ; #
      fhir:url [ fhir:v "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSPatientQRToLM"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "HIMSPatientQRToLM"] ; #
      fhir:status [ fhir:v "draft"] ; #
      fhir:date [ fhir:v "2023-11-10T04:37:53+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "Jembi Health Systems"] ; #
      fhir:contact ( [
    fhir:name [ fhir:v "Jembi Health Systems" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "https://www.jembi.org" ]     ] [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "info@jembi.org" ]     ] )
      ] [
    fhir:name [ fhir:v "Richard Langford" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "richard.langford@jembi.org" ] ;
    fhir:use [ fhir:v "work" ]     ] )
      ] ) ; #
      fhir:description [ fhir:v "Maps the Patient Registration Questionnaire Response to the HIMS Logical Model data elements"] ; #
      fhir:jurisdiction ( [
        ( fhir:coding [
    fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
    fhir:code [ fhir:v "001" ] ;
    fhir:display [ fhir:v "World" ]     ] )
      ] ) ; #
      fhir:structure ( [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse>     ] ;
    fhir:mode [ fhir:v "source" ] ;
    fhir:alias [ fhir:v "QResp" ]
      ] [
    fhir:url [
    fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSPatientRegistrationDataDictionary"^^xsd:anyURI ;
    fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSPatientRegistrationDataDictionary>     ] ;
    fhir:mode [ fhir:v "target" ] ;
    fhir:alias [ fhir:v "IMMZC" ]
      ] ) ; #
      fhir:group ( [
    fhir:name [ fhir:v "QRespToIMMZC" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "qr" ] ;
    fhir:type [ fhir:v "QResp" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "immzc" ] ;
    fhir:type [ fhir:v "IMMZC" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "processItems" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "qr" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "item" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "FirstAnswerForPHN" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'personalHealthNumber'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetPersonalHealthNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "personalHealthNumber" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForNIC" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'nationalIdentityCard'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetNationalIdentityCardNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "nationalIdentityCard" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForPassport" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'passport'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetPassportNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "passport" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForDL" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'drivingLicense'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetDrivingLicenseNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "drivingLicense" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForSCN" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'seniorCitizenNumber'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetSeniorCitizenNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "seniorCitizenNumber" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "SetPatientNames" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "patientName" ] ;
    fhir:condition [ fhir:v "item.linkId = 'patientName'" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "patientName" ] ;
    fhir:variable [ fhir:v "pat" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "FullNameToIMMZC" ] ;
              ( fhir:variable [ fhir:v "patientName" ] [ fhir:v "pat" ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForSex" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'sex'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "ProcessCoding" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ]           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "SetSex" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "coding" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "content" ]             ] ) ;
                ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "sex" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                  ( fhir:parameter [
    fhir:value [ fhir:v "content" ]               ] )             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "SetAddresses" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "address" ] ;
    fhir:condition [ fhir:v "item.linkId = 'address'" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "address" ] ;
    fhir:variable [ fhir:v "addy" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "AddressToIMMZC" ] ;
              ( fhir:variable [ fhir:v "address" ] [ fhir:v "addy" ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForBirthDate" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'birthDate'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetBirthDate" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "birthDate" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "SetContactDetails" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "contactDetails" ] ;
    fhir:condition [ fhir:v "item.linkId = 'contactDetails'" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "contactDetails" ] ;
    fhir:variable [ fhir:v "contact" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "ContactDetailsIMMZC" ] ;
              ( fhir:variable [ fhir:v "contactDetails" ] [ fhir:v "contact" ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "FullNameToIMMZC" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "name" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "immzc" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "processNameItems" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "name" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "item" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "FirstAnswerForFirstName" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'firstName'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetFirstName" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "firstName" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForSurname" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'surname'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetSurname" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "surname" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForFullName" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'firstName'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "set" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "firstName" ]           ] ) ;
              ( fhir:target [
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "firstName" ]             ] )           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "set" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer2" ] ;
    fhir:condition [ fhir:v "item.linkId = 'surname'" ]             ] ) ;
                ( fhir:rule [
    fhir:name [ fhir:v "SetName" ] ;
                  ( fhir:source [
    fhir:context [ fhir:v "answer2" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "surname" ]               ] ) ;
                  ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "fullName" ] ;
    fhir:transform [ fhir:v "append" ] ;
                    ( fhir:parameter [
    fhir:value [ fhir:v "firstName" ]                 ] [ ] [
    fhir:value [ fhir:v "surname" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "AddressToIMMZC" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "name" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "immzc" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "processAddressItems" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "name" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "item" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "FirstAnswerForStreetNameAndNr" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'streetNameAndNr'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetStreetNameAndNr" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "streetNameAndNr" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForCity" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'city'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetCity" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "city" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForState" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'state'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetState" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "state" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForCountry" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'country'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetCountry" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "country" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForPostalCode" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'postalCode'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetPostalCode" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "postalCode" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "ContactDetailsIMMZC" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "name" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "immzc" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "processContactDetailsItems" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "name" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "item" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "FirstAnswerForMobileNumber" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'mobileNumber'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetMobileNumber" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "mobileNumber" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "FirstAnswerForLandline" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "item" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:listMode [ fhir:v "first" ] ;
    fhir:variable [ fhir:v "answer" ] ;
    fhir:condition [ fhir:v "item.linkId = 'landline'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "SetLandline" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "content" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "immzc" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "landline" ] ;
    fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
    fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] )     ] )
      ] ) . #