<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
                xmlns:fn="http://www.w3.org/2005/xpath-functions"
                xmlns:f="http://hl7.org/fhir"
                xmlns:xh="http://www.w3.org/1999/xhtml"
                xmlns:xhtml="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                exclude-result-prefixes="#all"
                version="3.0">
   <xd:doc scope="stylesheet">
      <xd:desc>
         <xd:p>
            <xd:b>Generated:</xd:b> 2022-04-03T07:39:57.27+02:00</xd:p>
         <xd:p>
            <xd:b>By:</xd:b> schema2mapxsl.xsl version 1.0.0</xd:p>
         <xd:p>Takes in FHIR XSD fhir-single.xsd and constructs a stylesheet that will take in a FHIR XML instance and produce an expath map (http://www.w3.org/2005/xpath-functions) that may be converted into a valid FHIR JSON instance</xd:p>
         <xd:p>Known 'issue': does not handle xml comment() as array of fhir_comments, and basically ignores xml comment()</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:output indent="yes"
               method="xml"
               media-type="application/xml"
               omit-xml-declaration="yes"/>
   <xd:doc>
      <xd:desc>Process FHIR instances and error on anything else</xd:desc>
   </xd:doc>
   <xsl:template match="/">
      <xsl:choose>
         <xsl:when test="f:Account">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Account"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ActivityDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ActivityDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ActorDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ActorDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:AdverseEvent">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="AdverseEvent"/>
            </map>
         </xsl:when>
         <xsl:when test="f:AllergyIntolerance">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="AllergyIntolerance"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Appointment">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Appointment"/>
            </map>
         </xsl:when>
         <xsl:when test="f:AppointmentResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="AppointmentResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:AuditEvent">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="AuditEvent"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Basic">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Basic"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Binary">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Binary"/>
            </map>
         </xsl:when>
         <xsl:when test="f:BiologicallyDerivedProduct">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="BiologicallyDerivedProduct"/>
            </map>
         </xsl:when>
         <xsl:when test="f:BodyStructure">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="BodyStructure"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Bundle">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Bundle"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CapabilityStatement">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CapabilityStatement"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CarePlan">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CarePlan"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CareTeam">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CareTeam"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CatalogEntry">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CatalogEntry"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ChargeItem">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ChargeItem"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ChargeItemDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ChargeItemDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Claim">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Claim"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ClaimResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ClaimResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ClinicalImpression">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ClinicalImpression"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CodeSystem">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CodeSystem"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Communication">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Communication"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CommunicationRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CommunicationRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CompartmentDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CompartmentDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Composition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Composition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ConceptMap">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ConceptMap"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Condition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Condition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Consent">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Consent"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Contract">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Contract"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Coverage">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Coverage"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CoverageEligibilityRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CoverageEligibilityRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:CoverageEligibilityResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="CoverageEligibilityResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DetectedIssue">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DetectedIssue"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Device">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Device"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DeviceDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DeviceDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DeviceMetric">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DeviceMetric"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DeviceRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DeviceRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DeviceUseStatement">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DeviceUseStatement"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DiagnosticReport">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DiagnosticReport"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DocumentManifest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DocumentManifest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:DocumentReference">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="DocumentReference"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EffectEvidenceSynthesis">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EffectEvidenceSynthesis"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Encounter">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Encounter"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Endpoint">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Endpoint"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EnrollmentRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EnrollmentRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EnrollmentResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EnrollmentResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EpisodeOfCare">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EpisodeOfCare"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EventDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EventDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Evidence">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Evidence"/>
            </map>
         </xsl:when>
         <xsl:when test="f:EvidenceVariable">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="EvidenceVariable"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ExampleScenario">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ExampleScenario"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ExplanationOfBenefit">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ExplanationOfBenefit"/>
            </map>
         </xsl:when>
         <xsl:when test="f:FamilyMemberHistory">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="FamilyMemberHistory"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Flag">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Flag"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Goal">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Goal"/>
            </map>
         </xsl:when>
         <xsl:when test="f:GraphDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="GraphDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Group">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Group"/>
            </map>
         </xsl:when>
         <xsl:when test="f:GuidanceResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="GuidanceResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:HealthcareService">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="HealthcareService"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ImagingStudy">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ImagingStudy"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Immunization">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Immunization"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ImmunizationEvaluation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ImmunizationEvaluation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ImmunizationRecommendation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ImmunizationRecommendation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ImplementationGuide">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ImplementationGuide"/>
            </map>
         </xsl:when>
         <xsl:when test="f:InsurancePlan">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="InsurancePlan"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Invoice">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Invoice"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Library">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Library"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Linkage">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Linkage"/>
            </map>
         </xsl:when>
         <xsl:when test="f:List">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="List"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Location">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Location"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Measure">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Measure"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MeasureReport">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MeasureReport"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Media">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Media"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Medication">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Medication"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicationAdministration">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicationAdministration"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicationDispense">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicationDispense"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicationKnowledge">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicationKnowledge"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicationRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicationRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicationStatement">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicationStatement"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProduct">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProduct"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductAuthorization">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductAuthorization"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductContraindication">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductContraindication"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductIndication">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductIndication"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductIngredient">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductIngredient"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductInteraction">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductInteraction"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductManufactured">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductManufactured"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductPackaged">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductPackaged"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductPharmaceutical">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductPharmaceutical"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MedicinalProductUndesirableEffect">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MedicinalProductUndesirableEffect"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MessageDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MessageDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MessageHeader">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MessageHeader"/>
            </map>
         </xsl:when>
         <xsl:when test="f:MolecularSequence">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="MolecularSequence"/>
            </map>
         </xsl:when>
         <xsl:when test="f:NamingSystem">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="NamingSystem"/>
            </map>
         </xsl:when>
         <xsl:when test="f:NutritionOrder">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="NutritionOrder"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Observation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Observation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ObservationDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ObservationDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:OperationDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="OperationDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:OperationOutcome">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="OperationOutcome"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Organization">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Organization"/>
            </map>
         </xsl:when>
         <xsl:when test="f:OrganizationAffiliation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="OrganizationAffiliation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Patient">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Patient"/>
            </map>
         </xsl:when>
         <xsl:when test="f:PaymentNotice">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="PaymentNotice"/>
            </map>
         </xsl:when>
         <xsl:when test="f:PaymentReconciliation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="PaymentReconciliation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Person">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Person"/>
            </map>
         </xsl:when>
         <xsl:when test="f:PlanDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="PlanDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Practitioner">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Practitioner"/>
            </map>
         </xsl:when>
         <xsl:when test="f:PractitionerRole">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="PractitionerRole"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Procedure">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Procedure"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Provenance">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Provenance"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Questionnaire">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Questionnaire"/>
            </map>
         </xsl:when>
         <xsl:when test="f:QuestionnaireResponse">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="QuestionnaireResponse"/>
            </map>
         </xsl:when>
         <xsl:when test="f:RelatedPerson">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="RelatedPerson"/>
            </map>
         </xsl:when>
         <xsl:when test="f:RequestGroup">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="RequestGroup"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ResearchDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ResearchDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ResearchElementDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ResearchElementDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ResearchStudy">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ResearchStudy"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ResearchSubject">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ResearchSubject"/>
            </map>
         </xsl:when>
         <xsl:when test="f:RiskAssessment">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="RiskAssessment"/>
            </map>
         </xsl:when>
         <xsl:when test="f:RiskEvidenceSynthesis">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="RiskEvidenceSynthesis"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Schedule">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Schedule"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SearchParameter">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SearchParameter"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ServiceRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ServiceRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Slot">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Slot"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Specimen">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Specimen"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SpecimenDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SpecimenDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:StructureDefinition">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="StructureDefinition"/>
            </map>
         </xsl:when>
         <xsl:when test="f:StructureMap">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="StructureMap"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Subscription">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Subscription"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Substance">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Substance"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstanceNucleicAcid">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstanceNucleicAcid"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstancePolymer">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstancePolymer"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstanceProtein">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstanceProtein"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstanceReferenceInformation">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstanceReferenceInformation"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstanceSourceMaterial">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstanceSourceMaterial"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SubstanceSpecification">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SubstanceSpecification"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SupplyDelivery">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SupplyDelivery"/>
            </map>
         </xsl:when>
         <xsl:when test="f:SupplyRequest">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="SupplyRequest"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Task">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Task"/>
            </map>
         </xsl:when>
         <xsl:when test="f:TerminologyCapabilities">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="TerminologyCapabilities"/>
            </map>
         </xsl:when>
         <xsl:when test="f:TestReport">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="TestReport"/>
            </map>
         </xsl:when>
         <xsl:when test="f:TestScript">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="TestScript"/>
            </map>
         </xsl:when>
         <xsl:when test="f:ValueSet">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="ValueSet"/>
            </map>
         </xsl:when>
         <xsl:when test="f:VerificationResult">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="VerificationResult"/>
            </map>
         </xsl:when>
         <xsl:when test="f:VisionPrescription">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="VisionPrescription"/>
            </map>
         </xsl:when>
         <xsl:when test="f:Parameters">
            <map xmlns="http://www.w3.org/2005/xpath-functions">
               <xsl:apply-templates mode="Parameters"/>
            </map>
         </xsl:when>
         <xsl:otherwise>
            <xsl:message terminate="yes">Unknown resourceType or not in FHIR namespace: {<xsl:value-of select="*[1]/namespace-uri()"/>}:<xsl:value-of select="*[1]/local-name()"/>
            </xsl:message>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="date">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="dateTime">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="code">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A sequence of Unicode characters</xd:p>
         <xd:p>Note that FHIR strings SHALL NOT exceed 1MB in size</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="string">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A whole number</xd:p>
         <xd:p>32 bit number; for values larger than this, use decimal</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="integer">
      <xsl:if test="@value">
         <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </number>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An OID represented as a URI</xd:p>
         <xd:p>RFC 3001. See also ISO/IEC 8824:1990 €</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="oid">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A URI that is a reference to a canonical URL on a FHIR resource</xd:p>
         <xd:p>see [Canonical References](references.html#canonical)</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="canonical">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>String of characters used to identify a name or a resource</xd:p>
         <xd:p>see http://en.wikipedia.org/wiki/Uniform_resource_identifier</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="uri">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A UUID, represented as a URI</xd:p>
         <xd:p>See The Open Group, CDE 1.1 Remote Procedure Call specification, Appendix A.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="uuid">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A URI that is a literal reference</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="url">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An instant in time - known at least to the second</xd:p>
         <xd:p>Note: This is intended for where precisely observed times are required, typically system logs etc., and not human-reported times - for them, see date and dateTime (which can be as precise as instant, but is not required to be) below. Time zone is always required</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="instant">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Value of "true" or "false"</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="boolean">
      <xsl:if test="@value">
         <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </boolean>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A stream of bytes</xd:p>
         <xd:p>A stream of bytes, base64 encoded</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="base64Binary">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An integer with a value that is not negative (e.g. &gt;= 0)</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="unsignedInt">
      <xsl:if test="@value">
         <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </number>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine</xd:p>
         <xd:p>Systems are not required to have markdown support, so the text should be readable without markdown processing. The markdown syntax is GFM - see https://github.github.com/gfm/</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="markdown">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A time during the day, with no date specified</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="time">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.</xd:p>
         <xd:p>RFC 4122</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="id">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An integer with a value that is positive (e.g. &gt;0)</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="positiveInt">
      <xsl:if test="@value">
         <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </number>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A rational number with implicit precision</xd:p>
         <xd:p>Do not use an IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigInteger)</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="decimal">
      <xsl:if test="@value">
         <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </number>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc/>
   </xd:doc>
   <xsl:template match="*" mode="ResourceContainer">
      <!--Account 1..1 Account--><xsl:if test="f:Account">
         <xsl:apply-templates select="f:Account" mode="Account"/>
      </xsl:if>
      <!--ActivityDefinition 1..1 ActivityDefinition--><xsl:if test="f:ActivityDefinition">
         <xsl:apply-templates select="f:ActivityDefinition" mode="ActivityDefinition"/>
      </xsl:if>
      <!--ActorDefinition 1..1 ActorDefinition--><xsl:if test="f:ActorDefinition">
         <xsl:apply-templates select="f:ActorDefinition" mode="ActorDefinition"/>
      </xsl:if>
      <!--AdverseEvent 1..1 AdverseEvent--><xsl:if test="f:AdverseEvent">
         <xsl:apply-templates select="f:AdverseEvent" mode="AdverseEvent"/>
      </xsl:if>
      <!--AllergyIntolerance 1..1 AllergyIntolerance--><xsl:if test="f:AllergyIntolerance">
         <xsl:apply-templates select="f:AllergyIntolerance" mode="AllergyIntolerance"/>
      </xsl:if>
      <!--Appointment 1..1 Appointment--><xsl:if test="f:Appointment">
         <xsl:apply-templates select="f:Appointment" mode="Appointment"/>
      </xsl:if>
      <!--AppointmentResponse 1..1 AppointmentResponse--><xsl:if test="f:AppointmentResponse">
         <xsl:apply-templates select="f:AppointmentResponse" mode="AppointmentResponse"/>
      </xsl:if>
      <!--AuditEvent 1..1 AuditEvent--><xsl:if test="f:AuditEvent">
         <xsl:apply-templates select="f:AuditEvent" mode="AuditEvent"/>
      </xsl:if>
      <!--Basic 1..1 Basic--><xsl:if test="f:Basic">
         <xsl:apply-templates select="f:Basic" mode="Basic"/>
      </xsl:if>
      <!--Binary 1..1 Binary--><xsl:if test="f:Binary">
         <xsl:apply-templates select="f:Binary" mode="Binary"/>
      </xsl:if>
      <!--BiologicallyDerivedProduct 1..1 BiologicallyDerivedProduct--><xsl:if test="f:BiologicallyDerivedProduct">
         <xsl:apply-templates select="f:BiologicallyDerivedProduct" mode="BiologicallyDerivedProduct"/>
      </xsl:if>
      <!--BodyStructure 1..1 BodyStructure--><xsl:if test="f:BodyStructure">
         <xsl:apply-templates select="f:BodyStructure" mode="BodyStructure"/>
      </xsl:if>
      <!--Bundle 1..1 Bundle--><xsl:if test="f:Bundle">
         <xsl:apply-templates select="f:Bundle" mode="Bundle"/>
      </xsl:if>
      <!--CapabilityStatement 1..1 CapabilityStatement--><xsl:if test="f:CapabilityStatement">
         <xsl:apply-templates select="f:CapabilityStatement" mode="CapabilityStatement"/>
      </xsl:if>
      <!--CarePlan 1..1 CarePlan--><xsl:if test="f:CarePlan">
         <xsl:apply-templates select="f:CarePlan" mode="CarePlan"/>
      </xsl:if>
      <!--CareTeam 1..1 CareTeam--><xsl:if test="f:CareTeam">
         <xsl:apply-templates select="f:CareTeam" mode="CareTeam"/>
      </xsl:if>
      <!--CatalogEntry 1..1 CatalogEntry--><xsl:if test="f:CatalogEntry">
         <xsl:apply-templates select="f:CatalogEntry" mode="CatalogEntry"/>
      </xsl:if>
      <!--ChargeItem 1..1 ChargeItem--><xsl:if test="f:ChargeItem">
         <xsl:apply-templates select="f:ChargeItem" mode="ChargeItem"/>
      </xsl:if>
      <!--ChargeItemDefinition 1..1 ChargeItemDefinition--><xsl:if test="f:ChargeItemDefinition">
         <xsl:apply-templates select="f:ChargeItemDefinition" mode="ChargeItemDefinition"/>
      </xsl:if>
      <!--Claim 1..1 Claim--><xsl:if test="f:Claim">
         <xsl:apply-templates select="f:Claim" mode="Claim"/>
      </xsl:if>
      <!--ClaimResponse 1..1 ClaimResponse--><xsl:if test="f:ClaimResponse">
         <xsl:apply-templates select="f:ClaimResponse" mode="ClaimResponse"/>
      </xsl:if>
      <!--ClinicalImpression 1..1 ClinicalImpression--><xsl:if test="f:ClinicalImpression">
         <xsl:apply-templates select="f:ClinicalImpression" mode="ClinicalImpression"/>
      </xsl:if>
      <!--CodeSystem 1..1 CodeSystem--><xsl:if test="f:CodeSystem">
         <xsl:apply-templates select="f:CodeSystem" mode="CodeSystem"/>
      </xsl:if>
      <!--Communication 1..1 Communication--><xsl:if test="f:Communication">
         <xsl:apply-templates select="f:Communication" mode="Communication"/>
      </xsl:if>
      <!--CommunicationRequest 1..1 CommunicationRequest--><xsl:if test="f:CommunicationRequest">
         <xsl:apply-templates select="f:CommunicationRequest" mode="CommunicationRequest"/>
      </xsl:if>
      <!--CompartmentDefinition 1..1 CompartmentDefinition--><xsl:if test="f:CompartmentDefinition">
         <xsl:apply-templates select="f:CompartmentDefinition" mode="CompartmentDefinition"/>
      </xsl:if>
      <!--Composition 1..1 Composition--><xsl:if test="f:Composition">
         <xsl:apply-templates select="f:Composition" mode="Composition"/>
      </xsl:if>
      <!--ConceptMap 1..1 ConceptMap--><xsl:if test="f:ConceptMap">
         <xsl:apply-templates select="f:ConceptMap" mode="ConceptMap"/>
      </xsl:if>
      <!--Condition 1..1 Condition--><xsl:if test="f:Condition">
         <xsl:apply-templates select="f:Condition" mode="Condition"/>
      </xsl:if>
      <!--Consent 1..1 Consent--><xsl:if test="f:Consent">
         <xsl:apply-templates select="f:Consent" mode="Consent"/>
      </xsl:if>
      <!--Contract 1..1 Contract--><xsl:if test="f:Contract">
         <xsl:apply-templates select="f:Contract" mode="Contract"/>
      </xsl:if>
      <!--Coverage 1..1 Coverage--><xsl:if test="f:Coverage">
         <xsl:apply-templates select="f:Coverage" mode="Coverage"/>
      </xsl:if>
      <!--CoverageEligibilityRequest 1..1 CoverageEligibilityRequest--><xsl:if test="f:CoverageEligibilityRequest">
         <xsl:apply-templates select="f:CoverageEligibilityRequest" mode="CoverageEligibilityRequest"/>
      </xsl:if>
      <!--CoverageEligibilityResponse 1..1 CoverageEligibilityResponse--><xsl:if test="f:CoverageEligibilityResponse">
         <xsl:apply-templates select="f:CoverageEligibilityResponse"
                              mode="CoverageEligibilityResponse"/>
      </xsl:if>
      <!--DetectedIssue 1..1 DetectedIssue--><xsl:if test="f:DetectedIssue">
         <xsl:apply-templates select="f:DetectedIssue" mode="DetectedIssue"/>
      </xsl:if>
      <!--Device 1..1 Device--><xsl:if test="f:Device">
         <xsl:apply-templates select="f:Device" mode="Device"/>
      </xsl:if>
      <!--DeviceDefinition 1..1 DeviceDefinition--><xsl:if test="f:DeviceDefinition">
         <xsl:apply-templates select="f:DeviceDefinition" mode="DeviceDefinition"/>
      </xsl:if>
      <!--DeviceMetric 1..1 DeviceMetric--><xsl:if test="f:DeviceMetric">
         <xsl:apply-templates select="f:DeviceMetric" mode="DeviceMetric"/>
      </xsl:if>
      <!--DeviceRequest 1..1 DeviceRequest--><xsl:if test="f:DeviceRequest">
         <xsl:apply-templates select="f:DeviceRequest" mode="DeviceRequest"/>
      </xsl:if>
      <!--DeviceUseStatement 1..1 DeviceUseStatement--><xsl:if test="f:DeviceUseStatement">
         <xsl:apply-templates select="f:DeviceUseStatement" mode="DeviceUseStatement"/>
      </xsl:if>
      <!--DiagnosticReport 1..1 DiagnosticReport--><xsl:if test="f:DiagnosticReport">
         <xsl:apply-templates select="f:DiagnosticReport" mode="DiagnosticReport"/>
      </xsl:if>
      <!--DocumentManifest 1..1 DocumentManifest--><xsl:if test="f:DocumentManifest">
         <xsl:apply-templates select="f:DocumentManifest" mode="DocumentManifest"/>
      </xsl:if>
      <!--DocumentReference 1..1 DocumentReference--><xsl:if test="f:DocumentReference">
         <xsl:apply-templates select="f:DocumentReference" mode="DocumentReference"/>
      </xsl:if>
      <!--EffectEvidenceSynthesis 1..1 EffectEvidenceSynthesis--><xsl:if test="f:EffectEvidenceSynthesis">
         <xsl:apply-templates select="f:EffectEvidenceSynthesis" mode="EffectEvidenceSynthesis"/>
      </xsl:if>
      <!--Encounter 1..1 Encounter--><xsl:if test="f:Encounter">
         <xsl:apply-templates select="f:Encounter" mode="Encounter"/>
      </xsl:if>
      <!--Endpoint 1..1 Endpoint--><xsl:if test="f:Endpoint">
         <xsl:apply-templates select="f:Endpoint" mode="Endpoint"/>
      </xsl:if>
      <!--EnrollmentRequest 1..1 EnrollmentRequest--><xsl:if test="f:EnrollmentRequest">
         <xsl:apply-templates select="f:EnrollmentRequest" mode="EnrollmentRequest"/>
      </xsl:if>
      <!--EnrollmentResponse 1..1 EnrollmentResponse--><xsl:if test="f:EnrollmentResponse">
         <xsl:apply-templates select="f:EnrollmentResponse" mode="EnrollmentResponse"/>
      </xsl:if>
      <!--EpisodeOfCare 1..1 EpisodeOfCare--><xsl:if test="f:EpisodeOfCare">
         <xsl:apply-templates select="f:EpisodeOfCare" mode="EpisodeOfCare"/>
      </xsl:if>
      <!--EventDefinition 1..1 EventDefinition--><xsl:if test="f:EventDefinition">
         <xsl:apply-templates select="f:EventDefinition" mode="EventDefinition"/>
      </xsl:if>
      <!--Evidence 1..1 Evidence--><xsl:if test="f:Evidence">
         <xsl:apply-templates select="f:Evidence" mode="Evidence"/>
      </xsl:if>
      <!--EvidenceVariable 1..1 EvidenceVariable--><xsl:if test="f:EvidenceVariable">
         <xsl:apply-templates select="f:EvidenceVariable" mode="EvidenceVariable"/>
      </xsl:if>
      <!--ExampleScenario 1..1 ExampleScenario--><xsl:if test="f:ExampleScenario">
         <xsl:apply-templates select="f:ExampleScenario" mode="ExampleScenario"/>
      </xsl:if>
      <!--ExplanationOfBenefit 1..1 ExplanationOfBenefit--><xsl:if test="f:ExplanationOfBenefit">
         <xsl:apply-templates select="f:ExplanationOfBenefit" mode="ExplanationOfBenefit"/>
      </xsl:if>
      <!--FamilyMemberHistory 1..1 FamilyMemberHistory--><xsl:if test="f:FamilyMemberHistory">
         <xsl:apply-templates select="f:FamilyMemberHistory" mode="FamilyMemberHistory"/>
      </xsl:if>
      <!--Flag 1..1 Flag--><xsl:if test="f:Flag">
         <xsl:apply-templates select="f:Flag" mode="Flag"/>
      </xsl:if>
      <!--Goal 1..1 Goal--><xsl:if test="f:Goal">
         <xsl:apply-templates select="f:Goal" mode="Goal"/>
      </xsl:if>
      <!--GraphDefinition 1..1 GraphDefinition--><xsl:if test="f:GraphDefinition">
         <xsl:apply-templates select="f:GraphDefinition" mode="GraphDefinition"/>
      </xsl:if>
      <!--Group 1..1 Group--><xsl:if test="f:Group">
         <xsl:apply-templates select="f:Group" mode="Group"/>
      </xsl:if>
      <!--GuidanceResponse 1..1 GuidanceResponse--><xsl:if test="f:GuidanceResponse">
         <xsl:apply-templates select="f:GuidanceResponse" mode="GuidanceResponse"/>
      </xsl:if>
      <!--HealthcareService 1..1 HealthcareService--><xsl:if test="f:HealthcareService">
         <xsl:apply-templates select="f:HealthcareService" mode="HealthcareService"/>
      </xsl:if>
      <!--ImagingStudy 1..1 ImagingStudy--><xsl:if test="f:ImagingStudy">
         <xsl:apply-templates select="f:ImagingStudy" mode="ImagingStudy"/>
      </xsl:if>
      <!--Immunization 1..1 Immunization--><xsl:if test="f:Immunization">
         <xsl:apply-templates select="f:Immunization" mode="Immunization"/>
      </xsl:if>
      <!--ImmunizationEvaluation 1..1 ImmunizationEvaluation--><xsl:if test="f:ImmunizationEvaluation">
         <xsl:apply-templates select="f:ImmunizationEvaluation" mode="ImmunizationEvaluation"/>
      </xsl:if>
      <!--ImmunizationRecommendation 1..1 ImmunizationRecommendation--><xsl:if test="f:ImmunizationRecommendation">
         <xsl:apply-templates select="f:ImmunizationRecommendation" mode="ImmunizationRecommendation"/>
      </xsl:if>
      <!--ImplementationGuide 1..1 ImplementationGuide--><xsl:if test="f:ImplementationGuide">
         <xsl:apply-templates select="f:ImplementationGuide" mode="ImplementationGuide"/>
      </xsl:if>
      <!--InsurancePlan 1..1 InsurancePlan--><xsl:if test="f:InsurancePlan">
         <xsl:apply-templates select="f:InsurancePlan" mode="InsurancePlan"/>
      </xsl:if>
      <!--Invoice 1..1 Invoice--><xsl:if test="f:Invoice">
         <xsl:apply-templates select="f:Invoice" mode="Invoice"/>
      </xsl:if>
      <!--Library 1..1 Library--><xsl:if test="f:Library">
         <xsl:apply-templates select="f:Library" mode="Library"/>
      </xsl:if>
      <!--Linkage 1..1 Linkage--><xsl:if test="f:Linkage">
         <xsl:apply-templates select="f:Linkage" mode="Linkage"/>
      </xsl:if>
      <!--List 1..1 List--><xsl:if test="f:List">
         <xsl:apply-templates select="f:List" mode="List"/>
      </xsl:if>
      <!--Location 1..1 Location--><xsl:if test="f:Location">
         <xsl:apply-templates select="f:Location" mode="Location"/>
      </xsl:if>
      <!--Measure 1..1 Measure--><xsl:if test="f:Measure">
         <xsl:apply-templates select="f:Measure" mode="Measure"/>
      </xsl:if>
      <!--MeasureReport 1..1 MeasureReport--><xsl:if test="f:MeasureReport">
         <xsl:apply-templates select="f:MeasureReport" mode="MeasureReport"/>
      </xsl:if>
      <!--Media 1..1 Media--><xsl:if test="f:Media">
         <xsl:apply-templates select="f:Media" mode="Media"/>
      </xsl:if>
      <!--Medication 1..1 Medication--><xsl:if test="f:Medication">
         <xsl:apply-templates select="f:Medication" mode="Medication"/>
      </xsl:if>
      <!--MedicationAdministration 1..1 MedicationAdministration--><xsl:if test="f:MedicationAdministration">
         <xsl:apply-templates select="f:MedicationAdministration" mode="MedicationAdministration"/>
      </xsl:if>
      <!--MedicationDispense 1..1 MedicationDispense--><xsl:if test="f:MedicationDispense">
         <xsl:apply-templates select="f:MedicationDispense" mode="MedicationDispense"/>
      </xsl:if>
      <!--MedicationKnowledge 1..1 MedicationKnowledge--><xsl:if test="f:MedicationKnowledge">
         <xsl:apply-templates select="f:MedicationKnowledge" mode="MedicationKnowledge"/>
      </xsl:if>
      <!--MedicationRequest 1..1 MedicationRequest--><xsl:if test="f:MedicationRequest">
         <xsl:apply-templates select="f:MedicationRequest" mode="MedicationRequest"/>
      </xsl:if>
      <!--MedicationStatement 1..1 MedicationStatement--><xsl:if test="f:MedicationStatement">
         <xsl:apply-templates select="f:MedicationStatement" mode="MedicationStatement"/>
      </xsl:if>
      <!--MedicinalProduct 1..1 MedicinalProduct--><xsl:if test="f:MedicinalProduct">
         <xsl:apply-templates select="f:MedicinalProduct" mode="MedicinalProduct"/>
      </xsl:if>
      <!--MedicinalProductAuthorization 1..1 MedicinalProductAuthorization--><xsl:if test="f:MedicinalProductAuthorization">
         <xsl:apply-templates select="f:MedicinalProductAuthorization"
                              mode="MedicinalProductAuthorization"/>
      </xsl:if>
      <!--MedicinalProductContraindication 1..1 MedicinalProductContraindication--><xsl:if test="f:MedicinalProductContraindication">
         <xsl:apply-templates select="f:MedicinalProductContraindication"
                              mode="MedicinalProductContraindication"/>
      </xsl:if>
      <!--MedicinalProductIndication 1..1 MedicinalProductIndication--><xsl:if test="f:MedicinalProductIndication">
         <xsl:apply-templates select="f:MedicinalProductIndication" mode="MedicinalProductIndication"/>
      </xsl:if>
      <!--MedicinalProductIngredient 1..1 MedicinalProductIngredient--><xsl:if test="f:MedicinalProductIngredient">
         <xsl:apply-templates select="f:MedicinalProductIngredient" mode="MedicinalProductIngredient"/>
      </xsl:if>
      <!--MedicinalProductInteraction 1..1 MedicinalProductInteraction--><xsl:if test="f:MedicinalProductInteraction">
         <xsl:apply-templates select="f:MedicinalProductInteraction"
                              mode="MedicinalProductInteraction"/>
      </xsl:if>
      <!--MedicinalProductManufactured 1..1 MedicinalProductManufactured--><xsl:if test="f:MedicinalProductManufactured">
         <xsl:apply-templates select="f:MedicinalProductManufactured"
                              mode="MedicinalProductManufactured"/>
      </xsl:if>
      <!--MedicinalProductPackaged 1..1 MedicinalProductPackaged--><xsl:if test="f:MedicinalProductPackaged">
         <xsl:apply-templates select="f:MedicinalProductPackaged" mode="MedicinalProductPackaged"/>
      </xsl:if>
      <!--MedicinalProductPharmaceutical 1..1 MedicinalProductPharmaceutical--><xsl:if test="f:MedicinalProductPharmaceutical">
         <xsl:apply-templates select="f:MedicinalProductPharmaceutical"
                              mode="MedicinalProductPharmaceutical"/>
      </xsl:if>
      <!--MedicinalProductUndesirableEffect 1..1 MedicinalProductUndesirableEffect--><xsl:if test="f:MedicinalProductUndesirableEffect">
         <xsl:apply-templates select="f:MedicinalProductUndesirableEffect"
                              mode="MedicinalProductUndesirableEffect"/>
      </xsl:if>
      <!--MessageDefinition 1..1 MessageDefinition--><xsl:if test="f:MessageDefinition">
         <xsl:apply-templates select="f:MessageDefinition" mode="MessageDefinition"/>
      </xsl:if>
      <!--MessageHeader 1..1 MessageHeader--><xsl:if test="f:MessageHeader">
         <xsl:apply-templates select="f:MessageHeader" mode="MessageHeader"/>
      </xsl:if>
      <!--MolecularSequence 1..1 MolecularSequence--><xsl:if test="f:MolecularSequence">
         <xsl:apply-templates select="f:MolecularSequence" mode="MolecularSequence"/>
      </xsl:if>
      <!--NamingSystem 1..1 NamingSystem--><xsl:if test="f:NamingSystem">
         <xsl:apply-templates select="f:NamingSystem" mode="NamingSystem"/>
      </xsl:if>
      <!--NutritionOrder 1..1 NutritionOrder--><xsl:if test="f:NutritionOrder">
         <xsl:apply-templates select="f:NutritionOrder" mode="NutritionOrder"/>
      </xsl:if>
      <!--Observation 1..1 Observation--><xsl:if test="f:Observation">
         <xsl:apply-templates select="f:Observation" mode="Observation"/>
      </xsl:if>
      <!--ObservationDefinition 1..1 ObservationDefinition--><xsl:if test="f:ObservationDefinition">
         <xsl:apply-templates select="f:ObservationDefinition" mode="ObservationDefinition"/>
      </xsl:if>
      <!--OperationDefinition 1..1 OperationDefinition--><xsl:if test="f:OperationDefinition">
         <xsl:apply-templates select="f:OperationDefinition" mode="OperationDefinition"/>
      </xsl:if>
      <!--OperationOutcome 1..1 OperationOutcome--><xsl:if test="f:OperationOutcome">
         <xsl:apply-templates select="f:OperationOutcome" mode="OperationOutcome"/>
      </xsl:if>
      <!--Organization 1..1 Organization--><xsl:if test="f:Organization">
         <xsl:apply-templates select="f:Organization" mode="Organization"/>
      </xsl:if>
      <!--OrganizationAffiliation 1..1 OrganizationAffiliation--><xsl:if test="f:OrganizationAffiliation">
         <xsl:apply-templates select="f:OrganizationAffiliation" mode="OrganizationAffiliation"/>
      </xsl:if>
      <!--Patient 1..1 Patient--><xsl:if test="f:Patient">
         <xsl:apply-templates select="f:Patient" mode="Patient"/>
      </xsl:if>
      <!--PaymentNotice 1..1 PaymentNotice--><xsl:if test="f:PaymentNotice">
         <xsl:apply-templates select="f:PaymentNotice" mode="PaymentNotice"/>
      </xsl:if>
      <!--PaymentReconciliation 1..1 PaymentReconciliation--><xsl:if test="f:PaymentReconciliation">
         <xsl:apply-templates select="f:PaymentReconciliation" mode="PaymentReconciliation"/>
      </xsl:if>
      <!--Person 1..1 Person--><xsl:if test="f:Person">
         <xsl:apply-templates select="f:Person" mode="Person"/>
      </xsl:if>
      <!--PlanDefinition 1..1 PlanDefinition--><xsl:if test="f:PlanDefinition">
         <xsl:apply-templates select="f:PlanDefinition" mode="PlanDefinition"/>
      </xsl:if>
      <!--Practitioner 1..1 Practitioner--><xsl:if test="f:Practitioner">
         <xsl:apply-templates select="f:Practitioner" mode="Practitioner"/>
      </xsl:if>
      <!--PractitionerRole 1..1 PractitionerRole--><xsl:if test="f:PractitionerRole">
         <xsl:apply-templates select="f:PractitionerRole" mode="PractitionerRole"/>
      </xsl:if>
      <!--Procedure 1..1 Procedure--><xsl:if test="f:Procedure">
         <xsl:apply-templates select="f:Procedure" mode="Procedure"/>
      </xsl:if>
      <!--Provenance 1..1 Provenance--><xsl:if test="f:Provenance">
         <xsl:apply-templates select="f:Provenance" mode="Provenance"/>
      </xsl:if>
      <!--Questionnaire 1..1 Questionnaire--><xsl:if test="f:Questionnaire">
         <xsl:apply-templates select="f:Questionnaire" mode="Questionnaire"/>
      </xsl:if>
      <!--QuestionnaireResponse 1..1 QuestionnaireResponse--><xsl:if test="f:QuestionnaireResponse">
         <xsl:apply-templates select="f:QuestionnaireResponse" mode="QuestionnaireResponse"/>
      </xsl:if>
      <!--RelatedPerson 1..1 RelatedPerson--><xsl:if test="f:RelatedPerson">
         <xsl:apply-templates select="f:RelatedPerson" mode="RelatedPerson"/>
      </xsl:if>
      <!--RequestGroup 1..1 RequestGroup--><xsl:if test="f:RequestGroup">
         <xsl:apply-templates select="f:RequestGroup" mode="RequestGroup"/>
      </xsl:if>
      <!--ResearchDefinition 1..1 ResearchDefinition--><xsl:if test="f:ResearchDefinition">
         <xsl:apply-templates select="f:ResearchDefinition" mode="ResearchDefinition"/>
      </xsl:if>
      <!--ResearchElementDefinition 1..1 ResearchElementDefinition--><xsl:if test="f:ResearchElementDefinition">
         <xsl:apply-templates select="f:ResearchElementDefinition" mode="ResearchElementDefinition"/>
      </xsl:if>
      <!--ResearchStudy 1..1 ResearchStudy--><xsl:if test="f:ResearchStudy">
         <xsl:apply-templates select="f:ResearchStudy" mode="ResearchStudy"/>
      </xsl:if>
      <!--ResearchSubject 1..1 ResearchSubject--><xsl:if test="f:ResearchSubject">
         <xsl:apply-templates select="f:ResearchSubject" mode="ResearchSubject"/>
      </xsl:if>
      <!--RiskAssessment 1..1 RiskAssessment--><xsl:if test="f:RiskAssessment">
         <xsl:apply-templates select="f:RiskAssessment" mode="RiskAssessment"/>
      </xsl:if>
      <!--RiskEvidenceSynthesis 1..1 RiskEvidenceSynthesis--><xsl:if test="f:RiskEvidenceSynthesis">
         <xsl:apply-templates select="f:RiskEvidenceSynthesis" mode="RiskEvidenceSynthesis"/>
      </xsl:if>
      <!--Schedule 1..1 Schedule--><xsl:if test="f:Schedule">
         <xsl:apply-templates select="f:Schedule" mode="Schedule"/>
      </xsl:if>
      <!--SearchParameter 1..1 SearchParameter--><xsl:if test="f:SearchParameter">
         <xsl:apply-templates select="f:SearchParameter" mode="SearchParameter"/>
      </xsl:if>
      <!--ServiceRequest 1..1 ServiceRequest--><xsl:if test="f:ServiceRequest">
         <xsl:apply-templates select="f:ServiceRequest" mode="ServiceRequest"/>
      </xsl:if>
      <!--Slot 1..1 Slot--><xsl:if test="f:Slot">
         <xsl:apply-templates select="f:Slot" mode="Slot"/>
      </xsl:if>
      <!--Specimen 1..1 Specimen--><xsl:if test="f:Specimen">
         <xsl:apply-templates select="f:Specimen" mode="Specimen"/>
      </xsl:if>
      <!--SpecimenDefinition 1..1 SpecimenDefinition--><xsl:if test="f:SpecimenDefinition">
         <xsl:apply-templates select="f:SpecimenDefinition" mode="SpecimenDefinition"/>
      </xsl:if>
      <!--StructureDefinition 1..1 StructureDefinition--><xsl:if test="f:StructureDefinition">
         <xsl:apply-templates select="f:StructureDefinition" mode="StructureDefinition"/>
      </xsl:if>
      <!--StructureMap 1..1 StructureMap--><xsl:if test="f:StructureMap">
         <xsl:apply-templates select="f:StructureMap" mode="StructureMap"/>
      </xsl:if>
      <!--Subscription 1..1 Subscription--><xsl:if test="f:Subscription">
         <xsl:apply-templates select="f:Subscription" mode="Subscription"/>
      </xsl:if>
      <!--Substance 1..1 Substance--><xsl:if test="f:Substance">
         <xsl:apply-templates select="f:Substance" mode="Substance"/>
      </xsl:if>
      <!--SubstanceNucleicAcid 1..1 SubstanceNucleicAcid--><xsl:if test="f:SubstanceNucleicAcid">
         <xsl:apply-templates select="f:SubstanceNucleicAcid" mode="SubstanceNucleicAcid"/>
      </xsl:if>
      <!--SubstancePolymer 1..1 SubstancePolymer--><xsl:if test="f:SubstancePolymer">
         <xsl:apply-templates select="f:SubstancePolymer" mode="SubstancePolymer"/>
      </xsl:if>
      <!--SubstanceProtein 1..1 SubstanceProtein--><xsl:if test="f:SubstanceProtein">
         <xsl:apply-templates select="f:SubstanceProtein" mode="SubstanceProtein"/>
      </xsl:if>
      <!--SubstanceReferenceInformation 1..1 SubstanceReferenceInformation--><xsl:if test="f:SubstanceReferenceInformation">
         <xsl:apply-templates select="f:SubstanceReferenceInformation"
                              mode="SubstanceReferenceInformation"/>
      </xsl:if>
      <!--SubstanceSourceMaterial 1..1 SubstanceSourceMaterial--><xsl:if test="f:SubstanceSourceMaterial">
         <xsl:apply-templates select="f:SubstanceSourceMaterial" mode="SubstanceSourceMaterial"/>
      </xsl:if>
      <!--SubstanceSpecification 1..1 SubstanceSpecification--><xsl:if test="f:SubstanceSpecification">
         <xsl:apply-templates select="f:SubstanceSpecification" mode="SubstanceSpecification"/>
      </xsl:if>
      <!--SupplyDelivery 1..1 SupplyDelivery--><xsl:if test="f:SupplyDelivery">
         <xsl:apply-templates select="f:SupplyDelivery" mode="SupplyDelivery"/>
      </xsl:if>
      <!--SupplyRequest 1..1 SupplyRequest--><xsl:if test="f:SupplyRequest">
         <xsl:apply-templates select="f:SupplyRequest" mode="SupplyRequest"/>
      </xsl:if>
      <!--Task 1..1 Task--><xsl:if test="f:Task">
         <xsl:apply-templates select="f:Task" mode="Task"/>
      </xsl:if>
      <!--TerminologyCapabilities 1..1 TerminologyCapabilities--><xsl:if test="f:TerminologyCapabilities">
         <xsl:apply-templates select="f:TerminologyCapabilities" mode="TerminologyCapabilities"/>
      </xsl:if>
      <!--TestReport 1..1 TestReport--><xsl:if test="f:TestReport">
         <xsl:apply-templates select="f:TestReport" mode="TestReport"/>
      </xsl:if>
      <!--TestScript 1..1 TestScript--><xsl:if test="f:TestScript">
         <xsl:apply-templates select="f:TestScript" mode="TestScript"/>
      </xsl:if>
      <!--ValueSet 1..1 ValueSet--><xsl:if test="f:ValueSet">
         <xsl:apply-templates select="f:ValueSet" mode="ValueSet"/>
      </xsl:if>
      <!--VerificationResult 1..1 VerificationResult--><xsl:if test="f:VerificationResult">
         <xsl:apply-templates select="f:VerificationResult" mode="VerificationResult"/>
      </xsl:if>
      <!--VisionPrescription 1..1 VisionPrescription--><xsl:if test="f:VisionPrescription">
         <xsl:apply-templates select="f:VisionPrescription" mode="VisionPrescription"/>
      </xsl:if>
      <!--Parameters 1..1 Parameters--><xsl:if test="f:Parameters">
         <xsl:apply-templates select="f:Parameters" mode="Parameters"/>
      </xsl:if>
    </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Optional Extension Element - found in all resources.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Extension">
      <xsl:if test="@url">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
            <xsl:value-of select="@url"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
        
           
           <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:valueCanonical">
         <xsl:if test="f:valueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCanonical">
               <xsl:value-of select="f:valueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCanonical">
               <xsl:apply-templates select="f:valueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueInstant 1..1 instant (json type: string)--><xsl:if test="f:valueInstant">
         <xsl:if test="f:valueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueInstant">
               <xsl:value-of select="f:valueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInstant">
               <xsl:apply-templates select="f:valueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:valueMarkdown">
         <xsl:if test="f:valueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueMarkdown">
               <xsl:value-of select="f:valueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueMarkdown">
               <xsl:apply-templates select="f:valueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueOid 1..1 oid (json type: string)--><xsl:if test="f:valueOid">
         <xsl:if test="f:valueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueOid">
               <xsl:value-of select="f:valueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueOid">
               <xsl:apply-templates select="f:valueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:valuePositiveInt">
         <xsl:if test="f:valuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valuePositiveInt">
               <xsl:value-of select="f:valuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valuePositiveInt">
               <xsl:apply-templates select="f:valuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:valueUnsignedInt">
         <xsl:if test="f:valueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueUnsignedInt">
               <xsl:value-of select="f:valueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUnsignedInt">
               <xsl:apply-templates select="f:valueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUrl 1..1 url (json type: string)--><xsl:if test="f:valueUrl">
         <xsl:if test="f:valueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUrl">
               <xsl:value-of select="f:valueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUrl">
               <xsl:apply-templates select="f:valueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUuid 1..1 uuid (json type: string)--><xsl:if test="f:valueUuid">
         <xsl:if test="f:valueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUuid">
               <xsl:value-of select="f:valueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUuid">
               <xsl:apply-templates select="f:valueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueAddress 1..1 Address--><xsl:if test="f:valueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAddress">
            <xsl:apply-templates select="f:valueAddress" mode="Address"/>
         </map>
      </xsl:if>
           <!--valueAge 1..1 Age--><xsl:if test="f:valueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAge">
            <xsl:apply-templates select="f:valueAge" mode="Age"/>
         </map>
      </xsl:if>
           <!--valueAnnotation 1..1 Annotation--><xsl:if test="f:valueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAnnotation">
            <xsl:apply-templates select="f:valueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
           <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
           <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
           <!--valueContactPoint 1..1 ContactPoint--><xsl:if test="f:valueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactPoint">
            <xsl:apply-templates select="f:valueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
           <!--valueCount 1..1 Count--><xsl:if test="f:valueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCount">
            <xsl:apply-templates select="f:valueCount" mode="Count"/>
         </map>
      </xsl:if>
           <!--valueDistance 1..1 Distance--><xsl:if test="f:valueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDistance">
            <xsl:apply-templates select="f:valueDistance" mode="Distance"/>
         </map>
      </xsl:if>
           <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--valueHumanName 1..1 HumanName--><xsl:if test="f:valueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueHumanName">
            <xsl:apply-templates select="f:valueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
           <!--valueIdentifier 1..1 Identifier--><xsl:if test="f:valueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueIdentifier">
            <xsl:apply-templates select="f:valueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
           <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
           <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
           <!--valueSignature 1..1 Signature--><xsl:if test="f:valueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSignature">
            <xsl:apply-templates select="f:valueSignature" mode="Signature"/>
         </map>
      </xsl:if>
           <!--valueTiming 1..1 Timing--><xsl:if test="f:valueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTiming">
            <xsl:apply-templates select="f:valueTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--valueContactDetail 1..1 ContactDetail--><xsl:if test="f:valueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactDetail">
            <xsl:apply-templates select="f:valueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
           <!--valueContributor 1..1 Contributor--><xsl:if test="f:valueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContributor">
            <xsl:apply-templates select="f:valueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
           <!--valueDataRequirement 1..1 DataRequirement--><xsl:if test="f:valueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDataRequirement">
            <xsl:apply-templates select="f:valueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
           <!--valueExpression 1..1 Expression--><xsl:if test="f:valueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueExpression">
            <xsl:apply-templates select="f:valueExpression" mode="Expression"/>
         </map>
      </xsl:if>
           <!--valueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:valueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="valueParameterDefinition">
            <xsl:apply-templates select="f:valueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
           <!--valueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:valueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRelatedArtifact">
            <xsl:apply-templates select="f:valueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
           <!--valueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:valueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTriggerDefinition">
            <xsl:apply-templates select="f:valueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
           <!--valueUsageContext 1..1 UsageContext--><xsl:if test="f:valueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueUsageContext">
            <xsl:apply-templates select="f:valueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
           <!--valueDosage 1..1 Dosage--><xsl:if test="f:valueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDosage">
            <xsl:apply-templates select="f:valueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
           <!--valueMeta 1..1 Meta--><xsl:if test="f:valueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMeta">
            <xsl:apply-templates select="f:valueMeta" mode="Meta"/>
         </map>
      </xsl:if>
         
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Base definition for all elements that are defined inside a resource - but not those in a data type.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BackboneElement">
      <xsl:apply-templates select="." mode="Element"/>
          <!--modifierExtension 0..* Extension--><xsl:if test="f:modifierExtension">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifierExtension">
            <xsl:for-each select="f:modifierExtension">
               <map>
                  <xsl:apply-templates select="." mode="Extension"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A human-readable summary of the resource conveying the essential clinical and business information for the resource.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Narrative">
      <xsl:apply-templates select="." mode="Element"/>
          <!--status 1..1 NarrativeStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--xhtml:div 1..1 --><xsl:if test="xhtml:div">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="div">
            <xsl:value-of select="fn:serialize(xhtml:div)"/>
         </string>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of a resource narrative.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NarrativeStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Base definition for all elements in a resource.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Element">
      <xsl:if test="@id">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="id">
            <xsl:value-of select="@id"/>
         </string>
      </xsl:if>
          <!--extension 0..* Extension--><xsl:if test="f:extension">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="extension">
            <xsl:for-each select="f:extension">
               <map>
                  <xsl:apply-templates select="." mode="Extension"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Meta">
      <xsl:apply-templates select="." mode="Element"/>
          <!--versionId 0..1 id (json type: string)--><xsl:if test="f:versionId">
         <xsl:if test="f:versionId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="versionId">
               <xsl:value-of select="f:versionId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:versionId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versionId">
               <xsl:apply-templates select="f:versionId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastUpdated 0..1 instant (json type: string)--><xsl:if test="f:lastUpdated">
         <xsl:if test="f:lastUpdated/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastUpdated">
               <xsl:value-of select="f:lastUpdated/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastUpdated[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastUpdated">
               <xsl:apply-templates select="f:lastUpdated" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..1 uri (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..* canonical (json type: string)--><xsl:if test="f:profile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:for-each select="f:profile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:profile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:for-each select="f:profile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--security 0..* Coding--><xsl:if test="f:security">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="security">
            <xsl:for-each select="f:security">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--tag 0..* Coding--><xsl:if test="f:tag">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="tag">
            <xsl:for-each select="f:tag">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Address">
      <xsl:apply-templates select="." mode="Element"/>
          <!--use 0..1 AddressUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 AddressType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--line 0..* string (json type: string)--><xsl:if test="f:line">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="line">
            <xsl:for-each select="f:line">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:line[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_line">
               <xsl:for-each select="f:line">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--city 0..1 string (json type: string)--><xsl:if test="f:city">
         <xsl:if test="f:city/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="city">
               <xsl:value-of select="f:city/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:city[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_city">
               <xsl:apply-templates select="f:city" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--district 0..1 string (json type: string)--><xsl:if test="f:district">
         <xsl:if test="f:district/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="district">
               <xsl:value-of select="f:district/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:district[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_district">
               <xsl:apply-templates select="f:district" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--state 0..1 string (json type: string)--><xsl:if test="f:state">
         <xsl:if test="f:state/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="state">
               <xsl:value-of select="f:state/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:state[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_state">
               <xsl:apply-templates select="f:state" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--postalCode 0..1 string (json type: string)--><xsl:if test="f:postalCode">
         <xsl:if test="f:postalCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="postalCode">
               <xsl:value-of select="f:postalCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:postalCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_postalCode">
               <xsl:apply-templates select="f:postalCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--country 0..1 string (json type: string)--><xsl:if test="f:country">
         <xsl:if test="f:country/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="country">
               <xsl:value-of select="f:country/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:country[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_country">
               <xsl:apply-templates select="f:country" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The use of an address.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AddressUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of an address (physical / postal).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AddressType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contributor">
      <xsl:apply-templates select="." mode="Element"/>
          <!--type 1..1 ContributorType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of contributor.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContributorType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>For referring to data content defined in other formats.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Attachment">
      <xsl:apply-templates select="." mode="Element"/>
          <!--contentType 0..1 code (json type: string)--><xsl:if test="f:contentType">
         <xsl:if test="f:contentType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentType">
               <xsl:value-of select="f:contentType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentType">
               <xsl:apply-templates select="f:contentType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 code (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--data 0..1 base64Binary (json type: string)--><xsl:if test="f:data">
         <xsl:if test="f:data/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="data">
               <xsl:value-of select="f:data/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:data[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_data">
               <xsl:apply-templates select="f:data" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 url (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--size 0..1 unsignedInt (json type: number)--><xsl:if test="f:size">
         <xsl:if test="f:size/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="size">
               <xsl:value-of select="f:size/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:size[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_size">
               <xsl:apply-templates select="f:size" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--hash 0..1 base64Binary (json type: string)--><xsl:if test="f:hash">
         <xsl:if test="f:hash/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="hash">
               <xsl:value-of select="f:hash/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:hash[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_hash">
               <xsl:apply-templates select="f:hash" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--creation 0..1 dateTime (json type: string)--><xsl:if test="f:creation">
         <xsl:if test="f:creation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="creation">
               <xsl:value-of select="f:creation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:creation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_creation">
               <xsl:apply-templates select="f:creation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Count">
      <xsl:apply-templates select="." mode="Quantity"/>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DataRequirement">
      <xsl:apply-templates select="." mode="Element"/>
          <!--type 1..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..* canonical (json type: string)--><xsl:if test="f:profile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:for-each select="f:profile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:profile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:for-each select="f:profile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          
            
           <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--mustSupport 0..* string (json type: string)--><xsl:if test="f:mustSupport">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="mustSupport">
            <xsl:for-each select="f:mustSupport">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:mustSupport[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_mustSupport">
               <xsl:for-each select="f:mustSupport">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--codeFilter 0..* DataRequirement.CodeFilter--><xsl:if test="f:codeFilter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="codeFilter">
            <xsl:for-each select="f:codeFilter">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement.CodeFilter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dateFilter 0..* DataRequirement.DateFilter--><xsl:if test="f:dateFilter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dateFilter">
            <xsl:for-each select="f:dateFilter">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement.DateFilter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--limit 0..1 positiveInt (json type: number)--><xsl:if test="f:limit">
         <xsl:if test="f:limit/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="limit">
               <xsl:value-of select="f:limit/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:limit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_limit">
               <xsl:apply-templates select="f:limit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sort 0..* DataRequirement.Sort--><xsl:if test="f:sort">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="sort">
            <xsl:for-each select="f:sort">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement.Sort"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DataRequirement.CodeFilter">
      <xsl:apply-templates select="." mode="Element"/>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--searchParam 0..1 string (json type: string)--><xsl:if test="f:searchParam">
         <xsl:if test="f:searchParam/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="searchParam">
               <xsl:value-of select="f:searchParam/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:searchParam[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_searchParam">
               <xsl:apply-templates select="f:searchParam" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--valueSet 0..1 canonical (json type: string)--><xsl:if test="f:valueSet">
         <xsl:if test="f:valueSet/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueSet">
               <xsl:value-of select="f:valueSet/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueSet[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueSet">
               <xsl:apply-templates select="f:valueSet" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..* Coding--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DataRequirement.DateFilter">
      <xsl:apply-templates select="." mode="Element"/>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--searchParam 0..1 string (json type: string)--><xsl:if test="f:searchParam">
         <xsl:if test="f:searchParam/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="searchParam">
               <xsl:value-of select="f:searchParam/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:searchParam[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_searchParam">
               <xsl:apply-templates select="f:searchParam" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
           <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DataRequirement.Sort">
      <xsl:apply-templates select="." mode="Element"/>
          <!--path 1..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--direction 1..1 SortDirection (json type: string)--><xsl:if test="f:direction">
         <xsl:if test="f:direction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="direction">
               <xsl:value-of select="f:direction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:direction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_direction">
               <xsl:apply-templates select="f:direction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The possible sort directions, ascending or descending.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SortDirection">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates how the medication is/was taken or should be taken by the patient.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Dosage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 0..1 integer (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--additionalInstruction 0..* CodeableConcept--><xsl:if test="f:additionalInstruction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="additionalInstruction">
            <xsl:for-each select="f:additionalInstruction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patientInstruction 0..1 string (json type: string)--><xsl:if test="f:patientInstruction">
         <xsl:if test="f:patientInstruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patientInstruction">
               <xsl:value-of select="f:patientInstruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patientInstruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patientInstruction">
               <xsl:apply-templates select="f:patientInstruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--timing 0..1 Timing--><xsl:if test="f:timing">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timing">
            <xsl:apply-templates select="f:timing" mode="Timing"/>
         </map>
      </xsl:if>
          
            
           <!--asNeededBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:asNeededBoolean">
         <xsl:if test="f:asNeededBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="asNeededBoolean">
               <xsl:value-of select="f:asNeededBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:asNeededBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_asNeededBoolean">
               <xsl:apply-templates select="f:asNeededBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--asNeededCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:asNeededCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="asNeededCodeableConcept">
            <xsl:apply-templates select="f:asNeededCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--site 0..1 CodeableConcept--><xsl:if test="f:site">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="site">
            <xsl:apply-templates select="f:site" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--route 0..1 CodeableConcept--><xsl:if test="f:route">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="route">
            <xsl:apply-templates select="f:route" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--doseAndRate 0..* Dosage.DoseAndRate--><xsl:if test="f:doseAndRate">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="doseAndRate">
            <xsl:for-each select="f:doseAndRate">
               <map>
                  <xsl:apply-templates select="." mode="Dosage.DoseAndRate"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--maxDosePerPeriod 0..1 Ratio--><xsl:if test="f:maxDosePerPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxDosePerPeriod">
            <xsl:apply-templates select="f:maxDosePerPeriod" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--maxDosePerAdministration 0..1 Quantity--><xsl:if test="f:maxDosePerAdministration">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="maxDosePerAdministration">
            <xsl:apply-templates select="f:maxDosePerAdministration" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--maxDosePerLifetime 0..1 Quantity--><xsl:if test="f:maxDosePerLifetime">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxDosePerLifetime">
            <xsl:apply-templates select="f:maxDosePerLifetime" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates how the medication is/was taken or should be taken by the patient.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Dosage.DoseAndRate">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
           <!--doseRange 1..1 Range--><xsl:if test="f:doseRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="doseRange">
            <xsl:apply-templates select="f:doseRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--doseQuantity 1..1 Quantity--><xsl:if test="f:doseQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="doseQuantity">
            <xsl:apply-templates select="f:doseQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
          
            
           <!--rateRatio 1..1 Ratio--><xsl:if test="f:rateRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateRatio">
            <xsl:apply-templates select="f:rateRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--rateRange 1..1 Range--><xsl:if test="f:rateRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateRange">
            <xsl:apply-templates select="f:rateRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--rateQuantity 1..1 Quantity--><xsl:if test="f:rateQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateQuantity">
            <xsl:apply-templates select="f:rateQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An amount of economic utility in some recognized currency.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Money">
      <xsl:apply-templates select="." mode="Element"/>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--currency 0..1 code (json type: string)--><xsl:if test="f:currency">
         <xsl:if test="f:currency/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="currency">
               <xsl:value-of select="f:currency/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:currency[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_currency">
               <xsl:apply-templates select="f:currency" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A human's name with the ability to identify parts and usage.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HumanName">
      <xsl:apply-templates select="." mode="Element"/>
          <!--use 0..1 NameUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--family 0..1 string (json type: string)--><xsl:if test="f:family">
         <xsl:if test="f:family/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="family">
               <xsl:value-of select="f:family/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:family[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_family">
               <xsl:apply-templates select="f:family" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--given 0..* string (json type: string)--><xsl:if test="f:given">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="given">
            <xsl:for-each select="f:given">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:given[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_given">
               <xsl:for-each select="f:given">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--prefix 0..* string (json type: string)--><xsl:if test="f:prefix">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="prefix">
            <xsl:for-each select="f:prefix">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:prefix[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_prefix">
               <xsl:for-each select="f:prefix">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--suffix 0..* string (json type: string)--><xsl:if test="f:suffix">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="suffix">
            <xsl:for-each select="f:suffix">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:suffix[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_suffix">
               <xsl:for-each select="f:suffix">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The use of a human name.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NameUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContactPoint">
      <xsl:apply-templates select="." mode="Element"/>
          <!--system 0..1 ContactPointSystem (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 0..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--use 0..1 ContactPointUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--rank 0..1 positiveInt (json type: number)--><xsl:if test="f:rank">
         <xsl:if test="f:rank/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="rank">
               <xsl:value-of select="f:rank/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:rank[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rank">
               <xsl:apply-templates select="f:rank" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Telecommunications form for contact point.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContactPointSystem">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Use of contact point.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContactPointUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MarketingStatus">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--country 1..1 CodeableConcept--><xsl:if test="f:country">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:apply-templates select="f:country" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--jurisdiction 0..1 CodeableConcept--><xsl:if test="f:jurisdiction">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:apply-templates select="f:jurisdiction" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 1..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--dateRange 1..1 Period--><xsl:if test="f:dateRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dateRange">
            <xsl:apply-templates select="f:dateRange" mode="Period"/>
         </map>
      </xsl:if>
          <!--restoreDate 0..1 dateTime (json type: string)--><xsl:if test="f:restoreDate">
         <xsl:if test="f:restoreDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="restoreDate">
               <xsl:value-of select="f:restoreDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:restoreDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_restoreDate">
               <xsl:apply-templates select="f:restoreDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Identifier">
      <xsl:apply-templates select="." mode="Element"/>
          <!--use 0..1 IdentifierUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--system 0..1 uri (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 0..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--assigner 0..1 Reference--><xsl:if test="f:assigner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assigner">
            <xsl:apply-templates select="f:assigner" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies the purpose for this identifier, if known .</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="IdentifierUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceAmount">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
           <!--amountQuantity 1..1 Quantity--><xsl:if test="f:amountQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountQuantity">
            <xsl:apply-templates select="f:amountQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--amountRange 1..1 Range--><xsl:if test="f:amountRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountRange">
            <xsl:apply-templates select="f:amountRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--amountString 1..1 string (json type: string)--><xsl:if test="f:amountString">
         <xsl:if test="f:amountString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountString">
               <xsl:value-of select="f:amountString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountString">
               <xsl:apply-templates select="f:amountString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--amountType 0..1 CodeableConcept--><xsl:if test="f:amountType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountType">
            <xsl:apply-templates select="f:amountType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amountText 0..1 string (json type: string)--><xsl:if test="f:amountText">
         <xsl:if test="f:amountText/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountText">
               <xsl:value-of select="f:amountText/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountText[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountText">
               <xsl:apply-templates select="f:amountText" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--referenceRange 0..1 SubstanceAmount.ReferenceRange--><xsl:if test="f:referenceRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referenceRange">
            <xsl:apply-templates select="f:referenceRange" mode="SubstanceAmount.ReferenceRange"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceAmount.ReferenceRange">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--lowLimit 0..1 Quantity--><xsl:if test="f:lowLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="lowLimit">
            <xsl:apply-templates select="f:lowLimit" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--highLimit 0..1 Quantity--><xsl:if test="f:highLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="highLimit">
            <xsl:apply-templates select="f:highLimit" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A reference to a code defined by a terminology system.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Coding">
      <xsl:apply-templates select="." mode="Element"/>
          <!--system 0..1 uri (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--userSelected 0..1 boolean (json type: boolean)--><xsl:if test="f:userSelected">
         <xsl:if test="f:userSelected/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="userSelected">
               <xsl:value-of select="f:userSelected/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:userSelected[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_userSelected">
               <xsl:apply-templates select="f:userSelected" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SampledData">
      <xsl:apply-templates select="." mode="Element"/>
          <!--origin 1..1 Quantity--><xsl:if test="f:origin">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="origin">
            <xsl:apply-templates select="f:origin" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--period 1..1 decimal (json type: number)--><xsl:if test="f:period">
         <xsl:if test="f:period/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="period">
               <xsl:value-of select="f:period/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:period[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_period">
               <xsl:apply-templates select="f:period" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lowerLimit 0..1 decimal (json type: number)--><xsl:if test="f:lowerLimit">
         <xsl:if test="f:lowerLimit/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="lowerLimit">
               <xsl:value-of select="f:lowerLimit/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:lowerLimit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lowerLimit">
               <xsl:apply-templates select="f:lowerLimit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--upperLimit 0..1 decimal (json type: number)--><xsl:if test="f:upperLimit">
         <xsl:if test="f:upperLimit/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="upperLimit">
               <xsl:value-of select="f:upperLimit/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:upperLimit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_upperLimit">
               <xsl:apply-templates select="f:upperLimit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dimensions 1..1 positiveInt (json type: number)--><xsl:if test="f:dimensions">
         <xsl:if test="f:dimensions/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="dimensions">
               <xsl:value-of select="f:dimensions/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:dimensions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dimensions">
               <xsl:apply-templates select="f:dimensions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--data 0..1 SampledDataDataType (json type: string)--><xsl:if test="f:data">
         <xsl:if test="f:data/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="data">
               <xsl:value-of select="f:data/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:data[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_data">
               <xsl:apply-templates select="f:data" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc/>
   </xd:doc>
   <xsl:template match="*" mode="SampledDataDataType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A populatioof people with some set of grouping criteria.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Population">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
           <!--ageRange 1..1 Range--><xsl:if test="f:ageRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ageRange">
            <xsl:apply-templates select="f:ageRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--ageCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:ageCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ageCodeableConcept">
            <xsl:apply-templates select="f:ageCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--gender 0..1 CodeableConcept--><xsl:if test="f:gender">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
            <xsl:apply-templates select="f:gender" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--race 0..1 CodeableConcept--><xsl:if test="f:race">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="race">
            <xsl:apply-templates select="f:race" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--physiologicalCondition 0..1 CodeableConcept--><xsl:if test="f:physiologicalCondition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="physiologicalCondition">
            <xsl:apply-templates select="f:physiologicalCondition" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A relationship of two Quantity values - expressed as a numerator and a denominator.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Ratio">
      <xsl:apply-templates select="." mode="Element"/>
          <!--numerator 0..1 Quantity--><xsl:if test="f:numerator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="numerator">
            <xsl:apply-templates select="f:numerator" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--denominator 0..1 Quantity--><xsl:if test="f:denominator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="denominator">
            <xsl:apply-templates select="f:denominator" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A length - a value with a unit that is a physical distance.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Distance">
      <xsl:apply-templates select="." mode="Quantity"/>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A duration of time during which an organism (or a process) has existed.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Age">
      <xsl:apply-templates select="." mode="Quantity"/>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A reference from one resource to another.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Reference">
      <xsl:apply-templates select="." mode="Element"/>
          <!--reference 0..1 string (json type: string)--><xsl:if test="f:reference">
         <xsl:if test="f:reference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
               <xsl:value-of select="f:reference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:reference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reference">
               <xsl:apply-templates select="f:reference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 uri (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TriggerDefinition">
      <xsl:apply-templates select="." mode="Element"/>
          <!--type 1..1 TriggerType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
           <!--timingTiming 1..1 Timing--><xsl:if test="f:timingTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingTiming">
            <xsl:apply-templates select="f:timingTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--timingReference 1..1 Reference--><xsl:if test="f:timingReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingReference">
            <xsl:apply-templates select="f:timingReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--timingDate 1..1 date (json type: string)--><xsl:if test="f:timingDate">
         <xsl:if test="f:timingDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDate">
               <xsl:value-of select="f:timingDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDate">
               <xsl:apply-templates select="f:timingDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--timingDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timingDateTime">
         <xsl:if test="f:timingDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDateTime">
               <xsl:value-of select="f:timingDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDateTime">
               <xsl:apply-templates select="f:timingDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--data 0..* DataRequirement--><xsl:if test="f:data">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="data">
            <xsl:for-each select="f:data">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..1 Expression--><xsl:if test="f:condition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:apply-templates select="f:condition" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of trigger.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TriggerType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Quantity">
      <xsl:apply-templates select="." mode="Element"/>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comparator 0..1 QuantityComparator (json type: string)--><xsl:if test="f:comparator">
         <xsl:if test="f:comparator/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comparator">
               <xsl:value-of select="f:comparator/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comparator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comparator">
               <xsl:apply-templates select="f:comparator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--unit 0..1 string (json type: string)--><xsl:if test="f:unit">
         <xsl:if test="f:unit/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="unit">
               <xsl:value-of select="f:unit/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:unit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_unit">
               <xsl:apply-templates select="f:unit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--system 0..1 uri (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How the Quantity should be understood and represented.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuantityComparator">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A time period defined by a start and end date and optionally time.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Period">
      <xsl:apply-templates select="." mode="Element"/>
          <!--start 0..1 dateTime (json type: string)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 dateTime (json type: string)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A length of time.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Duration">
      <xsl:apply-templates select="." mode="Quantity"/>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A set of ordered Quantities defined by a low and high limit.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Range">
      <xsl:apply-templates select="." mode="Element"/>
          <!--low 0..1 Quantity--><xsl:if test="f:low">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="low">
            <xsl:apply-templates select="f:low" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--high 0..1 Quantity--><xsl:if test="f:high">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="high">
            <xsl:apply-templates select="f:high" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Related artifacts such as additional documentation, justification, or bibliographic references.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RelatedArtifact">
      <xsl:apply-templates select="." mode="Element"/>
          <!--type 1..1 RelatedArtifactType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--label 0..1 string (json type: string)--><xsl:if test="f:label">
         <xsl:if test="f:label/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="label">
               <xsl:value-of select="f:label/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:label[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_label">
               <xsl:apply-templates select="f:label" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--citation 0..1 markdown (json type: string)--><xsl:if test="f:citation">
         <xsl:if test="f:citation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="citation">
               <xsl:value-of select="f:citation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:citation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_citation">
               <xsl:apply-templates select="f:citation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 url (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--document 0..1 Attachment--><xsl:if test="f:document">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="document">
            <xsl:apply-templates select="f:document" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--resource 0..1 canonical (json type: string)--><xsl:if test="f:resource">
         <xsl:if test="f:resource/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
               <xsl:value-of select="f:resource/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resource[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resource">
               <xsl:apply-templates select="f:resource" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of relationship to the related artifact.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RelatedArtifactType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A  text note which also  contains information about who made the statement and when.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Annotation">
      <xsl:apply-templates select="." mode="Element"/>
          
            
           <!--authorReference 1..1 Reference--><xsl:if test="f:authorReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authorReference">
            <xsl:apply-templates select="f:authorReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--authorString 1..1 string (json type: string)--><xsl:if test="f:authorString">
         <xsl:if test="f:authorString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authorString">
               <xsl:value-of select="f:authorString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authorString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authorString">
               <xsl:apply-templates select="f:authorString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--time 0..1 dateTime (json type: string)--><xsl:if test="f:time">
         <xsl:if test="f:time/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="time">
               <xsl:value-of select="f:time/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:time[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_time">
               <xsl:apply-templates select="f:time" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 1..1 markdown (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The shelf-life and storage information for a medicinal product item or container can be described using this class.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ProductShelfLife">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--period 1..1 Quantity--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--specialPrecautionsForStorage 0..* CodeableConcept--><xsl:if test="f:specialPrecautionsForStorage">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="specialPrecautionsForStorage">
            <xsl:for-each select="f:specialPrecautionsForStorage">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Specifies contact information for a person or organization.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContactDetail">
      <xsl:apply-templates select="." mode="Element"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="UsageContext">
      <xsl:apply-templates select="." mode="Element"/>
          <!--code 1..1 Coding--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="Coding"/>
         </map>
      </xsl:if>
          
            
           <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Expression">
      <xsl:apply-templates select="." mode="Element"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 id (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 1..1 ExpressionLanguage (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reference 0..1 uri (json type: string)--><xsl:if test="f:reference">
         <xsl:if test="f:reference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
               <xsl:value-of select="f:reference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:reference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reference">
               <xsl:apply-templates select="f:reference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The media type of the expression language.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExpressionLanguage">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Signature">
      <xsl:apply-templates select="." mode="Element"/>
          <!--type 1..* Coding--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--when 1..1 instant (json type: string)--><xsl:if test="f:when">
         <xsl:if test="f:when/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="when">
               <xsl:value-of select="f:when/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:when[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_when">
               <xsl:apply-templates select="f:when" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--who 1..1 Reference--><xsl:if test="f:who">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="who">
            <xsl:apply-templates select="f:who" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onBehalfOf 0..1 Reference--><xsl:if test="f:onBehalfOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onBehalfOf">
            <xsl:apply-templates select="f:onBehalfOf" mode="Reference"/>
         </map>
      </xsl:if>
          <!--targetFormat 0..1 code (json type: string)--><xsl:if test="f:targetFormat">
         <xsl:if test="f:targetFormat/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="targetFormat">
               <xsl:value-of select="f:targetFormat/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:targetFormat[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_targetFormat">
               <xsl:apply-templates select="f:targetFormat" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sigFormat 0..1 code (json type: string)--><xsl:if test="f:sigFormat">
         <xsl:if test="f:sigFormat/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sigFormat">
               <xsl:value-of select="f:sigFormat/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sigFormat[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sigFormat">
               <xsl:apply-templates select="f:sigFormat" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--data 0..1 base64Binary (json type: string)--><xsl:if test="f:data">
         <xsl:if test="f:data/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="data">
               <xsl:value-of select="f:data/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:data[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_data">
               <xsl:apply-templates select="f:data" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Timing">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--event 0..* dateTime (json type: string)--><xsl:if test="f:event">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="event">
            <xsl:for-each select="f:event">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:event[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_event">
               <xsl:for-each select="f:event">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--repeat 0..1 Timing.Repeat--><xsl:if test="f:repeat">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="repeat">
            <xsl:apply-templates select="f:repeat" mode="Timing.Repeat"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Timing.Repeat">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
           <!--boundsDuration 1..1 Duration--><xsl:if test="f:boundsDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="boundsDuration">
            <xsl:apply-templates select="f:boundsDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--boundsRange 1..1 Range--><xsl:if test="f:boundsRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="boundsRange">
            <xsl:apply-templates select="f:boundsRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--boundsPeriod 1..1 Period--><xsl:if test="f:boundsPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="boundsPeriod">
            <xsl:apply-templates select="f:boundsPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--count 0..1 positiveInt (json type: number)--><xsl:if test="f:count">
         <xsl:if test="f:count/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="count">
               <xsl:value-of select="f:count/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:count[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_count">
               <xsl:apply-templates select="f:count" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--countMax 0..1 positiveInt (json type: number)--><xsl:if test="f:countMax">
         <xsl:if test="f:countMax/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="countMax">
               <xsl:value-of select="f:countMax/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:countMax[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_countMax">
               <xsl:apply-templates select="f:countMax" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--duration 0..1 decimal (json type: number)--><xsl:if test="f:duration">
         <xsl:if test="f:duration/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
               <xsl:value-of select="f:duration/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:duration[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_duration">
               <xsl:apply-templates select="f:duration" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--durationMax 0..1 decimal (json type: number)--><xsl:if test="f:durationMax">
         <xsl:if test="f:durationMax/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="durationMax">
               <xsl:value-of select="f:durationMax/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:durationMax[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_durationMax">
               <xsl:apply-templates select="f:durationMax" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--durationUnit 0..1 UnitsOfTime (json type: string)--><xsl:if test="f:durationUnit">
         <xsl:if test="f:durationUnit/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="durationUnit">
               <xsl:value-of select="f:durationUnit/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:durationUnit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_durationUnit">
               <xsl:apply-templates select="f:durationUnit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--frequency 0..1 positiveInt (json type: number)--><xsl:if test="f:frequency">
         <xsl:if test="f:frequency/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="frequency">
               <xsl:value-of select="f:frequency/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:frequency[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_frequency">
               <xsl:apply-templates select="f:frequency" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--frequencyMax 0..1 positiveInt (json type: number)--><xsl:if test="f:frequencyMax">
         <xsl:if test="f:frequencyMax/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="frequencyMax">
               <xsl:value-of select="f:frequencyMax/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:frequencyMax[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_frequencyMax">
               <xsl:apply-templates select="f:frequencyMax" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 decimal (json type: number)--><xsl:if test="f:period">
         <xsl:if test="f:period/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="period">
               <xsl:value-of select="f:period/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:period[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_period">
               <xsl:apply-templates select="f:period" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--periodMax 0..1 decimal (json type: number)--><xsl:if test="f:periodMax">
         <xsl:if test="f:periodMax/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="periodMax">
               <xsl:value-of select="f:periodMax/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:periodMax[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_periodMax">
               <xsl:apply-templates select="f:periodMax" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--periodUnit 0..1 UnitsOfTime (json type: string)--><xsl:if test="f:periodUnit">
         <xsl:if test="f:periodUnit/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="periodUnit">
               <xsl:value-of select="f:periodUnit/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:periodUnit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_periodUnit">
               <xsl:apply-templates select="f:periodUnit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dayOfWeek 0..* code (json type: string)--><xsl:if test="f:dayOfWeek">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dayOfWeek">
            <xsl:for-each select="f:dayOfWeek">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:dayOfWeek[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_dayOfWeek">
               <xsl:for-each select="f:dayOfWeek">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--timeOfDay 0..* time (json type: string)--><xsl:if test="f:timeOfDay">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="timeOfDay">
            <xsl:for-each select="f:timeOfDay">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:timeOfDay[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_timeOfDay">
               <xsl:for-each select="f:timeOfDay">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--when 0..* EventTiming (json type: string)--><xsl:if test="f:when">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="when">
            <xsl:for-each select="f:when">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:when[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_when">
               <xsl:for-each select="f:when">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--offset 0..1 unsignedInt (json type: number)--><xsl:if test="f:offset">
         <xsl:if test="f:offset/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="offset">
               <xsl:value-of select="f:offset/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:offset[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_offset">
               <xsl:apply-templates select="f:offset" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A unit of time (units from UCUM).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="UnitsOfTime">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Real world event relating to the schedule.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EventTiming">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ProdCharacteristic">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--height 0..1 Quantity--><xsl:if test="f:height">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="height">
            <xsl:apply-templates select="f:height" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--width 0..1 Quantity--><xsl:if test="f:width">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="width">
            <xsl:apply-templates select="f:width" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--depth 0..1 Quantity--><xsl:if test="f:depth">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="depth">
            <xsl:apply-templates select="f:depth" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--weight 0..1 Quantity--><xsl:if test="f:weight">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="weight">
            <xsl:apply-templates select="f:weight" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--nominalVolume 0..1 Quantity--><xsl:if test="f:nominalVolume">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="nominalVolume">
            <xsl:apply-templates select="f:nominalVolume" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--externalDiameter 0..1 Quantity--><xsl:if test="f:externalDiameter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="externalDiameter">
            <xsl:apply-templates select="f:externalDiameter" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--shape 0..1 string (json type: string)--><xsl:if test="f:shape">
         <xsl:if test="f:shape/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="shape">
               <xsl:value-of select="f:shape/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:shape[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_shape">
               <xsl:apply-templates select="f:shape" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--color 0..* string (json type: string)--><xsl:if test="f:color">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="color">
            <xsl:for-each select="f:color">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:color[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_color">
               <xsl:for-each select="f:color">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--imprint 0..* string (json type: string)--><xsl:if test="f:imprint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="imprint">
            <xsl:for-each select="f:imprint">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:imprint[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_imprint">
               <xsl:for-each select="f:imprint">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--image 0..* Attachment--><xsl:if test="f:image">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="image">
            <xsl:for-each select="f:image">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--scoring 0..1 CodeableConcept--><xsl:if test="f:scoring">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scoring">
            <xsl:apply-templates select="f:scoring" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeableConcept">
      <xsl:apply-templates select="." mode="Element"/>
          <!--coding 0..* Coding--><xsl:if test="f:coding">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coding">
            <xsl:for-each select="f:coding">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ParameterDefinition">
      <xsl:apply-templates select="." mode="Element"/>
          <!--name 0..1 code (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--use 1..1 code (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 0..1 integer (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 0..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--path 1..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--representation 0..* PropertyRepresentation (json type: string)--><xsl:if test="f:representation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="representation">
            <xsl:for-each select="f:representation">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:representation[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_representation">
               <xsl:for-each select="f:representation">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--sliceName 0..1 string (json type: string)--><xsl:if test="f:sliceName">
         <xsl:if test="f:sliceName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sliceName">
               <xsl:value-of select="f:sliceName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sliceName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sliceName">
               <xsl:apply-templates select="f:sliceName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sliceIsConstraining 0..1 boolean (json type: boolean)--><xsl:if test="f:sliceIsConstraining">
         <xsl:if test="f:sliceIsConstraining/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="sliceIsConstraining">
               <xsl:value-of select="f:sliceIsConstraining/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:sliceIsConstraining[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sliceIsConstraining">
               <xsl:apply-templates select="f:sliceIsConstraining" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--label 0..1 string (json type: string)--><xsl:if test="f:label">
         <xsl:if test="f:label/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="label">
               <xsl:value-of select="f:label/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:label[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_label">
               <xsl:apply-templates select="f:label" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..* Coding--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--slicing 0..1 ElementDefinition.Slicing--><xsl:if test="f:slicing">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="slicing">
            <xsl:apply-templates select="f:slicing" mode="ElementDefinition.Slicing"/>
         </map>
      </xsl:if>
          <!--short 0..1 string (json type: string)--><xsl:if test="f:short">
         <xsl:if test="f:short/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="short">
               <xsl:value-of select="f:short/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:short[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_short">
               <xsl:apply-templates select="f:short" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 0..1 markdown (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 markdown (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requirements 0..1 markdown (json type: string)--><xsl:if test="f:requirements">
         <xsl:if test="f:requirements/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requirements">
               <xsl:value-of select="f:requirements/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requirements[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requirements">
               <xsl:apply-templates select="f:requirements" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..* string (json type: string)--><xsl:if test="f:alias">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
            <xsl:for-each select="f:alias">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:alias[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:for-each select="f:alias">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--min 0..1 unsignedInt (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 0..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--base 0..1 ElementDefinition.Base--><xsl:if test="f:base">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="base">
            <xsl:apply-templates select="f:base" mode="ElementDefinition.Base"/>
         </map>
      </xsl:if>
          <!--contentReference 0..1 uri (json type: string)--><xsl:if test="f:contentReference">
         <xsl:if test="f:contentReference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
               <xsl:value-of select="f:contentReference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentReference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentReference">
               <xsl:apply-templates select="f:contentReference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* ElementDefinition.Type--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition.Type"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        
           
           <!--defaultValueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:defaultValueBase64Binary">
         <xsl:if test="f:defaultValueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValueBase64Binary">
               <xsl:value-of select="f:defaultValueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValueBase64Binary">
               <xsl:apply-templates select="f:defaultValueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:defaultValueBoolean">
         <xsl:if test="f:defaultValueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueBoolean">
               <xsl:value-of select="f:defaultValueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:defaultValueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueBoolean">
               <xsl:apply-templates select="f:defaultValueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:defaultValueCanonical">
         <xsl:if test="f:defaultValueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCanonical">
               <xsl:value-of select="f:defaultValueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueCanonical">
               <xsl:apply-templates select="f:defaultValueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueCode 1..1 code (json type: string)--><xsl:if test="f:defaultValueCode">
         <xsl:if test="f:defaultValueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCode">
               <xsl:value-of select="f:defaultValueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueCode">
               <xsl:apply-templates select="f:defaultValueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueDate 1..1 date (json type: string)--><xsl:if test="f:defaultValueDate">
         <xsl:if test="f:defaultValueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDate">
               <xsl:value-of select="f:defaultValueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDate">
               <xsl:apply-templates select="f:defaultValueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:defaultValueDateTime">
         <xsl:if test="f:defaultValueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDateTime">
               <xsl:value-of select="f:defaultValueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDateTime">
               <xsl:apply-templates select="f:defaultValueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:defaultValueDecimal">
         <xsl:if test="f:defaultValueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDecimal">
               <xsl:value-of select="f:defaultValueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDecimal">
               <xsl:apply-templates select="f:defaultValueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueId 1..1 id (json type: string)--><xsl:if test="f:defaultValueId">
         <xsl:if test="f:defaultValueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueId">
               <xsl:value-of select="f:defaultValueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueId">
               <xsl:apply-templates select="f:defaultValueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueInstant 1..1 instant (json type: string)--><xsl:if test="f:defaultValueInstant">
         <xsl:if test="f:defaultValueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueInstant">
               <xsl:value-of select="f:defaultValueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueInstant">
               <xsl:apply-templates select="f:defaultValueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueInteger 1..1 integer (json type: number)--><xsl:if test="f:defaultValueInteger">
         <xsl:if test="f:defaultValueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueInteger">
               <xsl:value-of select="f:defaultValueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueInteger">
               <xsl:apply-templates select="f:defaultValueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:defaultValueMarkdown">
         <xsl:if test="f:defaultValueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMarkdown">
               <xsl:value-of select="f:defaultValueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueMarkdown">
               <xsl:apply-templates select="f:defaultValueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueOid 1..1 oid (json type: string)--><xsl:if test="f:defaultValueOid">
         <xsl:if test="f:defaultValueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueOid">
               <xsl:value-of select="f:defaultValueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueOid">
               <xsl:apply-templates select="f:defaultValueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:defaultValuePositiveInt">
         <xsl:if test="f:defaultValuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValuePositiveInt">
               <xsl:value-of select="f:defaultValuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValuePositiveInt">
               <xsl:apply-templates select="f:defaultValuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueString 1..1 string (json type: string)--><xsl:if test="f:defaultValueString">
         <xsl:if test="f:defaultValueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueString">
               <xsl:value-of select="f:defaultValueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueString">
               <xsl:apply-templates select="f:defaultValueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueTime 1..1 time (json type: string)--><xsl:if test="f:defaultValueTime">
         <xsl:if test="f:defaultValueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueTime">
               <xsl:value-of select="f:defaultValueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueTime">
               <xsl:apply-templates select="f:defaultValueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:defaultValueUnsignedInt">
         <xsl:if test="f:defaultValueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValueUnsignedInt">
               <xsl:value-of select="f:defaultValueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValueUnsignedInt">
               <xsl:apply-templates select="f:defaultValueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueUri 1..1 uri (json type: string)--><xsl:if test="f:defaultValueUri">
         <xsl:if test="f:defaultValueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUri">
               <xsl:value-of select="f:defaultValueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUri">
               <xsl:apply-templates select="f:defaultValueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueUrl 1..1 url (json type: string)--><xsl:if test="f:defaultValueUrl">
         <xsl:if test="f:defaultValueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUrl">
               <xsl:value-of select="f:defaultValueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUrl">
               <xsl:apply-templates select="f:defaultValueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueUuid 1..1 uuid (json type: string)--><xsl:if test="f:defaultValueUuid">
         <xsl:if test="f:defaultValueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUuid">
               <xsl:value-of select="f:defaultValueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUuid">
               <xsl:apply-templates select="f:defaultValueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--defaultValueAddress 1..1 Address--><xsl:if test="f:defaultValueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAddress">
            <xsl:apply-templates select="f:defaultValueAddress" mode="Address"/>
         </map>
      </xsl:if>
           <!--defaultValueAge 1..1 Age--><xsl:if test="f:defaultValueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAge">
            <xsl:apply-templates select="f:defaultValueAge" mode="Age"/>
         </map>
      </xsl:if>
           <!--defaultValueAnnotation 1..1 Annotation--><xsl:if test="f:defaultValueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAnnotation">
            <xsl:apply-templates select="f:defaultValueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
           <!--defaultValueAttachment 1..1 Attachment--><xsl:if test="f:defaultValueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAttachment">
            <xsl:apply-templates select="f:defaultValueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
           <!--defaultValueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:defaultValueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueCodeableConcept">
            <xsl:apply-templates select="f:defaultValueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--defaultValueCoding 1..1 Coding--><xsl:if test="f:defaultValueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCoding">
            <xsl:apply-templates select="f:defaultValueCoding" mode="Coding"/>
         </map>
      </xsl:if>
           <!--defaultValueContactPoint 1..1 ContactPoint--><xsl:if test="f:defaultValueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContactPoint">
            <xsl:apply-templates select="f:defaultValueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
           <!--defaultValueCount 1..1 Count--><xsl:if test="f:defaultValueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCount">
            <xsl:apply-templates select="f:defaultValueCount" mode="Count"/>
         </map>
      </xsl:if>
           <!--defaultValueDistance 1..1 Distance--><xsl:if test="f:defaultValueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDistance">
            <xsl:apply-templates select="f:defaultValueDistance" mode="Distance"/>
         </map>
      </xsl:if>
           <!--defaultValueDuration 1..1 Duration--><xsl:if test="f:defaultValueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDuration">
            <xsl:apply-templates select="f:defaultValueDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--defaultValueHumanName 1..1 HumanName--><xsl:if test="f:defaultValueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueHumanName">
            <xsl:apply-templates select="f:defaultValueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
           <!--defaultValueIdentifier 1..1 Identifier--><xsl:if test="f:defaultValueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueIdentifier">
            <xsl:apply-templates select="f:defaultValueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
           <!--defaultValueMoney 1..1 Money--><xsl:if test="f:defaultValueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMoney">
            <xsl:apply-templates select="f:defaultValueMoney" mode="Money"/>
         </map>
      </xsl:if>
           <!--defaultValuePeriod 1..1 Period--><xsl:if test="f:defaultValuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValuePeriod">
            <xsl:apply-templates select="f:defaultValuePeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--defaultValueQuantity 1..1 Quantity--><xsl:if test="f:defaultValueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueQuantity">
            <xsl:apply-templates select="f:defaultValueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--defaultValueRange 1..1 Range--><xsl:if test="f:defaultValueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueRange">
            <xsl:apply-templates select="f:defaultValueRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--defaultValueRatio 1..1 Ratio--><xsl:if test="f:defaultValueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueRatio">
            <xsl:apply-templates select="f:defaultValueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--defaultValueReference 1..1 Reference--><xsl:if test="f:defaultValueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueReference">
            <xsl:apply-templates select="f:defaultValueReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--defaultValueSampledData 1..1 SampledData--><xsl:if test="f:defaultValueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueSampledData">
            <xsl:apply-templates select="f:defaultValueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
           <!--defaultValueSignature 1..1 Signature--><xsl:if test="f:defaultValueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueSignature">
            <xsl:apply-templates select="f:defaultValueSignature" mode="Signature"/>
         </map>
      </xsl:if>
           <!--defaultValueTiming 1..1 Timing--><xsl:if test="f:defaultValueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueTiming">
            <xsl:apply-templates select="f:defaultValueTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--defaultValueContactDetail 1..1 ContactDetail--><xsl:if test="f:defaultValueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContactDetail">
            <xsl:apply-templates select="f:defaultValueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
           <!--defaultValueContributor 1..1 Contributor--><xsl:if test="f:defaultValueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContributor">
            <xsl:apply-templates select="f:defaultValueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
           <!--defaultValueDataRequirement 1..1 DataRequirement--><xsl:if test="f:defaultValueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueDataRequirement">
            <xsl:apply-templates select="f:defaultValueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
           <!--defaultValueExpression 1..1 Expression--><xsl:if test="f:defaultValueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueExpression">
            <xsl:apply-templates select="f:defaultValueExpression" mode="Expression"/>
         </map>
      </xsl:if>
           <!--defaultValueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:defaultValueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueParameterDefinition">
            <xsl:apply-templates select="f:defaultValueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
           <!--defaultValueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:defaultValueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueRelatedArtifact">
            <xsl:apply-templates select="f:defaultValueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
           <!--defaultValueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:defaultValueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueTriggerDefinition">
            <xsl:apply-templates select="f:defaultValueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
           <!--defaultValueUsageContext 1..1 UsageContext--><xsl:if test="f:defaultValueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueUsageContext">
            <xsl:apply-templates select="f:defaultValueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
           <!--defaultValueDosage 1..1 Dosage--><xsl:if test="f:defaultValueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDosage">
            <xsl:apply-templates select="f:defaultValueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
           <!--defaultValueMeta 1..1 Meta--><xsl:if test="f:defaultValueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMeta">
            <xsl:apply-templates select="f:defaultValueMeta" mode="Meta"/>
         </map>
      </xsl:if>
         
          <!--meaningWhenMissing 0..1 markdown (json type: string)--><xsl:if test="f:meaningWhenMissing">
         <xsl:if test="f:meaningWhenMissing/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="meaningWhenMissing">
               <xsl:value-of select="f:meaningWhenMissing/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:meaningWhenMissing[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_meaningWhenMissing">
               <xsl:apply-templates select="f:meaningWhenMissing" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--orderMeaning 0..1 string (json type: string)--><xsl:if test="f:orderMeaning">
         <xsl:if test="f:orderMeaning/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="orderMeaning">
               <xsl:value-of select="f:orderMeaning/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:orderMeaning[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_orderMeaning">
               <xsl:apply-templates select="f:orderMeaning" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        
           
           <!--fixedBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:fixedBase64Binary">
         <xsl:if test="f:fixedBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedBase64Binary">
               <xsl:value-of select="f:fixedBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedBase64Binary">
               <xsl:apply-templates select="f:fixedBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:fixedBoolean">
         <xsl:if test="f:fixedBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="fixedBoolean">
               <xsl:value-of select="f:fixedBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:fixedBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedBoolean">
               <xsl:apply-templates select="f:fixedBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedCanonical 1..1 canonical (json type: string)--><xsl:if test="f:fixedCanonical">
         <xsl:if test="f:fixedCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedCanonical">
               <xsl:value-of select="f:fixedCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedCanonical">
               <xsl:apply-templates select="f:fixedCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedCode 1..1 code (json type: string)--><xsl:if test="f:fixedCode">
         <xsl:if test="f:fixedCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedCode">
               <xsl:value-of select="f:fixedCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedCode">
               <xsl:apply-templates select="f:fixedCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedDate 1..1 date (json type: string)--><xsl:if test="f:fixedDate">
         <xsl:if test="f:fixedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDate">
               <xsl:value-of select="f:fixedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedDate">
               <xsl:apply-templates select="f:fixedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:fixedDateTime">
         <xsl:if test="f:fixedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDateTime">
               <xsl:value-of select="f:fixedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedDateTime">
               <xsl:apply-templates select="f:fixedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedDecimal 1..1 decimal (json type: number)--><xsl:if test="f:fixedDecimal">
         <xsl:if test="f:fixedDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDecimal">
               <xsl:value-of select="f:fixedDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:fixedDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedDecimal">
               <xsl:apply-templates select="f:fixedDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedId 1..1 id (json type: string)--><xsl:if test="f:fixedId">
         <xsl:if test="f:fixedId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedId">
               <xsl:value-of select="f:fixedId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedId">
               <xsl:apply-templates select="f:fixedId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedInstant 1..1 instant (json type: string)--><xsl:if test="f:fixedInstant">
         <xsl:if test="f:fixedInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedInstant">
               <xsl:value-of select="f:fixedInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedInstant">
               <xsl:apply-templates select="f:fixedInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedInteger 1..1 integer (json type: number)--><xsl:if test="f:fixedInteger">
         <xsl:if test="f:fixedInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="fixedInteger">
               <xsl:value-of select="f:fixedInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:fixedInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedInteger">
               <xsl:apply-templates select="f:fixedInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:fixedMarkdown">
         <xsl:if test="f:fixedMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedMarkdown">
               <xsl:value-of select="f:fixedMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedMarkdown">
               <xsl:apply-templates select="f:fixedMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedOid 1..1 oid (json type: string)--><xsl:if test="f:fixedOid">
         <xsl:if test="f:fixedOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedOid">
               <xsl:value-of select="f:fixedOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedOid">
               <xsl:apply-templates select="f:fixedOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:fixedPositiveInt">
         <xsl:if test="f:fixedPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="fixedPositiveInt">
               <xsl:value-of select="f:fixedPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:fixedPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedPositiveInt">
               <xsl:apply-templates select="f:fixedPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedString 1..1 string (json type: string)--><xsl:if test="f:fixedString">
         <xsl:if test="f:fixedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedString">
               <xsl:value-of select="f:fixedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedString">
               <xsl:apply-templates select="f:fixedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedTime 1..1 time (json type: string)--><xsl:if test="f:fixedTime">
         <xsl:if test="f:fixedTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedTime">
               <xsl:value-of select="f:fixedTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedTime">
               <xsl:apply-templates select="f:fixedTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:fixedUnsignedInt">
         <xsl:if test="f:fixedUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="fixedUnsignedInt">
               <xsl:value-of select="f:fixedUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:fixedUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedUnsignedInt">
               <xsl:apply-templates select="f:fixedUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedUri 1..1 uri (json type: string)--><xsl:if test="f:fixedUri">
         <xsl:if test="f:fixedUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedUri">
               <xsl:value-of select="f:fixedUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedUri">
               <xsl:apply-templates select="f:fixedUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedUrl 1..1 url (json type: string)--><xsl:if test="f:fixedUrl">
         <xsl:if test="f:fixedUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedUrl">
               <xsl:value-of select="f:fixedUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedUrl">
               <xsl:apply-templates select="f:fixedUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedUuid 1..1 uuid (json type: string)--><xsl:if test="f:fixedUuid">
         <xsl:if test="f:fixedUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fixedUuid">
               <xsl:value-of select="f:fixedUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fixedUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fixedUuid">
               <xsl:apply-templates select="f:fixedUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--fixedAddress 1..1 Address--><xsl:if test="f:fixedAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedAddress">
            <xsl:apply-templates select="f:fixedAddress" mode="Address"/>
         </map>
      </xsl:if>
           <!--fixedAge 1..1 Age--><xsl:if test="f:fixedAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedAge">
            <xsl:apply-templates select="f:fixedAge" mode="Age"/>
         </map>
      </xsl:if>
           <!--fixedAnnotation 1..1 Annotation--><xsl:if test="f:fixedAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedAnnotation">
            <xsl:apply-templates select="f:fixedAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
           <!--fixedAttachment 1..1 Attachment--><xsl:if test="f:fixedAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedAttachment">
            <xsl:apply-templates select="f:fixedAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
           <!--fixedCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:fixedCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedCodeableConcept">
            <xsl:apply-templates select="f:fixedCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--fixedCoding 1..1 Coding--><xsl:if test="f:fixedCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedCoding">
            <xsl:apply-templates select="f:fixedCoding" mode="Coding"/>
         </map>
      </xsl:if>
           <!--fixedContactPoint 1..1 ContactPoint--><xsl:if test="f:fixedContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedContactPoint">
            <xsl:apply-templates select="f:fixedContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
           <!--fixedCount 1..1 Count--><xsl:if test="f:fixedCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedCount">
            <xsl:apply-templates select="f:fixedCount" mode="Count"/>
         </map>
      </xsl:if>
           <!--fixedDistance 1..1 Distance--><xsl:if test="f:fixedDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDistance">
            <xsl:apply-templates select="f:fixedDistance" mode="Distance"/>
         </map>
      </xsl:if>
           <!--fixedDuration 1..1 Duration--><xsl:if test="f:fixedDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDuration">
            <xsl:apply-templates select="f:fixedDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--fixedHumanName 1..1 HumanName--><xsl:if test="f:fixedHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedHumanName">
            <xsl:apply-templates select="f:fixedHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
           <!--fixedIdentifier 1..1 Identifier--><xsl:if test="f:fixedIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedIdentifier">
            <xsl:apply-templates select="f:fixedIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
           <!--fixedMoney 1..1 Money--><xsl:if test="f:fixedMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedMoney">
            <xsl:apply-templates select="f:fixedMoney" mode="Money"/>
         </map>
      </xsl:if>
           <!--fixedPeriod 1..1 Period--><xsl:if test="f:fixedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedPeriod">
            <xsl:apply-templates select="f:fixedPeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--fixedQuantity 1..1 Quantity--><xsl:if test="f:fixedQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedQuantity">
            <xsl:apply-templates select="f:fixedQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--fixedRange 1..1 Range--><xsl:if test="f:fixedRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedRange">
            <xsl:apply-templates select="f:fixedRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--fixedRatio 1..1 Ratio--><xsl:if test="f:fixedRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedRatio">
            <xsl:apply-templates select="f:fixedRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--fixedReference 1..1 Reference--><xsl:if test="f:fixedReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedReference">
            <xsl:apply-templates select="f:fixedReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--fixedSampledData 1..1 SampledData--><xsl:if test="f:fixedSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedSampledData">
            <xsl:apply-templates select="f:fixedSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
           <!--fixedSignature 1..1 Signature--><xsl:if test="f:fixedSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedSignature">
            <xsl:apply-templates select="f:fixedSignature" mode="Signature"/>
         </map>
      </xsl:if>
           <!--fixedTiming 1..1 Timing--><xsl:if test="f:fixedTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedTiming">
            <xsl:apply-templates select="f:fixedTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--fixedContactDetail 1..1 ContactDetail--><xsl:if test="f:fixedContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedContactDetail">
            <xsl:apply-templates select="f:fixedContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
           <!--fixedContributor 1..1 Contributor--><xsl:if test="f:fixedContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedContributor">
            <xsl:apply-templates select="f:fixedContributor" mode="Contributor"/>
         </map>
      </xsl:if>
           <!--fixedDataRequirement 1..1 DataRequirement--><xsl:if test="f:fixedDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDataRequirement">
            <xsl:apply-templates select="f:fixedDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
           <!--fixedExpression 1..1 Expression--><xsl:if test="f:fixedExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedExpression">
            <xsl:apply-templates select="f:fixedExpression" mode="Expression"/>
         </map>
      </xsl:if>
           <!--fixedParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:fixedParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="fixedParameterDefinition">
            <xsl:apply-templates select="f:fixedParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
           <!--fixedRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:fixedRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedRelatedArtifact">
            <xsl:apply-templates select="f:fixedRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
           <!--fixedTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:fixedTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedTriggerDefinition">
            <xsl:apply-templates select="f:fixedTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
           <!--fixedUsageContext 1..1 UsageContext--><xsl:if test="f:fixedUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedUsageContext">
            <xsl:apply-templates select="f:fixedUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
           <!--fixedDosage 1..1 Dosage--><xsl:if test="f:fixedDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedDosage">
            <xsl:apply-templates select="f:fixedDosage" mode="Dosage"/>
         </map>
      </xsl:if>
           <!--fixedMeta 1..1 Meta--><xsl:if test="f:fixedMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fixedMeta">
            <xsl:apply-templates select="f:fixedMeta" mode="Meta"/>
         </map>
      </xsl:if>
         
        
           
           <!--patternBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:patternBase64Binary">
         <xsl:if test="f:patternBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternBase64Binary">
               <xsl:value-of select="f:patternBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternBase64Binary">
               <xsl:apply-templates select="f:patternBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:patternBoolean">
         <xsl:if test="f:patternBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="patternBoolean">
               <xsl:value-of select="f:patternBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:patternBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternBoolean">
               <xsl:apply-templates select="f:patternBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternCanonical 1..1 canonical (json type: string)--><xsl:if test="f:patternCanonical">
         <xsl:if test="f:patternCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternCanonical">
               <xsl:value-of select="f:patternCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternCanonical">
               <xsl:apply-templates select="f:patternCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternCode 1..1 code (json type: string)--><xsl:if test="f:patternCode">
         <xsl:if test="f:patternCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternCode">
               <xsl:value-of select="f:patternCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternCode">
               <xsl:apply-templates select="f:patternCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternDate 1..1 date (json type: string)--><xsl:if test="f:patternDate">
         <xsl:if test="f:patternDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternDate">
               <xsl:value-of select="f:patternDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternDate">
               <xsl:apply-templates select="f:patternDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:patternDateTime">
         <xsl:if test="f:patternDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternDateTime">
               <xsl:value-of select="f:patternDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternDateTime">
               <xsl:apply-templates select="f:patternDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternDecimal 1..1 decimal (json type: number)--><xsl:if test="f:patternDecimal">
         <xsl:if test="f:patternDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="patternDecimal">
               <xsl:value-of select="f:patternDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:patternDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternDecimal">
               <xsl:apply-templates select="f:patternDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternId 1..1 id (json type: string)--><xsl:if test="f:patternId">
         <xsl:if test="f:patternId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternId">
               <xsl:value-of select="f:patternId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternId">
               <xsl:apply-templates select="f:patternId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternInstant 1..1 instant (json type: string)--><xsl:if test="f:patternInstant">
         <xsl:if test="f:patternInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternInstant">
               <xsl:value-of select="f:patternInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternInstant">
               <xsl:apply-templates select="f:patternInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternInteger 1..1 integer (json type: number)--><xsl:if test="f:patternInteger">
         <xsl:if test="f:patternInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="patternInteger">
               <xsl:value-of select="f:patternInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:patternInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternInteger">
               <xsl:apply-templates select="f:patternInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:patternMarkdown">
         <xsl:if test="f:patternMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternMarkdown">
               <xsl:value-of select="f:patternMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternMarkdown">
               <xsl:apply-templates select="f:patternMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternOid 1..1 oid (json type: string)--><xsl:if test="f:patternOid">
         <xsl:if test="f:patternOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternOid">
               <xsl:value-of select="f:patternOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternOid">
               <xsl:apply-templates select="f:patternOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:patternPositiveInt">
         <xsl:if test="f:patternPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="patternPositiveInt">
               <xsl:value-of select="f:patternPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:patternPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternPositiveInt">
               <xsl:apply-templates select="f:patternPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternString 1..1 string (json type: string)--><xsl:if test="f:patternString">
         <xsl:if test="f:patternString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternString">
               <xsl:value-of select="f:patternString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternString">
               <xsl:apply-templates select="f:patternString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternTime 1..1 time (json type: string)--><xsl:if test="f:patternTime">
         <xsl:if test="f:patternTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternTime">
               <xsl:value-of select="f:patternTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternTime">
               <xsl:apply-templates select="f:patternTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:patternUnsignedInt">
         <xsl:if test="f:patternUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="patternUnsignedInt">
               <xsl:value-of select="f:patternUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:patternUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternUnsignedInt">
               <xsl:apply-templates select="f:patternUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternUri 1..1 uri (json type: string)--><xsl:if test="f:patternUri">
         <xsl:if test="f:patternUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternUri">
               <xsl:value-of select="f:patternUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternUri">
               <xsl:apply-templates select="f:patternUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternUrl 1..1 url (json type: string)--><xsl:if test="f:patternUrl">
         <xsl:if test="f:patternUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternUrl">
               <xsl:value-of select="f:patternUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternUrl">
               <xsl:apply-templates select="f:patternUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternUuid 1..1 uuid (json type: string)--><xsl:if test="f:patternUuid">
         <xsl:if test="f:patternUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patternUuid">
               <xsl:value-of select="f:patternUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patternUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patternUuid">
               <xsl:apply-templates select="f:patternUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--patternAddress 1..1 Address--><xsl:if test="f:patternAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternAddress">
            <xsl:apply-templates select="f:patternAddress" mode="Address"/>
         </map>
      </xsl:if>
           <!--patternAge 1..1 Age--><xsl:if test="f:patternAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternAge">
            <xsl:apply-templates select="f:patternAge" mode="Age"/>
         </map>
      </xsl:if>
           <!--patternAnnotation 1..1 Annotation--><xsl:if test="f:patternAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternAnnotation">
            <xsl:apply-templates select="f:patternAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
           <!--patternAttachment 1..1 Attachment--><xsl:if test="f:patternAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternAttachment">
            <xsl:apply-templates select="f:patternAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
           <!--patternCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:patternCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternCodeableConcept">
            <xsl:apply-templates select="f:patternCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--patternCoding 1..1 Coding--><xsl:if test="f:patternCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternCoding">
            <xsl:apply-templates select="f:patternCoding" mode="Coding"/>
         </map>
      </xsl:if>
           <!--patternContactPoint 1..1 ContactPoint--><xsl:if test="f:patternContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternContactPoint">
            <xsl:apply-templates select="f:patternContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
           <!--patternCount 1..1 Count--><xsl:if test="f:patternCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternCount">
            <xsl:apply-templates select="f:patternCount" mode="Count"/>
         </map>
      </xsl:if>
           <!--patternDistance 1..1 Distance--><xsl:if test="f:patternDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternDistance">
            <xsl:apply-templates select="f:patternDistance" mode="Distance"/>
         </map>
      </xsl:if>
           <!--patternDuration 1..1 Duration--><xsl:if test="f:patternDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternDuration">
            <xsl:apply-templates select="f:patternDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--patternHumanName 1..1 HumanName--><xsl:if test="f:patternHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternHumanName">
            <xsl:apply-templates select="f:patternHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
           <!--patternIdentifier 1..1 Identifier--><xsl:if test="f:patternIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternIdentifier">
            <xsl:apply-templates select="f:patternIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
           <!--patternMoney 1..1 Money--><xsl:if test="f:patternMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternMoney">
            <xsl:apply-templates select="f:patternMoney" mode="Money"/>
         </map>
      </xsl:if>
           <!--patternPeriod 1..1 Period--><xsl:if test="f:patternPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternPeriod">
            <xsl:apply-templates select="f:patternPeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--patternQuantity 1..1 Quantity--><xsl:if test="f:patternQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternQuantity">
            <xsl:apply-templates select="f:patternQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--patternRange 1..1 Range--><xsl:if test="f:patternRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternRange">
            <xsl:apply-templates select="f:patternRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--patternRatio 1..1 Ratio--><xsl:if test="f:patternRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternRatio">
            <xsl:apply-templates select="f:patternRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--patternReference 1..1 Reference--><xsl:if test="f:patternReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternReference">
            <xsl:apply-templates select="f:patternReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--patternSampledData 1..1 SampledData--><xsl:if test="f:patternSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternSampledData">
            <xsl:apply-templates select="f:patternSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
           <!--patternSignature 1..1 Signature--><xsl:if test="f:patternSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternSignature">
            <xsl:apply-templates select="f:patternSignature" mode="Signature"/>
         </map>
      </xsl:if>
           <!--patternTiming 1..1 Timing--><xsl:if test="f:patternTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternTiming">
            <xsl:apply-templates select="f:patternTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--patternContactDetail 1..1 ContactDetail--><xsl:if test="f:patternContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternContactDetail">
            <xsl:apply-templates select="f:patternContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
           <!--patternContributor 1..1 Contributor--><xsl:if test="f:patternContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternContributor">
            <xsl:apply-templates select="f:patternContributor" mode="Contributor"/>
         </map>
      </xsl:if>
           <!--patternDataRequirement 1..1 DataRequirement--><xsl:if test="f:patternDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternDataRequirement">
            <xsl:apply-templates select="f:patternDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
           <!--patternExpression 1..1 Expression--><xsl:if test="f:patternExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternExpression">
            <xsl:apply-templates select="f:patternExpression" mode="Expression"/>
         </map>
      </xsl:if>
           <!--patternParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:patternParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="patternParameterDefinition">
            <xsl:apply-templates select="f:patternParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
           <!--patternRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:patternRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternRelatedArtifact">
            <xsl:apply-templates select="f:patternRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
           <!--patternTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:patternTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="patternTriggerDefinition">
            <xsl:apply-templates select="f:patternTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
           <!--patternUsageContext 1..1 UsageContext--><xsl:if test="f:patternUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternUsageContext">
            <xsl:apply-templates select="f:patternUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
           <!--patternDosage 1..1 Dosage--><xsl:if test="f:patternDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternDosage">
            <xsl:apply-templates select="f:patternDosage" mode="Dosage"/>
         </map>
      </xsl:if>
           <!--patternMeta 1..1 Meta--><xsl:if test="f:patternMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patternMeta">
            <xsl:apply-templates select="f:patternMeta" mode="Meta"/>
         </map>
      </xsl:if>
         
          <!--example 0..* ElementDefinition.Example--><xsl:if test="f:example">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="example">
            <xsl:for-each select="f:example">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition.Example"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
           <!--minValueDate 1..1 date (json type: string)--><xsl:if test="f:minValueDate">
         <xsl:if test="f:minValueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minValueDate">
               <xsl:value-of select="f:minValueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minValueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueDate">
               <xsl:apply-templates select="f:minValueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:minValueDateTime">
         <xsl:if test="f:minValueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minValueDateTime">
               <xsl:value-of select="f:minValueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minValueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueDateTime">
               <xsl:apply-templates select="f:minValueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueInstant 1..1 instant (json type: string)--><xsl:if test="f:minValueInstant">
         <xsl:if test="f:minValueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minValueInstant">
               <xsl:value-of select="f:minValueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minValueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueInstant">
               <xsl:apply-templates select="f:minValueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueTime 1..1 time (json type: string)--><xsl:if test="f:minValueTime">
         <xsl:if test="f:minValueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minValueTime">
               <xsl:value-of select="f:minValueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minValueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueTime">
               <xsl:apply-templates select="f:minValueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:minValueDecimal">
         <xsl:if test="f:minValueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="minValueDecimal">
               <xsl:value-of select="f:minValueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:minValueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueDecimal">
               <xsl:apply-templates select="f:minValueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueInteger 1..1 integer (json type: number)--><xsl:if test="f:minValueInteger">
         <xsl:if test="f:minValueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="minValueInteger">
               <xsl:value-of select="f:minValueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:minValueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueInteger">
               <xsl:apply-templates select="f:minValueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:minValuePositiveInt">
         <xsl:if test="f:minValuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="minValuePositiveInt">
               <xsl:value-of select="f:minValuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:minValuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValuePositiveInt">
               <xsl:apply-templates select="f:minValuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:minValueUnsignedInt">
         <xsl:if test="f:minValueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="minValueUnsignedInt">
               <xsl:value-of select="f:minValueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:minValueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minValueUnsignedInt">
               <xsl:apply-templates select="f:minValueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--minValueQuantity 1..1 Quantity--><xsl:if test="f:minValueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="minValueQuantity">
            <xsl:apply-templates select="f:minValueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
          
            
           <!--maxValueDate 1..1 date (json type: string)--><xsl:if test="f:maxValueDate">
         <xsl:if test="f:maxValueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueDate">
               <xsl:value-of select="f:maxValueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maxValueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueDate">
               <xsl:apply-templates select="f:maxValueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:maxValueDateTime">
         <xsl:if test="f:maxValueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueDateTime">
               <xsl:value-of select="f:maxValueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maxValueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueDateTime">
               <xsl:apply-templates select="f:maxValueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueInstant 1..1 instant (json type: string)--><xsl:if test="f:maxValueInstant">
         <xsl:if test="f:maxValueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueInstant">
               <xsl:value-of select="f:maxValueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maxValueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueInstant">
               <xsl:apply-templates select="f:maxValueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueTime 1..1 time (json type: string)--><xsl:if test="f:maxValueTime">
         <xsl:if test="f:maxValueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueTime">
               <xsl:value-of select="f:maxValueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maxValueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueTime">
               <xsl:apply-templates select="f:maxValueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:maxValueDecimal">
         <xsl:if test="f:maxValueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueDecimal">
               <xsl:value-of select="f:maxValueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxValueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueDecimal">
               <xsl:apply-templates select="f:maxValueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueInteger 1..1 integer (json type: number)--><xsl:if test="f:maxValueInteger">
         <xsl:if test="f:maxValueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueInteger">
               <xsl:value-of select="f:maxValueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxValueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueInteger">
               <xsl:apply-templates select="f:maxValueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:maxValuePositiveInt">
         <xsl:if test="f:maxValuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxValuePositiveInt">
               <xsl:value-of select="f:maxValuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxValuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValuePositiveInt">
               <xsl:apply-templates select="f:maxValuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:maxValueUnsignedInt">
         <xsl:if test="f:maxValueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueUnsignedInt">
               <xsl:value-of select="f:maxValueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxValueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxValueUnsignedInt">
               <xsl:apply-templates select="f:maxValueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--maxValueQuantity 1..1 Quantity--><xsl:if test="f:maxValueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxValueQuantity">
            <xsl:apply-templates select="f:maxValueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
          <!--maxLength 0..1 integer (json type: number)--><xsl:if test="f:maxLength">
         <xsl:if test="f:maxLength/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxLength">
               <xsl:value-of select="f:maxLength/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxLength[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxLength">
               <xsl:apply-templates select="f:maxLength" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--condition 0..* id (json type: string)--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:condition[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_condition">
               <xsl:for-each select="f:condition">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--constraint 0..* ElementDefinition.Constraint--><xsl:if test="f:constraint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="constraint">
            <xsl:for-each select="f:constraint">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition.Constraint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--mustSupport 0..1 boolean (json type: boolean)--><xsl:if test="f:mustSupport">
         <xsl:if test="f:mustSupport/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="mustSupport">
               <xsl:value-of select="f:mustSupport/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:mustSupport[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mustSupport">
               <xsl:apply-templates select="f:mustSupport" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--isModifier 0..1 boolean (json type: boolean)--><xsl:if test="f:isModifier">
         <xsl:if test="f:isModifier/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isModifier">
               <xsl:value-of select="f:isModifier/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isModifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isModifier">
               <xsl:apply-templates select="f:isModifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--isModifierReason 0..1 string (json type: string)--><xsl:if test="f:isModifierReason">
         <xsl:if test="f:isModifierReason/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="isModifierReason">
               <xsl:value-of select="f:isModifierReason/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:isModifierReason[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isModifierReason">
               <xsl:apply-templates select="f:isModifierReason" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--isSummary 0..1 boolean (json type: boolean)--><xsl:if test="f:isSummary">
         <xsl:if test="f:isSummary/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isSummary">
               <xsl:value-of select="f:isSummary/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isSummary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isSummary">
               <xsl:apply-templates select="f:isSummary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--binding 0..1 ElementDefinition.Binding--><xsl:if test="f:binding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="binding">
            <xsl:apply-templates select="f:binding" mode="ElementDefinition.Binding"/>
         </map>
      </xsl:if>
          <!--mapping 0..* ElementDefinition.Mapping--><xsl:if test="f:mapping">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="mapping">
            <xsl:for-each select="f:mapping">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition.Mapping"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Constraint">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--key 1..1 id (json type: string)--><xsl:if test="f:key">
         <xsl:if test="f:key/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="key">
               <xsl:value-of select="f:key/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:key[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_key">
               <xsl:apply-templates select="f:key" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requirements 0..1 string (json type: string)--><xsl:if test="f:requirements">
         <xsl:if test="f:requirements/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requirements">
               <xsl:value-of select="f:requirements/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requirements[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requirements">
               <xsl:apply-templates select="f:requirements" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--severity 1..1 ConstraintSeverity (json type: string)--><xsl:if test="f:severity">
         <xsl:if test="f:severity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
               <xsl:value-of select="f:severity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:severity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_severity">
               <xsl:apply-templates select="f:severity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--human 1..1 string (json type: string)--><xsl:if test="f:human">
         <xsl:if test="f:human/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="human">
               <xsl:value-of select="f:human/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:human[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_human">
               <xsl:apply-templates select="f:human" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--xpath 0..1 string (json type: string)--><xsl:if test="f:xpath">
         <xsl:if test="f:xpath/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="xpath">
               <xsl:value-of select="f:xpath/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:xpath[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_xpath">
               <xsl:apply-templates select="f:xpath" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..1 canonical (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Mapping">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identity 1..1 id (json type: string)--><xsl:if test="f:identity">
         <xsl:if test="f:identity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identity">
               <xsl:value-of select="f:identity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identity">
               <xsl:apply-templates select="f:identity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 code (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--map 1..1 string (json type: string)--><xsl:if test="f:map">
         <xsl:if test="f:map/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="map">
               <xsl:value-of select="f:map/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:map[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_map">
               <xsl:apply-templates select="f:map" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Base">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--path 1..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 1..1 unsignedInt (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 1..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Type">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 uri (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..* canonical (json type: string)--><xsl:if test="f:profile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:for-each select="f:profile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:profile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:for-each select="f:profile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--targetProfile 0..* canonical (json type: string)--><xsl:if test="f:targetProfile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="targetProfile">
            <xsl:for-each select="f:targetProfile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:targetProfile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_targetProfile">
               <xsl:for-each select="f:targetProfile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--aggregation 0..* AggregationMode (json type: string)--><xsl:if test="f:aggregation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="aggregation">
            <xsl:for-each select="f:aggregation">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:aggregation[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_aggregation">
               <xsl:for-each select="f:aggregation">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--versioning 0..1 ReferenceVersionRules (json type: string)--><xsl:if test="f:versioning">
         <xsl:if test="f:versioning/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="versioning">
               <xsl:value-of select="f:versioning/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:versioning[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versioning">
               <xsl:apply-templates select="f:versioning" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Example">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--label 1..1 string (json type: string)--><xsl:if test="f:label">
         <xsl:if test="f:label/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="label">
               <xsl:value-of select="f:label/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:label[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_label">
               <xsl:apply-templates select="f:label" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        
           
           <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:valueCanonical">
         <xsl:if test="f:valueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCanonical">
               <xsl:value-of select="f:valueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCanonical">
               <xsl:apply-templates select="f:valueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueInstant 1..1 instant (json type: string)--><xsl:if test="f:valueInstant">
         <xsl:if test="f:valueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueInstant">
               <xsl:value-of select="f:valueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInstant">
               <xsl:apply-templates select="f:valueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:valueMarkdown">
         <xsl:if test="f:valueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueMarkdown">
               <xsl:value-of select="f:valueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueMarkdown">
               <xsl:apply-templates select="f:valueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueOid 1..1 oid (json type: string)--><xsl:if test="f:valueOid">
         <xsl:if test="f:valueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueOid">
               <xsl:value-of select="f:valueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueOid">
               <xsl:apply-templates select="f:valueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:valuePositiveInt">
         <xsl:if test="f:valuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valuePositiveInt">
               <xsl:value-of select="f:valuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valuePositiveInt">
               <xsl:apply-templates select="f:valuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:valueUnsignedInt">
         <xsl:if test="f:valueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueUnsignedInt">
               <xsl:value-of select="f:valueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUnsignedInt">
               <xsl:apply-templates select="f:valueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUrl 1..1 url (json type: string)--><xsl:if test="f:valueUrl">
         <xsl:if test="f:valueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUrl">
               <xsl:value-of select="f:valueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUrl">
               <xsl:apply-templates select="f:valueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueUuid 1..1 uuid (json type: string)--><xsl:if test="f:valueUuid">
         <xsl:if test="f:valueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUuid">
               <xsl:value-of select="f:valueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUuid">
               <xsl:apply-templates select="f:valueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
           <!--valueAddress 1..1 Address--><xsl:if test="f:valueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAddress">
            <xsl:apply-templates select="f:valueAddress" mode="Address"/>
         </map>
      </xsl:if>
           <!--valueAge 1..1 Age--><xsl:if test="f:valueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAge">
            <xsl:apply-templates select="f:valueAge" mode="Age"/>
         </map>
      </xsl:if>
           <!--valueAnnotation 1..1 Annotation--><xsl:if test="f:valueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAnnotation">
            <xsl:apply-templates select="f:valueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
           <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
           <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
           <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
           <!--valueContactPoint 1..1 ContactPoint--><xsl:if test="f:valueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactPoint">
            <xsl:apply-templates select="f:valueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
           <!--valueCount 1..1 Count--><xsl:if test="f:valueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCount">
            <xsl:apply-templates select="f:valueCount" mode="Count"/>
         </map>
      </xsl:if>
           <!--valueDistance 1..1 Distance--><xsl:if test="f:valueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDistance">
            <xsl:apply-templates select="f:valueDistance" mode="Distance"/>
         </map>
      </xsl:if>
           <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
           <!--valueHumanName 1..1 HumanName--><xsl:if test="f:valueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueHumanName">
            <xsl:apply-templates select="f:valueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
           <!--valueIdentifier 1..1 Identifier--><xsl:if test="f:valueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueIdentifier">
            <xsl:apply-templates select="f:valueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
           <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
           <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
           <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
           <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
           <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
           <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
           <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
           <!--valueSignature 1..1 Signature--><xsl:if test="f:valueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSignature">
            <xsl:apply-templates select="f:valueSignature" mode="Signature"/>
         </map>
      </xsl:if>
           <!--valueTiming 1..1 Timing--><xsl:if test="f:valueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTiming">
            <xsl:apply-templates select="f:valueTiming" mode="Timing"/>
         </map>
      </xsl:if>
           <!--valueContactDetail 1..1 ContactDetail--><xsl:if test="f:valueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactDetail">
            <xsl:apply-templates select="f:valueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
           <!--valueContributor 1..1 Contributor--><xsl:if test="f:valueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContributor">
            <xsl:apply-templates select="f:valueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
           <!--valueDataRequirement 1..1 DataRequirement--><xsl:if test="f:valueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDataRequirement">
            <xsl:apply-templates select="f:valueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
           <!--valueExpression 1..1 Expression--><xsl:if test="f:valueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueExpression">
            <xsl:apply-templates select="f:valueExpression" mode="Expression"/>
         </map>
      </xsl:if>
           <!--valueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:valueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="valueParameterDefinition">
            <xsl:apply-templates select="f:valueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
           <!--valueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:valueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRelatedArtifact">
            <xsl:apply-templates select="f:valueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
           <!--valueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:valueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTriggerDefinition">
            <xsl:apply-templates select="f:valueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
           <!--valueUsageContext 1..1 UsageContext--><xsl:if test="f:valueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueUsageContext">
            <xsl:apply-templates select="f:valueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
           <!--valueDosage 1..1 Dosage--><xsl:if test="f:valueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDosage">
            <xsl:apply-templates select="f:valueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
           <!--valueMeta 1..1 Meta--><xsl:if test="f:valueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMeta">
            <xsl:apply-templates select="f:valueMeta" mode="Meta"/>
         </map>
      </xsl:if>
         
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Slicing">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--discriminator 0..* ElementDefinition.Discriminator--><xsl:if test="f:discriminator">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="discriminator">
            <xsl:for-each select="f:discriminator">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition.Discriminator"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--ordered 0..1 boolean (json type: boolean)--><xsl:if test="f:ordered">
         <xsl:if test="f:ordered/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="ordered">
               <xsl:value-of select="f:ordered/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:ordered[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ordered">
               <xsl:apply-templates select="f:ordered" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--rules 1..1 SlicingRules (json type: string)--><xsl:if test="f:rules">
         <xsl:if test="f:rules/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rules">
               <xsl:value-of select="f:rules/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rules[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rules">
               <xsl:apply-templates select="f:rules" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Binding">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--strength 1..1 BindingStrength (json type: string)--><xsl:if test="f:strength">
         <xsl:if test="f:strength/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
               <xsl:value-of select="f:strength/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:strength[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_strength">
               <xsl:apply-templates select="f:strength" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--valueSet 0..1 canonical (json type: string)--><xsl:if test="f:valueSet">
         <xsl:if test="f:valueSet/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueSet">
               <xsl:value-of select="f:valueSet/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueSet[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueSet">
               <xsl:apply-templates select="f:valueSet" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Captures constraints on each element within the resource, profile, or extension.</xd:p>
         <xd:p>If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ElementDefinition.Discriminator">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 DiscriminatorType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--path 1..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a property is represented when serialized.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PropertyRepresentation">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>SHALL applications comply with this constraint?</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConstraintSeverity">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How resource references can be aggregated.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AggregationMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Whether a reference needs to be version specific or version independent, or whether either can be used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ReferenceVersionRules">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How slices are interpreted when evaluating an instance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SlicingRules">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indication of the degree of conformance expectations associated with a binding.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BindingStrength">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How an element value is interpreted when discrimination is evaluated.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DiscriminatorType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A resource that includes narrative, extensions, and contained resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DomainResource">
      <xsl:apply-templates select="." mode="Resource"/>
          <!--text 0..1 Narrative--><xsl:if test="f:text">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="text">
            <xsl:apply-templates select="f:text" mode="Narrative"/>
         </map>
      </xsl:if>
          <!--contained 0..* ResourceContainer--><xsl:if test="f:contained">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contained">
            <xsl:for-each select="f:contained">
               <map>
                  <xsl:apply-templates select="." mode="ResourceContainer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--extension 0..* Extension--><xsl:if test="f:extension">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="extension">
            <xsl:for-each select="f:extension">
               <map>
                  <xsl:apply-templates select="." mode="Extension"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--modifierExtension 0..* Extension--><xsl:if test="f:modifierExtension">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifierExtension">
            <xsl:for-each select="f:modifierExtension">
               <map>
                  <xsl:apply-templates select="." mode="Extension"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This is the base resource type for everything.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Resource">
          <!--id 0..1 id (json type: string)--><xsl:if test="f:id">
         <xsl:if test="f:id/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="id">
               <xsl:value-of select="f:id/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:id[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_id">
               <xsl:apply-templates select="f:id" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--meta 0..1 Meta--><xsl:if test="f:meta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="meta">
            <xsl:apply-templates select="f:meta" mode="Meta"/>
         </map>
      </xsl:if>
          <!--implicitRules 0..1 uri (json type: string)--><xsl:if test="f:implicitRules">
         <xsl:if test="f:implicitRules/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="implicitRules">
               <xsl:value-of select="f:implicitRules/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:implicitRules[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_implicitRules">
               <xsl:apply-templates select="f:implicitRules" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 code (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PublicationStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchParamType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AdministrativeGender">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FHIRVersion">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NoteType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RemittanceOutcome">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMapEquivalence">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p/>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentReferenceStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Account">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Account</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 AccountStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--servicePeriod 0..1 Period--><xsl:if test="f:servicePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicePeriod">
            <xsl:apply-templates select="f:servicePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--coverage 0..* Account.Coverage--><xsl:if test="f:coverage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:for-each select="f:coverage">
               <map>
                  <xsl:apply-templates select="." mode="Account.Coverage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--owner 0..1 Reference--><xsl:if test="f:owner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="owner">
            <xsl:apply-templates select="f:owner" mode="Reference"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--guarantor 0..* Account.Guarantor--><xsl:if test="f:guarantor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="guarantor">
            <xsl:for-each select="f:guarantor">
               <map>
                  <xsl:apply-templates select="." mode="Account.Guarantor"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..1 Reference--><xsl:if test="f:partOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:apply-templates select="f:partOf" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Account.Coverage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--priority 0..1 positiveInt (json type: number)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Account.Guarantor">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--party 1..1 Reference--><xsl:if test="f:party">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:apply-templates select="f:party" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onHold 0..1 boolean (json type: boolean)--><xsl:if test="f:onHold">
         <xsl:if test="f:onHold/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="onHold">
               <xsl:value-of select="f:onHold/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:onHold[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onHold">
               <xsl:apply-templates select="f:onHold" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates whether the account is available to be used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AccountStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActivityDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ActivityDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--library 0..* canonical (json type: string)--><xsl:if test="f:library">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="library">
            <xsl:for-each select="f:library">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:library[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_library">
               <xsl:for-each select="f:library">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--kind 0..1 RequestResourceType (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intent 0..1 RequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--timingTiming 1..1 Timing--><xsl:if test="f:timingTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingTiming">
            <xsl:apply-templates select="f:timingTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--timingDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timingDateTime">
         <xsl:if test="f:timingDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDateTime">
               <xsl:value-of select="f:timingDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDateTime">
               <xsl:apply-templates select="f:timingDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timingAge 1..1 Age--><xsl:if test="f:timingAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingAge">
            <xsl:apply-templates select="f:timingAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--timingRange 1..1 Range--><xsl:if test="f:timingRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingRange">
            <xsl:apply-templates select="f:timingRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--timingDuration 1..1 Duration--><xsl:if test="f:timingDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingDuration">
            <xsl:apply-templates select="f:timingDuration" mode="Duration"/>
         </map>
      </xsl:if>
          
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--participant 0..* ActivityDefinition.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="ActivityDefinition.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--productReference 1..1 Reference--><xsl:if test="f:productReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productReference">
            <xsl:apply-templates select="f:productReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--productCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:productCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productCodeableConcept">
            <xsl:apply-templates select="f:productCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--dosage 0..* Dosage--><xsl:if test="f:dosage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosage">
            <xsl:for-each select="f:dosage">
               <map>
                  <xsl:apply-templates select="." mode="Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..* CodeableConcept--><xsl:if test="f:bodySite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:for-each select="f:bodySite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specimenRequirement 0..* Reference--><xsl:if test="f:specimenRequirement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specimenRequirement">
            <xsl:for-each select="f:specimenRequirement">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--observationRequirement 0..* Reference--><xsl:if test="f:observationRequirement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="observationRequirement">
            <xsl:for-each select="f:observationRequirement">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--observationResultRequirement 0..* Reference--><xsl:if test="f:observationResultRequirement">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="observationResultRequirement">
            <xsl:for-each select="f:observationResultRequirement">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--transform 0..1 canonical (json type: string)--><xsl:if test="f:transform">
         <xsl:if test="f:transform/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="transform">
               <xsl:value-of select="f:transform/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:transform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_transform">
               <xsl:apply-templates select="f:transform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dynamicValue 0..* ActivityDefinition.DynamicValue--><xsl:if test="f:dynamicValue">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dynamicValue">
            <xsl:for-each select="f:dynamicValue">
               <map>
                  <xsl:apply-templates select="." mode="ActivityDefinition.DynamicValue"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This is actually an R5 and up resource, but necessary to complete the obligation extension</xd:p>
         <xd:p>Describes an actor - a human or an application that plays a role in data exchange, and that may have obligations associated with the role the actor plays.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActorDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ActorDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
      <!--url 0..1 uri (json type: string)-->
      <xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--identifier 0..* Identifier-->
      <xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
      <!--version 0..1 string (json type: string)-->
      <xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--versionAlgorithm 0..1 string (json type: string)-->
      <xsl:choose>
         <xsl:when test="f:versionAlgorithmString">
            <xsl:if test="f:versionAlgorithmString/@value">
               <string xmlns="http://www.w3.org/2005/xpath-functions" key="versionAlgorithm">
                  <xsl:value-of select="f:versionAlgorithm/@value"/>
               </string>
            </xsl:if>
            <xsl:if test="f:versionAlgorithmString[@id | f:extension]">
               <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versionAlgorithm">
                  <xsl:apply-templates select="f:versionAlgorithm" mode="Element"/>
               </map>
            </xsl:if>
         </xsl:when>
         <!--versionAlgorithm 0..1 string (json type: string)-->
         <xsl:when test="f:versionAlgorithmCoding">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="versionAlgorithmCoding">
               <xsl:apply-templates select="f:versionAlgorithmCoding" mode="Coding"/>
            </map>
         </xsl:when>
      </xsl:choose>
      <!--name 0..1 string (json type: string)-->
      <xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--title 0..1 string (json type: string)-->
      <xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--status 1..1 PublicationStatus (json type: string)-->
      <xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--experimental 0..1 boolean (json type: boolean)-->
      <xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--date 0..1 dateTime (json type: string)-->
      <xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--publisher 0..1 string (json type: string)-->
      <xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--contact 0..* ContactDetail-->
      <xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
      <!--description 0..1 markdown (json type: string)-->
      <xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--useContext 0..* UsageContext-->
      <xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
      <!--jurisdiction 0..* CodeableConcept-->
      <xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
      <!--purpose 0..1 markdown (json type: string)-->
      <xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--copyright 0..1 markdown (json type: string)-->
      <xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--copyrightLabel 0..1 string (json type: string)-->
      <xsl:if test="f:copyrightLabel">
         <xsl:if test="f:copyrightLabel/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyrightLabel">
               <xsl:value-of select="f:copyrightLabel/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyrightLabel[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyrightLabel">
               <xsl:apply-templates select="f:copyrightLabel" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--type 0..1 ExampleScenarioActorType (json type: string)-->
      <xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--documentation 0..1 markdown (json type: string)-->
      <xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--reference 0..* canonical (json type: string)-->
      <xsl:if test="f:reference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:for-each select="f:reference">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
      </xsl:if>
      <xsl:if test="f:reference[@id | f:extension]">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="_reference">
            <xsl:for-each select="f:reference">
               <xsl:choose>
                  <xsl:when test=".[@id | f:extension]">
                     <map>
                        <xsl:apply-templates select="." mode="Element"/>
                     </map>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
      </xsl:if>
      <!--capabilities 0..1 canonical (json type: string)-->
      <xsl:if test="f:capabilities">
         <xsl:if test="f:capabilities/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="capabilities">
               <xsl:value-of select="f:capabilities/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:capabilities[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_capabilities">
               <xsl:apply-templates select="f:capabilities" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
      <!--derivedFrom 0..* canonical (json type: string)-->
      <xsl:if test="f:derivedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
      </xsl:if>
      <xsl:if test="f:derivedFrom[@id | f:extension]">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="_derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <xsl:choose>
                  <xsl:when test=".[@id | f:extension]">
                     <map>
                        <xsl:apply-templates select="." mode="Element"/>
                     </map>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
      </xsl:if>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActivityDefinition.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 ActionParticipantType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActivityDefinition.DynamicValue">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--path 1..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 1..1 Expression--><xsl:if test="f:expression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
            <xsl:apply-templates select="f:expression" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of participant in the activity.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionParticipantType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes indicating the degree of authority/intentionality associated with a request.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestIntent">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The kind of activity the definition is describing.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestResourceType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies the level of importance to be assigned to actioning the request.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestPriority">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AdverseEvent">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">AdverseEvent</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--actuality 1..1 AdverseEventActuality (json type: string)--><xsl:if test="f:actuality">
         <xsl:if test="f:actuality/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="actuality">
               <xsl:value-of select="f:actuality/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:actuality[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actuality">
               <xsl:apply-templates select="f:actuality" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--event 0..1 CodeableConcept--><xsl:if test="f:event">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="event">
            <xsl:apply-templates select="f:event" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detected 0..1 dateTime (json type: string)--><xsl:if test="f:detected">
         <xsl:if test="f:detected/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="detected">
               <xsl:value-of select="f:detected/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:detected[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detected">
               <xsl:apply-templates select="f:detected" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--recordedDate 0..1 dateTime (json type: string)--><xsl:if test="f:recordedDate">
         <xsl:if test="f:recordedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recordedDate">
               <xsl:value-of select="f:recordedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recordedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recordedDate">
               <xsl:apply-templates select="f:recordedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resultingCondition 0..* Reference--><xsl:if test="f:resultingCondition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resultingCondition">
            <xsl:for-each select="f:resultingCondition">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--seriousness 0..1 CodeableConcept--><xsl:if test="f:seriousness">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="seriousness">
            <xsl:apply-templates select="f:seriousness" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--severity 0..1 CodeableConcept--><xsl:if test="f:severity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
            <xsl:apply-templates select="f:severity" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--outcome 0..1 CodeableConcept--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--recorder 0..1 Reference--><xsl:if test="f:recorder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recorder">
            <xsl:apply-templates select="f:recorder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contributor 0..* Reference--><xsl:if test="f:contributor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contributor">
            <xsl:for-each select="f:contributor">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--suspectEntity 0..* AdverseEvent.SuspectEntity--><xsl:if test="f:suspectEntity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="suspectEntity">
            <xsl:for-each select="f:suspectEntity">
               <map>
                  <xsl:apply-templates select="." mode="AdverseEvent.SuspectEntity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subjectMedicalHistory 0..* Reference--><xsl:if test="f:subjectMedicalHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subjectMedicalHistory">
            <xsl:for-each select="f:subjectMedicalHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referenceDocument 0..* Reference--><xsl:if test="f:referenceDocument">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referenceDocument">
            <xsl:for-each select="f:referenceDocument">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--study 0..* Reference--><xsl:if test="f:study">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="study">
            <xsl:for-each select="f:study">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AdverseEvent.SuspectEntity">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--instance 1..1 Reference--><xsl:if test="f:instance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
            <xsl:apply-templates select="f:instance" mode="Reference"/>
         </map>
      </xsl:if>
          <!--causality 0..* AdverseEvent.Causality--><xsl:if test="f:causality">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="causality">
            <xsl:for-each select="f:causality">
               <map>
                  <xsl:apply-templates select="." mode="AdverseEvent.Causality"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AdverseEvent.Causality">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--assessment 0..1 CodeableConcept--><xsl:if test="f:assessment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assessment">
            <xsl:apply-templates select="f:assessment" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productRelatedness 0..1 string (json type: string)--><xsl:if test="f:productRelatedness">
         <xsl:if test="f:productRelatedness/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="productRelatedness">
               <xsl:value-of select="f:productRelatedness/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:productRelatedness[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_productRelatedness">
               <xsl:apply-templates select="f:productRelatedness" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Overall nature of the adverse event, e.g. real or potential.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AdverseEventActuality">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntolerance">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">AllergyIntolerance</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--clinicalStatus 0..1 CodeableConcept--><xsl:if test="f:clinicalStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="clinicalStatus">
            <xsl:apply-templates select="f:clinicalStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--verificationStatus 0..1 CodeableConcept--><xsl:if test="f:verificationStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="verificationStatus">
            <xsl:apply-templates select="f:verificationStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..1 AllergyIntoleranceType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* AllergyIntoleranceCategory (json type: string)--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:category[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_category">
               <xsl:for-each select="f:category">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--criticality 0..1 AllergyIntoleranceCriticality (json type: string)--><xsl:if test="f:criticality">
         <xsl:if test="f:criticality/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="criticality">
               <xsl:value-of select="f:criticality/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:criticality[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_criticality">
               <xsl:apply-templates select="f:criticality" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--onsetDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:onsetDateTime">
         <xsl:if test="f:onsetDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onsetDateTime">
               <xsl:value-of select="f:onsetDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onsetDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onsetDateTime">
               <xsl:apply-templates select="f:onsetDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--onsetAge 1..1 Age--><xsl:if test="f:onsetAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetAge">
            <xsl:apply-templates select="f:onsetAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--onsetPeriod 1..1 Period--><xsl:if test="f:onsetPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetPeriod">
            <xsl:apply-templates select="f:onsetPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--onsetRange 1..1 Range--><xsl:if test="f:onsetRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetRange">
            <xsl:apply-templates select="f:onsetRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--onsetString 1..1 string (json type: string)--><xsl:if test="f:onsetString">
         <xsl:if test="f:onsetString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onsetString">
               <xsl:value-of select="f:onsetString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onsetString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onsetString">
               <xsl:apply-templates select="f:onsetString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--recordedDate 0..1 dateTime (json type: string)--><xsl:if test="f:recordedDate">
         <xsl:if test="f:recordedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recordedDate">
               <xsl:value-of select="f:recordedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recordedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recordedDate">
               <xsl:apply-templates select="f:recordedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--recorder 0..1 Reference--><xsl:if test="f:recorder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recorder">
            <xsl:apply-templates select="f:recorder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--asserter 0..1 Reference--><xsl:if test="f:asserter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="asserter">
            <xsl:apply-templates select="f:asserter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--lastOccurrence 0..1 dateTime (json type: string)--><xsl:if test="f:lastOccurrence">
         <xsl:if test="f:lastOccurrence/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastOccurrence">
               <xsl:value-of select="f:lastOccurrence/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastOccurrence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastOccurrence">
               <xsl:apply-templates select="f:lastOccurrence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reaction 0..* AllergyIntolerance.Reaction--><xsl:if test="f:reaction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reaction">
            <xsl:for-each select="f:reaction">
               <map>
                  <xsl:apply-templates select="." mode="AllergyIntolerance.Reaction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntolerance.Reaction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--substance 0..1 CodeableConcept--><xsl:if test="f:substance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substance">
            <xsl:apply-templates select="f:substance" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--manifestation 1..* CodeableConcept--><xsl:if test="f:manifestation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manifestation">
            <xsl:for-each select="f:manifestation">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--onset 0..1 dateTime (json type: string)--><xsl:if test="f:onset">
         <xsl:if test="f:onset/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onset">
               <xsl:value-of select="f:onset/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onset[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onset">
               <xsl:apply-templates select="f:onset" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--severity 0..1 AllergyIntoleranceSeverity (json type: string)--><xsl:if test="f:severity">
         <xsl:if test="f:severity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
               <xsl:value-of select="f:severity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:severity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_severity">
               <xsl:apply-templates select="f:severity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--exposureRoute 0..1 CodeableConcept--><xsl:if test="f:exposureRoute">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposureRoute">
            <xsl:apply-templates select="f:exposureRoute" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntoleranceCriticality">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identification of the underlying physiological mechanism for a Reaction Risk.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntoleranceType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Category of an identified substance associated with allergies or intolerances.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntoleranceCategory">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AllergyIntoleranceSeverity">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Appointment">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Appointment</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 AppointmentStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cancelationReason 0..1 CodeableConcept--><xsl:if test="f:cancelationReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="cancelationReason">
            <xsl:apply-templates select="f:cancelationReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--serviceCategory 0..* CodeableConcept--><xsl:if test="f:serviceCategory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceCategory">
            <xsl:for-each select="f:serviceCategory">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceType 0..* CodeableConcept--><xsl:if test="f:serviceType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceType">
            <xsl:for-each select="f:serviceType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--appointmentType 0..1 CodeableConcept--><xsl:if test="f:appointmentType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="appointmentType">
            <xsl:apply-templates select="f:appointmentType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 unsignedInt (json type: number)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--supportingInformation 0..* Reference--><xsl:if test="f:supportingInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
            <xsl:for-each select="f:supportingInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--start 0..1 instant (json type: string)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 instant (json type: string)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--minutesDuration 0..1 positiveInt (json type: number)--><xsl:if test="f:minutesDuration">
         <xsl:if test="f:minutesDuration/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="minutesDuration">
               <xsl:value-of select="f:minutesDuration/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:minutesDuration[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minutesDuration">
               <xsl:apply-templates select="f:minutesDuration" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--slot 0..* Reference--><xsl:if test="f:slot">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="slot">
            <xsl:for-each select="f:slot">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--created 0..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patientInstruction 0..1 string (json type: string)--><xsl:if test="f:patientInstruction">
         <xsl:if test="f:patientInstruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patientInstruction">
               <xsl:value-of select="f:patientInstruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patientInstruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patientInstruction">
               <xsl:apply-templates select="f:patientInstruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--participant 1..* Appointment.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="Appointment.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--requestedPeriod 0..* Period--><xsl:if test="f:requestedPeriod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="requestedPeriod">
            <xsl:for-each select="f:requestedPeriod">
               <map>
                  <xsl:apply-templates select="." mode="Period"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Appointment.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--actor 0..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--required 0..1 ParticipantRequired (json type: string)--><xsl:if test="f:required">
         <xsl:if test="f:required/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="required">
               <xsl:value-of select="f:required/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:required[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_required">
               <xsl:apply-templates select="f:required" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 ParticipationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Is the Participant required to attend the appointment.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ParticipantRequired">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The free/busy status of an appointment.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AppointmentStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Participation status of an appointment.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ParticipationStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AppointmentResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">AppointmentResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--appointment 1..1 Reference--><xsl:if test="f:appointment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="appointment">
            <xsl:apply-templates select="f:appointment" mode="Reference"/>
         </map>
      </xsl:if>
          <!--start 0..1 instant (json type: string)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 instant (json type: string)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--participantType 0..* CodeableConcept--><xsl:if test="f:participantType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participantType">
            <xsl:for-each select="f:participantType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--actor 0..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--participantStatus 1..1 ParticipationStatus (json type: string)--><xsl:if test="f:participantStatus">
         <xsl:if test="f:participantStatus/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="participantStatus">
               <xsl:value-of select="f:participantStatus/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:participantStatus[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_participantStatus">
               <xsl:apply-templates select="f:participantStatus" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">AuditEvent</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--type 1..1 Coding--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="Coding"/>
         </map>
      </xsl:if>
          <!--subtype 0..* Coding--><xsl:if test="f:subtype">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subtype">
            <xsl:for-each select="f:subtype">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..1 AuditEventAction (json type: string)--><xsl:if test="f:action">
         <xsl:if test="f:action/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="action">
               <xsl:value-of select="f:action/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:action[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_action">
               <xsl:apply-templates select="f:action" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--recorded 1..1 instant (json type: string)--><xsl:if test="f:recorded">
         <xsl:if test="f:recorded/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recorded">
               <xsl:value-of select="f:recorded/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recorded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recorded">
               <xsl:apply-templates select="f:recorded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--outcome 0..1 AuditEventOutcome (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--outcomeDesc 0..1 string (json type: string)--><xsl:if test="f:outcomeDesc">
         <xsl:if test="f:outcomeDesc/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcomeDesc">
               <xsl:value-of select="f:outcomeDesc/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcomeDesc[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcomeDesc">
               <xsl:apply-templates select="f:outcomeDesc" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--purposeOfEvent 0..* CodeableConcept--><xsl:if test="f:purposeOfEvent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="purposeOfEvent">
            <xsl:for-each select="f:purposeOfEvent">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--agent 1..* AuditEvent.Agent--><xsl:if test="f:agent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="agent">
            <xsl:for-each select="f:agent">
               <map>
                  <xsl:apply-templates select="." mode="AuditEvent.Agent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--source 1..1 AuditEvent.Source--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="AuditEvent.Source"/>
         </map>
      </xsl:if>
          <!--entity 0..* AuditEvent.Entity--><xsl:if test="f:entity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="entity">
            <xsl:for-each select="f:entity">
               <map>
                  <xsl:apply-templates select="." mode="AuditEvent.Entity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent.Agent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--role 0..* CodeableConcept--><xsl:if test="f:role">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:for-each select="f:role">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--who 0..1 Reference--><xsl:if test="f:who">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="who">
            <xsl:apply-templates select="f:who" mode="Reference"/>
         </map>
      </xsl:if>
          <!--altId 0..1 string (json type: string)--><xsl:if test="f:altId">
         <xsl:if test="f:altId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="altId">
               <xsl:value-of select="f:altId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:altId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_altId">
               <xsl:apply-templates select="f:altId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requestor 1..1 boolean (json type: boolean)--><xsl:if test="f:requestor">
         <xsl:if test="f:requestor/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="requestor">
               <xsl:value-of select="f:requestor/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:requestor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requestor">
               <xsl:apply-templates select="f:requestor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--policy 0..* uri (json type: string)--><xsl:if test="f:policy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="policy">
            <xsl:for-each select="f:policy">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:policy[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_policy">
               <xsl:for-each select="f:policy">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--media 0..1 Coding--><xsl:if test="f:media">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="media">
            <xsl:apply-templates select="f:media" mode="Coding"/>
         </map>
      </xsl:if>
          <!--network 0..1 AuditEvent.Network--><xsl:if test="f:network">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:apply-templates select="f:network" mode="AuditEvent.Network"/>
         </map>
      </xsl:if>
          <!--purposeOfUse 0..* CodeableConcept--><xsl:if test="f:purposeOfUse">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="purposeOfUse">
            <xsl:for-each select="f:purposeOfUse">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent.Network">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--address 0..1 string (json type: string)--><xsl:if test="f:address">
         <xsl:if test="f:address/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="address">
               <xsl:value-of select="f:address/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:address[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_address">
               <xsl:apply-templates select="f:address" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 AuditEventAgentNetworkType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent.Source">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--site 0..1 string (json type: string)--><xsl:if test="f:site">
         <xsl:if test="f:site/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="site">
               <xsl:value-of select="f:site/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:site[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_site">
               <xsl:apply-templates select="f:site" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--observer 1..1 Reference--><xsl:if test="f:observer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="observer">
            <xsl:apply-templates select="f:observer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 0..* Coding--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent.Entity">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--what 0..1 Reference--><xsl:if test="f:what">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="what">
            <xsl:apply-templates select="f:what" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 0..1 Coding--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="Coding"/>
         </map>
      </xsl:if>
          <!--role 0..1 Coding--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="Coding"/>
         </map>
      </xsl:if>
          <!--lifecycle 0..1 Coding--><xsl:if test="f:lifecycle">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="lifecycle">
            <xsl:apply-templates select="f:lifecycle" mode="Coding"/>
         </map>
      </xsl:if>
          <!--securityLabel 0..* Coding--><xsl:if test="f:securityLabel">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabel">
            <xsl:for-each select="f:securityLabel">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--query 0..1 base64Binary (json type: string)--><xsl:if test="f:query">
         <xsl:if test="f:query/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="query">
               <xsl:value-of select="f:query/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:query[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_query">
               <xsl:apply-templates select="f:query" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detail 0..* AuditEvent.Detail--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="AuditEvent.Detail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEvent.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 string (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates whether the event succeeded or failed.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEventOutcome">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicator for type of action performed during the event that generated the event.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEventAction">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of network access point of this agent in the audit event.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AuditEventAgentNetworkType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Basic">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Basic</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--created 0..1 date (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Binary">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Binary</string>
      <xsl:apply-templates select="." mode="Resource"/>
          <!--contentType 1..1 code (json type: string)--><xsl:if test="f:contentType">
         <xsl:if test="f:contentType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentType">
               <xsl:value-of select="f:contentType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentType">
               <xsl:apply-templates select="f:contentType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--securityContext 0..1 Reference--><xsl:if test="f:securityContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="securityContext">
            <xsl:apply-templates select="f:securityContext" mode="Reference"/>
         </map>
      </xsl:if>
          <!--data 0..1 base64Binary (json type: string)--><xsl:if test="f:data">
         <xsl:if test="f:data/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="data">
               <xsl:value-of select="f:data/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:data[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_data">
               <xsl:apply-templates select="f:data" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProduct">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">BiologicallyDerivedProduct</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--productCategory 0..1 BiologicallyDerivedProductCategory (json type: string)--><xsl:if test="f:productCategory">
         <xsl:if test="f:productCategory/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="productCategory">
               <xsl:value-of select="f:productCategory/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:productCategory[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_productCategory">
               <xsl:apply-templates select="f:productCategory" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--productCode 0..1 CodeableConcept--><xsl:if test="f:productCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productCode">
            <xsl:apply-templates select="f:productCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 BiologicallyDerivedProductStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--request 0..* Reference--><xsl:if test="f:request">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:for-each select="f:request">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 integer (json type: number)--><xsl:if test="f:quantity">
         <xsl:if test="f:quantity/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
               <xsl:value-of select="f:quantity/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:quantity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_quantity">
               <xsl:apply-templates select="f:quantity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parent 0..* Reference--><xsl:if test="f:parent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:for-each select="f:parent">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--collection 0..1 BiologicallyDerivedProduct.Collection--><xsl:if test="f:collection">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collection">
            <xsl:apply-templates select="f:collection" mode="BiologicallyDerivedProduct.Collection"/>
         </map>
      </xsl:if>
          <!--processing 0..* BiologicallyDerivedProduct.Processing--><xsl:if test="f:processing">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="processing">
            <xsl:for-each select="f:processing">
               <map>
                  <xsl:apply-templates select="." mode="BiologicallyDerivedProduct.Processing"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--manipulation 0..1 BiologicallyDerivedProduct.Manipulation--><xsl:if test="f:manipulation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manipulation">
            <xsl:apply-templates select="f:manipulation" mode="BiologicallyDerivedProduct.Manipulation"/>
         </map>
      </xsl:if>
          <!--storage 0..* BiologicallyDerivedProduct.Storage--><xsl:if test="f:storage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="storage">
            <xsl:for-each select="f:storage">
               <map>
                  <xsl:apply-templates select="." mode="BiologicallyDerivedProduct.Storage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProduct.Collection">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--collector 0..1 Reference--><xsl:if test="f:collector">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collector">
            <xsl:apply-templates select="f:collector" mode="Reference"/>
         </map>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--collectedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:collectedDateTime">
         <xsl:if test="f:collectedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="collectedDateTime">
               <xsl:value-of select="f:collectedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:collectedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_collectedDateTime">
               <xsl:apply-templates select="f:collectedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--collectedPeriod 1..1 Period--><xsl:if test="f:collectedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collectedPeriod">
            <xsl:apply-templates select="f:collectedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProduct.Processing">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--procedure 0..1 CodeableConcept--><xsl:if test="f:procedure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedure">
            <xsl:apply-templates select="f:procedure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--additive 0..1 Reference--><xsl:if test="f:additive">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="additive">
            <xsl:apply-templates select="f:additive" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--timeDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timeDateTime">
         <xsl:if test="f:timeDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timeDateTime">
               <xsl:value-of select="f:timeDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timeDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timeDateTime">
               <xsl:apply-templates select="f:timeDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timePeriod 1..1 Period--><xsl:if test="f:timePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timePeriod">
            <xsl:apply-templates select="f:timePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProduct.Manipulation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--timeDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timeDateTime">
         <xsl:if test="f:timeDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timeDateTime">
               <xsl:value-of select="f:timeDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timeDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timeDateTime">
               <xsl:apply-templates select="f:timeDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timePeriod 1..1 Period--><xsl:if test="f:timePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timePeriod">
            <xsl:apply-templates select="f:timePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A material substance originating from a biological entity intended to be transplanted or infused
into another (possibly the same) biological entity.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProduct.Storage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--temperature 0..1 decimal (json type: number)--><xsl:if test="f:temperature">
         <xsl:if test="f:temperature/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="temperature">
               <xsl:value-of select="f:temperature/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:temperature[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_temperature">
               <xsl:apply-templates select="f:temperature" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--scale 0..1 BiologicallyDerivedProductStorageScale (json type: string)--><xsl:if test="f:scale">
         <xsl:if test="f:scale/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="scale">
               <xsl:value-of select="f:scale/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:scale[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_scale">
               <xsl:apply-templates select="f:scale" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--duration 0..1 Period--><xsl:if test="f:duration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
            <xsl:apply-templates select="f:duration" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Biologically Derived Product Category.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProductCategory">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Biologically Derived Product Status.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProductStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>BiologicallyDerived Product Storage Scale.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BiologicallyDerivedProductStorageScale">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BodyStructure">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">BodyStructure</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--morphology 0..1 CodeableConcept--><xsl:if test="f:morphology">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="morphology">
            <xsl:apply-templates select="f:morphology" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--location 0..1 CodeableConcept--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--locationQualifier 0..* CodeableConcept--><xsl:if test="f:locationQualifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="locationQualifier">
            <xsl:for-each select="f:locationQualifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--image 0..* Attachment--><xsl:if test="f:image">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="image">
            <xsl:for-each select="f:image">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Bundle</string>
      <xsl:apply-templates select="." mode="Resource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 1..1 BundleType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--timestamp 0..1 instant (json type: string)--><xsl:if test="f:timestamp">
         <xsl:if test="f:timestamp/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timestamp">
               <xsl:value-of select="f:timestamp/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timestamp[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timestamp">
               <xsl:apply-templates select="f:timestamp" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--total 0..1 unsignedInt (json type: number)--><xsl:if test="f:total">
         <xsl:if test="f:total/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="total">
               <xsl:value-of select="f:total/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:total[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_total">
               <xsl:apply-templates select="f:total" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--link 0..* Bundle.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="Bundle.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--entry 0..* Bundle.Entry--><xsl:if test="f:entry">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="entry">
            <xsl:for-each select="f:entry">
               <map>
                  <xsl:apply-templates select="." mode="Bundle.Entry"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--signature 0..1 Signature--><xsl:if test="f:signature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="signature">
            <xsl:apply-templates select="f:signature" mode="Signature"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle.Link">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--relation 1..1 string (json type: string)--><xsl:if test="f:relation">
         <xsl:if test="f:relation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="relation">
               <xsl:value-of select="f:relation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:relation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relation">
               <xsl:apply-templates select="f:relation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle.Entry">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--link 0..* Bundle.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="Bundle.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--fullUrl 0..1 uri (json type: string)--><xsl:if test="f:fullUrl">
         <xsl:if test="f:fullUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fullUrl">
               <xsl:value-of select="f:fullUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fullUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fullUrl">
               <xsl:apply-templates select="f:fullUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..1 ResourceContainer--><xsl:if test="f:resource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:apply-templates select="f:resource" mode="ResourceContainer"/>
         </map>
      </xsl:if>
          <!--search 0..1 Bundle.Search--><xsl:if test="f:search">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="search">
            <xsl:apply-templates select="f:search" mode="Bundle.Search"/>
         </map>
      </xsl:if>
          <!--request 0..1 Bundle.Request--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Bundle.Request"/>
         </map>
      </xsl:if>
          <!--response 0..1 Bundle.Response--><xsl:if test="f:response">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="response">
            <xsl:apply-templates select="f:response" mode="Bundle.Response"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle.Search">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 0..1 SearchEntryMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--score 0..1 decimal (json type: number)--><xsl:if test="f:score">
         <xsl:if test="f:score/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="score">
               <xsl:value-of select="f:score/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:score[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_score">
               <xsl:apply-templates select="f:score" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle.Request">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--method 1..1 HTTPVerb (json type: string)--><xsl:if test="f:method">
         <xsl:if test="f:method/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="method">
               <xsl:value-of select="f:method/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:method[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_method">
               <xsl:apply-templates select="f:method" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--ifNoneMatch 0..1 string (json type: string)--><xsl:if test="f:ifNoneMatch">
         <xsl:if test="f:ifNoneMatch/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="ifNoneMatch">
               <xsl:value-of select="f:ifNoneMatch/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:ifNoneMatch[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ifNoneMatch">
               <xsl:apply-templates select="f:ifNoneMatch" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--ifModifiedSince 0..1 instant (json type: string)--><xsl:if test="f:ifModifiedSince">
         <xsl:if test="f:ifModifiedSince/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="ifModifiedSince">
               <xsl:value-of select="f:ifModifiedSince/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:ifModifiedSince[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ifModifiedSince">
               <xsl:apply-templates select="f:ifModifiedSince" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--ifMatch 0..1 string (json type: string)--><xsl:if test="f:ifMatch">
         <xsl:if test="f:ifMatch/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="ifMatch">
               <xsl:value-of select="f:ifMatch/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:ifMatch[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ifMatch">
               <xsl:apply-templates select="f:ifMatch" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--ifNoneExist 0..1 string (json type: string)--><xsl:if test="f:ifNoneExist">
         <xsl:if test="f:ifNoneExist/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="ifNoneExist">
               <xsl:value-of select="f:ifNoneExist/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:ifNoneExist[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ifNoneExist">
               <xsl:apply-templates select="f:ifNoneExist" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for a collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Bundle.Response">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--status 1..1 string (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--location 0..1 uri (json type: string)--><xsl:if test="f:location">
         <xsl:if test="f:location/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="location">
               <xsl:value-of select="f:location/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:location[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_location">
               <xsl:apply-templates select="f:location" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--etag 0..1 string (json type: string)--><xsl:if test="f:etag">
         <xsl:if test="f:etag/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="etag">
               <xsl:value-of select="f:etag/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:etag[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_etag">
               <xsl:apply-templates select="f:etag" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastModified 0..1 instant (json type: string)--><xsl:if test="f:lastModified">
         <xsl:if test="f:lastModified/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastModified">
               <xsl:value-of select="f:lastModified/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastModified[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastModified">
               <xsl:apply-templates select="f:lastModified" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--outcome 0..1 ResourceContainer--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="ResourceContainer"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HTTPVerb">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the purpose of a bundle - how it is intended to be used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="BundleType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchEntryMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CapabilityStatement</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--kind 1..1 CapabilityStatementKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--instantiates 0..* canonical (json type: string)--><xsl:if test="f:instantiates">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiates">
            <xsl:for-each select="f:instantiates">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiates[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiates">
               <xsl:for-each select="f:instantiates">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--imports 0..* canonical (json type: string)--><xsl:if test="f:imports">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="imports">
            <xsl:for-each select="f:imports">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:imports[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_imports">
               <xsl:for-each select="f:imports">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--software 0..1 CapabilityStatement.Software--><xsl:if test="f:software">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="software">
            <xsl:apply-templates select="f:software" mode="CapabilityStatement.Software"/>
         </map>
      </xsl:if>
          <!--implementation 0..1 CapabilityStatement.Implementation--><xsl:if test="f:implementation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="implementation">
            <xsl:apply-templates select="f:implementation" mode="CapabilityStatement.Implementation"/>
         </map>
      </xsl:if>
          <!--fhirVersion 1..1 FHIRVersion (json type: string)--><xsl:if test="f:fhirVersion">
         <xsl:if test="f:fhirVersion/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fhirVersion">
               <xsl:value-of select="f:fhirVersion/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fhirVersion[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fhirVersion">
               <xsl:apply-templates select="f:fhirVersion" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--format 1..* code (json type: string)--><xsl:if test="f:format">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="format">
            <xsl:for-each select="f:format">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:format[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_format">
               <xsl:for-each select="f:format">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--patchFormat 0..* code (json type: string)--><xsl:if test="f:patchFormat">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="patchFormat">
            <xsl:for-each select="f:patchFormat">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:patchFormat[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_patchFormat">
               <xsl:for-each select="f:patchFormat">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--implementationGuide 0..* canonical (json type: string)--><xsl:if test="f:implementationGuide">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="implementationGuide">
            <xsl:for-each select="f:implementationGuide">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:implementationGuide[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_implementationGuide">
               <xsl:for-each select="f:implementationGuide">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--rest 0..* CapabilityStatement.Rest--><xsl:if test="f:rest">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rest">
            <xsl:for-each select="f:rest">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Rest"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--messaging 0..* CapabilityStatement.Messaging--><xsl:if test="f:messaging">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="messaging">
            <xsl:for-each select="f:messaging">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Messaging"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--document 0..* CapabilityStatement.Document--><xsl:if test="f:document">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="document">
            <xsl:for-each select="f:document">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Document"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Software">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--releaseDate 0..1 dateTime (json type: string)--><xsl:if test="f:releaseDate">
         <xsl:if test="f:releaseDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="releaseDate">
               <xsl:value-of select="f:releaseDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:releaseDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_releaseDate">
               <xsl:apply-templates select="f:releaseDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Implementation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 1..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 url (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--custodian 0..1 Reference--><xsl:if test="f:custodian">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="custodian">
            <xsl:apply-templates select="f:custodian" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Rest">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 1..1 RestfulCapabilityMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--security 0..1 CapabilityStatement.Security--><xsl:if test="f:security">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="security">
            <xsl:apply-templates select="f:security" mode="CapabilityStatement.Security"/>
         </map>
      </xsl:if>
          <!--resource 0..* CapabilityStatement.Resource--><xsl:if test="f:resource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:for-each select="f:resource">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Resource"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--interaction 0..* CapabilityStatement.Interaction1--><xsl:if test="f:interaction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interaction">
            <xsl:for-each select="f:interaction">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Interaction1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--searchParam 0..* CapabilityStatement.SearchParam--><xsl:if test="f:searchParam">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="searchParam">
            <xsl:for-each select="f:searchParam">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.SearchParam"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--operation 0..* CapabilityStatement.Operation--><xsl:if test="f:operation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:for-each select="f:operation">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Operation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--compartment 0..* canonical (json type: string)--><xsl:if test="f:compartment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="compartment">
            <xsl:for-each select="f:compartment">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:compartment[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_compartment">
               <xsl:for-each select="f:compartment">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Security">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--cors 0..1 boolean (json type: boolean)--><xsl:if test="f:cors">
         <xsl:if test="f:cors/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="cors">
               <xsl:value-of select="f:cors/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:cors[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cors">
               <xsl:apply-templates select="f:cors" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--service 0..* CodeableConcept--><xsl:if test="f:service">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="service">
            <xsl:for-each select="f:service">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Resource">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--supportedProfile 0..* canonical (json type: string)--><xsl:if test="f:supportedProfile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportedProfile">
            <xsl:for-each select="f:supportedProfile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:supportedProfile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_supportedProfile">
               <xsl:for-each select="f:supportedProfile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--interaction 0..* CapabilityStatement.Interaction--><xsl:if test="f:interaction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interaction">
            <xsl:for-each select="f:interaction">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Interaction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--versioning 0..1 ResourceVersionPolicy (json type: string)--><xsl:if test="f:versioning">
         <xsl:if test="f:versioning/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="versioning">
               <xsl:value-of select="f:versioning/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:versioning[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versioning">
               <xsl:apply-templates select="f:versioning" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--readHistory 0..1 boolean (json type: boolean)--><xsl:if test="f:readHistory">
         <xsl:if test="f:readHistory/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="readHistory">
               <xsl:value-of select="f:readHistory/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:readHistory[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_readHistory">
               <xsl:apply-templates select="f:readHistory" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--updateCreate 0..1 boolean (json type: boolean)--><xsl:if test="f:updateCreate">
         <xsl:if test="f:updateCreate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="updateCreate">
               <xsl:value-of select="f:updateCreate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:updateCreate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_updateCreate">
               <xsl:apply-templates select="f:updateCreate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--conditionalCreate 0..1 boolean (json type: boolean)--><xsl:if test="f:conditionalCreate">
         <xsl:if test="f:conditionalCreate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="conditionalCreate">
               <xsl:value-of select="f:conditionalCreate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:conditionalCreate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conditionalCreate">
               <xsl:apply-templates select="f:conditionalCreate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--conditionalRead 0..1 ConditionalReadStatus (json type: string)--><xsl:if test="f:conditionalRead">
         <xsl:if test="f:conditionalRead/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="conditionalRead">
               <xsl:value-of select="f:conditionalRead/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:conditionalRead[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conditionalRead">
               <xsl:apply-templates select="f:conditionalRead" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--conditionalUpdate 0..1 boolean (json type: boolean)--><xsl:if test="f:conditionalUpdate">
         <xsl:if test="f:conditionalUpdate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="conditionalUpdate">
               <xsl:value-of select="f:conditionalUpdate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:conditionalUpdate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conditionalUpdate">
               <xsl:apply-templates select="f:conditionalUpdate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--conditionalDelete 0..1 ConditionalDeleteStatus (json type: string)--><xsl:if test="f:conditionalDelete">
         <xsl:if test="f:conditionalDelete/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="conditionalDelete">
               <xsl:value-of select="f:conditionalDelete/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:conditionalDelete[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conditionalDelete">
               <xsl:apply-templates select="f:conditionalDelete" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--referencePolicy 0..* ReferenceHandlingPolicy (json type: string)--><xsl:if test="f:referencePolicy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referencePolicy">
            <xsl:for-each select="f:referencePolicy">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:referencePolicy[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_referencePolicy">
               <xsl:for-each select="f:referencePolicy">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--searchInclude 0..* string (json type: string)--><xsl:if test="f:searchInclude">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="searchInclude">
            <xsl:for-each select="f:searchInclude">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:searchInclude[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_searchInclude">
               <xsl:for-each select="f:searchInclude">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--searchRevInclude 0..* string (json type: string)--><xsl:if test="f:searchRevInclude">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="searchRevInclude">
            <xsl:for-each select="f:searchRevInclude">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:searchRevInclude[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_searchRevInclude">
               <xsl:for-each select="f:searchRevInclude">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--searchParam 0..* CapabilityStatement.SearchParam--><xsl:if test="f:searchParam">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="searchParam">
            <xsl:for-each select="f:searchParam">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.SearchParam"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--operation 0..* CapabilityStatement.Operation--><xsl:if test="f:operation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:for-each select="f:operation">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Operation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Interaction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 TypeRestfulInteraction (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.SearchParam">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 0..1 canonical (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 SearchParamType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Operation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 1..1 canonical (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Interaction1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 SystemRestfulInteraction (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Messaging">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--endpoint 0..* CapabilityStatement.Endpoint--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.Endpoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reliableCache 0..1 unsignedInt (json type: number)--><xsl:if test="f:reliableCache">
         <xsl:if test="f:reliableCache/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="reliableCache">
               <xsl:value-of select="f:reliableCache/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:reliableCache[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reliableCache">
               <xsl:apply-templates select="f:reliableCache" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--supportedMessage 0..* CapabilityStatement.SupportedMessage--><xsl:if test="f:supportedMessage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportedMessage">
            <xsl:for-each select="f:supportedMessage">
               <map>
                  <xsl:apply-templates select="." mode="CapabilityStatement.SupportedMessage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Endpoint">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--protocol 1..1 Coding--><xsl:if test="f:protocol">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="protocol">
            <xsl:apply-templates select="f:protocol" mode="Coding"/>
         </map>
      </xsl:if>
          <!--address 1..1 url (json type: string)--><xsl:if test="f:address">
         <xsl:if test="f:address/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="address">
               <xsl:value-of select="f:address/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:address[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_address">
               <xsl:apply-templates select="f:address" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.SupportedMessage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 1..1 EventCapabilityMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 1..1 canonical (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatement.Document">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 1..1 DocumentMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 markdown (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 1..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a capability statement is intended to be used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CapabilityStatementKind">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The mode of a message capability statement.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EventCapabilityMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How the system supports versioning for a resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResourceVersionPolicy">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Whether the application produces or consumes documents.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The mode of a RESTful capability statement.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RestfulCapabilityMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Operations supported by REST at the type or instance level.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TypeRestfulInteraction">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Operations supported by REST at the system level.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SystemRestfulInteraction">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code that indicates how the server supports conditional read.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConditionalReadStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A set of flags that defines how references are supported.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ReferenceHandlingPolicy">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code that indicates how the server supports conditional delete.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConditionalDeleteStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlan">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CarePlan</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--replaces 0..* Reference--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intent 1..1 CarePlanIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--created 0..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contributor 0..* Reference--><xsl:if test="f:contributor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contributor">
            <xsl:for-each select="f:contributor">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--careTeam 0..* Reference--><xsl:if test="f:careTeam">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="careTeam">
            <xsl:for-each select="f:careTeam">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--addresses 0..* Reference--><xsl:if test="f:addresses">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="addresses">
            <xsl:for-each select="f:addresses">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Reference--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--goal 0..* Reference--><xsl:if test="f:goal">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="goal">
            <xsl:for-each select="f:goal">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--activity 0..* CarePlan.Activity--><xsl:if test="f:activity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="activity">
            <xsl:for-each select="f:activity">
               <map>
                  <xsl:apply-templates select="." mode="CarePlan.Activity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlan.Activity">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--outcomeCodeableConcept 0..* CodeableConcept--><xsl:if test="f:outcomeCodeableConcept">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="outcomeCodeableConcept">
            <xsl:for-each select="f:outcomeCodeableConcept">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outcomeReference 0..* Reference--><xsl:if test="f:outcomeReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="outcomeReference">
            <xsl:for-each select="f:outcomeReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--progress 0..* Annotation--><xsl:if test="f:progress">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="progress">
            <xsl:for-each select="f:progress">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reference 0..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--detail 0..1 CarePlan.Detail--><xsl:if test="f:detail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:apply-templates select="f:detail" mode="CarePlan.Detail"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlan.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--kind 0..1 CarePlanActivityKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--goal 0..* Reference--><xsl:if test="f:goal">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="goal">
            <xsl:for-each select="f:goal">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 CarePlanActivityStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--scheduledTiming 1..1 Timing--><xsl:if test="f:scheduledTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scheduledTiming">
            <xsl:apply-templates select="f:scheduledTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--scheduledPeriod 1..1 Period--><xsl:if test="f:scheduledPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scheduledPeriod">
            <xsl:apply-templates select="f:scheduledPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--scheduledString 1..1 string (json type: string)--><xsl:if test="f:scheduledString">
         <xsl:if test="f:scheduledString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="scheduledString">
               <xsl:value-of select="f:scheduledString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:scheduledString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_scheduledString">
               <xsl:apply-templates select="f:scheduledString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performer 0..* Reference--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--productCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:productCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productCodeableConcept">
            <xsl:apply-templates select="f:productCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--productReference 1..1 Reference--><xsl:if test="f:productReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productReference">
            <xsl:apply-templates select="f:productReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--dailyAmount 0..1 Quantity--><xsl:if test="f:dailyAmount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dailyAmount">
            <xsl:apply-templates select="f:dailyAmount" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Resource types defined as part of FHIR that can be represented as in-line definitions of a care plan activity.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlanActivityKind">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes that reflect the current state of a care plan activity within its overall life cycle.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlanActivityStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes indicating the degree of authority/intentionality associated with a care plan.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CarePlanIntent">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates whether the plan is currently being acted upon, represents future intentions or is now a historical record.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CareTeam">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CareTeam</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 CareTeamStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--participant 0..* CareTeam.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="CareTeam.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--managingOrganization 0..* Reference--><xsl:if test="f:managingOrganization">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:for-each select="f:managingOrganization">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CareTeam.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--role 0..* CodeableConcept--><xsl:if test="f:role">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:for-each select="f:role">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--member 0..1 Reference--><xsl:if test="f:member">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="member">
            <xsl:apply-templates select="f:member" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onBehalfOf 0..1 Reference--><xsl:if test="f:onBehalfOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onBehalfOf">
            <xsl:apply-templates select="f:onBehalfOf" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the status of the care team.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CareTeamStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Catalog entries are wrappers that contextualize items included in a catalog.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CatalogEntry">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CatalogEntry</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--orderable 1..1 boolean (json type: boolean)--><xsl:if test="f:orderable">
         <xsl:if test="f:orderable/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="orderable">
               <xsl:value-of select="f:orderable/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:orderable[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_orderable">
               <xsl:apply-templates select="f:orderable" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--referencedItem 1..1 Reference--><xsl:if test="f:referencedItem">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referencedItem">
            <xsl:apply-templates select="f:referencedItem" mode="Reference"/>
         </map>
      </xsl:if>
          <!--additionalIdentifier 0..* Identifier--><xsl:if test="f:additionalIdentifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="additionalIdentifier">
            <xsl:for-each select="f:additionalIdentifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--classification 0..* CodeableConcept--><xsl:if test="f:classification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:for-each select="f:classification">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validityPeriod 0..1 Period--><xsl:if test="f:validityPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validityPeriod">
            <xsl:apply-templates select="f:validityPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--validTo 0..1 dateTime (json type: string)--><xsl:if test="f:validTo">
         <xsl:if test="f:validTo/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="validTo">
               <xsl:value-of select="f:validTo/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:validTo[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_validTo">
               <xsl:apply-templates select="f:validTo" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastUpdated 0..1 dateTime (json type: string)--><xsl:if test="f:lastUpdated">
         <xsl:if test="f:lastUpdated/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastUpdated">
               <xsl:value-of select="f:lastUpdated/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastUpdated[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastUpdated">
               <xsl:apply-templates select="f:lastUpdated" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--additionalCharacteristic 0..* CodeableConcept--><xsl:if test="f:additionalCharacteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="additionalCharacteristic">
            <xsl:for-each select="f:additionalCharacteristic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--additionalClassification 0..* CodeableConcept--><xsl:if test="f:additionalClassification">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="additionalClassification">
            <xsl:for-each select="f:additionalClassification">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedEntry 0..* CatalogEntry.RelatedEntry--><xsl:if test="f:relatedEntry">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedEntry">
            <xsl:for-each select="f:relatedEntry">
               <map>
                  <xsl:apply-templates select="." mode="CatalogEntry.RelatedEntry"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Catalog entries are wrappers that contextualize items included in a catalog.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CatalogEntry.RelatedEntry">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--relationtype 1..1 CatalogEntryRelationType (json type: string)--><xsl:if test="f:relationtype">
         <xsl:if test="f:relationtype/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="relationtype">
               <xsl:value-of select="f:relationtype/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:relationtype[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relationtype">
               <xsl:apply-templates select="f:relationtype" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--item 1..1 Reference--><xsl:if test="f:item">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:apply-templates select="f:item" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of relations between entries.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CatalogEntryRelationType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItem">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ChargeItem</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--definitionUri 0..* uri (json type: string)--><xsl:if test="f:definitionUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="definitionUri">
            <xsl:for-each select="f:definitionUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:definitionUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionUri">
               <xsl:for-each select="f:definitionUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--definitionCanonical 0..* canonical (json type: string)--><xsl:if test="f:definitionCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="definitionCanonical">
            <xsl:for-each select="f:definitionCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:definitionCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionCanonical">
               <xsl:for-each select="f:definitionCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 ChargeItemStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--context 0..1 Reference--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--performer 0..* ChargeItem.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="ChargeItem.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--performingOrganization 0..1 Reference--><xsl:if test="f:performingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performingOrganization">
            <xsl:apply-templates select="f:performingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--requestingOrganization 0..1 Reference--><xsl:if test="f:requestingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestingOrganization">
            <xsl:apply-templates select="f:requestingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--costCenter 0..1 Reference--><xsl:if test="f:costCenter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="costCenter">
            <xsl:apply-templates select="f:costCenter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--bodysite 0..* CodeableConcept--><xsl:if test="f:bodysite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="bodysite">
            <xsl:for-each select="f:bodysite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--factorOverride 0..1 decimal (json type: number)--><xsl:if test="f:factorOverride">
         <xsl:if test="f:factorOverride/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factorOverride">
               <xsl:value-of select="f:factorOverride/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factorOverride[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factorOverride">
               <xsl:apply-templates select="f:factorOverride" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priceOverride 0..1 Money--><xsl:if test="f:priceOverride">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priceOverride">
            <xsl:apply-templates select="f:priceOverride" mode="Money"/>
         </map>
      </xsl:if>
          <!--overrideReason 0..1 string (json type: string)--><xsl:if test="f:overrideReason">
         <xsl:if test="f:overrideReason/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="overrideReason">
               <xsl:value-of select="f:overrideReason/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:overrideReason[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_overrideReason">
               <xsl:apply-templates select="f:overrideReason" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enterer 0..1 Reference--><xsl:if test="f:enterer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enterer">
            <xsl:apply-templates select="f:enterer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--enteredDate 0..1 dateTime (json type: string)--><xsl:if test="f:enteredDate">
         <xsl:if test="f:enteredDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="enteredDate">
               <xsl:value-of select="f:enteredDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:enteredDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_enteredDate">
               <xsl:apply-templates select="f:enteredDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reason 0..* CodeableConcept--><xsl:if test="f:reason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:for-each select="f:reason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--service 0..* Reference--><xsl:if test="f:service">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="service">
            <xsl:for-each select="f:service">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--productReference 1..1 Reference--><xsl:if test="f:productReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productReference">
            <xsl:apply-templates select="f:productReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--productCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:productCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productCodeableConcept">
            <xsl:apply-templates select="f:productCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--account 0..* Reference--><xsl:if test="f:account">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="account">
            <xsl:for-each select="f:account">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInformation 0..* Reference--><xsl:if test="f:supportingInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
            <xsl:for-each select="f:supportingInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItem.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes identifying the lifecycle stage of a ChargeItem.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItemStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItemDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ChargeItemDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--derivedFromUri 0..* uri (json type: string)--><xsl:if test="f:derivedFromUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFromUri">
            <xsl:for-each select="f:derivedFromUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:derivedFromUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_derivedFromUri">
               <xsl:for-each select="f:derivedFromUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--partOf 0..* canonical (json type: string)--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:partOf[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_partOf">
               <xsl:for-each select="f:partOf">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--replaces 0..* canonical (json type: string)--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:replaces[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_replaces">
               <xsl:for-each select="f:replaces">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--instance 0..* Reference--><xsl:if test="f:instance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
            <xsl:for-each select="f:instance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--applicability 0..* ChargeItemDefinition.Applicability--><xsl:if test="f:applicability">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="applicability">
            <xsl:for-each select="f:applicability">
               <map>
                  <xsl:apply-templates select="." mode="ChargeItemDefinition.Applicability"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--propertyGroup 0..* ChargeItemDefinition.PropertyGroup--><xsl:if test="f:propertyGroup">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="propertyGroup">
            <xsl:for-each select="f:propertyGroup">
               <map>
                  <xsl:apply-templates select="." mode="ChargeItemDefinition.PropertyGroup"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItemDefinition.Applicability">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 string (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItemDefinition.PropertyGroup">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--applicability 0..* ChargeItemDefinition.Applicability--><xsl:if test="f:applicability">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="applicability">
            <xsl:for-each select="f:applicability">
               <map>
                  <xsl:apply-templates select="." mode="ChargeItemDefinition.Applicability"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priceComponent 0..* ChargeItemDefinition.PriceComponent--><xsl:if test="f:priceComponent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="priceComponent">
            <xsl:for-each select="f:priceComponent">
               <map>
                  <xsl:apply-templates select="." mode="ChargeItemDefinition.PriceComponent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ChargeItemDefinition.PriceComponent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 InvoicePriceComponentType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes indicating the kind of the price component.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InvoicePriceComponentType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Claim</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..1 CodeableConcept--><xsl:if test="f:subType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:apply-templates select="f:subType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--use 1..1 Use (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--billablePeriod 0..1 Period--><xsl:if test="f:billablePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="billablePeriod">
            <xsl:apply-templates select="f:billablePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enterer 0..1 Reference--><xsl:if test="f:enterer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enterer">
            <xsl:apply-templates select="f:enterer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--insurer 0..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--provider 1..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--priority 1..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--fundsReserve 0..1 CodeableConcept--><xsl:if test="f:fundsReserve">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fundsReserve">
            <xsl:apply-templates select="f:fundsReserve" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--related 0..* Claim.Related--><xsl:if test="f:related">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="related">
            <xsl:for-each select="f:related">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Related"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prescription 0..1 Reference--><xsl:if test="f:prescription">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="prescription">
            <xsl:apply-templates select="f:prescription" mode="Reference"/>
         </map>
      </xsl:if>
          <!--originalPrescription 0..1 Reference--><xsl:if test="f:originalPrescription">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="originalPrescription">
            <xsl:apply-templates select="f:originalPrescription" mode="Reference"/>
         </map>
      </xsl:if>
          <!--payee 0..1 Claim.Payee--><xsl:if test="f:payee">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payee">
            <xsl:apply-templates select="f:payee" mode="Claim.Payee"/>
         </map>
      </xsl:if>
          <!--referral 0..1 Reference--><xsl:if test="f:referral">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referral">
            <xsl:apply-templates select="f:referral" mode="Reference"/>
         </map>
      </xsl:if>
          <!--facility 0..1 Reference--><xsl:if test="f:facility">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="facility">
            <xsl:apply-templates select="f:facility" mode="Reference"/>
         </map>
      </xsl:if>
          <!--careTeam 0..* Claim.CareTeam--><xsl:if test="f:careTeam">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="careTeam">
            <xsl:for-each select="f:careTeam">
               <map>
                  <xsl:apply-templates select="." mode="Claim.CareTeam"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Claim.SupportingInfo--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Claim.SupportingInfo"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--diagnosis 0..* Claim.Diagnosis--><xsl:if test="f:diagnosis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosis">
            <xsl:for-each select="f:diagnosis">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Diagnosis"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--procedure 0..* Claim.Procedure--><xsl:if test="f:procedure">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="procedure">
            <xsl:for-each select="f:procedure">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Procedure"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--insurance 1..* Claim.Insurance--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Insurance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--accident 0..1 Claim.Accident--><xsl:if test="f:accident">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="accident">
            <xsl:apply-templates select="f:accident" mode="Claim.Accident"/>
         </map>
      </xsl:if>
          <!--item 0..* Claim.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--total 0..1 Money--><xsl:if test="f:total">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="total">
            <xsl:apply-templates select="f:total" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Related">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--claim 0..1 Reference--><xsl:if test="f:claim">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claim">
            <xsl:apply-templates select="f:claim" mode="Reference"/>
         </map>
      </xsl:if>
          <!--relationship 0..1 CodeableConcept--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reference 0..1 Identifier--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Identifier"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Payee">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--party 0..1 Reference--><xsl:if test="f:party">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:apply-templates select="f:party" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.CareTeam">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--provider 1..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--responsible 0..1 boolean (json type: boolean)--><xsl:if test="f:responsible">
         <xsl:if test="f:responsible/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
               <xsl:value-of select="f:responsible/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:responsible[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responsible">
               <xsl:apply-templates select="f:responsible" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--qualification 0..1 CodeableConcept--><xsl:if test="f:qualification">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="qualification">
            <xsl:apply-templates select="f:qualification" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.SupportingInfo">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--timingDate 1..1 date (json type: string)--><xsl:if test="f:timingDate">
         <xsl:if test="f:timingDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDate">
               <xsl:value-of select="f:timingDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDate">
               <xsl:apply-templates select="f:timingDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--reason 0..1 CodeableConcept--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Diagnosis">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--diagnosisCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:diagnosisCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="diagnosisCodeableConcept">
            <xsl:apply-templates select="f:diagnosisCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--diagnosisReference 1..1 Reference--><xsl:if test="f:diagnosisReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosisReference">
            <xsl:apply-templates select="f:diagnosisReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--onAdmission 0..1 CodeableConcept--><xsl:if test="f:onAdmission">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onAdmission">
            <xsl:apply-templates select="f:onAdmission" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--packageCode 0..1 CodeableConcept--><xsl:if test="f:packageCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="packageCode">
            <xsl:apply-templates select="f:packageCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Procedure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--procedureCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:procedureCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="procedureCodeableConcept">
            <xsl:apply-templates select="f:procedureCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--procedureReference 1..1 Reference--><xsl:if test="f:procedureReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedureReference">
            <xsl:apply-templates select="f:procedureReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Insurance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--focal 1..1 boolean (json type: boolean)--><xsl:if test="f:focal">
         <xsl:if test="f:focal/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="focal">
               <xsl:value-of select="f:focal/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:focal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_focal">
               <xsl:apply-templates select="f:focal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--businessArrangement 0..1 string (json type: string)--><xsl:if test="f:businessArrangement">
         <xsl:if test="f:businessArrangement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="businessArrangement">
               <xsl:value-of select="f:businessArrangement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:businessArrangement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_businessArrangement">
               <xsl:apply-templates select="f:businessArrangement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preAuthRef 0..* string (json type: string)--><xsl:if test="f:preAuthRef">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRef">
            <xsl:for-each select="f:preAuthRef">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:preAuthRef[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_preAuthRef">
               <xsl:for-each select="f:preAuthRef">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--claimResponse 0..1 Reference--><xsl:if test="f:claimResponse">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claimResponse">
            <xsl:apply-templates select="f:claimResponse" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Accident">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--date 1..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--careTeamSequence 0..* positiveInt (json type: number)--><xsl:if test="f:careTeamSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="careTeamSequence">
            <xsl:for-each select="f:careTeamSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:careTeamSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_careTeamSequence">
               <xsl:for-each select="f:careTeamSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--diagnosisSequence 0..* positiveInt (json type: number)--><xsl:if test="f:diagnosisSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosisSequence">
            <xsl:for-each select="f:diagnosisSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:diagnosisSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_diagnosisSequence">
               <xsl:for-each select="f:diagnosisSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--procedureSequence 0..* positiveInt (json type: number)--><xsl:if test="f:procedureSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="procedureSequence">
            <xsl:for-each select="f:procedureSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:procedureSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_procedureSequence">
               <xsl:for-each select="f:procedureSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--informationSequence 0..* positiveInt (json type: number)--><xsl:if test="f:informationSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="informationSequence">
            <xsl:for-each select="f:informationSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:informationSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_informationSequence">
               <xsl:for-each select="f:informationSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--locationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:locationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="locationCodeableConcept">
            <xsl:apply-templates select="f:locationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subSite 0..* CodeableConcept--><xsl:if test="f:subSite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subSite">
            <xsl:for-each select="f:subSite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--encounter 0..* Reference--><xsl:if test="f:encounter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:for-each select="f:encounter">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* Claim.Detail--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="Claim.Detail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subDetail 0..* Claim.SubDetail--><xsl:if test="f:subDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetail">
            <xsl:for-each select="f:subDetail">
               <map>
                  <xsl:apply-templates select="." mode="Claim.SubDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Claim.SubDetail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The purpose of the Claim: predetermination, preauthorization, claim.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Use">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code specifying the state of the resource instance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FinancialResourceStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ClaimResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..1 CodeableConcept--><xsl:if test="f:subType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:apply-templates select="f:subType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--use 1..1 Use (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--insurer 1..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--requestor 0..1 Reference--><xsl:if test="f:requestor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestor">
            <xsl:apply-templates select="f:requestor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 1..1 ClaimProcessingCodes (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disposition 0..1 string (json type: string)--><xsl:if test="f:disposition">
         <xsl:if test="f:disposition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disposition">
               <xsl:value-of select="f:disposition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disposition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disposition">
               <xsl:apply-templates select="f:disposition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preAuthRef 0..1 string (json type: string)--><xsl:if test="f:preAuthRef">
         <xsl:if test="f:preAuthRef/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRef">
               <xsl:value-of select="f:preAuthRef/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preAuthRef[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preAuthRef">
               <xsl:apply-templates select="f:preAuthRef" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preAuthPeriod 0..1 Period--><xsl:if test="f:preAuthPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthPeriod">
            <xsl:apply-templates select="f:preAuthPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--payeeType 0..1 CodeableConcept--><xsl:if test="f:payeeType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payeeType">
            <xsl:apply-templates select="f:payeeType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--item 0..* ClaimResponse.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--addItem 0..* ClaimResponse.AddItem--><xsl:if test="f:addItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="addItem">
            <xsl:for-each select="f:addItem">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.AddItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--adjudication 0..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--total 0..* ClaimResponse.Total--><xsl:if test="f:total">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="total">
            <xsl:for-each select="f:total">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Total"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--payment 0..1 ClaimResponse.Payment--><xsl:if test="f:payment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payment">
            <xsl:apply-templates select="f:payment" mode="ClaimResponse.Payment"/>
         </map>
      </xsl:if>
          <!--fundsReserve 0..1 CodeableConcept--><xsl:if test="f:fundsReserve">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fundsReserve">
            <xsl:apply-templates select="f:fundsReserve" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--formCode 0..1 CodeableConcept--><xsl:if test="f:formCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="formCode">
            <xsl:apply-templates select="f:formCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--form 0..1 Attachment--><xsl:if test="f:form">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="form">
            <xsl:apply-templates select="f:form" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--processNote 0..* ClaimResponse.ProcessNote--><xsl:if test="f:processNote">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="processNote">
            <xsl:for-each select="f:processNote">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.ProcessNote"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--communicationRequest 0..* Reference--><xsl:if test="f:communicationRequest">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communicationRequest">
            <xsl:for-each select="f:communicationRequest">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--insurance 0..* ClaimResponse.Insurance--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Insurance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--error 0..* ClaimResponse.Error--><xsl:if test="f:error">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="error">
            <xsl:for-each select="f:error">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Error"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--itemSequence 1..1 positiveInt (json type: number)--><xsl:if test="f:itemSequence">
         <xsl:if test="f:itemSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="itemSequence">
               <xsl:value-of select="f:itemSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:itemSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_itemSequence">
               <xsl:apply-templates select="f:itemSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 1..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* ClaimResponse.Detail--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Detail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Adjudication">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reason 0..1 CodeableConcept--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--detailSequence 1..1 positiveInt (json type: number)--><xsl:if test="f:detailSequence">
         <xsl:if test="f:detailSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="detailSequence">
               <xsl:value-of select="f:detailSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:detailSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detailSequence">
               <xsl:apply-templates select="f:detailSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 1..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subDetail 0..* ClaimResponse.SubDetail--><xsl:if test="f:subDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetail">
            <xsl:for-each select="f:subDetail">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.SubDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.SubDetail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--subDetailSequence 1..1 positiveInt (json type: number)--><xsl:if test="f:subDetailSequence">
         <xsl:if test="f:subDetailSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="subDetailSequence">
               <xsl:value-of select="f:subDetailSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:subDetailSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subDetailSequence">
               <xsl:apply-templates select="f:subDetailSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.AddItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--itemSequence 0..* positiveInt (json type: number)--><xsl:if test="f:itemSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="itemSequence">
            <xsl:for-each select="f:itemSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:itemSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_itemSequence">
               <xsl:for-each select="f:itemSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--detailSequence 0..* positiveInt (json type: number)--><xsl:if test="f:detailSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detailSequence">
            <xsl:for-each select="f:detailSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:detailSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_detailSequence">
               <xsl:for-each select="f:detailSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--subdetailSequence 0..* positiveInt (json type: number)--><xsl:if test="f:subdetailSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subdetailSequence">
            <xsl:for-each select="f:subdetailSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:subdetailSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_subdetailSequence">
               <xsl:for-each select="f:subdetailSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--provider 0..* Reference--><xsl:if test="f:provider">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:for-each select="f:provider">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--locationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:locationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="locationCodeableConcept">
            <xsl:apply-templates select="f:locationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subSite 0..* CodeableConcept--><xsl:if test="f:subSite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subSite">
            <xsl:for-each select="f:subSite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 1..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* ClaimResponse.Detail1--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Detail1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Detail1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 1..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subDetail 0..* ClaimResponse.SubDetail1--><xsl:if test="f:subDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetail">
            <xsl:for-each select="f:subDetail">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.SubDetail1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.SubDetail1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 1..* ClaimResponse.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ClaimResponse.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Total">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 1..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Payment">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--adjustment 0..1 Money--><xsl:if test="f:adjustment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="adjustment">
            <xsl:apply-templates select="f:adjustment" mode="Money"/>
         </map>
      </xsl:if>
          <!--adjustmentReason 0..1 CodeableConcept--><xsl:if test="f:adjustmentReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="adjustmentReason">
            <xsl:apply-templates select="f:adjustmentReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 1..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.ProcessNote">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--number 0..1 positiveInt (json type: number)--><xsl:if test="f:number">
         <xsl:if test="f:number/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="number">
               <xsl:value-of select="f:number/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:number[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:apply-templates select="f:number" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 NoteType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 1..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 CodeableConcept--><xsl:if test="f:language">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:apply-templates select="f:language" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Insurance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--focal 1..1 boolean (json type: boolean)--><xsl:if test="f:focal">
         <xsl:if test="f:focal/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="focal">
               <xsl:value-of select="f:focal/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:focal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_focal">
               <xsl:apply-templates select="f:focal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--businessArrangement 0..1 string (json type: string)--><xsl:if test="f:businessArrangement">
         <xsl:if test="f:businessArrangement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="businessArrangement">
               <xsl:value-of select="f:businessArrangement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:businessArrangement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_businessArrangement">
               <xsl:apply-templates select="f:businessArrangement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--claimResponse 0..1 Reference--><xsl:if test="f:claimResponse">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claimResponse">
            <xsl:apply-templates select="f:claimResponse" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the adjudication details from the processing of a Claim resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimResponse.Error">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--itemSequence 0..1 positiveInt (json type: number)--><xsl:if test="f:itemSequence">
         <xsl:if test="f:itemSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="itemSequence">
               <xsl:value-of select="f:itemSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:itemSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_itemSequence">
               <xsl:apply-templates select="f:itemSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detailSequence 0..1 positiveInt (json type: number)--><xsl:if test="f:detailSequence">
         <xsl:if test="f:detailSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="detailSequence">
               <xsl:value-of select="f:detailSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:detailSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detailSequence">
               <xsl:apply-templates select="f:detailSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subDetailSequence 0..1 positiveInt (json type: number)--><xsl:if test="f:subDetailSequence">
         <xsl:if test="f:subDetailSequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="subDetailSequence">
               <xsl:value-of select="f:subDetailSequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:subDetailSequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subDetailSequence">
               <xsl:apply-templates select="f:subDetailSequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The result of the claim processing.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClaimProcessingCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClinicalImpression">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ClinicalImpression</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ClinicalImpressionStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--effectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:effectiveDateTime">
         <xsl:if test="f:effectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDateTime">
               <xsl:value-of select="f:effectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDateTime">
               <xsl:apply-templates select="f:effectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--effectivePeriod 1..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--assessor 0..1 Reference--><xsl:if test="f:assessor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assessor">
            <xsl:apply-templates select="f:assessor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--previous 0..1 Reference--><xsl:if test="f:previous">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="previous">
            <xsl:apply-templates select="f:previous" mode="Reference"/>
         </map>
      </xsl:if>
          <!--problem 0..* Reference--><xsl:if test="f:problem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="problem">
            <xsl:for-each select="f:problem">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--investigation 0..* ClinicalImpression.Investigation--><xsl:if test="f:investigation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="investigation">
            <xsl:for-each select="f:investigation">
               <map>
                  <xsl:apply-templates select="." mode="ClinicalImpression.Investigation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--protocol 0..* uri (json type: string)--><xsl:if test="f:protocol">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="protocol">
            <xsl:for-each select="f:protocol">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:protocol[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_protocol">
               <xsl:for-each select="f:protocol">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--summary 0..1 string (json type: string)--><xsl:if test="f:summary">
         <xsl:if test="f:summary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="summary">
               <xsl:value-of select="f:summary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:summary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_summary">
               <xsl:apply-templates select="f:summary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--finding 0..* ClinicalImpression.Finding--><xsl:if test="f:finding">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="finding">
            <xsl:for-each select="f:finding">
               <map>
                  <xsl:apply-templates select="." mode="ClinicalImpression.Finding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prognosisCodeableConcept 0..* CodeableConcept--><xsl:if test="f:prognosisCodeableConcept">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="prognosisCodeableConcept">
            <xsl:for-each select="f:prognosisCodeableConcept">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prognosisReference 0..* Reference--><xsl:if test="f:prognosisReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="prognosisReference">
            <xsl:for-each select="f:prognosisReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Reference--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClinicalImpression.Investigation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--item 0..* Reference--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClinicalImpression.Finding">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--itemCodeableConcept 0..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--itemReference 0..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--basis 0..1 string (json type: string)--><xsl:if test="f:basis">
         <xsl:if test="f:basis/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="basis">
               <xsl:value-of select="f:basis/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:basis[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_basis">
               <xsl:apply-templates select="f:basis" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The workflow state of a clinical impression.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ClinicalImpressionStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CodeSystem</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--caseSensitive 0..1 boolean (json type: boolean)--><xsl:if test="f:caseSensitive">
         <xsl:if test="f:caseSensitive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="caseSensitive">
               <xsl:value-of select="f:caseSensitive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:caseSensitive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_caseSensitive">
               <xsl:apply-templates select="f:caseSensitive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--valueSet 0..1 canonical (json type: string)--><xsl:if test="f:valueSet">
         <xsl:if test="f:valueSet/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueSet">
               <xsl:value-of select="f:valueSet/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueSet[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueSet">
               <xsl:apply-templates select="f:valueSet" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--hierarchyMeaning 0..1 CodeSystemHierarchyMeaning (json type: string)--><xsl:if test="f:hierarchyMeaning">
         <xsl:if test="f:hierarchyMeaning/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="hierarchyMeaning">
               <xsl:value-of select="f:hierarchyMeaning/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:hierarchyMeaning[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_hierarchyMeaning">
               <xsl:apply-templates select="f:hierarchyMeaning" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compositional 0..1 boolean (json type: boolean)--><xsl:if test="f:compositional">
         <xsl:if test="f:compositional/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="compositional">
               <xsl:value-of select="f:compositional/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:compositional[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_compositional">
               <xsl:apply-templates select="f:compositional" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--versionNeeded 0..1 boolean (json type: boolean)--><xsl:if test="f:versionNeeded">
         <xsl:if test="f:versionNeeded/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="versionNeeded">
               <xsl:value-of select="f:versionNeeded/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:versionNeeded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versionNeeded">
               <xsl:apply-templates select="f:versionNeeded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--content 1..1 CodeSystemContentMode (json type: string)--><xsl:if test="f:content">
         <xsl:if test="f:content/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="content">
               <xsl:value-of select="f:content/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:content[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_content">
               <xsl:apply-templates select="f:content" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--supplements 0..1 canonical (json type: string)--><xsl:if test="f:supplements">
         <xsl:if test="f:supplements/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="supplements">
               <xsl:value-of select="f:supplements/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:supplements[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_supplements">
               <xsl:apply-templates select="f:supplements" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--count 0..1 unsignedInt (json type: number)--><xsl:if test="f:count">
         <xsl:if test="f:count/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="count">
               <xsl:value-of select="f:count/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:count[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_count">
               <xsl:apply-templates select="f:count" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--filter 0..* CodeSystem.Filter--><xsl:if test="f:filter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="filter">
            <xsl:for-each select="f:filter">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Filter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* CodeSystem.Property--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Property"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--concept 0..* CodeSystem.Concept--><xsl:if test="f:concept">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="concept">
            <xsl:for-each select="f:concept">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Concept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem.Filter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operator 1..* FilterOperator (json type: string)--><xsl:if test="f:operator">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="operator">
            <xsl:for-each select="f:operator">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:operator[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_operator">
               <xsl:for-each select="f:operator">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem.Property">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--uri 0..1 uri (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 PropertyType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem.Concept">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 0..1 string (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--designation 0..* CodeSystem.Designation--><xsl:if test="f:designation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="designation">
            <xsl:for-each select="f:designation">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Designation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* CodeSystem.Property1--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Property1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--concept 0..* CodeSystem.Concept--><xsl:if test="f:concept">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="concept">
            <xsl:for-each select="f:concept">
               <map>
                  <xsl:apply-templates select="." mode="CodeSystem.Concept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem.Designation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--language 0..1 code (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--use 0..1 Coding--><xsl:if test="f:use">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="use">
            <xsl:apply-templates select="f:use" mode="Coding"/>
         </map>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystem.Property1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The kind of operation to perform as a part of a property based filter.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FilterOperator">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of a property value.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PropertyType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The meaning of the hierarchy of concepts in a code system.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystemHierarchyMeaning">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSystemContentMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Communication">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Communication</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--inResponseTo 0..* Reference--><xsl:if test="f:inResponseTo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="inResponseTo">
            <xsl:for-each select="f:inResponseTo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EventStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--medium 0..* CodeableConcept--><xsl:if test="f:medium">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="medium">
            <xsl:for-each select="f:medium">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--topic 0..1 CodeableConcept--><xsl:if test="f:topic">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:apply-templates select="f:topic" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--about 0..* Reference--><xsl:if test="f:about">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="about">
            <xsl:for-each select="f:about">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--sent 0..1 dateTime (json type: string)--><xsl:if test="f:sent">
         <xsl:if test="f:sent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sent">
               <xsl:value-of select="f:sent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sent">
               <xsl:apply-templates select="f:sent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--received 0..1 dateTime (json type: string)--><xsl:if test="f:received">
         <xsl:if test="f:received/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="received">
               <xsl:value-of select="f:received/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:received[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_received">
               <xsl:apply-templates select="f:received" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--recipient 0..* Reference--><xsl:if test="f:recipient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:for-each select="f:recipient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--sender 0..1 Reference--><xsl:if test="f:sender">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sender">
            <xsl:apply-templates select="f:sender" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--payload 0..* Communication.Payload--><xsl:if test="f:payload">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="payload">
            <xsl:for-each select="f:payload">
               <map>
                  <xsl:apply-templates select="." mode="Communication.Payload"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Communication.Payload">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--contentString 1..1 string (json type: string)--><xsl:if test="f:contentString">
         <xsl:if test="f:contentString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentString">
               <xsl:value-of select="f:contentString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentString">
               <xsl:apply-templates select="f:contentString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--contentAttachment 1..1 Attachment--><xsl:if test="f:contentAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentAttachment">
            <xsl:apply-templates select="f:contentAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--contentReference 1..1 Reference--><xsl:if test="f:contentReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
            <xsl:apply-templates select="f:contentReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the communication.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EventStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CommunicationRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CommunicationRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--replaces 0..* Reference--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--groupIdentifier 0..1 Identifier--><xsl:if test="f:groupIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="groupIdentifier">
            <xsl:apply-templates select="f:groupIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 1..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--medium 0..* CodeableConcept--><xsl:if test="f:medium">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="medium">
            <xsl:for-each select="f:medium">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--about 0..* Reference--><xsl:if test="f:about">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="about">
            <xsl:for-each select="f:about">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--payload 0..* CommunicationRequest.Payload--><xsl:if test="f:payload">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="payload">
            <xsl:for-each select="f:payload">
               <map>
                  <xsl:apply-templates select="." mode="CommunicationRequest.Payload"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--recipient 0..* Reference--><xsl:if test="f:recipient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:for-each select="f:recipient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--sender 0..1 Reference--><xsl:if test="f:sender">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sender">
            <xsl:apply-templates select="f:sender" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CommunicationRequest.Payload">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--contentString 1..1 string (json type: string)--><xsl:if test="f:contentString">
         <xsl:if test="f:contentString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentString">
               <xsl:value-of select="f:contentString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentString">
               <xsl:apply-templates select="f:contentString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--contentAttachment 1..1 Attachment--><xsl:if test="f:contentAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentAttachment">
            <xsl:apply-templates select="f:contentAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--contentReference 1..1 Reference--><xsl:if test="f:contentReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
            <xsl:apply-templates select="f:contentReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A compartment definition that defines how resources are accessed on a server.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CompartmentDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CompartmentDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 CompartmentType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--search 1..1 boolean (json type: boolean)--><xsl:if test="f:search">
         <xsl:if test="f:search/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="search">
               <xsl:value-of select="f:search/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:search[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_search">
               <xsl:apply-templates select="f:search" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..* CompartmentDefinition.Resource--><xsl:if test="f:resource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:for-each select="f:resource">
               <map>
                  <xsl:apply-templates select="." mode="CompartmentDefinition.Resource"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A compartment definition that defines how resources are accessed on a server.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CompartmentDefinition.Resource">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--param 0..* string (json type: string)--><xsl:if test="f:param">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="param">
            <xsl:for-each select="f:param">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:param[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_param">
               <xsl:for-each select="f:param">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Which type a compartment definition describes.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CompartmentType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Composition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Composition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 1..1 CompositionStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 1..* Reference--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--title 1..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--confidentiality 0..1 vConfidentialityClassification (json type: string)--><xsl:if test="f:confidentiality">
         <xsl:if test="f:confidentiality/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="confidentiality">
               <xsl:value-of select="f:confidentiality/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:confidentiality[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_confidentiality">
               <xsl:apply-templates select="f:confidentiality" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--attester 0..* Composition.Attester--><xsl:if test="f:attester">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="attester">
            <xsl:for-each select="f:attester">
               <map>
                  <xsl:apply-templates select="." mode="Composition.Attester"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--custodian 0..1 Reference--><xsl:if test="f:custodian">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="custodian">
            <xsl:apply-templates select="f:custodian" mode="Reference"/>
         </map>
      </xsl:if>
          <!--relatesTo 0..* Composition.RelatesTo--><xsl:if test="f:relatesTo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatesTo">
            <xsl:for-each select="f:relatesTo">
               <map>
                  <xsl:apply-templates select="." mode="Composition.RelatesTo"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--event 0..* Composition.Event--><xsl:if test="f:event">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="event">
            <xsl:for-each select="f:event">
               <map>
                  <xsl:apply-templates select="." mode="Composition.Event"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--section 0..* Composition.Section--><xsl:if test="f:section">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="section">
            <xsl:for-each select="f:section">
               <map>
                  <xsl:apply-templates select="." mode="Composition.Section"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Composition.Attester">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 1..1 CompositionAttestationMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--time 0..1 dateTime (json type: string)--><xsl:if test="f:time">
         <xsl:if test="f:time/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="time">
               <xsl:value-of select="f:time/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:time[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_time">
               <xsl:apply-templates select="f:time" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--party 0..1 Reference--><xsl:if test="f:party">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:apply-templates select="f:party" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Composition.RelatesTo">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 DocumentRelationshipType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--targetIdentifier 1..1 Identifier--><xsl:if test="f:targetIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="targetIdentifier">
            <xsl:apply-templates select="f:targetIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
            <!--targetReference 1..1 Reference--><xsl:if test="f:targetReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="targetReference">
            <xsl:apply-templates select="f:targetReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Composition.Event">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--detail 0..* Reference--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Composition.Section">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--author 0..* Reference--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--focus 0..1 Reference--><xsl:if test="f:focus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:apply-templates select="f:focus" mode="Reference"/>
         </map>
      </xsl:if>
          <!--text 0..1 Narrative--><xsl:if test="f:text">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="text">
            <xsl:apply-templates select="f:text" mode="Narrative"/>
         </map>
      </xsl:if>
          <!--mode 0..1 ListMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--orderedBy 0..1 CodeableConcept--><xsl:if test="f:orderedBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="orderedBy">
            <xsl:apply-templates select="f:orderedBy" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--entry 0..* Reference--><xsl:if test="f:entry">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="entry">
            <xsl:for-each select="f:entry">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--emptyReason 0..1 CodeableConcept--><xsl:if test="f:emptyReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="emptyReason">
            <xsl:apply-templates select="f:emptyReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--section 0..* Composition.Section--><xsl:if test="f:section">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="section">
            <xsl:for-each select="f:section">
               <map>
                  <xsl:apply-templates select="." mode="Composition.Section"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes specifying the level of confidentiality of the composition.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="vConfidentialityClassification">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The workflow/clinical status of the composition.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CompositionStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of relationship between documents.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentRelationshipType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The way in which a person authenticated a composition.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CompositionAttestationMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The processing mode that applies to this section.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ListMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ConceptMap</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--sourceUri 1..1 uri (json type: string)--><xsl:if test="f:sourceUri">
         <xsl:if test="f:sourceUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceUri">
               <xsl:value-of select="f:sourceUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceUri">
               <xsl:apply-templates select="f:sourceUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--sourceCanonical 1..1 canonical (json type: string)--><xsl:if test="f:sourceCanonical">
         <xsl:if test="f:sourceCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceCanonical">
               <xsl:value-of select="f:sourceCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceCanonical">
               <xsl:apply-templates select="f:sourceCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--targetUri 1..1 uri (json type: string)--><xsl:if test="f:targetUri">
         <xsl:if test="f:targetUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="targetUri">
               <xsl:value-of select="f:targetUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:targetUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_targetUri">
               <xsl:apply-templates select="f:targetUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--targetCanonical 1..1 canonical (json type: string)--><xsl:if test="f:targetCanonical">
         <xsl:if test="f:targetCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="targetCanonical">
               <xsl:value-of select="f:targetCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:targetCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_targetCanonical">
               <xsl:apply-templates select="f:targetCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--group 0..* ConceptMap.Group--><xsl:if test="f:group">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:for-each select="f:group">
               <map>
                  <xsl:apply-templates select="." mode="ConceptMap.Group"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap.Group">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--source 0..1 uri (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceVersion 0..1 string (json type: string)--><xsl:if test="f:sourceVersion">
         <xsl:if test="f:sourceVersion/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceVersion">
               <xsl:value-of select="f:sourceVersion/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceVersion[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceVersion">
               <xsl:apply-templates select="f:sourceVersion" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 0..1 uri (json type: string)--><xsl:if test="f:target">
         <xsl:if test="f:target/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="target">
               <xsl:value-of select="f:target/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:target[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_target">
               <xsl:apply-templates select="f:target" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--targetVersion 0..1 string (json type: string)--><xsl:if test="f:targetVersion">
         <xsl:if test="f:targetVersion/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="targetVersion">
               <xsl:value-of select="f:targetVersion/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:targetVersion[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_targetVersion">
               <xsl:apply-templates select="f:targetVersion" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--element 1..* ConceptMap.Element--><xsl:if test="f:element">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="element">
            <xsl:for-each select="f:element">
               <map>
                  <xsl:apply-templates select="." mode="ConceptMap.Element"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--unmapped 0..1 ConceptMap.Unmapped--><xsl:if test="f:unmapped">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unmapped">
            <xsl:apply-templates select="f:unmapped" mode="ConceptMap.Unmapped"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap.Element">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 0..* ConceptMap.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="ConceptMap.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--equivalence 1..1 ConceptMapEquivalence (json type: string)--><xsl:if test="f:equivalence">
         <xsl:if test="f:equivalence/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="equivalence">
               <xsl:value-of select="f:equivalence/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:equivalence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_equivalence">
               <xsl:apply-templates select="f:equivalence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dependsOn 0..* ConceptMap.DependsOn--><xsl:if test="f:dependsOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dependsOn">
            <xsl:for-each select="f:dependsOn">
               <map>
                  <xsl:apply-templates select="." mode="ConceptMap.DependsOn"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--product 0..* ConceptMap.DependsOn--><xsl:if test="f:product">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="product">
            <xsl:for-each select="f:product">
               <map>
                  <xsl:apply-templates select="." mode="ConceptMap.DependsOn"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap.DependsOn">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--property 1..1 uri (json type: string)--><xsl:if test="f:property">
         <xsl:if test="f:property/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="property">
               <xsl:value-of select="f:property/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:property[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_property">
               <xsl:apply-templates select="f:property" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--system 0..1 canonical (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMap.Unmapped">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--mode 1..1 ConceptMapGroupUnmappedMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 canonical (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines which action to take if there is no match in the group.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConceptMapGroupUnmappedMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Condition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Condition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--clinicalStatus 0..1 CodeableConcept--><xsl:if test="f:clinicalStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="clinicalStatus">
            <xsl:apply-templates select="f:clinicalStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--verificationStatus 0..1 CodeableConcept--><xsl:if test="f:verificationStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="verificationStatus">
            <xsl:apply-templates select="f:verificationStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--severity 0..1 CodeableConcept--><xsl:if test="f:severity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
            <xsl:apply-templates select="f:severity" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--bodySite 0..* CodeableConcept--><xsl:if test="f:bodySite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:for-each select="f:bodySite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--onsetDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:onsetDateTime">
         <xsl:if test="f:onsetDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onsetDateTime">
               <xsl:value-of select="f:onsetDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onsetDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onsetDateTime">
               <xsl:apply-templates select="f:onsetDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--onsetAge 1..1 Age--><xsl:if test="f:onsetAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetAge">
            <xsl:apply-templates select="f:onsetAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--onsetPeriod 1..1 Period--><xsl:if test="f:onsetPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetPeriod">
            <xsl:apply-templates select="f:onsetPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--onsetRange 1..1 Range--><xsl:if test="f:onsetRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetRange">
            <xsl:apply-templates select="f:onsetRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--onsetString 1..1 string (json type: string)--><xsl:if test="f:onsetString">
         <xsl:if test="f:onsetString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onsetString">
               <xsl:value-of select="f:onsetString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onsetString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onsetString">
               <xsl:apply-templates select="f:onsetString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--abatementDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:abatementDateTime">
         <xsl:if test="f:abatementDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="abatementDateTime">
               <xsl:value-of select="f:abatementDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:abatementDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_abatementDateTime">
               <xsl:apply-templates select="f:abatementDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--abatementAge 1..1 Age--><xsl:if test="f:abatementAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="abatementAge">
            <xsl:apply-templates select="f:abatementAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--abatementPeriod 1..1 Period--><xsl:if test="f:abatementPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="abatementPeriod">
            <xsl:apply-templates select="f:abatementPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--abatementRange 1..1 Range--><xsl:if test="f:abatementRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="abatementRange">
            <xsl:apply-templates select="f:abatementRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--abatementString 1..1 string (json type: string)--><xsl:if test="f:abatementString">
         <xsl:if test="f:abatementString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="abatementString">
               <xsl:value-of select="f:abatementString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:abatementString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_abatementString">
               <xsl:apply-templates select="f:abatementString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--recordedDate 0..1 dateTime (json type: string)--><xsl:if test="f:recordedDate">
         <xsl:if test="f:recordedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recordedDate">
               <xsl:value-of select="f:recordedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recordedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recordedDate">
               <xsl:apply-templates select="f:recordedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--recorder 0..1 Reference--><xsl:if test="f:recorder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recorder">
            <xsl:apply-templates select="f:recorder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--asserter 0..1 Reference--><xsl:if test="f:asserter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="asserter">
            <xsl:apply-templates select="f:asserter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--stage 0..* Condition.Stage--><xsl:if test="f:stage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="stage">
            <xsl:for-each select="f:stage">
               <map>
                  <xsl:apply-templates select="." mode="Condition.Stage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--evidence 0..* Condition.Evidence--><xsl:if test="f:evidence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="evidence">
            <xsl:for-each select="f:evidence">
               <map>
                  <xsl:apply-templates select="." mode="Condition.Evidence"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Condition.Stage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--summary 0..1 CodeableConcept--><xsl:if test="f:summary">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="summary">
            <xsl:apply-templates select="f:summary" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--assessment 0..* Reference--><xsl:if test="f:assessment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="assessment">
            <xsl:for-each select="f:assessment">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Condition.Evidence">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* Reference--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Consent</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ConsentState (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--scope 1..1 CodeableConcept--><xsl:if test="f:scope">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scope">
            <xsl:apply-templates select="f:scope" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 1..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patient 0..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dateTime 0..1 dateTime (json type: string)--><xsl:if test="f:dateTime">
         <xsl:if test="f:dateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dateTime">
               <xsl:value-of select="f:dateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dateTime">
               <xsl:apply-templates select="f:dateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--performer 0..* Reference--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--organization 0..* Reference--><xsl:if test="f:organization">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:for-each select="f:organization">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--sourceAttachment 1..1 Attachment--><xsl:if test="f:sourceAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceAttachment">
            <xsl:apply-templates select="f:sourceAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--sourceReference 1..1 Reference--><xsl:if test="f:sourceReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceReference">
            <xsl:apply-templates select="f:sourceReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--policy 0..* Consent.Policy--><xsl:if test="f:policy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="policy">
            <xsl:for-each select="f:policy">
               <map>
                  <xsl:apply-templates select="." mode="Consent.Policy"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--policyRule 0..1 CodeableConcept--><xsl:if test="f:policyRule">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="policyRule">
            <xsl:apply-templates select="f:policyRule" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--verification 0..* Consent.Verification--><xsl:if test="f:verification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="verification">
            <xsl:for-each select="f:verification">
               <map>
                  <xsl:apply-templates select="." mode="Consent.Verification"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--provision 0..1 Consent.Provision--><xsl:if test="f:provision">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provision">
            <xsl:apply-templates select="f:provision" mode="Consent.Provision"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent.Policy">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--authority 0..1 uri (json type: string)--><xsl:if test="f:authority">
         <xsl:if test="f:authority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
               <xsl:value-of select="f:authority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authority">
               <xsl:apply-templates select="f:authority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--uri 0..1 uri (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent.Verification">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--verified 1..1 boolean (json type: boolean)--><xsl:if test="f:verified">
         <xsl:if test="f:verified/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="verified">
               <xsl:value-of select="f:verified/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:verified[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_verified">
               <xsl:apply-templates select="f:verified" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--verifiedWith 0..1 Reference--><xsl:if test="f:verifiedWith">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="verifiedWith">
            <xsl:apply-templates select="f:verifiedWith" mode="Reference"/>
         </map>
      </xsl:if>
          <!--verificationDate 0..1 dateTime (json type: string)--><xsl:if test="f:verificationDate">
         <xsl:if test="f:verificationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="verificationDate">
               <xsl:value-of select="f:verificationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:verificationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_verificationDate">
               <xsl:apply-templates select="f:verificationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent.Provision">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 ConsentProvisionType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--actor 0..* Consent.Actor--><xsl:if test="f:actor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:for-each select="f:actor">
               <map>
                  <xsl:apply-templates select="." mode="Consent.Actor"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..* CodeableConcept--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--securityLabel 0..* Coding--><xsl:if test="f:securityLabel">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabel">
            <xsl:for-each select="f:securityLabel">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..* Coding--><xsl:if test="f:purpose">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
            <xsl:for-each select="f:purpose">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--class 0..* Coding--><xsl:if test="f:class">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:for-each select="f:class">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dataPeriod 0..1 Period--><xsl:if test="f:dataPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dataPeriod">
            <xsl:apply-templates select="f:dataPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--data 0..* Consent.Data--><xsl:if test="f:data">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="data">
            <xsl:for-each select="f:data">
               <map>
                  <xsl:apply-templates select="." mode="Consent.Data"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--provision 0..* Consent.Provision--><xsl:if test="f:provision">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="provision">
            <xsl:for-each select="f:provision">
               <map>
                  <xsl:apply-templates select="." mode="Consent.Provision"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent.Actor">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--role 1..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reference 1..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Consent.Data">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--meaning 1..1 ConsentDataMeaning (json type: string)--><xsl:if test="f:meaning">
         <xsl:if test="f:meaning/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="meaning">
               <xsl:value-of select="f:meaning/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:meaning[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_meaning">
               <xsl:apply-templates select="f:meaning" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reference 1..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a rule statement is applied, such as adding additional consent or removing consent.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConsentProvisionType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a resource reference is interpreted when testing consent restrictions.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConsentDataMeaning">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the state of the consent.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ConsentState">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Contract</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 0..1 ContractResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--legalState 0..1 CodeableConcept--><xsl:if test="f:legalState">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="legalState">
            <xsl:apply-templates select="f:legalState" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--instantiatesCanonical 0..1 Reference--><xsl:if test="f:instantiatesCanonical">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:apply-templates select="f:instantiatesCanonical" mode="Reference"/>
         </map>
      </xsl:if>
          <!--instantiatesUri 0..1 uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <xsl:if test="f:instantiatesUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
               <xsl:value-of select="f:instantiatesUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:apply-templates select="f:instantiatesUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contentDerivative 0..1 CodeableConcept--><xsl:if test="f:contentDerivative">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentDerivative">
            <xsl:apply-templates select="f:contentDerivative" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--issued 0..1 dateTime (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--applies 0..1 Period--><xsl:if test="f:applies">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="applies">
            <xsl:apply-templates select="f:applies" mode="Period"/>
         </map>
      </xsl:if>
          <!--expirationType 0..1 CodeableConcept--><xsl:if test="f:expirationType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expirationType">
            <xsl:apply-templates select="f:expirationType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--authority 0..* Reference--><xsl:if test="f:authority">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
            <xsl:for-each select="f:authority">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--domain 0..* Reference--><xsl:if test="f:domain">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="domain">
            <xsl:for-each select="f:domain">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--site 0..* Reference--><xsl:if test="f:site">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="site">
            <xsl:for-each select="f:site">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..* string (json type: string)--><xsl:if test="f:alias">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
            <xsl:for-each select="f:alias">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:alias[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:for-each select="f:alias">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--scope 0..1 CodeableConcept--><xsl:if test="f:scope">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scope">
            <xsl:apply-templates select="f:scope" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--topicCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:topicCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topicCodeableConcept">
            <xsl:apply-templates select="f:topicCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--topicReference 1..1 Reference--><xsl:if test="f:topicReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topicReference">
            <xsl:apply-templates select="f:topicReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..* CodeableConcept--><xsl:if test="f:subType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:for-each select="f:subType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contentDefinition 0..1 Contract.ContentDefinition--><xsl:if test="f:contentDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentDefinition">
            <xsl:apply-templates select="f:contentDefinition" mode="Contract.ContentDefinition"/>
         </map>
      </xsl:if>
          <!--term 0..* Contract.Term--><xsl:if test="f:term">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="term">
            <xsl:for-each select="f:term">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Term"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Reference--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relevantHistory 0..* Reference--><xsl:if test="f:relevantHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relevantHistory">
            <xsl:for-each select="f:relevantHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--signer 0..* Contract.Signer--><xsl:if test="f:signer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="signer">
            <xsl:for-each select="f:signer">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Signer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--friendly 0..* Contract.Friendly--><xsl:if test="f:friendly">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="friendly">
            <xsl:for-each select="f:friendly">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Friendly"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--legal 0..* Contract.Legal--><xsl:if test="f:legal">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="legal">
            <xsl:for-each select="f:legal">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Legal"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--rule 0..* Contract.Rule--><xsl:if test="f:rule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rule">
            <xsl:for-each select="f:rule">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Rule"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--legallyBindingAttachment 1..1 Attachment--><xsl:if test="f:legallyBindingAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="legallyBindingAttachment">
            <xsl:apply-templates select="f:legallyBindingAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--legallyBindingReference 1..1 Reference--><xsl:if test="f:legallyBindingReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="legallyBindingReference">
            <xsl:apply-templates select="f:legallyBindingReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.ContentDefinition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..1 CodeableConcept--><xsl:if test="f:subType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:apply-templates select="f:subType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--publisher 0..1 Reference--><xsl:if test="f:publisher">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
            <xsl:apply-templates select="f:publisher" mode="Reference"/>
         </map>
      </xsl:if>
          <!--publicationDate 0..1 dateTime (json type: string)--><xsl:if test="f:publicationDate">
         <xsl:if test="f:publicationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publicationDate">
               <xsl:value-of select="f:publicationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publicationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publicationDate">
               <xsl:apply-templates select="f:publicationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publicationStatus 1..1 ContractResourcePublicationStatusCodes (json type: string)--><xsl:if test="f:publicationStatus">
         <xsl:if test="f:publicationStatus/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publicationStatus">
               <xsl:value-of select="f:publicationStatus/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publicationStatus[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publicationStatus">
               <xsl:apply-templates select="f:publicationStatus" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Term">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--issued 0..1 dateTime (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--applies 0..1 Period--><xsl:if test="f:applies">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="applies">
            <xsl:apply-templates select="f:applies" mode="Period"/>
         </map>
      </xsl:if>
          
            
            <!--topicCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:topicCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topicCodeableConcept">
            <xsl:apply-templates select="f:topicCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--topicReference 1..1 Reference--><xsl:if test="f:topicReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topicReference">
            <xsl:apply-templates select="f:topicReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..1 CodeableConcept--><xsl:if test="f:subType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:apply-templates select="f:subType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--securityLabel 0..* Contract.SecurityLabel--><xsl:if test="f:securityLabel">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabel">
            <xsl:for-each select="f:securityLabel">
               <map>
                  <xsl:apply-templates select="." mode="Contract.SecurityLabel"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--offer 1..1 Contract.Offer--><xsl:if test="f:offer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="offer">
            <xsl:apply-templates select="f:offer" mode="Contract.Offer"/>
         </map>
      </xsl:if>
          <!--asset 0..* Contract.Asset--><xsl:if test="f:asset">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="asset">
            <xsl:for-each select="f:asset">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Asset"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..* Contract.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--group 0..* Contract.Term--><xsl:if test="f:group">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:for-each select="f:group">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Term"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.SecurityLabel">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--number 0..* unsignedInt (json type: number)--><xsl:if test="f:number">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="number">
            <xsl:for-each select="f:number">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:number[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:for-each select="f:number">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--classification 1..1 Coding--><xsl:if test="f:classification">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:apply-templates select="f:classification" mode="Coding"/>
         </map>
      </xsl:if>
          <!--category 0..* Coding--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--control 0..* Coding--><xsl:if test="f:control">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="control">
            <xsl:for-each select="f:control">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Offer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--party 0..* Contract.Party--><xsl:if test="f:party">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:for-each select="f:party">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Party"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--topic 0..1 Reference--><xsl:if test="f:topic">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:apply-templates select="f:topic" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--decision 0..1 CodeableConcept--><xsl:if test="f:decision">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="decision">
            <xsl:apply-templates select="f:decision" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--decisionMode 0..* CodeableConcept--><xsl:if test="f:decisionMode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="decisionMode">
            <xsl:for-each select="f:decisionMode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--answer 0..* Contract.Answer--><xsl:if test="f:answer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="answer">
            <xsl:for-each select="f:answer">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Answer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--linkId 0..* string (json type: string)--><xsl:if test="f:linkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
            <xsl:for-each select="f:linkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:linkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:for-each select="f:linkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--securityLabelNumber 0..* unsignedInt (json type: number)--><xsl:if test="f:securityLabelNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabelNumber">
            <xsl:for-each select="f:securityLabelNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:securityLabelNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_securityLabelNumber">
               <xsl:for-each select="f:securityLabelNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Party">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--reference 1..* Reference--><xsl:if test="f:reference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:for-each select="f:reference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--role 1..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Answer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Asset">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--scope 0..1 CodeableConcept--><xsl:if test="f:scope">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scope">
            <xsl:apply-templates select="f:scope" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--typeReference 0..* Reference--><xsl:if test="f:typeReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="typeReference">
            <xsl:for-each select="f:typeReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subtype 0..* CodeableConcept--><xsl:if test="f:subtype">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subtype">
            <xsl:for-each select="f:subtype">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relationship 0..1 Coding--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="Coding"/>
         </map>
      </xsl:if>
          <!--context 0..* Contract.Context--><xsl:if test="f:context">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:for-each select="f:context">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Context"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..1 string (json type: string)--><xsl:if test="f:condition">
         <xsl:if test="f:condition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
               <xsl:value-of select="f:condition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:condition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_condition">
               <xsl:apply-templates select="f:condition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--periodType 0..* CodeableConcept--><xsl:if test="f:periodType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="periodType">
            <xsl:for-each select="f:periodType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..* Period--><xsl:if test="f:period">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:for-each select="f:period">
               <map>
                  <xsl:apply-templates select="." mode="Period"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--usePeriod 0..* Period--><xsl:if test="f:usePeriod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usePeriod">
            <xsl:for-each select="f:usePeriod">
               <map>
                  <xsl:apply-templates select="." mode="Period"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--linkId 0..* string (json type: string)--><xsl:if test="f:linkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
            <xsl:for-each select="f:linkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:linkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:for-each select="f:linkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--answer 0..* Contract.Answer--><xsl:if test="f:answer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="answer">
            <xsl:for-each select="f:answer">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Answer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--securityLabelNumber 0..* unsignedInt (json type: number)--><xsl:if test="f:securityLabelNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabelNumber">
            <xsl:for-each select="f:securityLabelNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:securityLabelNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_securityLabelNumber">
               <xsl:for-each select="f:securityLabelNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--valuedItem 0..* Contract.ValuedItem--><xsl:if test="f:valuedItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valuedItem">
            <xsl:for-each select="f:valuedItem">
               <map>
                  <xsl:apply-templates select="." mode="Contract.ValuedItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Context">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--reference 0..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.ValuedItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--entityCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:entityCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="entityCodeableConcept">
            <xsl:apply-templates select="f:entityCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--entityReference 1..1 Reference--><xsl:if test="f:entityReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="entityReference">
            <xsl:apply-templates select="f:entityReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--effectiveTime 0..1 dateTime (json type: string)--><xsl:if test="f:effectiveTime">
         <xsl:if test="f:effectiveTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveTime">
               <xsl:value-of select="f:effectiveTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveTime">
               <xsl:apply-templates select="f:effectiveTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--points 0..1 decimal (json type: number)--><xsl:if test="f:points">
         <xsl:if test="f:points/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="points">
               <xsl:value-of select="f:points/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:points[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_points">
               <xsl:apply-templates select="f:points" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--payment 0..1 string (json type: string)--><xsl:if test="f:payment">
         <xsl:if test="f:payment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="payment">
               <xsl:value-of select="f:payment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:payment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_payment">
               <xsl:apply-templates select="f:payment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paymentDate 0..1 dateTime (json type: string)--><xsl:if test="f:paymentDate">
         <xsl:if test="f:paymentDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paymentDate">
               <xsl:value-of select="f:paymentDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paymentDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paymentDate">
               <xsl:apply-templates select="f:paymentDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--responsible 0..1 Reference--><xsl:if test="f:responsible">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
            <xsl:apply-templates select="f:responsible" mode="Reference"/>
         </map>
      </xsl:if>
          <!--recipient 0..1 Reference--><xsl:if test="f:recipient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:apply-templates select="f:recipient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--linkId 0..* string (json type: string)--><xsl:if test="f:linkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
            <xsl:for-each select="f:linkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:linkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:for-each select="f:linkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--securityLabelNumber 0..* unsignedInt (json type: number)--><xsl:if test="f:securityLabelNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabelNumber">
            <xsl:for-each select="f:securityLabelNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:securityLabelNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_securityLabelNumber">
               <xsl:for-each select="f:securityLabelNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Action">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..* Contract.Subject--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Contract.Subject"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--intent 1..1 CodeableConcept--><xsl:if test="f:intent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
            <xsl:apply-templates select="f:intent" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--linkId 0..* string (json type: string)--><xsl:if test="f:linkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
            <xsl:for-each select="f:linkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:linkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:for-each select="f:linkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--context 0..1 Reference--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contextLinkId 0..* string (json type: string)--><xsl:if test="f:contextLinkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contextLinkId">
            <xsl:for-each select="f:contextLinkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:contextLinkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_contextLinkId">
               <xsl:for-each select="f:contextLinkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--requester 0..* Reference--><xsl:if test="f:requester">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:for-each select="f:requester">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--requesterLinkId 0..* string (json type: string)--><xsl:if test="f:requesterLinkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="requesterLinkId">
            <xsl:for-each select="f:requesterLinkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:requesterLinkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_requesterLinkId">
               <xsl:for-each select="f:requesterLinkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--performerType 0..* CodeableConcept--><xsl:if test="f:performerType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performerType">
            <xsl:for-each select="f:performerType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--performerRole 0..1 CodeableConcept--><xsl:if test="f:performerRole">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performerRole">
            <xsl:apply-templates select="f:performerRole" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performerLinkId 0..* string (json type: string)--><xsl:if test="f:performerLinkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performerLinkId">
            <xsl:for-each select="f:performerLinkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:performerLinkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_performerLinkId">
               <xsl:for-each select="f:performerLinkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reason 0..* string (json type: string)--><xsl:if test="f:reason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:for-each select="f:reason">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:reason[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_reason">
               <xsl:for-each select="f:reason">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--reasonLinkId 0..* string (json type: string)--><xsl:if test="f:reasonLinkId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonLinkId">
            <xsl:for-each select="f:reasonLinkId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:reasonLinkId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_reasonLinkId">
               <xsl:for-each select="f:reasonLinkId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--securityLabelNumber 0..* unsignedInt (json type: number)--><xsl:if test="f:securityLabelNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabelNumber">
            <xsl:for-each select="f:securityLabelNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:securityLabelNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_securityLabelNumber">
               <xsl:for-each select="f:securityLabelNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Subject">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--reference 1..* Reference--><xsl:if test="f:reference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:for-each select="f:reference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Signer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 Coding--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="Coding"/>
         </map>
      </xsl:if>
          <!--party 1..1 Reference--><xsl:if test="f:party">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:apply-templates select="f:party" mode="Reference"/>
         </map>
      </xsl:if>
          <!--signature 1..* Signature--><xsl:if test="f:signature">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="signature">
            <xsl:for-each select="f:signature">
               <map>
                  <xsl:apply-templates select="." mode="Signature"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Friendly">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--contentAttachment 1..1 Attachment--><xsl:if test="f:contentAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentAttachment">
            <xsl:apply-templates select="f:contentAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--contentReference 1..1 Reference--><xsl:if test="f:contentReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
            <xsl:apply-templates select="f:contentReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Legal">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--contentAttachment 1..1 Attachment--><xsl:if test="f:contentAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentAttachment">
            <xsl:apply-templates select="f:contentAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--contentReference 1..1 Reference--><xsl:if test="f:contentReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
            <xsl:apply-templates select="f:contentReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Contract.Rule">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--contentAttachment 1..1 Attachment--><xsl:if test="f:contentAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentAttachment">
            <xsl:apply-templates select="f:contentAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--contentReference 1..1 Reference--><xsl:if test="f:contentReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contentReference">
            <xsl:apply-templates select="f:contentReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code specifying the state of the resource instance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContractResourceStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Status of the publication of contract content.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ContractResourcePublicationStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Coverage">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Coverage</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--policyHolder 0..1 Reference--><xsl:if test="f:policyHolder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="policyHolder">
            <xsl:apply-templates select="f:policyHolder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--subscriber 0..1 Reference--><xsl:if test="f:subscriber">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subscriber">
            <xsl:apply-templates select="f:subscriber" mode="Reference"/>
         </map>
      </xsl:if>
          <!--subscriberId 0..1 string (json type: string)--><xsl:if test="f:subscriberId">
         <xsl:if test="f:subscriberId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subscriberId">
               <xsl:value-of select="f:subscriberId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subscriberId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subscriberId">
               <xsl:apply-templates select="f:subscriberId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--beneficiary 1..1 Reference--><xsl:if test="f:beneficiary">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="beneficiary">
            <xsl:apply-templates select="f:beneficiary" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dependent 0..1 string (json type: string)--><xsl:if test="f:dependent">
         <xsl:if test="f:dependent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dependent">
               <xsl:value-of select="f:dependent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dependent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dependent">
               <xsl:apply-templates select="f:dependent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--relationship 0..1 CodeableConcept--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--payor 1..* Reference--><xsl:if test="f:payor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="payor">
            <xsl:for-each select="f:payor">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--class 0..* Coverage.Class--><xsl:if test="f:class">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:for-each select="f:class">
               <map>
                  <xsl:apply-templates select="." mode="Coverage.Class"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--order 0..1 positiveInt (json type: number)--><xsl:if test="f:order">
         <xsl:if test="f:order/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="order">
               <xsl:value-of select="f:order/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:order[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_order">
               <xsl:apply-templates select="f:order" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--network 0..1 string (json type: string)--><xsl:if test="f:network">
         <xsl:if test="f:network/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="network">
               <xsl:value-of select="f:network/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:network[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_network">
               <xsl:apply-templates select="f:network" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--costToBeneficiary 0..* Coverage.CostToBeneficiary--><xsl:if test="f:costToBeneficiary">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="costToBeneficiary">
            <xsl:for-each select="f:costToBeneficiary">
               <map>
                  <xsl:apply-templates select="." mode="Coverage.CostToBeneficiary"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subrogation 0..1 boolean (json type: boolean)--><xsl:if test="f:subrogation">
         <xsl:if test="f:subrogation/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="subrogation">
               <xsl:value-of select="f:subrogation/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:subrogation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subrogation">
               <xsl:apply-templates select="f:subrogation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contract 0..* Reference--><xsl:if test="f:contract">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contract">
            <xsl:for-each select="f:contract">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Coverage.Class">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Coverage.CostToBeneficiary">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
          
          <!--exception 0..* Coverage.Exception--><xsl:if test="f:exception">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="exception">
            <xsl:for-each select="f:exception">
               <map>
                  <xsl:apply-templates select="." mode="Coverage.Exception"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Coverage.Exception">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CoverageEligibilityRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--purpose 1..* EligibilityRequestPurpose (json type: string)--><xsl:if test="f:purpose">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
            <xsl:for-each select="f:purpose">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:purpose[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:for-each select="f:purpose">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enterer 0..1 Reference--><xsl:if test="f:enterer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enterer">
            <xsl:apply-templates select="f:enterer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--provider 0..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--insurer 1..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--facility 0..1 Reference--><xsl:if test="f:facility">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="facility">
            <xsl:apply-templates select="f:facility" mode="Reference"/>
         </map>
      </xsl:if>
          <!--supportingInfo 0..* CoverageEligibilityRequest.SupportingInfo--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityRequest.SupportingInfo"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--insurance 0..* CoverageEligibilityRequest.Insurance--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityRequest.Insurance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--item 0..* CoverageEligibilityRequest.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityRequest.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityRequest.SupportingInfo">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--information 1..1 Reference--><xsl:if test="f:information">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="information">
            <xsl:apply-templates select="f:information" mode="Reference"/>
         </map>
      </xsl:if>
          <!--appliesToAll 0..1 boolean (json type: boolean)--><xsl:if test="f:appliesToAll">
         <xsl:if test="f:appliesToAll/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="appliesToAll">
               <xsl:value-of select="f:appliesToAll/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:appliesToAll[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_appliesToAll">
               <xsl:apply-templates select="f:appliesToAll" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityRequest.Insurance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--focal 0..1 boolean (json type: boolean)--><xsl:if test="f:focal">
         <xsl:if test="f:focal/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="focal">
               <xsl:value-of select="f:focal/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:focal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_focal">
               <xsl:apply-templates select="f:focal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--businessArrangement 0..1 string (json type: string)--><xsl:if test="f:businessArrangement">
         <xsl:if test="f:businessArrangement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="businessArrangement">
               <xsl:value-of select="f:businessArrangement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:businessArrangement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_businessArrangement">
               <xsl:apply-templates select="f:businessArrangement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityRequest.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--supportingInfoSequence 0..* positiveInt (json type: number)--><xsl:if test="f:supportingInfoSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfoSequence">
            <xsl:for-each select="f:supportingInfoSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:supportingInfoSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions"
                   key="_supportingInfoSequence">
               <xsl:for-each select="f:supportingInfoSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 0..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--provider 0..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--facility 0..1 Reference--><xsl:if test="f:facility">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="facility">
            <xsl:apply-templates select="f:facility" mode="Reference"/>
         </map>
      </xsl:if>
          <!--diagnosis 0..* CoverageEligibilityRequest.Diagnosis--><xsl:if test="f:diagnosis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosis">
            <xsl:for-each select="f:diagnosis">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityRequest.Diagnosis"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* Reference--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityRequest.Diagnosis">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--diagnosisCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:diagnosisCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="diagnosisCodeableConcept">
            <xsl:apply-templates select="f:diagnosisCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--diagnosisReference 1..1 Reference--><xsl:if test="f:diagnosisReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosisReference">
            <xsl:apply-templates select="f:diagnosisReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code specifying the types of information being requested.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EligibilityRequestPurpose">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">CoverageEligibilityResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--purpose 1..* EligibilityResponsePurpose (json type: string)--><xsl:if test="f:purpose">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
            <xsl:for-each select="f:purpose">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:purpose[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:for-each select="f:purpose">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requestor 0..1 Reference--><xsl:if test="f:requestor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestor">
            <xsl:apply-templates select="f:requestor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--request 1..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 1..1 RemittanceOutcome (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disposition 0..1 string (json type: string)--><xsl:if test="f:disposition">
         <xsl:if test="f:disposition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disposition">
               <xsl:value-of select="f:disposition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disposition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disposition">
               <xsl:apply-templates select="f:disposition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--insurer 1..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--insurance 0..* CoverageEligibilityResponse.Insurance--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityResponse.Insurance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--preAuthRef 0..1 string (json type: string)--><xsl:if test="f:preAuthRef">
         <xsl:if test="f:preAuthRef/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRef">
               <xsl:value-of select="f:preAuthRef/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preAuthRef[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preAuthRef">
               <xsl:apply-templates select="f:preAuthRef" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--form 0..1 CodeableConcept--><xsl:if test="f:form">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="form">
            <xsl:apply-templates select="f:form" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--error 0..* CoverageEligibilityResponse.Error--><xsl:if test="f:error">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="error">
            <xsl:for-each select="f:error">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityResponse.Error"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityResponse.Insurance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--inforce 0..1 boolean (json type: boolean)--><xsl:if test="f:inforce">
         <xsl:if test="f:inforce/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="inforce">
               <xsl:value-of select="f:inforce/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:inforce[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_inforce">
               <xsl:apply-templates select="f:inforce" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--benefitPeriod 0..1 Period--><xsl:if test="f:benefitPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="benefitPeriod">
            <xsl:apply-templates select="f:benefitPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--item 0..* CoverageEligibilityResponse.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityResponse.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityResponse.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 0..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--provider 0..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--excluded 0..1 boolean (json type: boolean)--><xsl:if test="f:excluded">
         <xsl:if test="f:excluded/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="excluded">
               <xsl:value-of select="f:excluded/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:excluded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_excluded">
               <xsl:apply-templates select="f:excluded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--network 0..1 CodeableConcept--><xsl:if test="f:network">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:apply-templates select="f:network" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unit 0..1 CodeableConcept--><xsl:if test="f:unit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unit">
            <xsl:apply-templates select="f:unit" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--term 0..1 CodeableConcept--><xsl:if test="f:term">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="term">
            <xsl:apply-templates select="f:term" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--benefit 0..* CoverageEligibilityResponse.Benefit--><xsl:if test="f:benefit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="benefit">
            <xsl:for-each select="f:benefit">
               <map>
                  <xsl:apply-templates select="." mode="CoverageEligibilityResponse.Benefit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--authorizationRequired 0..1 boolean (json type: boolean)--><xsl:if test="f:authorizationRequired">
         <xsl:if test="f:authorizationRequired/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="authorizationRequired">
               <xsl:value-of select="f:authorizationRequired/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:authorizationRequired[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authorizationRequired">
               <xsl:apply-templates select="f:authorizationRequired" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--authorizationSupporting 0..* CodeableConcept--><xsl:if test="f:authorizationSupporting">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="authorizationSupporting">
            <xsl:for-each select="f:authorizationSupporting">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--authorizationUrl 0..1 uri (json type: string)--><xsl:if test="f:authorizationUrl">
         <xsl:if test="f:authorizationUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authorizationUrl">
               <xsl:value-of select="f:authorizationUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authorizationUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authorizationUrl">
               <xsl:apply-templates select="f:authorizationUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityResponse.Benefit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--allowedUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:allowedUnsignedInt">
         <xsl:if test="f:allowedUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="allowedUnsignedInt">
               <xsl:value-of select="f:allowedUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:allowedUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowedUnsignedInt">
               <xsl:apply-templates select="f:allowedUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--allowedString 1..1 string (json type: string)--><xsl:if test="f:allowedString">
         <xsl:if test="f:allowedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="allowedString">
               <xsl:value-of select="f:allowedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:allowedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowedString">
               <xsl:apply-templates select="f:allowedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--allowedMoney 1..1 Money--><xsl:if test="f:allowedMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="allowedMoney">
            <xsl:apply-templates select="f:allowedMoney" mode="Money"/>
         </map>
      </xsl:if>
          
          
            
            <!--usedUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:usedUnsignedInt">
         <xsl:if test="f:usedUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="usedUnsignedInt">
               <xsl:value-of select="f:usedUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:usedUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usedUnsignedInt">
               <xsl:apply-templates select="f:usedUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--usedString 1..1 string (json type: string)--><xsl:if test="f:usedString">
         <xsl:if test="f:usedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usedString">
               <xsl:value-of select="f:usedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usedString">
               <xsl:apply-templates select="f:usedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--usedMoney 1..1 Money--><xsl:if test="f:usedMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="usedMoney">
            <xsl:apply-templates select="f:usedMoney" mode="Money"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CoverageEligibilityResponse.Error">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code specifying the types of information being requested.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EligibilityResponsePurpose">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DetectedIssue">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DetectedIssue</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ObservationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--severity 0..1 DetectedIssueSeverity (json type: string)--><xsl:if test="f:severity">
         <xsl:if test="f:severity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
               <xsl:value-of select="f:severity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:severity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_severity">
               <xsl:apply-templates select="f:severity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 0..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--identifiedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:identifiedDateTime">
         <xsl:if test="f:identifiedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identifiedDateTime">
               <xsl:value-of select="f:identifiedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identifiedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identifiedDateTime">
               <xsl:apply-templates select="f:identifiedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--identifiedPeriod 1..1 Period--><xsl:if test="f:identifiedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifiedPeriod">
            <xsl:apply-templates select="f:identifiedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--implicated 0..* Reference--><xsl:if test="f:implicated">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="implicated">
            <xsl:for-each select="f:implicated">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--evidence 0..* DetectedIssue.Evidence--><xsl:if test="f:evidence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="evidence">
            <xsl:for-each select="f:evidence">
               <map>
                  <xsl:apply-templates select="." mode="DetectedIssue.Evidence"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..1 string (json type: string)--><xsl:if test="f:detail">
         <xsl:if test="f:detail/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
               <xsl:value-of select="f:detail/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:detail[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detail">
               <xsl:apply-templates select="f:detail" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reference 0..1 uri (json type: string)--><xsl:if test="f:reference">
         <xsl:if test="f:reference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
               <xsl:value-of select="f:reference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:reference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reference">
               <xsl:apply-templates select="f:reference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mitigation 0..* DetectedIssue.Mitigation--><xsl:if test="f:mitigation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="mitigation">
            <xsl:for-each select="f:mitigation">
               <map>
                  <xsl:apply-templates select="." mode="DetectedIssue.Mitigation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DetectedIssue.Evidence">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* Reference--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DetectedIssue.Mitigation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 1..1 CodeableConcept--><xsl:if test="f:action">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:apply-templates select="f:action" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the status of the identified issue.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the potential degree of impact of the identified issue on the patient.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DetectedIssueSeverity">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Device</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--definition 0..1 Reference--><xsl:if test="f:definition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
            <xsl:apply-templates select="f:definition" mode="Reference"/>
         </map>
      </xsl:if>
          <!--udiCarrier 0..* Device.UdiCarrier--><xsl:if test="f:udiCarrier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udiCarrier">
            <xsl:for-each select="f:udiCarrier">
               <map>
                  <xsl:apply-templates select="." mode="Device.UdiCarrier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 FHIRDeviceStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..* CodeableConcept--><xsl:if test="f:statusReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:for-each select="f:statusReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--distinctIdentifier 0..1 string (json type: string)--><xsl:if test="f:distinctIdentifier">
         <xsl:if test="f:distinctIdentifier/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="distinctIdentifier">
               <xsl:value-of select="f:distinctIdentifier/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:distinctIdentifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_distinctIdentifier">
               <xsl:apply-templates select="f:distinctIdentifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--manufacturer 0..1 string (json type: string)--><xsl:if test="f:manufacturer">
         <xsl:if test="f:manufacturer/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
               <xsl:value-of select="f:manufacturer/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:manufacturer[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_manufacturer">
               <xsl:apply-templates select="f:manufacturer" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--manufactureDate 0..1 dateTime (json type: string)--><xsl:if test="f:manufactureDate">
         <xsl:if test="f:manufactureDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="manufactureDate">
               <xsl:value-of select="f:manufactureDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:manufactureDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_manufactureDate">
               <xsl:apply-templates select="f:manufactureDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expirationDate 0..1 dateTime (json type: string)--><xsl:if test="f:expirationDate">
         <xsl:if test="f:expirationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expirationDate">
               <xsl:value-of select="f:expirationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expirationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expirationDate">
               <xsl:apply-templates select="f:expirationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lotNumber 0..1 string (json type: string)--><xsl:if test="f:lotNumber">
         <xsl:if test="f:lotNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lotNumber">
               <xsl:value-of select="f:lotNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lotNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lotNumber">
               <xsl:apply-templates select="f:lotNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--serialNumber 0..1 string (json type: string)--><xsl:if test="f:serialNumber">
         <xsl:if test="f:serialNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="serialNumber">
               <xsl:value-of select="f:serialNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:serialNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_serialNumber">
               <xsl:apply-templates select="f:serialNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--deviceName 0..* Device.DeviceName--><xsl:if test="f:deviceName">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="deviceName">
            <xsl:for-each select="f:deviceName">
               <map>
                  <xsl:apply-templates select="." mode="Device.DeviceName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--modelNumber 0..1 string (json type: string)--><xsl:if test="f:modelNumber">
         <xsl:if test="f:modelNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="modelNumber">
               <xsl:value-of select="f:modelNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:modelNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_modelNumber">
               <xsl:apply-templates select="f:modelNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--partNumber 0..1 string (json type: string)--><xsl:if test="f:partNumber">
         <xsl:if test="f:partNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="partNumber">
               <xsl:value-of select="f:partNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:partNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_partNumber">
               <xsl:apply-templates select="f:partNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--specialization 0..* Device.Specialization--><xsl:if test="f:specialization">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialization">
            <xsl:for-each select="f:specialization">
               <map>
                  <xsl:apply-templates select="." mode="Device.Specialization"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..* Device.Version--><xsl:if test="f:version">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="version">
            <xsl:for-each select="f:version">
               <map>
                  <xsl:apply-templates select="." mode="Device.Version"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* Device.Property--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <map>
                  <xsl:apply-templates select="." mode="Device.Property"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patient 0..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--owner 0..1 Reference--><xsl:if test="f:owner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="owner">
            <xsl:apply-templates select="f:owner" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contact 0..* ContactPoint--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--safety 0..* CodeableConcept--><xsl:if test="f:safety">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="safety">
            <xsl:for-each select="f:safety">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--parent 0..1 Reference--><xsl:if test="f:parent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:apply-templates select="f:parent" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device.UdiCarrier">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--deviceIdentifier 0..1 string (json type: string)--><xsl:if test="f:deviceIdentifier">
         <xsl:if test="f:deviceIdentifier/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deviceIdentifier">
               <xsl:value-of select="f:deviceIdentifier/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deviceIdentifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deviceIdentifier">
               <xsl:apply-templates select="f:deviceIdentifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--issuer 0..1 uri (json type: string)--><xsl:if test="f:issuer">
         <xsl:if test="f:issuer/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issuer">
               <xsl:value-of select="f:issuer/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issuer[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issuer">
               <xsl:apply-templates select="f:issuer" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--jurisdiction 0..1 uri (json type: string)--><xsl:if test="f:jurisdiction">
         <xsl:if test="f:jurisdiction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
               <xsl:value-of select="f:jurisdiction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:jurisdiction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_jurisdiction">
               <xsl:apply-templates select="f:jurisdiction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--carrierAIDC 0..1 base64Binary (json type: string)--><xsl:if test="f:carrierAIDC">
         <xsl:if test="f:carrierAIDC/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="carrierAIDC">
               <xsl:value-of select="f:carrierAIDC/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:carrierAIDC[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_carrierAIDC">
               <xsl:apply-templates select="f:carrierAIDC" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--carrierHRF 0..1 string (json type: string)--><xsl:if test="f:carrierHRF">
         <xsl:if test="f:carrierHRF/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="carrierHRF">
               <xsl:value-of select="f:carrierHRF/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:carrierHRF[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_carrierHRF">
               <xsl:apply-templates select="f:carrierHRF" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--entryType 0..1 UDIEntryType (json type: string)--><xsl:if test="f:entryType">
         <xsl:if test="f:entryType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="entryType">
               <xsl:value-of select="f:entryType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:entryType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_entryType">
               <xsl:apply-templates select="f:entryType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device.DeviceName">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 DeviceNameType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device.Specialization">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--systemType 1..1 CodeableConcept--><xsl:if test="f:systemType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="systemType">
            <xsl:apply-templates select="f:systemType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device.Version">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--component 0..1 Identifier--><xsl:if test="f:component">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="component">
            <xsl:apply-templates select="f:component" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Device.Property">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--valueQuantity 0..* Quantity--><xsl:if test="f:valueQuantity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:for-each select="f:valueQuantity">
               <map>
                  <xsl:apply-templates select="." mode="Quantity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--valueCode 0..* CodeableConcept--><xsl:if test="f:valueCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
            <xsl:for-each select="f:valueCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The availability status of the device.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FHIRDeviceStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of name the device is referred by.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceNameType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes to identify how UDI data was entered.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="UDIEntryType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DeviceDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--udiDeviceIdentifier 0..* DeviceDefinition.UdiDeviceIdentifier--><xsl:if test="f:udiDeviceIdentifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udiDeviceIdentifier">
            <xsl:for-each select="f:udiDeviceIdentifier">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.UdiDeviceIdentifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--manufacturerString 1..1 string (json type: string)--><xsl:if test="f:manufacturerString">
         <xsl:if test="f:manufacturerString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturerString">
               <xsl:value-of select="f:manufacturerString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:manufacturerString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_manufacturerString">
               <xsl:apply-templates select="f:manufacturerString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--manufacturerReference 1..1 Reference--><xsl:if test="f:manufacturerReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturerReference">
            <xsl:apply-templates select="f:manufacturerReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--deviceName 0..* DeviceDefinition.DeviceName--><xsl:if test="f:deviceName">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="deviceName">
            <xsl:for-each select="f:deviceName">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.DeviceName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--modelNumber 0..1 string (json type: string)--><xsl:if test="f:modelNumber">
         <xsl:if test="f:modelNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="modelNumber">
               <xsl:value-of select="f:modelNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:modelNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_modelNumber">
               <xsl:apply-templates select="f:modelNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--specialization 0..* DeviceDefinition.Specialization--><xsl:if test="f:specialization">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialization">
            <xsl:for-each select="f:specialization">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.Specialization"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..* string (json type: string)--><xsl:if test="f:version">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="version">
            <xsl:for-each select="f:version">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:version[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:for-each select="f:version">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--safety 0..* CodeableConcept--><xsl:if test="f:safety">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="safety">
            <xsl:for-each select="f:safety">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--shelfLifeStorage 0..* ProductShelfLife--><xsl:if test="f:shelfLifeStorage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="shelfLifeStorage">
            <xsl:for-each select="f:shelfLifeStorage">
               <map>
                  <xsl:apply-templates select="." mode="ProductShelfLife"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--physicalCharacteristics 0..1 ProdCharacteristic--><xsl:if test="f:physicalCharacteristics">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="physicalCharacteristics">
            <xsl:apply-templates select="f:physicalCharacteristics" mode="ProdCharacteristic"/>
         </map>
      </xsl:if>
          <!--languageCode 0..* CodeableConcept--><xsl:if test="f:languageCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="languageCode">
            <xsl:for-each select="f:languageCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--capability 0..* DeviceDefinition.Capability--><xsl:if test="f:capability">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="capability">
            <xsl:for-each select="f:capability">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.Capability"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* DeviceDefinition.Property--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.Property"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--owner 0..1 Reference--><xsl:if test="f:owner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="owner">
            <xsl:apply-templates select="f:owner" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contact 0..* ContactPoint--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--onlineInformation 0..1 uri (json type: string)--><xsl:if test="f:onlineInformation">
         <xsl:if test="f:onlineInformation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onlineInformation">
               <xsl:value-of select="f:onlineInformation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onlineInformation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onlineInformation">
               <xsl:apply-templates select="f:onlineInformation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--parentDevice 0..1 Reference--><xsl:if test="f:parentDevice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="parentDevice">
            <xsl:apply-templates select="f:parentDevice" mode="Reference"/>
         </map>
      </xsl:if>
          <!--material 0..* DeviceDefinition.Material--><xsl:if test="f:material">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="material">
            <xsl:for-each select="f:material">
               <map>
                  <xsl:apply-templates select="." mode="DeviceDefinition.Material"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.UdiDeviceIdentifier">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--deviceIdentifier 1..1 string (json type: string)--><xsl:if test="f:deviceIdentifier">
         <xsl:if test="f:deviceIdentifier/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deviceIdentifier">
               <xsl:value-of select="f:deviceIdentifier/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deviceIdentifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deviceIdentifier">
               <xsl:apply-templates select="f:deviceIdentifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--issuer 1..1 uri (json type: string)--><xsl:if test="f:issuer">
         <xsl:if test="f:issuer/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issuer">
               <xsl:value-of select="f:issuer/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issuer[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issuer">
               <xsl:apply-templates select="f:issuer" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--jurisdiction 1..1 uri (json type: string)--><xsl:if test="f:jurisdiction">
         <xsl:if test="f:jurisdiction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
               <xsl:value-of select="f:jurisdiction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:jurisdiction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_jurisdiction">
               <xsl:apply-templates select="f:jurisdiction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.DeviceName">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 DeviceNameType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.Specialization">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--systemType 1..1 string (json type: string)--><xsl:if test="f:systemType">
         <xsl:if test="f:systemType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="systemType">
               <xsl:value-of select="f:systemType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:systemType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_systemType">
               <xsl:apply-templates select="f:systemType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.Capability">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..* CodeableConcept--><xsl:if test="f:description">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="description">
            <xsl:for-each select="f:description">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.Property">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--valueQuantity 0..* Quantity--><xsl:if test="f:valueQuantity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:for-each select="f:valueQuantity">
               <map>
                  <xsl:apply-templates select="." mode="Quantity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--valueCode 0..* CodeableConcept--><xsl:if test="f:valueCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
            <xsl:for-each select="f:valueCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The characteristics, operational status and capabilities of a medical-related component of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceDefinition.Material">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--substance 1..1 CodeableConcept--><xsl:if test="f:substance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substance">
            <xsl:apply-templates select="f:substance" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--alternate 0..1 boolean (json type: boolean)--><xsl:if test="f:alternate">
         <xsl:if test="f:alternate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="alternate">
               <xsl:value-of select="f:alternate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:alternate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_alternate">
               <xsl:apply-templates select="f:alternate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--allergenicIndicator 0..1 boolean (json type: boolean)--><xsl:if test="f:allergenicIndicator">
         <xsl:if test="f:allergenicIndicator/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allergenicIndicator">
               <xsl:value-of select="f:allergenicIndicator/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allergenicIndicator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allergenicIndicator">
               <xsl:apply-templates select="f:allergenicIndicator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a measurement, calculation or setting capability of a medical device.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetric">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DeviceMetric</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unit 0..1 CodeableConcept--><xsl:if test="f:unit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unit">
            <xsl:apply-templates select="f:unit" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
          <!--parent 0..1 Reference--><xsl:if test="f:parent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:apply-templates select="f:parent" mode="Reference"/>
         </map>
      </xsl:if>
          <!--operationalStatus 0..1 DeviceMetricOperationalStatus (json type: string)--><xsl:if test="f:operationalStatus">
         <xsl:if test="f:operationalStatus/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="operationalStatus">
               <xsl:value-of select="f:operationalStatus/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:operationalStatus[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_operationalStatus">
               <xsl:apply-templates select="f:operationalStatus" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--color 0..1 DeviceMetricColor (json type: string)--><xsl:if test="f:color">
         <xsl:if test="f:color/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="color">
               <xsl:value-of select="f:color/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:color[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_color">
               <xsl:apply-templates select="f:color" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 1..1 DeviceMetricCategory (json type: string)--><xsl:if test="f:category">
         <xsl:if test="f:category/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="category">
               <xsl:value-of select="f:category/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:category[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_category">
               <xsl:apply-templates select="f:category" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--measurementPeriod 0..1 Timing--><xsl:if test="f:measurementPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="measurementPeriod">
            <xsl:apply-templates select="f:measurementPeriod" mode="Timing"/>
         </map>
      </xsl:if>
          <!--calibration 0..* DeviceMetric.Calibration--><xsl:if test="f:calibration">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="calibration">
            <xsl:for-each select="f:calibration">
               <map>
                  <xsl:apply-templates select="." mode="DeviceMetric.Calibration"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a measurement, calculation or setting capability of a medical device.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetric.Calibration">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 DeviceMetricCalibrationType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--state 0..1 DeviceMetricCalibrationState (json type: string)--><xsl:if test="f:state">
         <xsl:if test="f:state/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="state">
               <xsl:value-of select="f:state/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:state[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_state">
               <xsl:apply-templates select="f:state" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--time 0..1 instant (json type: string)--><xsl:if test="f:time">
         <xsl:if test="f:time/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="time">
               <xsl:value-of select="f:time/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:time[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_time">
               <xsl:apply-templates select="f:time" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes the type of a metric calibration.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetricCalibrationType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes the typical color of representation.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetricColor">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes the state of a metric calibration.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetricCalibrationState">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes the operational status of the DeviceMetric.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetricOperationalStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes the category of the metric.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceMetricCategory">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DeviceRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priorRequest 0..* Reference--><xsl:if test="f:priorRequest">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="priorRequest">
            <xsl:for-each select="f:priorRequest">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--groupIdentifier 0..1 Identifier--><xsl:if test="f:groupIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="groupIdentifier">
            <xsl:apply-templates select="f:groupIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 0..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intent 1..1 RequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--codeReference 1..1 Reference--><xsl:if test="f:codeReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="codeReference">
            <xsl:apply-templates select="f:codeReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--codeCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:codeCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="codeCodeableConcept">
            <xsl:apply-templates select="f:codeCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--parameter 0..* DeviceRequest.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="DeviceRequest.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performerType 0..1 CodeableConcept--><xsl:if test="f:performerType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performerType">
            <xsl:apply-templates select="f:performerType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--insurance 0..* Reference--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Reference--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relevantHistory 0..* Reference--><xsl:if test="f:relevantHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relevantHistory">
            <xsl:for-each select="f:relevantHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceRequest.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceUseStatement">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DeviceUseStatement</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 DeviceUseStatementStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--derivedFrom 0..* Reference--><xsl:if test="f:derivedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--timingTiming 1..1 Timing--><xsl:if test="f:timingTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingTiming">
            <xsl:apply-templates select="f:timingTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--timingDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timingDateTime">
         <xsl:if test="f:timingDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDateTime">
               <xsl:value-of select="f:timingDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDateTime">
               <xsl:apply-templates select="f:timingDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--recordedOn 0..1 dateTime (json type: string)--><xsl:if test="f:recordedOn">
         <xsl:if test="f:recordedOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recordedOn">
               <xsl:value-of select="f:recordedOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recordedOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recordedOn">
               <xsl:apply-templates select="f:recordedOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
          <!--device 1..1 Reference--><xsl:if test="f:device">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:apply-templates select="f:device" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A coded concept indicating the current status of the Device Usage.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DeviceUseStatementStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DiagnosticReport">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DiagnosticReport</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 DiagnosticReportStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--effectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:effectiveDateTime">
         <xsl:if test="f:effectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDateTime">
               <xsl:value-of select="f:effectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDateTime">
               <xsl:apply-templates select="f:effectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--effectivePeriod 1..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--issued 0..1 instant (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--performer 0..* Reference--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--resultsInterpreter 0..* Reference--><xsl:if test="f:resultsInterpreter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resultsInterpreter">
            <xsl:for-each select="f:resultsInterpreter">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specimen 0..* Reference--><xsl:if test="f:specimen">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specimen">
            <xsl:for-each select="f:specimen">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--result 0..* Reference--><xsl:if test="f:result">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="result">
            <xsl:for-each select="f:result">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--imagingStudy 0..* Reference--><xsl:if test="f:imagingStudy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="imagingStudy">
            <xsl:for-each select="f:imagingStudy">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--media 0..* DiagnosticReport.Media--><xsl:if test="f:media">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="media">
            <xsl:for-each select="f:media">
               <map>
                  <xsl:apply-templates select="." mode="DiagnosticReport.Media"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--conclusion 0..1 string (json type: string)--><xsl:if test="f:conclusion">
         <xsl:if test="f:conclusion/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="conclusion">
               <xsl:value-of select="f:conclusion/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:conclusion[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conclusion">
               <xsl:apply-templates select="f:conclusion" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--conclusionCode 0..* CodeableConcept--><xsl:if test="f:conclusionCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="conclusionCode">
            <xsl:for-each select="f:conclusionCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--presentedForm 0..* Attachment--><xsl:if test="f:presentedForm">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="presentedForm">
            <xsl:for-each select="f:presentedForm">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DiagnosticReport.Media">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--link 1..1 Reference--><xsl:if test="f:link">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:apply-templates select="f:link" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the diagnostic report.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DiagnosticReportStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A collection of documents compiled for a purpose together with metadata that applies to the collection.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentManifest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DocumentManifest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--masterIdentifier 0..1 Identifier--><xsl:if test="f:masterIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="masterIdentifier">
            <xsl:apply-templates select="f:masterIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 DocumentReferenceStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--created 0..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..* Reference--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--recipient 0..* Reference--><xsl:if test="f:recipient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:for-each select="f:recipient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--source 0..1 uri (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--content 1..* Reference--><xsl:if test="f:content">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="content">
            <xsl:for-each select="f:content">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--related 0..* DocumentManifest.Related--><xsl:if test="f:related">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="related">
            <xsl:for-each select="f:related">
               <map>
                  <xsl:apply-templates select="." mode="DocumentManifest.Related"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A collection of documents compiled for a purpose together with metadata that applies to the collection.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentManifest.Related">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--ref 0..1 Reference--><xsl:if test="f:ref">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ref">
            <xsl:apply-templates select="f:ref" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentReference">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">DocumentReference</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--masterIdentifier 0..1 Identifier--><xsl:if test="f:masterIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="masterIdentifier">
            <xsl:apply-templates select="f:masterIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 DocumentReferenceStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--docStatus 0..1 CompositionStatus (json type: string)--><xsl:if test="f:docStatus">
         <xsl:if test="f:docStatus/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="docStatus">
               <xsl:value-of select="f:docStatus/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:docStatus[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_docStatus">
               <xsl:apply-templates select="f:docStatus" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 instant (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..* Reference--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--authenticator 0..1 Reference--><xsl:if test="f:authenticator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authenticator">
            <xsl:apply-templates select="f:authenticator" mode="Reference"/>
         </map>
      </xsl:if>
          <!--custodian 0..1 Reference--><xsl:if test="f:custodian">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="custodian">
            <xsl:apply-templates select="f:custodian" mode="Reference"/>
         </map>
      </xsl:if>
          <!--relatesTo 0..* DocumentReference.RelatesTo--><xsl:if test="f:relatesTo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatesTo">
            <xsl:for-each select="f:relatesTo">
               <map>
                  <xsl:apply-templates select="." mode="DocumentReference.RelatesTo"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--securityLabel 0..* CodeableConcept--><xsl:if test="f:securityLabel">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="securityLabel">
            <xsl:for-each select="f:securityLabel">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--content 1..* DocumentReference.Content--><xsl:if test="f:content">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="content">
            <xsl:for-each select="f:content">
               <map>
                  <xsl:apply-templates select="." mode="DocumentReference.Content"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--context 0..1 DocumentReference.Context--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="DocumentReference.Context"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentReference.RelatesTo">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 DocumentRelationshipType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 1..1 Reference--><xsl:if test="f:target">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:apply-templates select="f:target" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentReference.Content">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--attachment 1..1 Attachment--><xsl:if test="f:attachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="attachment">
            <xsl:apply-templates select="f:attachment" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--format 0..1 Coding--><xsl:if test="f:format">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="format">
            <xsl:apply-templates select="f:format" mode="Coding"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DocumentReference.Context">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--encounter 0..* Reference--><xsl:if test="f:encounter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:for-each select="f:encounter">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--event 0..* CodeableConcept--><xsl:if test="f:event">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="event">
            <xsl:for-each select="f:event">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--facilityType 0..1 CodeableConcept--><xsl:if test="f:facilityType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="facilityType">
            <xsl:apply-templates select="f:facilityType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--practiceSetting 0..1 CodeableConcept--><xsl:if test="f:practiceSetting">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="practiceSetting">
            <xsl:apply-templates select="f:practiceSetting" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--sourcePatientInfo 0..1 Reference--><xsl:if test="f:sourcePatientInfo">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourcePatientInfo">
            <xsl:apply-templates select="f:sourcePatientInfo" mode="Reference"/>
         </map>
      </xsl:if>
          <!--related 0..* Reference--><xsl:if test="f:related">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="related">
            <xsl:for-each select="f:related">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EffectEvidenceSynthesis</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--synthesisType 0..1 CodeableConcept--><xsl:if test="f:synthesisType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="synthesisType">
            <xsl:apply-templates select="f:synthesisType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--studyType 0..1 CodeableConcept--><xsl:if test="f:studyType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="studyType">
            <xsl:apply-templates select="f:studyType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--population 1..1 Reference--><xsl:if test="f:population">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:apply-templates select="f:population" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposure 1..1 Reference--><xsl:if test="f:exposure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposure">
            <xsl:apply-templates select="f:exposure" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposureAlternative 1..1 Reference--><xsl:if test="f:exposureAlternative">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposureAlternative">
            <xsl:apply-templates select="f:exposureAlternative" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 1..1 Reference--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="Reference"/>
         </map>
      </xsl:if>
          <!--sampleSize 0..1 EffectEvidenceSynthesis.SampleSize--><xsl:if test="f:sampleSize">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sampleSize">
            <xsl:apply-templates select="f:sampleSize" mode="EffectEvidenceSynthesis.SampleSize"/>
         </map>
      </xsl:if>
          <!--resultsByExposure 0..* EffectEvidenceSynthesis.ResultsByExposure--><xsl:if test="f:resultsByExposure">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resultsByExposure">
            <xsl:for-each select="f:resultsByExposure">
               <map>
                  <xsl:apply-templates select="." mode="EffectEvidenceSynthesis.ResultsByExposure"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--effectEstimate 0..* EffectEvidenceSynthesis.EffectEstimate--><xsl:if test="f:effectEstimate">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="effectEstimate">
            <xsl:for-each select="f:effectEstimate">
               <map>
                  <xsl:apply-templates select="." mode="EffectEvidenceSynthesis.EffectEstimate"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--certainty 0..* EffectEvidenceSynthesis.Certainty--><xsl:if test="f:certainty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="certainty">
            <xsl:for-each select="f:certainty">
               <map>
                  <xsl:apply-templates select="." mode="EffectEvidenceSynthesis.Certainty"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.SampleSize">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfStudies 0..1 integer (json type: number)--><xsl:if test="f:numberOfStudies">
         <xsl:if test="f:numberOfStudies/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfStudies">
               <xsl:value-of select="f:numberOfStudies/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfStudies[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfStudies">
               <xsl:apply-templates select="f:numberOfStudies" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfParticipants 0..1 integer (json type: number)--><xsl:if test="f:numberOfParticipants">
         <xsl:if test="f:numberOfParticipants/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfParticipants">
               <xsl:value-of select="f:numberOfParticipants/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfParticipants[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfParticipants">
               <xsl:apply-templates select="f:numberOfParticipants" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.ResultsByExposure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--exposureState 0..1 ExposureState (json type: string)--><xsl:if test="f:exposureState">
         <xsl:if test="f:exposureState/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="exposureState">
               <xsl:value-of select="f:exposureState/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:exposureState[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exposureState">
               <xsl:apply-templates select="f:exposureState" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variantState 0..1 CodeableConcept--><xsl:if test="f:variantState">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="variantState">
            <xsl:apply-templates select="f:variantState" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--riskEvidenceSynthesis 1..1 Reference--><xsl:if test="f:riskEvidenceSynthesis">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="riskEvidenceSynthesis">
            <xsl:apply-templates select="f:riskEvidenceSynthesis" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.EffectEstimate">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--variantState 0..1 CodeableConcept--><xsl:if test="f:variantState">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="variantState">
            <xsl:apply-templates select="f:variantState" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--unitOfMeasure 0..1 CodeableConcept--><xsl:if test="f:unitOfMeasure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitOfMeasure">
            <xsl:apply-templates select="f:unitOfMeasure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--precisionEstimate 0..* EffectEvidenceSynthesis.PrecisionEstimate--><xsl:if test="f:precisionEstimate">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="precisionEstimate">
            <xsl:for-each select="f:precisionEstimate">
               <map>
                  <xsl:apply-templates select="." mode="EffectEvidenceSynthesis.PrecisionEstimate"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.PrecisionEstimate">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--level 0..1 decimal (json type: number)--><xsl:if test="f:level">
         <xsl:if test="f:level/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="level">
               <xsl:value-of select="f:level/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:level[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_level">
               <xsl:apply-templates select="f:level" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--from 0..1 decimal (json type: number)--><xsl:if test="f:from">
         <xsl:if test="f:from/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="from">
               <xsl:value-of select="f:from/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:from[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_from">
               <xsl:apply-templates select="f:from" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--to 0..1 decimal (json type: number)--><xsl:if test="f:to">
         <xsl:if test="f:to/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="to">
               <xsl:value-of select="f:to/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:to[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_to">
               <xsl:apply-templates select="f:to" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.Certainty">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--rating 0..* CodeableConcept--><xsl:if test="f:rating">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rating">
            <xsl:for-each select="f:rating">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--certaintySubcomponent 0..* EffectEvidenceSynthesis.CertaintySubcomponent--><xsl:if test="f:certaintySubcomponent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="certaintySubcomponent">
            <xsl:for-each select="f:certaintySubcomponent">
               <map>
                  <xsl:apply-templates select="." mode="EffectEvidenceSynthesis.CertaintySubcomponent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EffectEvidenceSynthesis.CertaintySubcomponent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--rating 0..* CodeableConcept--><xsl:if test="f:rating">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rating">
            <xsl:for-each select="f:rating">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Whether the results by exposure is describing the results for the primary exposure of interest (exposure) or the alternative state (exposureAlternative).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExposureState">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Encounter</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EncounterStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusHistory 0..* Encounter.StatusHistory--><xsl:if test="f:statusHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="statusHistory">
            <xsl:for-each select="f:statusHistory">
               <map>
                  <xsl:apply-templates select="." mode="Encounter.StatusHistory"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--class 1..1 Coding--><xsl:if test="f:class">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:apply-templates select="f:class" mode="Coding"/>
         </map>
      </xsl:if>
          <!--classHistory 0..* Encounter.ClassHistory--><xsl:if test="f:classHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="classHistory">
            <xsl:for-each select="f:classHistory">
               <map>
                  <xsl:apply-templates select="." mode="Encounter.ClassHistory"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceType 0..1 CodeableConcept--><xsl:if test="f:serviceType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="serviceType">
            <xsl:apply-templates select="f:serviceType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--priority 0..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--episodeOfCare 0..* Reference--><xsl:if test="f:episodeOfCare">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="episodeOfCare">
            <xsl:for-each select="f:episodeOfCare">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--participant 0..* Encounter.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="Encounter.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--appointment 0..* Reference--><xsl:if test="f:appointment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="appointment">
            <xsl:for-each select="f:appointment">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--length 0..1 Duration--><xsl:if test="f:length">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="length">
            <xsl:apply-templates select="f:length" mode="Duration"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--diagnosis 0..* Encounter.Diagnosis--><xsl:if test="f:diagnosis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosis">
            <xsl:for-each select="f:diagnosis">
               <map>
                  <xsl:apply-templates select="." mode="Encounter.Diagnosis"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--account 0..* Reference--><xsl:if test="f:account">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="account">
            <xsl:for-each select="f:account">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--hospitalization 0..1 Encounter.Hospitalization--><xsl:if test="f:hospitalization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="hospitalization">
            <xsl:apply-templates select="f:hospitalization" mode="Encounter.Hospitalization"/>
         </map>
      </xsl:if>
          <!--location 0..* Encounter.Location--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <map>
                  <xsl:apply-templates select="." mode="Encounter.Location"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceProvider 0..1 Reference--><xsl:if test="f:serviceProvider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="serviceProvider">
            <xsl:apply-templates select="f:serviceProvider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--partOf 0..1 Reference--><xsl:if test="f:partOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:apply-templates select="f:partOf" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.StatusHistory">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--status 1..1 EncounterStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 1..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.ClassHistory">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--class 1..1 Coding--><xsl:if test="f:class">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:apply-templates select="f:class" mode="Coding"/>
         </map>
      </xsl:if>
          <!--period 1..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--individual 0..1 Reference--><xsl:if test="f:individual">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="individual">
            <xsl:apply-templates select="f:individual" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.Diagnosis">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--condition 1..1 Reference--><xsl:if test="f:condition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:apply-templates select="f:condition" mode="Reference"/>
         </map>
      </xsl:if>
          <!--use 0..1 CodeableConcept--><xsl:if test="f:use">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="use">
            <xsl:apply-templates select="f:use" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--rank 0..1 positiveInt (json type: number)--><xsl:if test="f:rank">
         <xsl:if test="f:rank/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="rank">
               <xsl:value-of select="f:rank/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:rank[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rank">
               <xsl:apply-templates select="f:rank" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.Hospitalization">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--preAdmissionIdentifier 0..1 Identifier--><xsl:if test="f:preAdmissionIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="preAdmissionIdentifier">
            <xsl:apply-templates select="f:preAdmissionIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--origin 0..1 Reference--><xsl:if test="f:origin">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="origin">
            <xsl:apply-templates select="f:origin" mode="Reference"/>
         </map>
      </xsl:if>
          <!--admitSource 0..1 CodeableConcept--><xsl:if test="f:admitSource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="admitSource">
            <xsl:apply-templates select="f:admitSource" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reAdmission 0..1 CodeableConcept--><xsl:if test="f:reAdmission">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reAdmission">
            <xsl:apply-templates select="f:reAdmission" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--dietPreference 0..* CodeableConcept--><xsl:if test="f:dietPreference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dietPreference">
            <xsl:for-each select="f:dietPreference">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialCourtesy 0..* CodeableConcept--><xsl:if test="f:specialCourtesy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialCourtesy">
            <xsl:for-each select="f:specialCourtesy">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialArrangement 0..* CodeableConcept--><xsl:if test="f:specialArrangement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialArrangement">
            <xsl:for-each select="f:specialArrangement">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--destination 0..1 Reference--><xsl:if test="f:destination">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
            <xsl:apply-templates select="f:destination" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dischargeDisposition 0..1 CodeableConcept--><xsl:if test="f:dischargeDisposition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dischargeDisposition">
            <xsl:apply-templates select="f:dischargeDisposition" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Encounter.Location">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--location 1..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--status 0..1 EncounterLocationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--physicalType 0..1 CodeableConcept--><xsl:if test="f:physicalType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="physicalType">
            <xsl:apply-templates select="f:physicalType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the location.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EncounterLocationStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Current state of the encounter.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EncounterStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Endpoint">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Endpoint</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EndpointStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--connectionType 1..1 Coding--><xsl:if test="f:connectionType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="connectionType">
            <xsl:apply-templates select="f:connectionType" mode="Coding"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--managingOrganization 0..1 Reference--><xsl:if test="f:managingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:apply-templates select="f:managingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contact 0..* ContactPoint--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--payloadType 1..* CodeableConcept--><xsl:if test="f:payloadType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="payloadType">
            <xsl:for-each select="f:payloadType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--payloadMimeType 0..* code (json type: string)--><xsl:if test="f:payloadMimeType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="payloadMimeType">
            <xsl:for-each select="f:payloadMimeType">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:payloadMimeType[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_payloadMimeType">
               <xsl:for-each select="f:payloadMimeType">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--address 1..1 url (json type: string)--><xsl:if test="f:address">
         <xsl:if test="f:address/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="address">
               <xsl:value-of select="f:address/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:address[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_address">
               <xsl:apply-templates select="f:address" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--header 0..* string (json type: string)--><xsl:if test="f:header">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="header">
            <xsl:for-each select="f:header">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:header[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_header">
               <xsl:for-each select="f:header">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the endpoint.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EndpointStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the insurance enrollment details to the insurer regarding a specified coverage.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EnrollmentRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EnrollmentRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--created 0..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--insurer 0..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--provider 0..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--candidate 0..1 Reference--><xsl:if test="f:candidate">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="candidate">
            <xsl:apply-templates select="f:candidate" mode="Reference"/>
         </map>
      </xsl:if>
          <!--coverage 0..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EnrollmentResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EnrollmentResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 0..1 RemittanceOutcome (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disposition 0..1 string (json type: string)--><xsl:if test="f:disposition">
         <xsl:if test="f:disposition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disposition">
               <xsl:value-of select="f:disposition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disposition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disposition">
               <xsl:apply-templates select="f:disposition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--created 0..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--organization 0..1 Reference--><xsl:if test="f:organization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:apply-templates select="f:organization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--requestProvider 0..1 Reference--><xsl:if test="f:requestProvider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestProvider">
            <xsl:apply-templates select="f:requestProvider" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EpisodeOfCare">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EpisodeOfCare</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EpisodeOfCareStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusHistory 0..* EpisodeOfCare.StatusHistory--><xsl:if test="f:statusHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="statusHistory">
            <xsl:for-each select="f:statusHistory">
               <map>
                  <xsl:apply-templates select="." mode="EpisodeOfCare.StatusHistory"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--diagnosis 0..* EpisodeOfCare.Diagnosis--><xsl:if test="f:diagnosis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosis">
            <xsl:for-each select="f:diagnosis">
               <map>
                  <xsl:apply-templates select="." mode="EpisodeOfCare.Diagnosis"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--managingOrganization 0..1 Reference--><xsl:if test="f:managingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:apply-templates select="f:managingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--referralRequest 0..* Reference--><xsl:if test="f:referralRequest">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referralRequest">
            <xsl:for-each select="f:referralRequest">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--careManager 0..1 Reference--><xsl:if test="f:careManager">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="careManager">
            <xsl:apply-templates select="f:careManager" mode="Reference"/>
         </map>
      </xsl:if>
          <!--team 0..* Reference--><xsl:if test="f:team">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="team">
            <xsl:for-each select="f:team">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--account 0..* Reference--><xsl:if test="f:account">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="account">
            <xsl:for-each select="f:account">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EpisodeOfCare.StatusHistory">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--status 1..1 EpisodeOfCareStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 1..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EpisodeOfCare.Diagnosis">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--condition 1..1 Reference--><xsl:if test="f:condition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:apply-templates select="f:condition" mode="Reference"/>
         </map>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--rank 0..1 positiveInt (json type: number)--><xsl:if test="f:rank">
         <xsl:if test="f:rank/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="rank">
               <xsl:value-of select="f:rank/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:rank[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rank">
               <xsl:apply-templates select="f:rank" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the episode of care.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EpisodeOfCareStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The EventDefinition resource provides a reusable description of when a particular event can occur.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EventDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EventDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--trigger 1..* TriggerDefinition--><xsl:if test="f:trigger">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="trigger">
            <xsl:for-each select="f:trigger">
               <map>
                  <xsl:apply-templates select="." mode="TriggerDefinition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Evidence">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Evidence</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--shortTitle 0..1 string (json type: string)--><xsl:if test="f:shortTitle">
         <xsl:if test="f:shortTitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="shortTitle">
               <xsl:value-of select="f:shortTitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:shortTitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_shortTitle">
               <xsl:apply-templates select="f:shortTitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--exposureBackground 1..1 Reference--><xsl:if test="f:exposureBackground">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposureBackground">
            <xsl:apply-templates select="f:exposureBackground" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposureVariant 0..* Reference--><xsl:if test="f:exposureVariant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="exposureVariant">
            <xsl:for-each select="f:exposureVariant">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outcome 0..* Reference--><xsl:if test="f:outcome">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:for-each select="f:outcome">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EvidenceVariable">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">EvidenceVariable</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--shortTitle 0..1 string (json type: string)--><xsl:if test="f:shortTitle">
         <xsl:if test="f:shortTitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="shortTitle">
               <xsl:value-of select="f:shortTitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:shortTitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_shortTitle">
               <xsl:apply-templates select="f:shortTitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 EvidenceVariableType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--characteristic 1..* EvidenceVariable.Characteristic--><xsl:if test="f:characteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="characteristic">
            <xsl:for-each select="f:characteristic">
               <map>
                  <xsl:apply-templates select="." mode="EvidenceVariable.Characteristic"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EvidenceVariable.Characteristic">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--definitionReference 1..1 Reference--><xsl:if test="f:definitionReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="definitionReference">
            <xsl:apply-templates select="f:definitionReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--definitionCanonical 1..1 canonical (json type: string)--><xsl:if test="f:definitionCanonical">
         <xsl:if test="f:definitionCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definitionCanonical">
               <xsl:value-of select="f:definitionCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definitionCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionCanonical">
               <xsl:apply-templates select="f:definitionCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--definitionCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:definitionCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definitionCodeableConcept">
            <xsl:apply-templates select="f:definitionCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--definitionExpression 1..1 Expression--><xsl:if test="f:definitionExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="definitionExpression">
            <xsl:apply-templates select="f:definitionExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--definitionDataRequirement 1..1 DataRequirement--><xsl:if test="f:definitionDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definitionDataRequirement">
            <xsl:apply-templates select="f:definitionDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
            <!--definitionTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:definitionTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definitionTriggerDefinition">
            <xsl:apply-templates select="f:definitionTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
          
          <!--usageContext 0..* UsageContext--><xsl:if test="f:usageContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usageContext">
            <xsl:for-each select="f:usageContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--exclude 0..1 boolean (json type: boolean)--><xsl:if test="f:exclude">
         <xsl:if test="f:exclude/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exclude">
               <xsl:value-of select="f:exclude/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exclude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exclude">
               <xsl:apply-templates select="f:exclude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--participantEffectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:participantEffectiveDateTime">
         <xsl:if test="f:participantEffectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="participantEffectiveDateTime">
               <xsl:value-of select="f:participantEffectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:participantEffectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_participantEffectiveDateTime">
               <xsl:apply-templates select="f:participantEffectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--participantEffectivePeriod 1..1 Period--><xsl:if test="f:participantEffectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectivePeriod">
            <xsl:apply-templates select="f:participantEffectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--participantEffectiveDuration 1..1 Duration--><xsl:if test="f:participantEffectiveDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectiveDuration">
            <xsl:apply-templates select="f:participantEffectiveDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--participantEffectiveTiming 1..1 Timing--><xsl:if test="f:participantEffectiveTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectiveTiming">
            <xsl:apply-templates select="f:participantEffectiveTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--timeFromStart 0..1 Duration--><xsl:if test="f:timeFromStart">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timeFromStart">
            <xsl:apply-templates select="f:timeFromStart" mode="Duration"/>
         </map>
      </xsl:if>
          <!--groupMeasure 0..1 GroupMeasure (json type: string)--><xsl:if test="f:groupMeasure">
         <xsl:if test="f:groupMeasure/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="groupMeasure">
               <xsl:value-of select="f:groupMeasure/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:groupMeasure[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_groupMeasure">
               <xsl:apply-templates select="f:groupMeasure" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EvidenceVariableType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Possible group measure aggregates (E.g. Mean, Median).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GroupMeasure">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ExampleScenario</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--actor 0..* ExampleScenario.Actor--><xsl:if test="f:actor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:for-each select="f:actor">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Actor"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instance 0..* ExampleScenario.Instance--><xsl:if test="f:instance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
            <xsl:for-each select="f:instance">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Instance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--process 0..* ExampleScenario.Process--><xsl:if test="f:process">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="process">
            <xsl:for-each select="f:process">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Process"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--workflow 0..* canonical (json type: string)--><xsl:if test="f:workflow">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="workflow">
            <xsl:for-each select="f:workflow">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:workflow[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_workflow">
               <xsl:for-each select="f:workflow">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Actor">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--actorId 1..1 string (json type: string)--><xsl:if test="f:actorId">
         <xsl:if test="f:actorId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="actorId">
               <xsl:value-of select="f:actorId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:actorId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actorId">
               <xsl:apply-templates select="f:actorId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 ExampleScenarioActorType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Instance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--resourceId 1..1 string (json type: string)--><xsl:if test="f:resourceId">
         <xsl:if test="f:resourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceId">
               <xsl:value-of select="f:resourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resourceId">
               <xsl:apply-templates select="f:resourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resourceType 1..1 ResourceType (json type: string)--><xsl:if test="f:resourceType">
         <xsl:if test="f:resourceType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">
               <xsl:value-of select="f:resourceType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resourceType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resourceType">
               <xsl:apply-templates select="f:resourceType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..* ExampleScenario.Version--><xsl:if test="f:version">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="version">
            <xsl:for-each select="f:version">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Version"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--containedInstance 0..* ExampleScenario.ContainedInstance--><xsl:if test="f:containedInstance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="containedInstance">
            <xsl:for-each select="f:containedInstance">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.ContainedInstance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Version">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--versionId 1..1 string (json type: string)--><xsl:if test="f:versionId">
         <xsl:if test="f:versionId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="versionId">
               <xsl:value-of select="f:versionId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:versionId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versionId">
               <xsl:apply-templates select="f:versionId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 1..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.ContainedInstance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--resourceId 1..1 string (json type: string)--><xsl:if test="f:resourceId">
         <xsl:if test="f:resourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceId">
               <xsl:value-of select="f:resourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resourceId">
               <xsl:apply-templates select="f:resourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--versionId 0..1 string (json type: string)--><xsl:if test="f:versionId">
         <xsl:if test="f:versionId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="versionId">
               <xsl:value-of select="f:versionId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:versionId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_versionId">
               <xsl:apply-templates select="f:versionId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Process">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--title 1..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preConditions 0..1 markdown (json type: string)--><xsl:if test="f:preConditions">
         <xsl:if test="f:preConditions/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preConditions">
               <xsl:value-of select="f:preConditions/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preConditions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preConditions">
               <xsl:apply-templates select="f:preConditions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--postConditions 0..1 markdown (json type: string)--><xsl:if test="f:postConditions">
         <xsl:if test="f:postConditions/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="postConditions">
               <xsl:value-of select="f:postConditions/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:postConditions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_postConditions">
               <xsl:apply-templates select="f:postConditions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--step 0..* ExampleScenario.Step--><xsl:if test="f:step">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="step">
            <xsl:for-each select="f:step">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Step"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Step">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--process 0..* ExampleScenario.Process--><xsl:if test="f:process">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="process">
            <xsl:for-each select="f:process">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Process"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--pause 0..1 boolean (json type: boolean)--><xsl:if test="f:pause">
         <xsl:if test="f:pause/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="pause">
               <xsl:value-of select="f:pause/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:pause[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_pause">
               <xsl:apply-templates select="f:pause" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operation 0..1 ExampleScenario.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="ExampleScenario.Operation"/>
         </map>
      </xsl:if>
          <!--alternative 0..* ExampleScenario.Alternative--><xsl:if test="f:alternative">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alternative">
            <xsl:for-each select="f:alternative">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Alternative"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Operation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--number 1..1 string (json type: string)--><xsl:if test="f:number">
         <xsl:if test="f:number/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="number">
               <xsl:value-of select="f:number/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:number[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:apply-templates select="f:number" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 string (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--initiator 0..1 string (json type: string)--><xsl:if test="f:initiator">
         <xsl:if test="f:initiator/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="initiator">
               <xsl:value-of select="f:initiator/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:initiator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_initiator">
               <xsl:apply-templates select="f:initiator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--receiver 0..1 string (json type: string)--><xsl:if test="f:receiver">
         <xsl:if test="f:receiver/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="receiver">
               <xsl:value-of select="f:receiver/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:receiver[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_receiver">
               <xsl:apply-templates select="f:receiver" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--initiatorActive 0..1 boolean (json type: boolean)--><xsl:if test="f:initiatorActive">
         <xsl:if test="f:initiatorActive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="initiatorActive">
               <xsl:value-of select="f:initiatorActive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:initiatorActive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_initiatorActive">
               <xsl:apply-templates select="f:initiatorActive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--receiverActive 0..1 boolean (json type: boolean)--><xsl:if test="f:receiverActive">
         <xsl:if test="f:receiverActive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="receiverActive">
               <xsl:value-of select="f:receiverActive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:receiverActive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_receiverActive">
               <xsl:apply-templates select="f:receiverActive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--request 0..1 ExampleScenario.ContainedInstance--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="ExampleScenario.ContainedInstance"/>
         </map>
      </xsl:if>
          <!--response 0..1 ExampleScenario.ContainedInstance--><xsl:if test="f:response">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="response">
            <xsl:apply-templates select="f:response" mode="ExampleScenario.ContainedInstance"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Example of workflow instance.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenario.Alternative">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--title 1..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--step 0..* ExampleScenario.Step--><xsl:if test="f:step">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="step">
            <xsl:for-each select="f:step">
               <map>
                  <xsl:apply-templates select="." mode="ExampleScenario.Step"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of actor - system or human.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExampleScenarioActorType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResourceType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ExplanationOfBenefit</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ExplanationOfBenefitStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subType 0..1 CodeableConcept--><xsl:if test="f:subType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subType">
            <xsl:apply-templates select="f:subType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--use 1..1 Use (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--billablePeriod 0..1 Period--><xsl:if test="f:billablePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="billablePeriod">
            <xsl:apply-templates select="f:billablePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enterer 0..1 Reference--><xsl:if test="f:enterer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enterer">
            <xsl:apply-templates select="f:enterer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--insurer 1..1 Reference--><xsl:if test="f:insurer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="insurer">
            <xsl:apply-templates select="f:insurer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--provider 1..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--priority 0..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--fundsReserveRequested 0..1 CodeableConcept--><xsl:if test="f:fundsReserveRequested">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fundsReserveRequested">
            <xsl:apply-templates select="f:fundsReserveRequested" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--fundsReserve 0..1 CodeableConcept--><xsl:if test="f:fundsReserve">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fundsReserve">
            <xsl:apply-templates select="f:fundsReserve" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--related 0..* ExplanationOfBenefit.Related--><xsl:if test="f:related">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="related">
            <xsl:for-each select="f:related">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Related"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prescription 0..1 Reference--><xsl:if test="f:prescription">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="prescription">
            <xsl:apply-templates select="f:prescription" mode="Reference"/>
         </map>
      </xsl:if>
          <!--originalPrescription 0..1 Reference--><xsl:if test="f:originalPrescription">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="originalPrescription">
            <xsl:apply-templates select="f:originalPrescription" mode="Reference"/>
         </map>
      </xsl:if>
          <!--payee 0..1 ExplanationOfBenefit.Payee--><xsl:if test="f:payee">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payee">
            <xsl:apply-templates select="f:payee" mode="ExplanationOfBenefit.Payee"/>
         </map>
      </xsl:if>
          <!--referral 0..1 Reference--><xsl:if test="f:referral">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referral">
            <xsl:apply-templates select="f:referral" mode="Reference"/>
         </map>
      </xsl:if>
          <!--facility 0..1 Reference--><xsl:if test="f:facility">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="facility">
            <xsl:apply-templates select="f:facility" mode="Reference"/>
         </map>
      </xsl:if>
          <!--claim 0..1 Reference--><xsl:if test="f:claim">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claim">
            <xsl:apply-templates select="f:claim" mode="Reference"/>
         </map>
      </xsl:if>
          <!--claimResponse 0..1 Reference--><xsl:if test="f:claimResponse">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claimResponse">
            <xsl:apply-templates select="f:claimResponse" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 1..1 ClaimProcessingCodes (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disposition 0..1 string (json type: string)--><xsl:if test="f:disposition">
         <xsl:if test="f:disposition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disposition">
               <xsl:value-of select="f:disposition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disposition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disposition">
               <xsl:apply-templates select="f:disposition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preAuthRef 0..* string (json type: string)--><xsl:if test="f:preAuthRef">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRef">
            <xsl:for-each select="f:preAuthRef">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:preAuthRef[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_preAuthRef">
               <xsl:for-each select="f:preAuthRef">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--preAuthRefPeriod 0..* Period--><xsl:if test="f:preAuthRefPeriod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRefPeriod">
            <xsl:for-each select="f:preAuthRefPeriod">
               <map>
                  <xsl:apply-templates select="." mode="Period"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--careTeam 0..* ExplanationOfBenefit.CareTeam--><xsl:if test="f:careTeam">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="careTeam">
            <xsl:for-each select="f:careTeam">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.CareTeam"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* ExplanationOfBenefit.SupportingInfo--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.SupportingInfo"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--diagnosis 0..* ExplanationOfBenefit.Diagnosis--><xsl:if test="f:diagnosis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosis">
            <xsl:for-each select="f:diagnosis">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Diagnosis"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--procedure 0..* ExplanationOfBenefit.Procedure--><xsl:if test="f:procedure">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="procedure">
            <xsl:for-each select="f:procedure">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Procedure"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--precedence 0..1 positiveInt (json type: number)--><xsl:if test="f:precedence">
         <xsl:if test="f:precedence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="precedence">
               <xsl:value-of select="f:precedence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:precedence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_precedence">
               <xsl:apply-templates select="f:precedence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--insurance 1..* ExplanationOfBenefit.Insurance--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Insurance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--accident 0..1 ExplanationOfBenefit.Accident--><xsl:if test="f:accident">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="accident">
            <xsl:apply-templates select="f:accident" mode="ExplanationOfBenefit.Accident"/>
         </map>
      </xsl:if>
          <!--item 0..* ExplanationOfBenefit.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--addItem 0..* ExplanationOfBenefit.AddItem--><xsl:if test="f:addItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="addItem">
            <xsl:for-each select="f:addItem">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.AddItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--total 0..* ExplanationOfBenefit.Total--><xsl:if test="f:total">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="total">
            <xsl:for-each select="f:total">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Total"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--payment 0..1 ExplanationOfBenefit.Payment--><xsl:if test="f:payment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payment">
            <xsl:apply-templates select="f:payment" mode="ExplanationOfBenefit.Payment"/>
         </map>
      </xsl:if>
          <!--formCode 0..1 CodeableConcept--><xsl:if test="f:formCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="formCode">
            <xsl:apply-templates select="f:formCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--form 0..1 Attachment--><xsl:if test="f:form">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="form">
            <xsl:apply-templates select="f:form" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--processNote 0..* ExplanationOfBenefit.ProcessNote--><xsl:if test="f:processNote">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="processNote">
            <xsl:for-each select="f:processNote">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.ProcessNote"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--benefitPeriod 0..1 Period--><xsl:if test="f:benefitPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="benefitPeriod">
            <xsl:apply-templates select="f:benefitPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--benefitBalance 0..* ExplanationOfBenefit.BenefitBalance--><xsl:if test="f:benefitBalance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="benefitBalance">
            <xsl:for-each select="f:benefitBalance">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.BenefitBalance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Related">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--claim 0..1 Reference--><xsl:if test="f:claim">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="claim">
            <xsl:apply-templates select="f:claim" mode="Reference"/>
         </map>
      </xsl:if>
          <!--relationship 0..1 CodeableConcept--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reference 0..1 Identifier--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Identifier"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Payee">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--party 0..1 Reference--><xsl:if test="f:party">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="party">
            <xsl:apply-templates select="f:party" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.CareTeam">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--provider 1..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--responsible 0..1 boolean (json type: boolean)--><xsl:if test="f:responsible">
         <xsl:if test="f:responsible/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
               <xsl:value-of select="f:responsible/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:responsible[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responsible">
               <xsl:apply-templates select="f:responsible" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--qualification 0..1 CodeableConcept--><xsl:if test="f:qualification">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="qualification">
            <xsl:apply-templates select="f:qualification" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.SupportingInfo">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--timingDate 1..1 date (json type: string)--><xsl:if test="f:timingDate">
         <xsl:if test="f:timingDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDate">
               <xsl:value-of select="f:timingDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDate">
               <xsl:apply-templates select="f:timingDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--reason 0..1 Coding--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="Coding"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Diagnosis">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--diagnosisCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:diagnosisCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="diagnosisCodeableConcept">
            <xsl:apply-templates select="f:diagnosisCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--diagnosisReference 1..1 Reference--><xsl:if test="f:diagnosisReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosisReference">
            <xsl:apply-templates select="f:diagnosisReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--onAdmission 0..1 CodeableConcept--><xsl:if test="f:onAdmission">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onAdmission">
            <xsl:apply-templates select="f:onAdmission" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--packageCode 0..1 CodeableConcept--><xsl:if test="f:packageCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="packageCode">
            <xsl:apply-templates select="f:packageCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Procedure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--procedureCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:procedureCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="procedureCodeableConcept">
            <xsl:apply-templates select="f:procedureCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--procedureReference 1..1 Reference--><xsl:if test="f:procedureReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedureReference">
            <xsl:apply-templates select="f:procedureReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Insurance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--focal 1..1 boolean (json type: boolean)--><xsl:if test="f:focal">
         <xsl:if test="f:focal/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="focal">
               <xsl:value-of select="f:focal/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:focal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_focal">
               <xsl:apply-templates select="f:focal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--coverage 1..1 Reference--><xsl:if test="f:coverage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:apply-templates select="f:coverage" mode="Reference"/>
         </map>
      </xsl:if>
          <!--preAuthRef 0..* string (json type: string)--><xsl:if test="f:preAuthRef">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="preAuthRef">
            <xsl:for-each select="f:preAuthRef">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:preAuthRef[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_preAuthRef">
               <xsl:for-each select="f:preAuthRef">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Accident">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--date 0..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--careTeamSequence 0..* positiveInt (json type: number)--><xsl:if test="f:careTeamSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="careTeamSequence">
            <xsl:for-each select="f:careTeamSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:careTeamSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_careTeamSequence">
               <xsl:for-each select="f:careTeamSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--diagnosisSequence 0..* positiveInt (json type: number)--><xsl:if test="f:diagnosisSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="diagnosisSequence">
            <xsl:for-each select="f:diagnosisSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:diagnosisSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_diagnosisSequence">
               <xsl:for-each select="f:diagnosisSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--procedureSequence 0..* positiveInt (json type: number)--><xsl:if test="f:procedureSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="procedureSequence">
            <xsl:for-each select="f:procedureSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:procedureSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_procedureSequence">
               <xsl:for-each select="f:procedureSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--informationSequence 0..* positiveInt (json type: number)--><xsl:if test="f:informationSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="informationSequence">
            <xsl:for-each select="f:informationSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:informationSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_informationSequence">
               <xsl:for-each select="f:informationSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--locationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:locationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="locationCodeableConcept">
            <xsl:apply-templates select="f:locationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subSite 0..* CodeableConcept--><xsl:if test="f:subSite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subSite">
            <xsl:for-each select="f:subSite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--encounter 0..* Reference--><xsl:if test="f:encounter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:for-each select="f:encounter">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* ExplanationOfBenefit.Detail--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Detail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Adjudication">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reason 0..1 CodeableConcept--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subDetail 0..* ExplanationOfBenefit.SubDetail--><xsl:if test="f:subDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetail">
            <xsl:for-each select="f:subDetail">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.SubDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.SubDetail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 1..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--revenue 0..1 CodeableConcept--><xsl:if test="f:revenue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="revenue">
            <xsl:apply-templates select="f:revenue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--udi 0..* Reference--><xsl:if test="f:udi">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="udi">
            <xsl:for-each select="f:udi">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.AddItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--itemSequence 0..* positiveInt (json type: number)--><xsl:if test="f:itemSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="itemSequence">
            <xsl:for-each select="f:itemSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:itemSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_itemSequence">
               <xsl:for-each select="f:itemSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--detailSequence 0..* positiveInt (json type: number)--><xsl:if test="f:detailSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detailSequence">
            <xsl:for-each select="f:detailSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:detailSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_detailSequence">
               <xsl:for-each select="f:detailSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--subDetailSequence 0..* positiveInt (json type: number)--><xsl:if test="f:subDetailSequence">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetailSequence">
            <xsl:for-each select="f:subDetailSequence">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:subDetailSequence[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_subDetailSequence">
               <xsl:for-each select="f:subDetailSequence">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--provider 0..* Reference--><xsl:if test="f:provider">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:for-each select="f:provider">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programCode 0..* CodeableConcept--><xsl:if test="f:programCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programCode">
            <xsl:for-each select="f:programCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--servicedDate 1..1 date (json type: string)--><xsl:if test="f:servicedDate">
         <xsl:if test="f:servicedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="servicedDate">
               <xsl:value-of select="f:servicedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:servicedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_servicedDate">
               <xsl:apply-templates select="f:servicedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--servicedPeriod 1..1 Period--><xsl:if test="f:servicedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="servicedPeriod">
            <xsl:apply-templates select="f:servicedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          
            
            <!--locationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:locationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="locationCodeableConcept">
            <xsl:apply-templates select="f:locationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--locationAddress 1..1 Address--><xsl:if test="f:locationAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationAddress">
            <xsl:apply-templates select="f:locationAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--locationReference 1..1 Reference--><xsl:if test="f:locationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:apply-templates select="f:locationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subSite 0..* CodeableConcept--><xsl:if test="f:subSite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subSite">
            <xsl:for-each select="f:subSite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--detail 0..* ExplanationOfBenefit.Detail1--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Detail1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Detail1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subDetail 0..* ExplanationOfBenefit.SubDetail1--><xsl:if test="f:subDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subDetail">
            <xsl:for-each select="f:subDetail">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.SubDetail1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.SubDetail1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--productOrService 1..1 CodeableConcept--><xsl:if test="f:productOrService">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="productOrService">
            <xsl:apply-templates select="f:productOrService" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modifier 0..* CodeableConcept--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--unitPrice 0..1 Money--><xsl:if test="f:unitPrice">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitPrice">
            <xsl:apply-templates select="f:unitPrice" mode="Money"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--net 0..1 Money--><xsl:if test="f:net">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="net">
            <xsl:apply-templates select="f:net" mode="Money"/>
         </map>
      </xsl:if>
          <!--noteNumber 0..* positiveInt (json type: number)--><xsl:if test="f:noteNumber">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="noteNumber">
            <xsl:for-each select="f:noteNumber">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:noteNumber[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_noteNumber">
               <xsl:for-each select="f:noteNumber">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--adjudication 0..* ExplanationOfBenefit.Adjudication--><xsl:if test="f:adjudication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="adjudication">
            <xsl:for-each select="f:adjudication">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Adjudication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Total">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 1..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Payment">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--adjustment 0..1 Money--><xsl:if test="f:adjustment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="adjustment">
            <xsl:apply-templates select="f:adjustment" mode="Money"/>
         </map>
      </xsl:if>
          <!--adjustmentReason 0..1 CodeableConcept--><xsl:if test="f:adjustmentReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="adjustmentReason">
            <xsl:apply-templates select="f:adjustmentReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.ProcessNote">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--number 0..1 positiveInt (json type: number)--><xsl:if test="f:number">
         <xsl:if test="f:number/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="number">
               <xsl:value-of select="f:number/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:number[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:apply-templates select="f:number" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 NoteType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..1 CodeableConcept--><xsl:if test="f:language">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:apply-templates select="f:language" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.BenefitBalance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--excluded 0..1 boolean (json type: boolean)--><xsl:if test="f:excluded">
         <xsl:if test="f:excluded/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="excluded">
               <xsl:value-of select="f:excluded/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:excluded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_excluded">
               <xsl:apply-templates select="f:excluded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--network 0..1 CodeableConcept--><xsl:if test="f:network">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:apply-templates select="f:network" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unit 0..1 CodeableConcept--><xsl:if test="f:unit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unit">
            <xsl:apply-templates select="f:unit" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--term 0..1 CodeableConcept--><xsl:if test="f:term">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="term">
            <xsl:apply-templates select="f:term" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--financial 0..* ExplanationOfBenefit.Financial--><xsl:if test="f:financial">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="financial">
            <xsl:for-each select="f:financial">
               <map>
                  <xsl:apply-templates select="." mode="ExplanationOfBenefit.Financial"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefit.Financial">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--allowedUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:allowedUnsignedInt">
         <xsl:if test="f:allowedUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="allowedUnsignedInt">
               <xsl:value-of select="f:allowedUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:allowedUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowedUnsignedInt">
               <xsl:apply-templates select="f:allowedUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--allowedString 1..1 string (json type: string)--><xsl:if test="f:allowedString">
         <xsl:if test="f:allowedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="allowedString">
               <xsl:value-of select="f:allowedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:allowedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowedString">
               <xsl:apply-templates select="f:allowedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--allowedMoney 1..1 Money--><xsl:if test="f:allowedMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="allowedMoney">
            <xsl:apply-templates select="f:allowedMoney" mode="Money"/>
         </map>
      </xsl:if>
          
          
            
            <!--usedUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:usedUnsignedInt">
         <xsl:if test="f:usedUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="usedUnsignedInt">
               <xsl:value-of select="f:usedUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:usedUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usedUnsignedInt">
               <xsl:apply-templates select="f:usedUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--usedMoney 1..1 Money--><xsl:if test="f:usedMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="usedMoney">
            <xsl:apply-templates select="f:usedMoney" mode="Money"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code specifying the state of the resource instance.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExplanationOfBenefitStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FamilyMemberHistory">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">FamilyMemberHistory</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 FamilyHistoryStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dataAbsentReason 0..1 CodeableConcept--><xsl:if test="f:dataAbsentReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dataAbsentReason">
            <xsl:apply-templates select="f:dataAbsentReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--relationship 1..1 CodeableConcept--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--sex 0..1 CodeableConcept--><xsl:if test="f:sex">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sex">
            <xsl:apply-templates select="f:sex" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--bornPeriod 1..1 Period--><xsl:if test="f:bornPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bornPeriod">
            <xsl:apply-templates select="f:bornPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--bornDate 1..1 date (json type: string)--><xsl:if test="f:bornDate">
         <xsl:if test="f:bornDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="bornDate">
               <xsl:value-of select="f:bornDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:bornDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_bornDate">
               <xsl:apply-templates select="f:bornDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--bornString 1..1 string (json type: string)--><xsl:if test="f:bornString">
         <xsl:if test="f:bornString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="bornString">
               <xsl:value-of select="f:bornString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:bornString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_bornString">
               <xsl:apply-templates select="f:bornString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--ageAge 1..1 Age--><xsl:if test="f:ageAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ageAge">
            <xsl:apply-templates select="f:ageAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--ageRange 1..1 Range--><xsl:if test="f:ageRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ageRange">
            <xsl:apply-templates select="f:ageRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--ageString 1..1 string (json type: string)--><xsl:if test="f:ageString">
         <xsl:if test="f:ageString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="ageString">
               <xsl:value-of select="f:ageString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:ageString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_ageString">
               <xsl:apply-templates select="f:ageString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--estimatedAge 0..1 boolean (json type: boolean)--><xsl:if test="f:estimatedAge">
         <xsl:if test="f:estimatedAge/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="estimatedAge">
               <xsl:value-of select="f:estimatedAge/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:estimatedAge[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_estimatedAge">
               <xsl:apply-templates select="f:estimatedAge" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--deceasedBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:deceasedBoolean">
         <xsl:if test="f:deceasedBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedBoolean">
               <xsl:value-of select="f:deceasedBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:deceasedBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deceasedBoolean">
               <xsl:apply-templates select="f:deceasedBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--deceasedAge 1..1 Age--><xsl:if test="f:deceasedAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedAge">
            <xsl:apply-templates select="f:deceasedAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--deceasedRange 1..1 Range--><xsl:if test="f:deceasedRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedRange">
            <xsl:apply-templates select="f:deceasedRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--deceasedDate 1..1 date (json type: string)--><xsl:if test="f:deceasedDate">
         <xsl:if test="f:deceasedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedDate">
               <xsl:value-of select="f:deceasedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deceasedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deceasedDate">
               <xsl:apply-templates select="f:deceasedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--deceasedString 1..1 string (json type: string)--><xsl:if test="f:deceasedString">
         <xsl:if test="f:deceasedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedString">
               <xsl:value-of select="f:deceasedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deceasedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deceasedString">
               <xsl:apply-templates select="f:deceasedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..* FamilyMemberHistory.Condition--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <map>
                  <xsl:apply-templates select="." mode="FamilyMemberHistory.Condition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Significant health conditions for a person related to the patient relevant in the context of care for the patient.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FamilyMemberHistory.Condition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--outcome 0..1 CodeableConcept--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--contributedToDeath 0..1 boolean (json type: boolean)--><xsl:if test="f:contributedToDeath">
         <xsl:if test="f:contributedToDeath/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="contributedToDeath">
               <xsl:value-of select="f:contributedToDeath/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:contributedToDeath[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contributedToDeath">
               <xsl:apply-templates select="f:contributedToDeath" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--onsetAge 1..1 Age--><xsl:if test="f:onsetAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetAge">
            <xsl:apply-templates select="f:onsetAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--onsetRange 1..1 Range--><xsl:if test="f:onsetRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetRange">
            <xsl:apply-templates select="f:onsetRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--onsetPeriod 1..1 Period--><xsl:if test="f:onsetPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onsetPeriod">
            <xsl:apply-templates select="f:onsetPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--onsetString 1..1 string (json type: string)--><xsl:if test="f:onsetString">
         <xsl:if test="f:onsetString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="onsetString">
               <xsl:value-of select="f:onsetString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:onsetString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_onsetString">
               <xsl:apply-templates select="f:onsetString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code that identifies the status of the family history record.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FamilyHistoryStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Prospective warnings of potential issues when providing care to the patient.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Flag">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Flag</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FlagStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FlagStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Goal">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Goal</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--lifecycleStatus 1..1 GoalLifecycleStatus (json type: string)--><xsl:if test="f:lifecycleStatus">
         <xsl:if test="f:lifecycleStatus/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lifecycleStatus">
               <xsl:value-of select="f:lifecycleStatus/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lifecycleStatus[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lifecycleStatus">
               <xsl:apply-templates select="f:lifecycleStatus" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--achievementStatus 0..1 CodeableConcept--><xsl:if test="f:achievementStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="achievementStatus">
            <xsl:apply-templates select="f:achievementStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 1..1 CodeableConcept--><xsl:if test="f:description">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="description">
            <xsl:apply-templates select="f:description" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--startDate 1..1 date (json type: string)--><xsl:if test="f:startDate">
         <xsl:if test="f:startDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="startDate">
               <xsl:value-of select="f:startDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:startDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_startDate">
               <xsl:apply-templates select="f:startDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--startCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:startCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="startCodeableConcept">
            <xsl:apply-templates select="f:startCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--target 0..* Goal.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="Goal.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--statusDate 0..1 date (json type: string)--><xsl:if test="f:statusDate">
         <xsl:if test="f:statusDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="statusDate">
               <xsl:value-of select="f:statusDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:statusDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_statusDate">
               <xsl:apply-templates select="f:statusDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 string (json type: string)--><xsl:if test="f:statusReason">
         <xsl:if test="f:statusReason/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
               <xsl:value-of select="f:statusReason/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:statusReason[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_statusReason">
               <xsl:apply-templates select="f:statusReason" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expressedBy 0..1 Reference--><xsl:if test="f:expressedBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expressedBy">
            <xsl:apply-templates select="f:expressedBy" mode="Reference"/>
         </map>
      </xsl:if>
          <!--addresses 0..* Reference--><xsl:if test="f:addresses">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="addresses">
            <xsl:for-each select="f:addresses">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outcomeCode 0..* CodeableConcept--><xsl:if test="f:outcomeCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="outcomeCode">
            <xsl:for-each select="f:outcomeCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outcomeReference 0..* Reference--><xsl:if test="f:outcomeReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="outcomeReference">
            <xsl:for-each select="f:outcomeReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Goal.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--measure 0..1 CodeableConcept--><xsl:if test="f:measure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="measure">
            <xsl:apply-templates select="f:measure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--detailQuantity 1..1 Quantity--><xsl:if test="f:detailQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailQuantity">
            <xsl:apply-templates select="f:detailQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--detailRange 1..1 Range--><xsl:if test="f:detailRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailRange">
            <xsl:apply-templates select="f:detailRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--detailCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:detailCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailCodeableConcept">
            <xsl:apply-templates select="f:detailCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--detailString 1..1 string (json type: string)--><xsl:if test="f:detailString">
         <xsl:if test="f:detailString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="detailString">
               <xsl:value-of select="f:detailString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:detailString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detailString">
               <xsl:apply-templates select="f:detailString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--detailBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:detailBoolean">
         <xsl:if test="f:detailBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="detailBoolean">
               <xsl:value-of select="f:detailBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:detailBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detailBoolean">
               <xsl:apply-templates select="f:detailBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--detailInteger 1..1 integer (json type: number)--><xsl:if test="f:detailInteger">
         <xsl:if test="f:detailInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="detailInteger">
               <xsl:value-of select="f:detailInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:detailInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detailInteger">
               <xsl:apply-templates select="f:detailInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--detailRatio 1..1 Ratio--><xsl:if test="f:detailRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailRatio">
            <xsl:apply-templates select="f:detailRatio" mode="Ratio"/>
         </map>
      </xsl:if>
          
          
            
            <!--dueDate 1..1 date (json type: string)--><xsl:if test="f:dueDate">
         <xsl:if test="f:dueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dueDate">
               <xsl:value-of select="f:dueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dueDate">
               <xsl:apply-templates select="f:dueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--dueDuration 1..1 Duration--><xsl:if test="f:dueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dueDuration">
            <xsl:apply-templates select="f:dueDuration" mode="Duration"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes that reflect the current state of a goal and whether the goal is still being targeted.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GoalLifecycleStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">GraphDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--start 1..1 code (json type: string)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--link 0..* GraphDefinition.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="GraphDefinition.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphDefinition.Link">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sliceName 0..1 string (json type: string)--><xsl:if test="f:sliceName">
         <xsl:if test="f:sliceName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sliceName">
               <xsl:value-of select="f:sliceName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sliceName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sliceName">
               <xsl:apply-templates select="f:sliceName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 0..1 integer (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 0..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 0..* GraphDefinition.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="GraphDefinition.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphDefinition.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--params 0..1 string (json type: string)--><xsl:if test="f:params">
         <xsl:if test="f:params/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="params">
               <xsl:value-of select="f:params/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:params[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_params">
               <xsl:apply-templates select="f:params" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compartment 0..* GraphDefinition.Compartment--><xsl:if test="f:compartment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="compartment">
            <xsl:for-each select="f:compartment">
               <map>
                  <xsl:apply-templates select="." mode="GraphDefinition.Compartment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--link 0..* GraphDefinition.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="GraphDefinition.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphDefinition.Compartment">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--use 1..1 GraphCompartmentUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 CompartmentType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--rule 1..1 GraphCompartmentRule (json type: string)--><xsl:if test="f:rule">
         <xsl:if test="f:rule/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rule">
               <xsl:value-of select="f:rule/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rule[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rule">
               <xsl:apply-templates select="f:rule" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines how a compartment rule is used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphCompartmentUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a compartment must be linked.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GraphCompartmentRule">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Group">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Group</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 GroupType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--actual 1..1 boolean (json type: boolean)--><xsl:if test="f:actual">
         <xsl:if test="f:actual/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="actual">
               <xsl:value-of select="f:actual/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:actual[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actual">
               <xsl:apply-templates select="f:actual" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quantity 0..1 unsignedInt (json type: number)--><xsl:if test="f:quantity">
         <xsl:if test="f:quantity/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
               <xsl:value-of select="f:quantity/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:quantity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_quantity">
               <xsl:apply-templates select="f:quantity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--managingEntity 0..1 Reference--><xsl:if test="f:managingEntity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingEntity">
            <xsl:apply-templates select="f:managingEntity" mode="Reference"/>
         </map>
      </xsl:if>
          <!--characteristic 0..* Group.Characteristic--><xsl:if test="f:characteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="characteristic">
            <xsl:for-each select="f:characteristic">
               <map>
                  <xsl:apply-templates select="." mode="Group.Characteristic"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--member 0..* Group.Member--><xsl:if test="f:member">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="member">
            <xsl:for-each select="f:member">
               <map>
                  <xsl:apply-templates select="." mode="Group.Member"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Group.Characteristic">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--exclude 1..1 boolean (json type: boolean)--><xsl:if test="f:exclude">
         <xsl:if test="f:exclude/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exclude">
               <xsl:value-of select="f:exclude/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exclude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exclude">
               <xsl:apply-templates select="f:exclude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Group.Member">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--entity 1..1 Reference--><xsl:if test="f:entity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="entity">
            <xsl:apply-templates select="f:entity" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--inactive 0..1 boolean (json type: boolean)--><xsl:if test="f:inactive">
         <xsl:if test="f:inactive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="inactive">
               <xsl:value-of select="f:inactive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:inactive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_inactive">
               <xsl:apply-templates select="f:inactive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Types of resources that are part of group.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GroupType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GuidanceResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">GuidanceResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--requestIdentifier 0..1 Identifier--><xsl:if test="f:requestIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestIdentifier">
            <xsl:apply-templates select="f:requestIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--moduleUri 1..1 uri (json type: string)--><xsl:if test="f:moduleUri">
         <xsl:if test="f:moduleUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="moduleUri">
               <xsl:value-of select="f:moduleUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:moduleUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_moduleUri">
               <xsl:apply-templates select="f:moduleUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--moduleCanonical 1..1 canonical (json type: string)--><xsl:if test="f:moduleCanonical">
         <xsl:if test="f:moduleCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="moduleCanonical">
               <xsl:value-of select="f:moduleCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:moduleCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_moduleCanonical">
               <xsl:apply-templates select="f:moduleCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--moduleCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:moduleCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="moduleCodeableConcept">
            <xsl:apply-templates select="f:moduleCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--status 1..1 GuidanceResponseStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--occurrenceDateTime 0..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--evaluationMessage 0..* Reference--><xsl:if test="f:evaluationMessage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="evaluationMessage">
            <xsl:for-each select="f:evaluationMessage">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outputParameters 0..1 Reference--><xsl:if test="f:outputParameters">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outputParameters">
            <xsl:apply-templates select="f:outputParameters" mode="Reference"/>
         </map>
      </xsl:if>
          <!--result 0..1 Reference--><xsl:if test="f:result">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="result">
            <xsl:apply-templates select="f:result" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dataRequirement 0..* DataRequirement--><xsl:if test="f:dataRequirement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dataRequirement">
            <xsl:for-each select="f:dataRequirement">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of a guidance response.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GuidanceResponseStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The details of a healthcare service available at a location.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HealthcareService">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">HealthcareService</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--providedBy 0..1 Reference--><xsl:if test="f:providedBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="providedBy">
            <xsl:apply-templates select="f:providedBy" mode="Reference"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..* Reference--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--extraDetails 0..1 markdown (json type: string)--><xsl:if test="f:extraDetails">
         <xsl:if test="f:extraDetails/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="extraDetails">
               <xsl:value-of select="f:extraDetails/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:extraDetails[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_extraDetails">
               <xsl:apply-templates select="f:extraDetails" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--photo 0..1 Attachment--><xsl:if test="f:photo">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="photo">
            <xsl:apply-templates select="f:photo" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--coverageArea 0..* Reference--><xsl:if test="f:coverageArea">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coverageArea">
            <xsl:for-each select="f:coverageArea">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceProvisionCode 0..* CodeableConcept--><xsl:if test="f:serviceProvisionCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceProvisionCode">
            <xsl:for-each select="f:serviceProvisionCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--eligibility 0..* HealthcareService.Eligibility--><xsl:if test="f:eligibility">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="eligibility">
            <xsl:for-each select="f:eligibility">
               <map>
                  <xsl:apply-templates select="." mode="HealthcareService.Eligibility"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--program 0..* CodeableConcept--><xsl:if test="f:program">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="program">
            <xsl:for-each select="f:program">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--characteristic 0..* CodeableConcept--><xsl:if test="f:characteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="characteristic">
            <xsl:for-each select="f:characteristic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--communication 0..* CodeableConcept--><xsl:if test="f:communication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communication">
            <xsl:for-each select="f:communication">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referralMethod 0..* CodeableConcept--><xsl:if test="f:referralMethod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referralMethod">
            <xsl:for-each select="f:referralMethod">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--appointmentRequired 0..1 boolean (json type: boolean)--><xsl:if test="f:appointmentRequired">
         <xsl:if test="f:appointmentRequired/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="appointmentRequired">
               <xsl:value-of select="f:appointmentRequired/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:appointmentRequired[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_appointmentRequired">
               <xsl:apply-templates select="f:appointmentRequired" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--availableTime 0..* HealthcareService.AvailableTime--><xsl:if test="f:availableTime">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="availableTime">
            <xsl:for-each select="f:availableTime">
               <map>
                  <xsl:apply-templates select="." mode="HealthcareService.AvailableTime"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--notAvailable 0..* HealthcareService.NotAvailable--><xsl:if test="f:notAvailable">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="notAvailable">
            <xsl:for-each select="f:notAvailable">
               <map>
                  <xsl:apply-templates select="." mode="HealthcareService.NotAvailable"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--availabilityExceptions 0..1 string (json type: string)--><xsl:if test="f:availabilityExceptions">
         <xsl:if test="f:availabilityExceptions/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availabilityExceptions">
               <xsl:value-of select="f:availabilityExceptions/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availabilityExceptions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_availabilityExceptions">
               <xsl:apply-templates select="f:availabilityExceptions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The details of a healthcare service available at a location.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HealthcareService.Eligibility">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--comment 0..1 markdown (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The details of a healthcare service available at a location.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HealthcareService.AvailableTime">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--daysOfWeek 0..* DaysOfWeek (json type: string)--><xsl:if test="f:daysOfWeek">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="daysOfWeek">
            <xsl:for-each select="f:daysOfWeek">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:daysOfWeek[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_daysOfWeek">
               <xsl:for-each select="f:daysOfWeek">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--allDay 0..1 boolean (json type: boolean)--><xsl:if test="f:allDay">
         <xsl:if test="f:allDay/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allDay">
               <xsl:value-of select="f:allDay/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allDay[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allDay">
               <xsl:apply-templates select="f:allDay" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--availableStartTime 0..1 time (json type: string)--><xsl:if test="f:availableStartTime">
         <xsl:if test="f:availableStartTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availableStartTime">
               <xsl:value-of select="f:availableStartTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availableStartTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_availableStartTime">
               <xsl:apply-templates select="f:availableStartTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--availableEndTime 0..1 time (json type: string)--><xsl:if test="f:availableEndTime">
         <xsl:if test="f:availableEndTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availableEndTime">
               <xsl:value-of select="f:availableEndTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availableEndTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_availableEndTime">
               <xsl:apply-templates select="f:availableEndTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The details of a healthcare service available at a location.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="HealthcareService.NotAvailable">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 1..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--during 0..1 Period--><xsl:if test="f:during">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="during">
            <xsl:apply-templates select="f:during" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The days of the week.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="DaysOfWeek">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImagingStudy">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ImagingStudy</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ImagingStudyStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--modality 0..* Coding--><xsl:if test="f:modality">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modality">
            <xsl:for-each select="f:modality">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--started 0..1 dateTime (json type: string)--><xsl:if test="f:started">
         <xsl:if test="f:started/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="started">
               <xsl:value-of select="f:started/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:started[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_started">
               <xsl:apply-templates select="f:started" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referrer 0..1 Reference--><xsl:if test="f:referrer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referrer">
            <xsl:apply-templates select="f:referrer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--interpreter 0..* Reference--><xsl:if test="f:interpreter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interpreter">
            <xsl:for-each select="f:interpreter">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--numberOfSeries 0..1 unsignedInt (json type: number)--><xsl:if test="f:numberOfSeries">
         <xsl:if test="f:numberOfSeries/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfSeries">
               <xsl:value-of select="f:numberOfSeries/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfSeries[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfSeries">
               <xsl:apply-templates select="f:numberOfSeries" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfInstances 0..1 unsignedInt (json type: number)--><xsl:if test="f:numberOfInstances">
         <xsl:if test="f:numberOfInstances/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfInstances">
               <xsl:value-of select="f:numberOfInstances/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfInstances[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfInstances">
               <xsl:apply-templates select="f:numberOfInstances" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--procedureReference 0..1 Reference--><xsl:if test="f:procedureReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedureReference">
            <xsl:apply-templates select="f:procedureReference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--procedureCode 0..* CodeableConcept--><xsl:if test="f:procedureCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="procedureCode">
            <xsl:for-each select="f:procedureCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--series 0..* ImagingStudy.Series--><xsl:if test="f:series">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="series">
            <xsl:for-each select="f:series">
               <map>
                  <xsl:apply-templates select="." mode="ImagingStudy.Series"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImagingStudy.Series">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--uid 1..1 id (json type: string)--><xsl:if test="f:uid">
         <xsl:if test="f:uid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uid">
               <xsl:value-of select="f:uid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uid">
               <xsl:apply-templates select="f:uid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--number 0..1 unsignedInt (json type: number)--><xsl:if test="f:number">
         <xsl:if test="f:number/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="number">
               <xsl:value-of select="f:number/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:number[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:apply-templates select="f:number" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--modality 1..1 Coding--><xsl:if test="f:modality">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="modality">
            <xsl:apply-templates select="f:modality" mode="Coding"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfInstances 0..1 unsignedInt (json type: number)--><xsl:if test="f:numberOfInstances">
         <xsl:if test="f:numberOfInstances/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfInstances">
               <xsl:value-of select="f:numberOfInstances/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfInstances[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfInstances">
               <xsl:apply-templates select="f:numberOfInstances" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 Coding--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="Coding"/>
         </map>
      </xsl:if>
          <!--laterality 0..1 Coding--><xsl:if test="f:laterality">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="laterality">
            <xsl:apply-templates select="f:laterality" mode="Coding"/>
         </map>
      </xsl:if>
          <!--specimen 0..* Reference--><xsl:if test="f:specimen">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specimen">
            <xsl:for-each select="f:specimen">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--started 0..1 dateTime (json type: string)--><xsl:if test="f:started">
         <xsl:if test="f:started/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="started">
               <xsl:value-of select="f:started/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:started[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_started">
               <xsl:apply-templates select="f:started" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--performer 0..* ImagingStudy.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="ImagingStudy.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instance 0..* ImagingStudy.Instance--><xsl:if test="f:instance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
            <xsl:for-each select="f:instance">
               <map>
                  <xsl:apply-templates select="." mode="ImagingStudy.Instance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImagingStudy.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImagingStudy.Instance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--uid 1..1 id (json type: string)--><xsl:if test="f:uid">
         <xsl:if test="f:uid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uid">
               <xsl:value-of select="f:uid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uid">
               <xsl:apply-templates select="f:uid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sopClass 1..1 Coding--><xsl:if test="f:sopClass">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sopClass">
            <xsl:apply-templates select="f:sopClass" mode="Coding"/>
         </map>
      </xsl:if>
          <!--number 0..1 unsignedInt (json type: number)--><xsl:if test="f:number">
         <xsl:if test="f:number/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="number">
               <xsl:value-of select="f:number/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:number[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_number">
               <xsl:apply-templates select="f:number" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the ImagingStudy.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImagingStudyStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Immunization">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Immunization</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ImmunizationStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--vaccineCode 1..1 CodeableConcept--><xsl:if test="f:vaccineCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="vaccineCode">
            <xsl:apply-templates select="f:vaccineCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrenceString 1..1 string (json type: string)--><xsl:if test="f:occurrenceString">
         <xsl:if test="f:occurrenceString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceString">
               <xsl:value-of select="f:occurrenceString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceString">
               <xsl:apply-templates select="f:occurrenceString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--recorded 0..1 dateTime (json type: string)--><xsl:if test="f:recorded">
         <xsl:if test="f:recorded/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recorded">
               <xsl:value-of select="f:recorded/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recorded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recorded">
               <xsl:apply-templates select="f:recorded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--primarySource 0..1 boolean (json type: boolean)--><xsl:if test="f:primarySource">
         <xsl:if test="f:primarySource/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="primarySource">
               <xsl:value-of select="f:primarySource/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:primarySource[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_primarySource">
               <xsl:apply-templates select="f:primarySource" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reportOrigin 0..1 CodeableConcept--><xsl:if test="f:reportOrigin">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reportOrigin">
            <xsl:apply-templates select="f:reportOrigin" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--manufacturer 0..1 Reference--><xsl:if test="f:manufacturer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:apply-templates select="f:manufacturer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--lotNumber 0..1 string (json type: string)--><xsl:if test="f:lotNumber">
         <xsl:if test="f:lotNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lotNumber">
               <xsl:value-of select="f:lotNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lotNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lotNumber">
               <xsl:apply-templates select="f:lotNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expirationDate 0..1 date (json type: string)--><xsl:if test="f:expirationDate">
         <xsl:if test="f:expirationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expirationDate">
               <xsl:value-of select="f:expirationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expirationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expirationDate">
               <xsl:apply-templates select="f:expirationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--site 0..1 CodeableConcept--><xsl:if test="f:site">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="site">
            <xsl:apply-templates select="f:site" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--route 0..1 CodeableConcept--><xsl:if test="f:route">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="route">
            <xsl:apply-templates select="f:route" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--doseQuantity 0..1 Quantity--><xsl:if test="f:doseQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="doseQuantity">
            <xsl:apply-templates select="f:doseQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--performer 0..* Immunization.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Immunization.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--isSubpotent 0..1 boolean (json type: boolean)--><xsl:if test="f:isSubpotent">
         <xsl:if test="f:isSubpotent/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isSubpotent">
               <xsl:value-of select="f:isSubpotent/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isSubpotent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isSubpotent">
               <xsl:apply-templates select="f:isSubpotent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subpotentReason 0..* CodeableConcept--><xsl:if test="f:subpotentReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subpotentReason">
            <xsl:for-each select="f:subpotentReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--education 0..* Immunization.Education--><xsl:if test="f:education">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="education">
            <xsl:for-each select="f:education">
               <map>
                  <xsl:apply-templates select="." mode="Immunization.Education"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--programEligibility 0..* CodeableConcept--><xsl:if test="f:programEligibility">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="programEligibility">
            <xsl:for-each select="f:programEligibility">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--fundingSource 0..1 CodeableConcept--><xsl:if test="f:fundingSource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fundingSource">
            <xsl:apply-templates select="f:fundingSource" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reaction 0..* Immunization.Reaction--><xsl:if test="f:reaction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reaction">
            <xsl:for-each select="f:reaction">
               <map>
                  <xsl:apply-templates select="." mode="Immunization.Reaction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--protocolApplied 0..* Immunization.ProtocolApplied--><xsl:if test="f:protocolApplied">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="protocolApplied">
            <xsl:for-each select="f:protocolApplied">
               <map>
                  <xsl:apply-templates select="." mode="Immunization.ProtocolApplied"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Immunization.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Immunization.Education">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--documentType 0..1 string (json type: string)--><xsl:if test="f:documentType">
         <xsl:if test="f:documentType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentType">
               <xsl:value-of select="f:documentType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentType">
               <xsl:apply-templates select="f:documentType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reference 0..1 uri (json type: string)--><xsl:if test="f:reference">
         <xsl:if test="f:reference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
               <xsl:value-of select="f:reference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:reference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reference">
               <xsl:apply-templates select="f:reference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publicationDate 0..1 dateTime (json type: string)--><xsl:if test="f:publicationDate">
         <xsl:if test="f:publicationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publicationDate">
               <xsl:value-of select="f:publicationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publicationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publicationDate">
               <xsl:apply-templates select="f:publicationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--presentationDate 0..1 dateTime (json type: string)--><xsl:if test="f:presentationDate">
         <xsl:if test="f:presentationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="presentationDate">
               <xsl:value-of select="f:presentationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:presentationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_presentationDate">
               <xsl:apply-templates select="f:presentationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Immunization.Reaction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detail 0..1 Reference--><xsl:if test="f:detail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:apply-templates select="f:detail" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reported 0..1 boolean (json type: boolean)--><xsl:if test="f:reported">
         <xsl:if test="f:reported/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="reported">
               <xsl:value-of select="f:reported/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:reported[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reported">
               <xsl:apply-templates select="f:reported" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Immunization.ProtocolApplied">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--series 0..1 string (json type: string)--><xsl:if test="f:series">
         <xsl:if test="f:series/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="series">
               <xsl:value-of select="f:series/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:series[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_series">
               <xsl:apply-templates select="f:series" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--authority 0..1 Reference--><xsl:if test="f:authority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
            <xsl:apply-templates select="f:authority" mode="Reference"/>
         </map>
      </xsl:if>
          <!--targetDisease 0..* CodeableConcept--><xsl:if test="f:targetDisease">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="targetDisease">
            <xsl:for-each select="f:targetDisease">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--doseNumberPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:doseNumberPositiveInt">
         <xsl:if test="f:doseNumberPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberPositiveInt">
               <xsl:value-of select="f:doseNumberPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:doseNumberPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberPositiveInt">
               <xsl:apply-templates select="f:doseNumberPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--doseNumberString 1..1 string (json type: string)--><xsl:if test="f:doseNumberString">
         <xsl:if test="f:doseNumberString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberString">
               <xsl:value-of select="f:doseNumberString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:doseNumberString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberString">
               <xsl:apply-templates select="f:doseNumberString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--seriesDosesPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:seriesDosesPositiveInt">
         <xsl:if test="f:seriesDosesPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesPositiveInt">
               <xsl:value-of select="f:seriesDosesPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:seriesDosesPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_seriesDosesPositiveInt">
               <xsl:apply-templates select="f:seriesDosesPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--seriesDosesString 1..1 string (json type: string)--><xsl:if test="f:seriesDosesString">
         <xsl:if test="f:seriesDosesString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesString">
               <xsl:value-of select="f:seriesDosesString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:seriesDosesString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_seriesDosesString">
               <xsl:apply-templates select="f:seriesDosesString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A set of codes indicating the current status of an Immunization.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationEvaluation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ImmunizationEvaluation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ImmunizationEvaluationStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--authority 0..1 Reference--><xsl:if test="f:authority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
            <xsl:apply-templates select="f:authority" mode="Reference"/>
         </map>
      </xsl:if>
          <!--targetDisease 1..1 CodeableConcept--><xsl:if test="f:targetDisease">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="targetDisease">
            <xsl:apply-templates select="f:targetDisease" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--immunizationEvent 1..1 Reference--><xsl:if test="f:immunizationEvent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="immunizationEvent">
            <xsl:apply-templates select="f:immunizationEvent" mode="Reference"/>
         </map>
      </xsl:if>
          <!--doseStatus 1..1 CodeableConcept--><xsl:if test="f:doseStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="doseStatus">
            <xsl:apply-templates select="f:doseStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--doseStatusReason 0..* CodeableConcept--><xsl:if test="f:doseStatusReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="doseStatusReason">
            <xsl:for-each select="f:doseStatusReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--series 0..1 string (json type: string)--><xsl:if test="f:series">
         <xsl:if test="f:series/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="series">
               <xsl:value-of select="f:series/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:series[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_series">
               <xsl:apply-templates select="f:series" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--doseNumberPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:doseNumberPositiveInt">
         <xsl:if test="f:doseNumberPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberPositiveInt">
               <xsl:value-of select="f:doseNumberPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:doseNumberPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberPositiveInt">
               <xsl:apply-templates select="f:doseNumberPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--doseNumberString 1..1 string (json type: string)--><xsl:if test="f:doseNumberString">
         <xsl:if test="f:doseNumberString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberString">
               <xsl:value-of select="f:doseNumberString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:doseNumberString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberString">
               <xsl:apply-templates select="f:doseNumberString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--seriesDosesPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:seriesDosesPositiveInt">
         <xsl:if test="f:seriesDosesPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesPositiveInt">
               <xsl:value-of select="f:seriesDosesPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:seriesDosesPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_seriesDosesPositiveInt">
               <xsl:apply-templates select="f:seriesDosesPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--seriesDosesString 1..1 string (json type: string)--><xsl:if test="f:seriesDosesString">
         <xsl:if test="f:seriesDosesString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesString">
               <xsl:value-of select="f:seriesDosesString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:seriesDosesString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_seriesDosesString">
               <xsl:apply-templates select="f:seriesDosesString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the evaluation being done.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationEvaluationStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationRecommendation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ImmunizationRecommendation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--authority 0..1 Reference--><xsl:if test="f:authority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
            <xsl:apply-templates select="f:authority" mode="Reference"/>
         </map>
      </xsl:if>
          <!--recommendation 1..* ImmunizationRecommendation.Recommendation--><xsl:if test="f:recommendation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="recommendation">
            <xsl:for-each select="f:recommendation">
               <map>
                  <xsl:apply-templates select="." mode="ImmunizationRecommendation.Recommendation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationRecommendation.Recommendation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--vaccineCode 0..* CodeableConcept--><xsl:if test="f:vaccineCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="vaccineCode">
            <xsl:for-each select="f:vaccineCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--targetDisease 0..1 CodeableConcept--><xsl:if test="f:targetDisease">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="targetDisease">
            <xsl:apply-templates select="f:targetDisease" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--contraindicatedVaccineCode 0..* CodeableConcept--><xsl:if test="f:contraindicatedVaccineCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="contraindicatedVaccineCode">
            <xsl:for-each select="f:contraindicatedVaccineCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--forecastStatus 1..1 CodeableConcept--><xsl:if test="f:forecastStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="forecastStatus">
            <xsl:apply-templates select="f:forecastStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--forecastReason 0..* CodeableConcept--><xsl:if test="f:forecastReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="forecastReason">
            <xsl:for-each select="f:forecastReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dateCriterion 0..* ImmunizationRecommendation.DateCriterion--><xsl:if test="f:dateCriterion">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dateCriterion">
            <xsl:for-each select="f:dateCriterion">
               <map>
                  <xsl:apply-templates select="." mode="ImmunizationRecommendation.DateCriterion"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--series 0..1 string (json type: string)--><xsl:if test="f:series">
         <xsl:if test="f:series/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="series">
               <xsl:value-of select="f:series/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:series[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_series">
               <xsl:apply-templates select="f:series" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--doseNumberPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:doseNumberPositiveInt">
         <xsl:if test="f:doseNumberPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberPositiveInt">
               <xsl:value-of select="f:doseNumberPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:doseNumberPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberPositiveInt">
               <xsl:apply-templates select="f:doseNumberPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--doseNumberString 1..1 string (json type: string)--><xsl:if test="f:doseNumberString">
         <xsl:if test="f:doseNumberString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="doseNumberString">
               <xsl:value-of select="f:doseNumberString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:doseNumberString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doseNumberString">
               <xsl:apply-templates select="f:doseNumberString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          
            
            <!--seriesDosesPositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:seriesDosesPositiveInt">
         <xsl:if test="f:seriesDosesPositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesPositiveInt">
               <xsl:value-of select="f:seriesDosesPositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:seriesDosesPositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_seriesDosesPositiveInt">
               <xsl:apply-templates select="f:seriesDosesPositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--seriesDosesString 1..1 string (json type: string)--><xsl:if test="f:seriesDosesString">
         <xsl:if test="f:seriesDosesString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="seriesDosesString">
               <xsl:value-of select="f:seriesDosesString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:seriesDosesString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_seriesDosesString">
               <xsl:apply-templates select="f:seriesDosesString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--supportingImmunization 0..* Reference--><xsl:if test="f:supportingImmunization">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingImmunization">
            <xsl:for-each select="f:supportingImmunization">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingPatientInformation 0..* Reference--><xsl:if test="f:supportingPatientInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="supportingPatientInformation">
            <xsl:for-each select="f:supportingPatientInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImmunizationRecommendation.DateCriterion">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 1..1 dateTime (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ImplementationGuide</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--packageId 1..1 id (json type: string)--><xsl:if test="f:packageId">
         <xsl:if test="f:packageId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="packageId">
               <xsl:value-of select="f:packageId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:packageId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_packageId">
               <xsl:apply-templates select="f:packageId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--license 0..1 SPDXLicense (json type: string)--><xsl:if test="f:license">
         <xsl:if test="f:license/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="license">
               <xsl:value-of select="f:license/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:license[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_license">
               <xsl:apply-templates select="f:license" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--fhirVersion 1..* FHIRVersion (json type: string)--><xsl:if test="f:fhirVersion">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fhirVersion">
            <xsl:for-each select="f:fhirVersion">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:fhirVersion[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_fhirVersion">
               <xsl:for-each select="f:fhirVersion">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--dependsOn 0..* ImplementationGuide.DependsOn--><xsl:if test="f:dependsOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dependsOn">
            <xsl:for-each select="f:dependsOn">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.DependsOn"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--global 0..* ImplementationGuide.Global--><xsl:if test="f:global">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="global">
            <xsl:for-each select="f:global">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Global"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--definition 0..1 ImplementationGuide.Definition--><xsl:if test="f:definition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
            <xsl:apply-templates select="f:definition" mode="ImplementationGuide.Definition"/>
         </map>
      </xsl:if>
          <!--manifest 0..1 ImplementationGuide.Manifest--><xsl:if test="f:manifest">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manifest">
            <xsl:apply-templates select="f:manifest" mode="ImplementationGuide.Manifest"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.DependsOn">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--uri 1..1 canonical (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--packageId 0..1 id (json type: string)--><xsl:if test="f:packageId">
         <xsl:if test="f:packageId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="packageId">
               <xsl:value-of select="f:packageId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:packageId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_packageId">
               <xsl:apply-templates select="f:packageId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Global">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 1..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Definition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--grouping 0..* ImplementationGuide.Grouping--><xsl:if test="f:grouping">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="grouping">
            <xsl:for-each select="f:grouping">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Grouping"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--resource 1..* ImplementationGuide.Resource--><xsl:if test="f:resource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:for-each select="f:resource">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Resource"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--page 0..1 ImplementationGuide.Page--><xsl:if test="f:page">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="page">
            <xsl:apply-templates select="f:page" mode="ImplementationGuide.Page"/>
         </map>
      </xsl:if>
          <!--parameter 0..* ImplementationGuide.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--template 0..* ImplementationGuide.Template--><xsl:if test="f:template">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="template">
            <xsl:for-each select="f:template">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Template"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Grouping">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Resource">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--reference 1..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--fhirVersion 0..* FHIRVersion (json type: string)--><xsl:if test="f:fhirVersion">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fhirVersion">
            <xsl:for-each select="f:fhirVersion">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:fhirVersion[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_fhirVersion">
               <xsl:for-each select="f:fhirVersion">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--exampleBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:exampleBoolean">
         <xsl:if test="f:exampleBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exampleBoolean">
               <xsl:value-of select="f:exampleBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exampleBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exampleBoolean">
               <xsl:apply-templates select="f:exampleBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--exampleCanonical 1..1 canonical (json type: string)--><xsl:if test="f:exampleCanonical">
         <xsl:if test="f:exampleCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="exampleCanonical">
               <xsl:value-of select="f:exampleCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:exampleCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exampleCanonical">
               <xsl:apply-templates select="f:exampleCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--groupingId 0..1 id (json type: string)--><xsl:if test="f:groupingId">
         <xsl:if test="f:groupingId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="groupingId">
               <xsl:value-of select="f:groupingId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:groupingId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_groupingId">
               <xsl:apply-templates select="f:groupingId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Page">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--nameUrl 1..1 url (json type: string)--><xsl:if test="f:nameUrl">
         <xsl:if test="f:nameUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="nameUrl">
               <xsl:value-of select="f:nameUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:nameUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_nameUrl">
               <xsl:apply-templates select="f:nameUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--nameReference 1..1 Reference--><xsl:if test="f:nameReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="nameReference">
            <xsl:apply-templates select="f:nameReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--title 1..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--generation 1..1 GuidePageGeneration (json type: string)--><xsl:if test="f:generation">
         <xsl:if test="f:generation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="generation">
               <xsl:value-of select="f:generation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:generation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_generation">
               <xsl:apply-templates select="f:generation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--page 0..* ImplementationGuide.Page--><xsl:if test="f:page">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="page">
            <xsl:for-each select="f:page">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Page"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 GuideParameterCode (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Template">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 1..1 string (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--scope 0..1 string (json type: string)--><xsl:if test="f:scope">
         <xsl:if test="f:scope/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="scope">
               <xsl:value-of select="f:scope/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:scope[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_scope">
               <xsl:apply-templates select="f:scope" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Manifest">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--rendering 0..1 url (json type: string)--><xsl:if test="f:rendering">
         <xsl:if test="f:rendering/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rendering">
               <xsl:value-of select="f:rendering/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rendering[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rendering">
               <xsl:apply-templates select="f:rendering" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 1..* ImplementationGuide.Resource1--><xsl:if test="f:resource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:for-each select="f:resource">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Resource1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--page 0..* ImplementationGuide.Page1--><xsl:if test="f:page">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="page">
            <xsl:for-each select="f:page">
               <map>
                  <xsl:apply-templates select="." mode="ImplementationGuide.Page1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--image 0..* string (json type: string)--><xsl:if test="f:image">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="image">
            <xsl:for-each select="f:image">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:image[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_image">
               <xsl:for-each select="f:image">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--other 0..* string (json type: string)--><xsl:if test="f:other">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="other">
            <xsl:for-each select="f:other">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:other[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_other">
               <xsl:for-each select="f:other">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Resource1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--reference 1..1 Reference--><xsl:if test="f:reference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:apply-templates select="f:reference" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--exampleBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:exampleBoolean">
         <xsl:if test="f:exampleBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exampleBoolean">
               <xsl:value-of select="f:exampleBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exampleBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exampleBoolean">
               <xsl:apply-templates select="f:exampleBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--exampleCanonical 1..1 canonical (json type: string)--><xsl:if test="f:exampleCanonical">
         <xsl:if test="f:exampleCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="exampleCanonical">
               <xsl:value-of select="f:exampleCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:exampleCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exampleCanonical">
               <xsl:apply-templates select="f:exampleCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--relativePath 0..1 url (json type: string)--><xsl:if test="f:relativePath">
         <xsl:if test="f:relativePath/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="relativePath">
               <xsl:value-of select="f:relativePath/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:relativePath[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relativePath">
               <xsl:apply-templates select="f:relativePath" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ImplementationGuide.Page1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--anchor 0..* string (json type: string)--><xsl:if test="f:anchor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="anchor">
            <xsl:for-each select="f:anchor">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:anchor[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_anchor">
               <xsl:for-each select="f:anchor">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Code of parameter that is input to the guide.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GuideParameterCode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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/).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SPDXLicense">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code that indicates how the page is generated.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="GuidePageGeneration">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">InsurancePlan</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..* string (json type: string)--><xsl:if test="f:alias">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
            <xsl:for-each select="f:alias">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:alias[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:for-each select="f:alias">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--ownedBy 0..1 Reference--><xsl:if test="f:ownedBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ownedBy">
            <xsl:apply-templates select="f:ownedBy" mode="Reference"/>
         </map>
      </xsl:if>
          <!--administeredBy 0..1 Reference--><xsl:if test="f:administeredBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="administeredBy">
            <xsl:apply-templates select="f:administeredBy" mode="Reference"/>
         </map>
      </xsl:if>
          <!--coverageArea 0..* Reference--><xsl:if test="f:coverageArea">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coverageArea">
            <xsl:for-each select="f:coverageArea">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contact 0..* InsurancePlan.Contact--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Contact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--network 0..* Reference--><xsl:if test="f:network">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:for-each select="f:network">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--coverage 0..* InsurancePlan.Coverage--><xsl:if test="f:coverage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coverage">
            <xsl:for-each select="f:coverage">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Coverage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--plan 0..* InsurancePlan.Plan--><xsl:if test="f:plan">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="plan">
            <xsl:for-each select="f:plan">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Plan"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Contact">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--purpose 0..1 CodeableConcept--><xsl:if test="f:purpose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
            <xsl:apply-templates select="f:purpose" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--name 0..1 HumanName--><xsl:if test="f:name">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:apply-templates select="f:name" mode="HumanName"/>
         </map>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..1 Address--><xsl:if test="f:address">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:apply-templates select="f:address" mode="Address"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Coverage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--network 0..* Reference--><xsl:if test="f:network">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:for-each select="f:network">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--benefit 1..* InsurancePlan.Benefit--><xsl:if test="f:benefit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="benefit">
            <xsl:for-each select="f:benefit">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Benefit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Benefit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--requirement 0..1 string (json type: string)--><xsl:if test="f:requirement">
         <xsl:if test="f:requirement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requirement">
               <xsl:value-of select="f:requirement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requirement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requirement">
               <xsl:apply-templates select="f:requirement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--limit 0..* InsurancePlan.Limit--><xsl:if test="f:limit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="limit">
            <xsl:for-each select="f:limit">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Limit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Limit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--value 0..1 Quantity--><xsl:if test="f:value">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:apply-templates select="f:value" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Plan">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--coverageArea 0..* Reference--><xsl:if test="f:coverageArea">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="coverageArea">
            <xsl:for-each select="f:coverageArea">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--network 0..* Reference--><xsl:if test="f:network">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:for-each select="f:network">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--generalCost 0..* InsurancePlan.GeneralCost--><xsl:if test="f:generalCost">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="generalCost">
            <xsl:for-each select="f:generalCost">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.GeneralCost"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specificCost 0..* InsurancePlan.SpecificCost--><xsl:if test="f:specificCost">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specificCost">
            <xsl:for-each select="f:specificCost">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.SpecificCost"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.GeneralCost">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--groupSize 0..1 positiveInt (json type: number)--><xsl:if test="f:groupSize">
         <xsl:if test="f:groupSize/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="groupSize">
               <xsl:value-of select="f:groupSize/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:groupSize[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_groupSize">
               <xsl:apply-templates select="f:groupSize" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cost 0..1 Money--><xsl:if test="f:cost">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="cost">
            <xsl:apply-templates select="f:cost" mode="Money"/>
         </map>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.SpecificCost">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 1..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--benefit 0..* InsurancePlan.Benefit1--><xsl:if test="f:benefit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="benefit">
            <xsl:for-each select="f:benefit">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Benefit1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Benefit1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--cost 0..* InsurancePlan.Cost--><xsl:if test="f:cost">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="cost">
            <xsl:for-each select="f:cost">
               <map>
                  <xsl:apply-templates select="." mode="InsurancePlan.Cost"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details of a Health Insurance product/plan provided by an organization.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InsurancePlan.Cost">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--applicability 0..1 CodeableConcept--><xsl:if test="f:applicability">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="applicability">
            <xsl:apply-templates select="f:applicability" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--qualifiers 0..* CodeableConcept--><xsl:if test="f:qualifiers">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="qualifiers">
            <xsl:for-each select="f:qualifiers">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--value 0..1 Quantity--><xsl:if test="f:value">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:apply-templates select="f:value" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Invoice">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Invoice</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 InvoiceStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cancelledReason 0..1 string (json type: string)--><xsl:if test="f:cancelledReason">
         <xsl:if test="f:cancelledReason/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="cancelledReason">
               <xsl:value-of select="f:cancelledReason/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:cancelledReason[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cancelledReason">
               <xsl:apply-templates select="f:cancelledReason" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--recipient 0..1 Reference--><xsl:if test="f:recipient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:apply-templates select="f:recipient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--participant 0..* Invoice.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="Invoice.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--issuer 0..1 Reference--><xsl:if test="f:issuer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="issuer">
            <xsl:apply-templates select="f:issuer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--account 0..1 Reference--><xsl:if test="f:account">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="account">
            <xsl:apply-templates select="f:account" mode="Reference"/>
         </map>
      </xsl:if>
          <!--lineItem 0..* Invoice.LineItem--><xsl:if test="f:lineItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="lineItem">
            <xsl:for-each select="f:lineItem">
               <map>
                  <xsl:apply-templates select="." mode="Invoice.LineItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--totalPriceComponent 0..* Invoice.PriceComponent--><xsl:if test="f:totalPriceComponent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="totalPriceComponent">
            <xsl:for-each select="f:totalPriceComponent">
               <map>
                  <xsl:apply-templates select="." mode="Invoice.PriceComponent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--totalNet 0..1 Money--><xsl:if test="f:totalNet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="totalNet">
            <xsl:apply-templates select="f:totalNet" mode="Money"/>
         </map>
      </xsl:if>
          <!--totalGross 0..1 Money--><xsl:if test="f:totalGross">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="totalGross">
            <xsl:apply-templates select="f:totalGross" mode="Money"/>
         </map>
      </xsl:if>
          <!--paymentTerms 0..1 markdown (json type: string)--><xsl:if test="f:paymentTerms">
         <xsl:if test="f:paymentTerms/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paymentTerms">
               <xsl:value-of select="f:paymentTerms/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paymentTerms[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paymentTerms">
               <xsl:apply-templates select="f:paymentTerms" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Invoice.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Invoice.LineItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--sequence 0..1 positiveInt (json type: number)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--chargeItemReference 1..1 Reference--><xsl:if test="f:chargeItemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="chargeItemReference">
            <xsl:apply-templates select="f:chargeItemReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--chargeItemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:chargeItemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="chargeItemCodeableConcept">
            <xsl:apply-templates select="f:chargeItemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--priceComponent 0..* Invoice.PriceComponent--><xsl:if test="f:priceComponent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="priceComponent">
            <xsl:for-each select="f:priceComponent">
               <map>
                  <xsl:apply-templates select="." mode="Invoice.PriceComponent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Invoice.PriceComponent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 InvoicePriceComponentType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--factor 0..1 decimal (json type: number)--><xsl:if test="f:factor">
         <xsl:if test="f:factor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="factor">
               <xsl:value-of select="f:factor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:factor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_factor">
               <xsl:apply-templates select="f:factor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes identifying the lifecycle stage of an Invoice.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="InvoiceStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Library">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Library</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--parameter 0..* ParameterDefinition--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="ParameterDefinition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dataRequirement 0..* DataRequirement--><xsl:if test="f:dataRequirement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dataRequirement">
            <xsl:for-each select="f:dataRequirement">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--content 0..* Attachment--><xsl:if test="f:content">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="content">
            <xsl:for-each select="f:content">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies two or more records (resource instances) that refer to the same real-world "occurrence".</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Linkage">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Linkage</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--item 1..* Linkage.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="Linkage.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies two or more records (resource instances) that refer to the same real-world "occurrence".</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Linkage.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 LinkageType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 1..1 Reference--><xsl:if test="f:resource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:apply-templates select="f:resource" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Used to distinguish different roles a resource can play within a set of linked resources.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="LinkageType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A list is a curated collection of resources.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="List">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">List</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ListStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mode 1..1 ListMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
          <!--orderedBy 0..1 CodeableConcept--><xsl:if test="f:orderedBy">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="orderedBy">
            <xsl:apply-templates select="f:orderedBy" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--entry 0..* List.Entry--><xsl:if test="f:entry">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="entry">
            <xsl:for-each select="f:entry">
               <map>
                  <xsl:apply-templates select="." mode="List.Entry"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--emptyReason 0..1 CodeableConcept--><xsl:if test="f:emptyReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="emptyReason">
            <xsl:apply-templates select="f:emptyReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A list is a curated collection of resources.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="List.Entry">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--flag 0..1 CodeableConcept--><xsl:if test="f:flag">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="flag">
            <xsl:apply-templates select="f:flag" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--deleted 0..1 boolean (json type: boolean)--><xsl:if test="f:deleted">
         <xsl:if test="f:deleted/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="deleted">
               <xsl:value-of select="f:deleted/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:deleted[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deleted">
               <xsl:apply-templates select="f:deleted" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--item 1..1 Reference--><xsl:if test="f:item">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:apply-templates select="f:item" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The current state of the list.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ListStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Location">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Location</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 LocationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operationalStatus 0..1 Coding--><xsl:if test="f:operationalStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operationalStatus">
            <xsl:apply-templates select="f:operationalStatus" mode="Coding"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..* string (json type: string)--><xsl:if test="f:alias">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
            <xsl:for-each select="f:alias">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:alias[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:for-each select="f:alias">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mode 0..1 LocationMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..1 Address--><xsl:if test="f:address">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:apply-templates select="f:address" mode="Address"/>
         </map>
      </xsl:if>
          <!--physicalType 0..1 CodeableConcept--><xsl:if test="f:physicalType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="physicalType">
            <xsl:apply-templates select="f:physicalType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--position 0..1 Location.Position--><xsl:if test="f:position">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="position">
            <xsl:apply-templates select="f:position" mode="Location.Position"/>
         </map>
      </xsl:if>
          <!--managingOrganization 0..1 Reference--><xsl:if test="f:managingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:apply-templates select="f:managingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--partOf 0..1 Reference--><xsl:if test="f:partOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:apply-templates select="f:partOf" mode="Reference"/>
         </map>
      </xsl:if>
          <!--hoursOfOperation 0..* Location.HoursOfOperation--><xsl:if test="f:hoursOfOperation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="hoursOfOperation">
            <xsl:for-each select="f:hoursOfOperation">
               <map>
                  <xsl:apply-templates select="." mode="Location.HoursOfOperation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--availabilityExceptions 0..1 string (json type: string)--><xsl:if test="f:availabilityExceptions">
         <xsl:if test="f:availabilityExceptions/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availabilityExceptions">
               <xsl:value-of select="f:availabilityExceptions/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availabilityExceptions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_availabilityExceptions">
               <xsl:apply-templates select="f:availabilityExceptions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Location.Position">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--longitude 1..1 decimal (json type: number)--><xsl:if test="f:longitude">
         <xsl:if test="f:longitude/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="longitude">
               <xsl:value-of select="f:longitude/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:longitude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_longitude">
               <xsl:apply-templates select="f:longitude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--latitude 1..1 decimal (json type: number)--><xsl:if test="f:latitude">
         <xsl:if test="f:latitude/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="latitude">
               <xsl:value-of select="f:latitude/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:latitude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_latitude">
               <xsl:apply-templates select="f:latitude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--altitude 0..1 decimal (json type: number)--><xsl:if test="f:altitude">
         <xsl:if test="f:altitude/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="altitude">
               <xsl:value-of select="f:altitude/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:altitude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_altitude">
               <xsl:apply-templates select="f:altitude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Location.HoursOfOperation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--daysOfWeek 0..* DaysOfWeek (json type: string)--><xsl:if test="f:daysOfWeek">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="daysOfWeek">
            <xsl:for-each select="f:daysOfWeek">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:daysOfWeek[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_daysOfWeek">
               <xsl:for-each select="f:daysOfWeek">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--allDay 0..1 boolean (json type: boolean)--><xsl:if test="f:allDay">
         <xsl:if test="f:allDay/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allDay">
               <xsl:value-of select="f:allDay/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allDay[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allDay">
               <xsl:apply-templates select="f:allDay" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--openingTime 0..1 time (json type: string)--><xsl:if test="f:openingTime">
         <xsl:if test="f:openingTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="openingTime">
               <xsl:value-of select="f:openingTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:openingTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_openingTime">
               <xsl:apply-templates select="f:openingTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--closingTime 0..1 time (json type: string)--><xsl:if test="f:closingTime">
         <xsl:if test="f:closingTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="closingTime">
               <xsl:value-of select="f:closingTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:closingTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_closingTime">
               <xsl:apply-templates select="f:closingTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates whether a resource instance represents a specific location or a class of locations.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="LocationMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates whether the location is still in use.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="LocationStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Measure</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--library 0..* canonical (json type: string)--><xsl:if test="f:library">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="library">
            <xsl:for-each select="f:library">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:library[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_library">
               <xsl:for-each select="f:library">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--disclaimer 0..1 markdown (json type: string)--><xsl:if test="f:disclaimer">
         <xsl:if test="f:disclaimer/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disclaimer">
               <xsl:value-of select="f:disclaimer/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disclaimer[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disclaimer">
               <xsl:apply-templates select="f:disclaimer" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--scoring 0..1 CodeableConcept--><xsl:if test="f:scoring">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="scoring">
            <xsl:apply-templates select="f:scoring" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--compositeScoring 0..1 CodeableConcept--><xsl:if test="f:compositeScoring">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="compositeScoring">
            <xsl:apply-templates select="f:compositeScoring" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--riskAdjustment 0..1 string (json type: string)--><xsl:if test="f:riskAdjustment">
         <xsl:if test="f:riskAdjustment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="riskAdjustment">
               <xsl:value-of select="f:riskAdjustment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:riskAdjustment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_riskAdjustment">
               <xsl:apply-templates select="f:riskAdjustment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--rateAggregation 0..1 string (json type: string)--><xsl:if test="f:rateAggregation">
         <xsl:if test="f:rateAggregation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rateAggregation">
               <xsl:value-of select="f:rateAggregation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rateAggregation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rateAggregation">
               <xsl:apply-templates select="f:rateAggregation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--rationale 0..1 markdown (json type: string)--><xsl:if test="f:rationale">
         <xsl:if test="f:rationale/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rationale">
               <xsl:value-of select="f:rationale/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rationale[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rationale">
               <xsl:apply-templates select="f:rationale" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--clinicalRecommendationStatement 0..1 markdown (json type: string)--><xsl:if test="f:clinicalRecommendationStatement">
         <xsl:if test="f:clinicalRecommendationStatement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="clinicalRecommendationStatement">
               <xsl:value-of select="f:clinicalRecommendationStatement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:clinicalRecommendationStatement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_clinicalRecommendationStatement">
               <xsl:apply-templates select="f:clinicalRecommendationStatement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--improvementNotation 0..1 CodeableConcept--><xsl:if test="f:improvementNotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="improvementNotation">
            <xsl:apply-templates select="f:improvementNotation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--definition 0..* markdown (json type: string)--><xsl:if test="f:definition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
            <xsl:for-each select="f:definition">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:definition[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:for-each select="f:definition">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--guidance 0..1 markdown (json type: string)--><xsl:if test="f:guidance">
         <xsl:if test="f:guidance/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="guidance">
               <xsl:value-of select="f:guidance/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:guidance[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_guidance">
               <xsl:apply-templates select="f:guidance" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--group 0..* Measure.Group--><xsl:if test="f:group">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:for-each select="f:group">
               <map>
                  <xsl:apply-templates select="." mode="Measure.Group"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supplementalData 0..* Measure.SupplementalData--><xsl:if test="f:supplementalData">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supplementalData">
            <xsl:for-each select="f:supplementalData">
               <map>
                  <xsl:apply-templates select="." mode="Measure.SupplementalData"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure.Group">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--population 0..* Measure.Population--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="Measure.Population"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--stratifier 0..* Measure.Stratifier--><xsl:if test="f:stratifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="stratifier">
            <xsl:for-each select="f:stratifier">
               <map>
                  <xsl:apply-templates select="." mode="Measure.Stratifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure.Population">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--criteria 1..1 Expression--><xsl:if test="f:criteria">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="criteria">
            <xsl:apply-templates select="f:criteria" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure.Stratifier">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--criteria 0..1 Expression--><xsl:if test="f:criteria">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="criteria">
            <xsl:apply-templates select="f:criteria" mode="Expression"/>
         </map>
      </xsl:if>
          <!--component 0..* Measure.Component--><xsl:if test="f:component">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="component">
            <xsl:for-each select="f:component">
               <map>
                  <xsl:apply-templates select="." mode="Measure.Component"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure.Component">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--criteria 1..1 Expression--><xsl:if test="f:criteria">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="criteria">
            <xsl:apply-templates select="f:criteria" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The Measure resource provides the definition of a quality measure.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Measure.SupplementalData">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--usage 0..* CodeableConcept--><xsl:if test="f:usage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
            <xsl:for-each select="f:usage">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--criteria 1..1 Expression--><xsl:if test="f:criteria">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="criteria">
            <xsl:apply-templates select="f:criteria" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MeasureReport</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 MeasureReportStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 MeasureReportType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--measure 1..1 canonical (json type: string)--><xsl:if test="f:measure">
         <xsl:if test="f:measure/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="measure">
               <xsl:value-of select="f:measure/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:measure[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_measure">
               <xsl:apply-templates select="f:measure" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reporter 0..1 Reference--><xsl:if test="f:reporter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reporter">
            <xsl:apply-templates select="f:reporter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 1..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--improvementNotation 0..1 CodeableConcept--><xsl:if test="f:improvementNotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="improvementNotation">
            <xsl:apply-templates select="f:improvementNotation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--group 0..* MeasureReport.Group--><xsl:if test="f:group">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:for-each select="f:group">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Group"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--evaluatedResource 0..* Reference--><xsl:if test="f:evaluatedResource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="evaluatedResource">
            <xsl:for-each select="f:evaluatedResource">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Group">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--population 0..* MeasureReport.Population--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Population"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--measureScore 0..1 Quantity--><xsl:if test="f:measureScore">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="measureScore">
            <xsl:apply-templates select="f:measureScore" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--stratifier 0..* MeasureReport.Stratifier--><xsl:if test="f:stratifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="stratifier">
            <xsl:for-each select="f:stratifier">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Stratifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Population">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--count 0..1 integer (json type: number)--><xsl:if test="f:count">
         <xsl:if test="f:count/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="count">
               <xsl:value-of select="f:count/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:count[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_count">
               <xsl:apply-templates select="f:count" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subjectResults 0..1 Reference--><xsl:if test="f:subjectResults">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectResults">
            <xsl:apply-templates select="f:subjectResults" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Stratifier">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--stratum 0..* MeasureReport.Stratum--><xsl:if test="f:stratum">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="stratum">
            <xsl:for-each select="f:stratum">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Stratum"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Stratum">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--value 0..1 CodeableConcept--><xsl:if test="f:value">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:apply-templates select="f:value" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--component 0..* MeasureReport.Component--><xsl:if test="f:component">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="component">
            <xsl:for-each select="f:component">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Component"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--population 0..* MeasureReport.Population1--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="MeasureReport.Population1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--measureScore 0..1 Quantity--><xsl:if test="f:measureScore">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="measureScore">
            <xsl:apply-templates select="f:measureScore" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Component">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 1..1 CodeableConcept--><xsl:if test="f:value">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:apply-templates select="f:value" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReport.Population1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--count 0..1 integer (json type: number)--><xsl:if test="f:count">
         <xsl:if test="f:count/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="count">
               <xsl:value-of select="f:count/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:count[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_count">
               <xsl:apply-templates select="f:count" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subjectResults 0..1 Reference--><xsl:if test="f:subjectResults">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectResults">
            <xsl:apply-templates select="f:subjectResults" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of the measure report.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReportStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of the measure report.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MeasureReportType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Media">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Media</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EventStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--modality 0..1 CodeableConcept--><xsl:if test="f:modality">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="modality">
            <xsl:apply-templates select="f:modality" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--view 0..1 CodeableConcept--><xsl:if test="f:view">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="view">
            <xsl:apply-templates select="f:view" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--createdDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:createdDateTime">
         <xsl:if test="f:createdDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="createdDateTime">
               <xsl:value-of select="f:createdDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:createdDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_createdDateTime">
               <xsl:apply-templates select="f:createdDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--createdPeriod 1..1 Period--><xsl:if test="f:createdPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="createdPeriod">
            <xsl:apply-templates select="f:createdPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--issued 0..1 instant (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operator 0..1 Reference--><xsl:if test="f:operator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operator">
            <xsl:apply-templates select="f:operator" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--deviceName 0..1 string (json type: string)--><xsl:if test="f:deviceName">
         <xsl:if test="f:deviceName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deviceName">
               <xsl:value-of select="f:deviceName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deviceName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deviceName">
               <xsl:apply-templates select="f:deviceName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--device 0..1 Reference--><xsl:if test="f:device">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:apply-templates select="f:device" mode="Reference"/>
         </map>
      </xsl:if>
          <!--height 0..1 positiveInt (json type: number)--><xsl:if test="f:height">
         <xsl:if test="f:height/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="height">
               <xsl:value-of select="f:height/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:height[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_height">
               <xsl:apply-templates select="f:height" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--width 0..1 positiveInt (json type: number)--><xsl:if test="f:width">
         <xsl:if test="f:width/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="width">
               <xsl:value-of select="f:width/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:width[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_width">
               <xsl:apply-templates select="f:width" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--frames 0..1 positiveInt (json type: number)--><xsl:if test="f:frames">
         <xsl:if test="f:frames/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="frames">
               <xsl:value-of select="f:frames/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:frames[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_frames">
               <xsl:apply-templates select="f:frames" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--duration 0..1 decimal (json type: number)--><xsl:if test="f:duration">
         <xsl:if test="f:duration/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
               <xsl:value-of select="f:duration/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:duration[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_duration">
               <xsl:apply-templates select="f:duration" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--content 1..1 Attachment--><xsl:if test="f:content">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="content">
            <xsl:apply-templates select="f:content" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Medication">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Medication</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 MedicationStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--manufacturer 0..1 Reference--><xsl:if test="f:manufacturer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:apply-templates select="f:manufacturer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--form 0..1 CodeableConcept--><xsl:if test="f:form">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="form">
            <xsl:apply-templates select="f:form" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Ratio--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--ingredient 0..* Medication.Ingredient--><xsl:if test="f:ingredient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="ingredient">
            <xsl:for-each select="f:ingredient">
               <map>
                  <xsl:apply-templates select="." mode="Medication.Ingredient"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--batch 0..1 Medication.Batch--><xsl:if test="f:batch">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="batch">
            <xsl:apply-templates select="f:batch" mode="Medication.Batch"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Medication.Ingredient">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--itemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--itemReference 1..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--isActive 0..1 boolean (json type: boolean)--><xsl:if test="f:isActive">
         <xsl:if test="f:isActive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isActive">
               <xsl:value-of select="f:isActive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isActive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isActive">
               <xsl:apply-templates select="f:isActive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--strength 0..1 Ratio--><xsl:if test="f:strength">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
            <xsl:apply-templates select="f:strength" mode="Ratio"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Medication.Batch">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--lotNumber 0..1 string (json type: string)--><xsl:if test="f:lotNumber">
         <xsl:if test="f:lotNumber/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lotNumber">
               <xsl:value-of select="f:lotNumber/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lotNumber[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lotNumber">
               <xsl:apply-templates select="f:lotNumber" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expirationDate 0..1 dateTime (json type: string)--><xsl:if test="f:expirationDate">
         <xsl:if test="f:expirationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expirationDate">
               <xsl:value-of select="f:expirationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expirationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expirationDate">
               <xsl:apply-templates select="f:expirationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A coded concept defining if the medication is in active use.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationStatusCodes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationAdministration">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicationAdministration</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiates 0..* uri (json type: string)--><xsl:if test="f:instantiates">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiates">
            <xsl:for-each select="f:instantiates">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiates[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiates">
               <xsl:for-each select="f:instantiates">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 code (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..* CodeableConcept--><xsl:if test="f:statusReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:for-each select="f:statusReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--context 0..1 Reference--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="Reference"/>
         </map>
      </xsl:if>
          <!--supportingInformation 0..* Reference--><xsl:if test="f:supportingInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
            <xsl:for-each select="f:supportingInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--effectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:effectiveDateTime">
         <xsl:if test="f:effectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDateTime">
               <xsl:value-of select="f:effectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDateTime">
               <xsl:apply-templates select="f:effectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--effectivePeriod 1..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--performer 0..* MedicationAdministration.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="MedicationAdministration.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--device 0..* Reference--><xsl:if test="f:device">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:for-each select="f:device">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dosage 0..1 MedicationAdministration.Dosage--><xsl:if test="f:dosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dosage">
            <xsl:apply-templates select="f:dosage" mode="MedicationAdministration.Dosage"/>
         </map>
      </xsl:if>
          <!--eventHistory 0..* Reference--><xsl:if test="f:eventHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="eventHistory">
            <xsl:for-each select="f:eventHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationAdministration.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationAdministration.Dosage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--site 0..1 CodeableConcept--><xsl:if test="f:site">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="site">
            <xsl:apply-templates select="f:site" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--route 0..1 CodeableConcept--><xsl:if test="f:route">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="route">
            <xsl:apply-templates select="f:route" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--dose 0..1 Quantity--><xsl:if test="f:dose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dose">
            <xsl:apply-templates select="f:dose" mode="Quantity"/>
         </map>
      </xsl:if>
          
            
            <!--rateRatio 1..1 Ratio--><xsl:if test="f:rateRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateRatio">
            <xsl:apply-templates select="f:rateRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--rateQuantity 1..1 Quantity--><xsl:if test="f:rateQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateQuantity">
            <xsl:apply-templates select="f:rateQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationDispense">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicationDispense</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 code (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--statusReasonCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:statusReasonCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="statusReasonCodeableConcept">
            <xsl:apply-templates select="f:statusReasonCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--statusReasonReference 1..1 Reference--><xsl:if test="f:statusReasonReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReasonReference">
            <xsl:apply-templates select="f:statusReasonReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--context 0..1 Reference--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="Reference"/>
         </map>
      </xsl:if>
          <!--supportingInformation 0..* Reference--><xsl:if test="f:supportingInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
            <xsl:for-each select="f:supportingInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--performer 0..* MedicationDispense.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="MedicationDispense.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--authorizingPrescription 0..* Reference--><xsl:if test="f:authorizingPrescription">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="authorizingPrescription">
            <xsl:for-each select="f:authorizingPrescription">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--daysSupply 0..1 Quantity--><xsl:if test="f:daysSupply">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="daysSupply">
            <xsl:apply-templates select="f:daysSupply" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--whenPrepared 0..1 dateTime (json type: string)--><xsl:if test="f:whenPrepared">
         <xsl:if test="f:whenPrepared/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="whenPrepared">
               <xsl:value-of select="f:whenPrepared/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:whenPrepared[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_whenPrepared">
               <xsl:apply-templates select="f:whenPrepared" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--whenHandedOver 0..1 dateTime (json type: string)--><xsl:if test="f:whenHandedOver">
         <xsl:if test="f:whenHandedOver/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="whenHandedOver">
               <xsl:value-of select="f:whenHandedOver/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:whenHandedOver[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_whenHandedOver">
               <xsl:apply-templates select="f:whenHandedOver" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--destination 0..1 Reference--><xsl:if test="f:destination">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
            <xsl:apply-templates select="f:destination" mode="Reference"/>
         </map>
      </xsl:if>
          <!--receiver 0..* Reference--><xsl:if test="f:receiver">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="receiver">
            <xsl:for-each select="f:receiver">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dosageInstruction 0..* Dosage--><xsl:if test="f:dosageInstruction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosageInstruction">
            <xsl:for-each select="f:dosageInstruction">
               <map>
                  <xsl:apply-templates select="." mode="Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--substitution 0..1 MedicationDispense.Substitution--><xsl:if test="f:substitution">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substitution">
            <xsl:apply-templates select="f:substitution" mode="MedicationDispense.Substitution"/>
         </map>
      </xsl:if>
          <!--detectedIssue 0..* Reference--><xsl:if test="f:detectedIssue">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detectedIssue">
            <xsl:for-each select="f:detectedIssue">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--eventHistory 0..* Reference--><xsl:if test="f:eventHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="eventHistory">
            <xsl:for-each select="f:eventHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationDispense.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationDispense.Substitution">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--wasSubstituted 1..1 boolean (json type: boolean)--><xsl:if test="f:wasSubstituted">
         <xsl:if test="f:wasSubstituted/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="wasSubstituted">
               <xsl:value-of select="f:wasSubstituted/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:wasSubstituted[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_wasSubstituted">
               <xsl:apply-templates select="f:wasSubstituted" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reason 0..* CodeableConcept--><xsl:if test="f:reason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:for-each select="f:reason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--responsibleParty 0..* Reference--><xsl:if test="f:responsibleParty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="responsibleParty">
            <xsl:for-each select="f:responsibleParty">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicationKnowledge</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 code (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--manufacturer 0..1 Reference--><xsl:if test="f:manufacturer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:apply-templates select="f:manufacturer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--doseForm 0..1 CodeableConcept--><xsl:if test="f:doseForm">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="doseForm">
            <xsl:apply-templates select="f:doseForm" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Quantity--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--synonym 0..* string (json type: string)--><xsl:if test="f:synonym">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="synonym">
            <xsl:for-each select="f:synonym">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:synonym[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_synonym">
               <xsl:for-each select="f:synonym">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--relatedMedicationKnowledge 0..* MedicationKnowledge.RelatedMedicationKnowledge--><xsl:if test="f:relatedMedicationKnowledge">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="relatedMedicationKnowledge">
            <xsl:for-each select="f:relatedMedicationKnowledge">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.RelatedMedicationKnowledge"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--associatedMedication 0..* Reference--><xsl:if test="f:associatedMedication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="associatedMedication">
            <xsl:for-each select="f:associatedMedication">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--productType 0..* CodeableConcept--><xsl:if test="f:productType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="productType">
            <xsl:for-each select="f:productType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--monograph 0..* MedicationKnowledge.Monograph--><xsl:if test="f:monograph">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="monograph">
            <xsl:for-each select="f:monograph">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Monograph"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--ingredient 0..* MedicationKnowledge.Ingredient--><xsl:if test="f:ingredient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="ingredient">
            <xsl:for-each select="f:ingredient">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Ingredient"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--preparationInstruction 0..1 markdown (json type: string)--><xsl:if test="f:preparationInstruction">
         <xsl:if test="f:preparationInstruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preparationInstruction">
               <xsl:value-of select="f:preparationInstruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preparationInstruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_preparationInstruction">
               <xsl:apply-templates select="f:preparationInstruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intendedRoute 0..* CodeableConcept--><xsl:if test="f:intendedRoute">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="intendedRoute">
            <xsl:for-each select="f:intendedRoute">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--cost 0..* MedicationKnowledge.Cost--><xsl:if test="f:cost">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="cost">
            <xsl:for-each select="f:cost">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Cost"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--monitoringProgram 0..* MedicationKnowledge.MonitoringProgram--><xsl:if test="f:monitoringProgram">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="monitoringProgram">
            <xsl:for-each select="f:monitoringProgram">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.MonitoringProgram"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--administrationGuidelines 0..* MedicationKnowledge.AdministrationGuidelines--><xsl:if test="f:administrationGuidelines">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="administrationGuidelines">
            <xsl:for-each select="f:administrationGuidelines">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.AdministrationGuidelines"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--medicineClassification 0..* MedicationKnowledge.MedicineClassification--><xsl:if test="f:medicineClassification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="medicineClassification">
            <xsl:for-each select="f:medicineClassification">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.MedicineClassification"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--packaging 0..1 MedicationKnowledge.Packaging--><xsl:if test="f:packaging">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="packaging">
            <xsl:apply-templates select="f:packaging" mode="MedicationKnowledge.Packaging"/>
         </map>
      </xsl:if>
          <!--drugCharacteristic 0..* MedicationKnowledge.DrugCharacteristic--><xsl:if test="f:drugCharacteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="drugCharacteristic">
            <xsl:for-each select="f:drugCharacteristic">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.DrugCharacteristic"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contraindication 0..* Reference--><xsl:if test="f:contraindication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contraindication">
            <xsl:for-each select="f:contraindication">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--regulatory 0..* MedicationKnowledge.Regulatory--><xsl:if test="f:regulatory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="regulatory">
            <xsl:for-each select="f:regulatory">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Regulatory"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--kinetics 0..* MedicationKnowledge.Kinetics--><xsl:if test="f:kinetics">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="kinetics">
            <xsl:for-each select="f:kinetics">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Kinetics"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.RelatedMedicationKnowledge">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reference 1..* Reference--><xsl:if test="f:reference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reference">
            <xsl:for-each select="f:reference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Monograph">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Ingredient">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--itemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--itemReference 1..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--isActive 0..1 boolean (json type: boolean)--><xsl:if test="f:isActive">
         <xsl:if test="f:isActive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isActive">
               <xsl:value-of select="f:isActive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isActive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isActive">
               <xsl:apply-templates select="f:isActive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--strength 0..1 Ratio--><xsl:if test="f:strength">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
            <xsl:apply-templates select="f:strength" mode="Ratio"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Cost">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..1 string (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cost 1..1 Money--><xsl:if test="f:cost">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="cost">
            <xsl:apply-templates select="f:cost" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.MonitoringProgram">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.AdministrationGuidelines">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--dosage 0..* MedicationKnowledge.Dosage--><xsl:if test="f:dosage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosage">
            <xsl:for-each select="f:dosage">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--indicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:indicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="indicationCodeableConcept">
            <xsl:apply-templates select="f:indicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--indicationReference 1..1 Reference--><xsl:if test="f:indicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="indicationReference">
            <xsl:apply-templates select="f:indicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--patientCharacteristics 0..* MedicationKnowledge.PatientCharacteristics--><xsl:if test="f:patientCharacteristics">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="patientCharacteristics">
            <xsl:for-each select="f:patientCharacteristics">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.PatientCharacteristics"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Dosage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--dosage 1..* Dosage--><xsl:if test="f:dosage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosage">
            <xsl:for-each select="f:dosage">
               <map>
                  <xsl:apply-templates select="." mode="Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.PatientCharacteristics">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--characteristicCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:characteristicCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="characteristicCodeableConcept">
            <xsl:apply-templates select="f:characteristicCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--characteristicQuantity 1..1 Quantity--><xsl:if test="f:characteristicQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="characteristicQuantity">
            <xsl:apply-templates select="f:characteristicQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
          <!--value 0..* string (json type: string)--><xsl:if test="f:value">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:for-each select="f:value">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:value[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:for-each select="f:value">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.MedicineClassification">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--classification 0..* CodeableConcept--><xsl:if test="f:classification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:for-each select="f:classification">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Packaging">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.DrugCharacteristic">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Regulatory">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--regulatoryAuthority 1..1 Reference--><xsl:if test="f:regulatoryAuthority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="regulatoryAuthority">
            <xsl:apply-templates select="f:regulatoryAuthority" mode="Reference"/>
         </map>
      </xsl:if>
          <!--substitution 0..* MedicationKnowledge.Substitution--><xsl:if test="f:substitution">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="substitution">
            <xsl:for-each select="f:substitution">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Substitution"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--schedule 0..* MedicationKnowledge.Schedule--><xsl:if test="f:schedule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:for-each select="f:schedule">
               <map>
                  <xsl:apply-templates select="." mode="MedicationKnowledge.Schedule"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--maxDispense 0..1 MedicationKnowledge.MaxDispense--><xsl:if test="f:maxDispense">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxDispense">
            <xsl:apply-templates select="f:maxDispense" mode="MedicationKnowledge.MaxDispense"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Substitution">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--allowed 1..1 boolean (json type: boolean)--><xsl:if test="f:allowed">
         <xsl:if test="f:allowed/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allowed">
               <xsl:value-of select="f:allowed/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allowed[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowed">
               <xsl:apply-templates select="f:allowed" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Schedule">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--schedule 1..1 CodeableConcept--><xsl:if test="f:schedule">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:apply-templates select="f:schedule" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.MaxDispense">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--quantity 1..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--period 0..1 Duration--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Duration"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Information about a medication that is used to support knowledge.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationKnowledge.Kinetics">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--areaUnderCurve 0..* Quantity--><xsl:if test="f:areaUnderCurve">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="areaUnderCurve">
            <xsl:for-each select="f:areaUnderCurve">
               <map>
                  <xsl:apply-templates select="." mode="Quantity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--lethalDose50 0..* Quantity--><xsl:if test="f:lethalDose50">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="lethalDose50">
            <xsl:for-each select="f:lethalDose50">
               <map>
                  <xsl:apply-templates select="." mode="Quantity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--halfLifePeriod 0..1 Duration--><xsl:if test="f:halfLifePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="halfLifePeriod">
            <xsl:apply-templates select="f:halfLifePeriod" mode="Duration"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicationRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 medicationrequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intent 1..1 medicationRequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--reportedBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:reportedBoolean">
         <xsl:if test="f:reportedBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="reportedBoolean">
               <xsl:value-of select="f:reportedBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:reportedBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reportedBoolean">
               <xsl:apply-templates select="f:reportedBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--reportedReference 1..1 Reference--><xsl:if test="f:reportedReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reportedReference">
            <xsl:apply-templates select="f:reportedReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--supportingInformation 0..* Reference--><xsl:if test="f:supportingInformation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
            <xsl:for-each select="f:supportingInformation">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performerType 0..1 CodeableConcept--><xsl:if test="f:performerType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performerType">
            <xsl:apply-templates select="f:performerType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--recorder 0..1 Reference--><xsl:if test="f:recorder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recorder">
            <xsl:apply-templates select="f:recorder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--groupIdentifier 0..1 Identifier--><xsl:if test="f:groupIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="groupIdentifier">
            <xsl:apply-templates select="f:groupIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--courseOfTherapyType 0..1 CodeableConcept--><xsl:if test="f:courseOfTherapyType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="courseOfTherapyType">
            <xsl:apply-templates select="f:courseOfTherapyType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--insurance 0..* Reference--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dosageInstruction 0..* Dosage--><xsl:if test="f:dosageInstruction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosageInstruction">
            <xsl:for-each select="f:dosageInstruction">
               <map>
                  <xsl:apply-templates select="." mode="Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dispenseRequest 0..1 MedicationRequest.DispenseRequest--><xsl:if test="f:dispenseRequest">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dispenseRequest">
            <xsl:apply-templates select="f:dispenseRequest" mode="MedicationRequest.DispenseRequest"/>
         </map>
      </xsl:if>
          <!--substitution 0..1 MedicationRequest.Substitution--><xsl:if test="f:substitution">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substitution">
            <xsl:apply-templates select="f:substitution" mode="MedicationRequest.Substitution"/>
         </map>
      </xsl:if>
          <!--priorPrescription 0..1 Reference--><xsl:if test="f:priorPrescription">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priorPrescription">
            <xsl:apply-templates select="f:priorPrescription" mode="Reference"/>
         </map>
      </xsl:if>
          <!--detectedIssue 0..* Reference--><xsl:if test="f:detectedIssue">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detectedIssue">
            <xsl:for-each select="f:detectedIssue">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--eventHistory 0..* Reference--><xsl:if test="f:eventHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="eventHistory">
            <xsl:for-each select="f:eventHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationRequest.DispenseRequest">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--initialFill 0..1 MedicationRequest.InitialFill--><xsl:if test="f:initialFill">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="initialFill">
            <xsl:apply-templates select="f:initialFill" mode="MedicationRequest.InitialFill"/>
         </map>
      </xsl:if>
          <!--dispenseInterval 0..1 Duration--><xsl:if test="f:dispenseInterval">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dispenseInterval">
            <xsl:apply-templates select="f:dispenseInterval" mode="Duration"/>
         </map>
      </xsl:if>
          <!--validityPeriod 0..1 Period--><xsl:if test="f:validityPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validityPeriod">
            <xsl:apply-templates select="f:validityPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--numberOfRepeatsAllowed 0..1 unsignedInt (json type: number)--><xsl:if test="f:numberOfRepeatsAllowed">
         <xsl:if test="f:numberOfRepeatsAllowed/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfRepeatsAllowed">
               <xsl:value-of select="f:numberOfRepeatsAllowed/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfRepeatsAllowed[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_numberOfRepeatsAllowed">
               <xsl:apply-templates select="f:numberOfRepeatsAllowed" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--expectedSupplyDuration 0..1 Duration--><xsl:if test="f:expectedSupplyDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expectedSupplyDuration">
            <xsl:apply-templates select="f:expectedSupplyDuration" mode="Duration"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationRequest.InitialFill">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--duration 0..1 Duration--><xsl:if test="f:duration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
            <xsl:apply-templates select="f:duration" mode="Duration"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationRequest.Substitution">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--allowedBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:allowedBoolean">
         <xsl:if test="f:allowedBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allowedBoolean">
               <xsl:value-of select="f:allowedBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allowedBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allowedBoolean">
               <xsl:apply-templates select="f:allowedBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--allowedCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:allowedCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="allowedCodeableConcept">
            <xsl:apply-templates select="f:allowedCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--reason 0..1 CodeableConcept--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A coded concept specifying the state of the prescribing event. Describes the lifecycle of the prescription.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="medicationrequestStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The kind of medication order.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="medicationRequestIntent">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicationStatement">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicationStatement</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 MedicationStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..* CodeableConcept--><xsl:if test="f:statusReason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:for-each select="f:statusReason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--context 0..1 Reference--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--effectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:effectiveDateTime">
         <xsl:if test="f:effectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDateTime">
               <xsl:value-of select="f:effectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDateTime">
               <xsl:apply-templates select="f:effectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--effectivePeriod 1..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--dateAsserted 0..1 dateTime (json type: string)--><xsl:if test="f:dateAsserted">
         <xsl:if test="f:dateAsserted/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dateAsserted">
               <xsl:value-of select="f:dateAsserted/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateAsserted[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dateAsserted">
               <xsl:apply-templates select="f:dateAsserted" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--informationSource 0..1 Reference--><xsl:if test="f:informationSource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="informationSource">
            <xsl:apply-templates select="f:informationSource" mode="Reference"/>
         </map>
      </xsl:if>
          <!--derivedFrom 0..* Reference--><xsl:if test="f:derivedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dosage 0..* Dosage--><xsl:if test="f:dosage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dosage">
            <xsl:for-each select="f:dosage">
               <map>
                  <xsl:apply-templates select="." mode="Dosage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProduct</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--domain 0..1 Coding--><xsl:if test="f:domain">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="domain">
            <xsl:apply-templates select="f:domain" mode="Coding"/>
         </map>
      </xsl:if>
          <!--combinedPharmaceuticalDoseForm 0..1 CodeableConcept--><xsl:if test="f:combinedPharmaceuticalDoseForm">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="combinedPharmaceuticalDoseForm">
            <xsl:apply-templates select="f:combinedPharmaceuticalDoseForm" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--legalStatusOfSupply 0..1 CodeableConcept--><xsl:if test="f:legalStatusOfSupply">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="legalStatusOfSupply">
            <xsl:apply-templates select="f:legalStatusOfSupply" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--additionalMonitoringIndicator 0..1 CodeableConcept--><xsl:if test="f:additionalMonitoringIndicator">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="additionalMonitoringIndicator">
            <xsl:apply-templates select="f:additionalMonitoringIndicator" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--specialMeasures 0..* string (json type: string)--><xsl:if test="f:specialMeasures">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialMeasures">
            <xsl:for-each select="f:specialMeasures">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:specialMeasures[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_specialMeasures">
               <xsl:for-each select="f:specialMeasures">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--paediatricUseIndicator 0..1 CodeableConcept--><xsl:if test="f:paediatricUseIndicator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="paediatricUseIndicator">
            <xsl:apply-templates select="f:paediatricUseIndicator" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productClassification 0..* CodeableConcept--><xsl:if test="f:productClassification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="productClassification">
            <xsl:for-each select="f:productClassification">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--marketingStatus 0..* MarketingStatus--><xsl:if test="f:marketingStatus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="marketingStatus">
            <xsl:for-each select="f:marketingStatus">
               <map>
                  <xsl:apply-templates select="." mode="MarketingStatus"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--pharmaceuticalProduct 0..* Reference--><xsl:if test="f:pharmaceuticalProduct">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="pharmaceuticalProduct">
            <xsl:for-each select="f:pharmaceuticalProduct">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--packagedMedicinalProduct 0..* Reference--><xsl:if test="f:packagedMedicinalProduct">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="packagedMedicinalProduct">
            <xsl:for-each select="f:packagedMedicinalProduct">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--attachedDocument 0..* Reference--><xsl:if test="f:attachedDocument">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="attachedDocument">
            <xsl:for-each select="f:attachedDocument">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--masterFile 0..* Reference--><xsl:if test="f:masterFile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="masterFile">
            <xsl:for-each select="f:masterFile">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contact 0..* Reference--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--clinicalTrial 0..* Reference--><xsl:if test="f:clinicalTrial">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="clinicalTrial">
            <xsl:for-each select="f:clinicalTrial">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 1..* MedicinalProduct.Name--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProduct.Name"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--crossReference 0..* Identifier--><xsl:if test="f:crossReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="crossReference">
            <xsl:for-each select="f:crossReference">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--manufacturingBusinessOperation 0..* MedicinalProduct.ManufacturingBusinessOperation--><xsl:if test="f:manufacturingBusinessOperation">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="manufacturingBusinessOperation">
            <xsl:for-each select="f:manufacturingBusinessOperation">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProduct.ManufacturingBusinessOperation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialDesignation 0..* MedicinalProduct.SpecialDesignation--><xsl:if test="f:specialDesignation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialDesignation">
            <xsl:for-each select="f:specialDesignation">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProduct.SpecialDesignation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct.Name">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--productName 1..1 string (json type: string)--><xsl:if test="f:productName">
         <xsl:if test="f:productName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="productName">
               <xsl:value-of select="f:productName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:productName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_productName">
               <xsl:apply-templates select="f:productName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--namePart 0..* MedicinalProduct.NamePart--><xsl:if test="f:namePart">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="namePart">
            <xsl:for-each select="f:namePart">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProduct.NamePart"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--countryLanguage 0..* MedicinalProduct.CountryLanguage--><xsl:if test="f:countryLanguage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="countryLanguage">
            <xsl:for-each select="f:countryLanguage">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProduct.CountryLanguage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct.NamePart">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--part 1..1 string (json type: string)--><xsl:if test="f:part">
         <xsl:if test="f:part/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="part">
               <xsl:value-of select="f:part/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:part[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_part">
               <xsl:apply-templates select="f:part" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 Coding--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="Coding"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct.CountryLanguage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--country 1..1 CodeableConcept--><xsl:if test="f:country">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:apply-templates select="f:country" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--jurisdiction 0..1 CodeableConcept--><xsl:if test="f:jurisdiction">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:apply-templates select="f:jurisdiction" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--language 1..1 CodeableConcept--><xsl:if test="f:language">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:apply-templates select="f:language" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct.ManufacturingBusinessOperation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operationType 0..1 CodeableConcept--><xsl:if test="f:operationType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operationType">
            <xsl:apply-templates select="f:operationType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--authorisationReferenceNumber 0..1 Identifier--><xsl:if test="f:authorisationReferenceNumber">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="authorisationReferenceNumber">
            <xsl:apply-templates select="f:authorisationReferenceNumber" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--effectiveDate 0..1 dateTime (json type: string)--><xsl:if test="f:effectiveDate">
         <xsl:if test="f:effectiveDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDate">
               <xsl:value-of select="f:effectiveDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDate">
               <xsl:apply-templates select="f:effectiveDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--confidentialityIndicator 0..1 CodeableConcept--><xsl:if test="f:confidentialityIndicator">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="confidentialityIndicator">
            <xsl:apply-templates select="f:confidentialityIndicator" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--manufacturer 0..* Reference--><xsl:if test="f:manufacturer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:for-each select="f:manufacturer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--regulator 0..1 Reference--><xsl:if test="f:regulator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="regulator">
            <xsl:apply-templates select="f:regulator" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProduct.SpecialDesignation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intendedUse 0..1 CodeableConcept--><xsl:if test="f:intendedUse">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="intendedUse">
            <xsl:apply-templates select="f:intendedUse" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--indicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:indicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="indicationCodeableConcept">
            <xsl:apply-templates select="f:indicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--indicationReference 1..1 Reference--><xsl:if test="f:indicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="indicationReference">
            <xsl:apply-templates select="f:indicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--species 0..1 CodeableConcept--><xsl:if test="f:species">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="species">
            <xsl:apply-templates select="f:species" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The regulatory authorization of a medicinal product.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductAuthorization">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductAuthorization</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--country 0..* CodeableConcept--><xsl:if test="f:country">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:for-each select="f:country">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--statusDate 0..1 dateTime (json type: string)--><xsl:if test="f:statusDate">
         <xsl:if test="f:statusDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="statusDate">
               <xsl:value-of select="f:statusDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:statusDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_statusDate">
               <xsl:apply-templates select="f:statusDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--restoreDate 0..1 dateTime (json type: string)--><xsl:if test="f:restoreDate">
         <xsl:if test="f:restoreDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="restoreDate">
               <xsl:value-of select="f:restoreDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:restoreDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_restoreDate">
               <xsl:apply-templates select="f:restoreDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validityPeriod 0..1 Period--><xsl:if test="f:validityPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validityPeriod">
            <xsl:apply-templates select="f:validityPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--dataExclusivityPeriod 0..1 Period--><xsl:if test="f:dataExclusivityPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dataExclusivityPeriod">
            <xsl:apply-templates select="f:dataExclusivityPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--dateOfFirstAuthorization 0..1 dateTime (json type: string)--><xsl:if test="f:dateOfFirstAuthorization">
         <xsl:if test="f:dateOfFirstAuthorization/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="dateOfFirstAuthorization">
               <xsl:value-of select="f:dateOfFirstAuthorization/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateOfFirstAuthorization[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_dateOfFirstAuthorization">
               <xsl:apply-templates select="f:dateOfFirstAuthorization" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--internationalBirthDate 0..1 dateTime (json type: string)--><xsl:if test="f:internationalBirthDate">
         <xsl:if test="f:internationalBirthDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="internationalBirthDate">
               <xsl:value-of select="f:internationalBirthDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:internationalBirthDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_internationalBirthDate">
               <xsl:apply-templates select="f:internationalBirthDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--legalBasis 0..1 CodeableConcept--><xsl:if test="f:legalBasis">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="legalBasis">
            <xsl:apply-templates select="f:legalBasis" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--jurisdictionalAuthorization 0..* MedicinalProductAuthorization.JurisdictionalAuthorization--><xsl:if test="f:jurisdictionalAuthorization">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="jurisdictionalAuthorization">
            <xsl:for-each select="f:jurisdictionalAuthorization">
               <map>
                  <xsl:apply-templates select="."
                                       mode="MedicinalProductAuthorization.JurisdictionalAuthorization"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--holder 0..1 Reference--><xsl:if test="f:holder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="holder">
            <xsl:apply-templates select="f:holder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--regulator 0..1 Reference--><xsl:if test="f:regulator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="regulator">
            <xsl:apply-templates select="f:regulator" mode="Reference"/>
         </map>
      </xsl:if>
          <!--procedure 0..1 MedicinalProductAuthorization.Procedure--><xsl:if test="f:procedure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedure">
            <xsl:apply-templates select="f:procedure" mode="MedicinalProductAuthorization.Procedure"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The regulatory authorization of a medicinal product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*"
                 mode="MedicinalProductAuthorization.JurisdictionalAuthorization">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--country 0..1 CodeableConcept--><xsl:if test="f:country">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:apply-templates select="f:country" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--legalStatusOfSupply 0..1 CodeableConcept--><xsl:if test="f:legalStatusOfSupply">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="legalStatusOfSupply">
            <xsl:apply-templates select="f:legalStatusOfSupply" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--validityPeriod 0..1 Period--><xsl:if test="f:validityPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validityPeriod">
            <xsl:apply-templates select="f:validityPeriod" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The regulatory authorization of a medicinal product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductAuthorization.Procedure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--datePeriod 1..1 Period--><xsl:if test="f:datePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="datePeriod">
            <xsl:apply-templates select="f:datePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--dateDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:dateDateTime">
         <xsl:if test="f:dateDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dateDateTime">
               <xsl:value-of select="f:dateDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dateDateTime">
               <xsl:apply-templates select="f:dateDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--application 0..* MedicinalProductAuthorization.Procedure--><xsl:if test="f:application">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="application">
            <xsl:for-each select="f:application">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductAuthorization.Procedure"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductContraindication">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductContraindication</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--disease 0..1 CodeableConcept--><xsl:if test="f:disease">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="disease">
            <xsl:apply-templates select="f:disease" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--diseaseStatus 0..1 CodeableConcept--><xsl:if test="f:diseaseStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="diseaseStatus">
            <xsl:apply-templates select="f:diseaseStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--comorbidity 0..* CodeableConcept--><xsl:if test="f:comorbidity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="comorbidity">
            <xsl:for-each select="f:comorbidity">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--therapeuticIndication 0..* Reference--><xsl:if test="f:therapeuticIndication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="therapeuticIndication">
            <xsl:for-each select="f:therapeuticIndication">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--otherTherapy 0..* MedicinalProductContraindication.OtherTherapy--><xsl:if test="f:otherTherapy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="otherTherapy">
            <xsl:for-each select="f:otherTherapy">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductContraindication.OtherTherapy"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--population 0..* Population--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="Population"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductContraindication.OtherTherapy">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--therapyRelationshipType 1..1 CodeableConcept--><xsl:if test="f:therapyRelationshipType">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="therapyRelationshipType">
            <xsl:apply-templates select="f:therapyRelationshipType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indication for the Medicinal Product.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIndication">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductIndication</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--diseaseSymptomProcedure 0..1 CodeableConcept--><xsl:if test="f:diseaseSymptomProcedure">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="diseaseSymptomProcedure">
            <xsl:apply-templates select="f:diseaseSymptomProcedure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--diseaseStatus 0..1 CodeableConcept--><xsl:if test="f:diseaseStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="diseaseStatus">
            <xsl:apply-templates select="f:diseaseStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--comorbidity 0..* CodeableConcept--><xsl:if test="f:comorbidity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="comorbidity">
            <xsl:for-each select="f:comorbidity">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--intendedEffect 0..1 CodeableConcept--><xsl:if test="f:intendedEffect">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="intendedEffect">
            <xsl:apply-templates select="f:intendedEffect" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--duration 0..1 Quantity--><xsl:if test="f:duration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
            <xsl:apply-templates select="f:duration" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--otherTherapy 0..* MedicinalProductIndication.OtherTherapy--><xsl:if test="f:otherTherapy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="otherTherapy">
            <xsl:for-each select="f:otherTherapy">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductIndication.OtherTherapy"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--undesirableEffect 0..* Reference--><xsl:if test="f:undesirableEffect">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="undesirableEffect">
            <xsl:for-each select="f:undesirableEffect">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--population 0..* Population--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="Population"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indication for the Medicinal Product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIndication.OtherTherapy">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--therapyRelationshipType 1..1 CodeableConcept--><xsl:if test="f:therapyRelationshipType">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="therapyRelationshipType">
            <xsl:apply-templates select="f:therapyRelationshipType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--medicationCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:medicationCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="medicationCodeableConcept">
            <xsl:apply-templates select="f:medicationCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--medicationReference 1..1 Reference--><xsl:if test="f:medicationReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="medicationReference">
            <xsl:apply-templates select="f:medicationReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An ingredient of a manufactured item or pharmaceutical product.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIngredient">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductIngredient</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--role 1..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--allergenicIndicator 0..1 boolean (json type: boolean)--><xsl:if test="f:allergenicIndicator">
         <xsl:if test="f:allergenicIndicator/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allergenicIndicator">
               <xsl:value-of select="f:allergenicIndicator/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allergenicIndicator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allergenicIndicator">
               <xsl:apply-templates select="f:allergenicIndicator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--manufacturer 0..* Reference--><xsl:if test="f:manufacturer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:for-each select="f:manufacturer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specifiedSubstance 0..* MedicinalProductIngredient.SpecifiedSubstance--><xsl:if test="f:specifiedSubstance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specifiedSubstance">
            <xsl:for-each select="f:specifiedSubstance">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductIngredient.SpecifiedSubstance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--substance 0..1 MedicinalProductIngredient.Substance--><xsl:if test="f:substance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substance">
            <xsl:apply-templates select="f:substance" mode="MedicinalProductIngredient.Substance"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An ingredient of a manufactured item or pharmaceutical product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIngredient.SpecifiedSubstance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--group 1..1 CodeableConcept--><xsl:if test="f:group">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:apply-templates select="f:group" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--confidentiality 0..1 CodeableConcept--><xsl:if test="f:confidentiality">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="confidentiality">
            <xsl:apply-templates select="f:confidentiality" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--strength 0..* MedicinalProductIngredient.Strength--><xsl:if test="f:strength">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
            <xsl:for-each select="f:strength">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductIngredient.Strength"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An ingredient of a manufactured item or pharmaceutical product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIngredient.Strength">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--presentation 1..1 Ratio--><xsl:if test="f:presentation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="presentation">
            <xsl:apply-templates select="f:presentation" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--presentationLowLimit 0..1 Ratio--><xsl:if test="f:presentationLowLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="presentationLowLimit">
            <xsl:apply-templates select="f:presentationLowLimit" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--concentration 0..1 Ratio--><xsl:if test="f:concentration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="concentration">
            <xsl:apply-templates select="f:concentration" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--concentrationLowLimit 0..1 Ratio--><xsl:if test="f:concentrationLowLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="concentrationLowLimit">
            <xsl:apply-templates select="f:concentrationLowLimit" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--measurementPoint 0..1 string (json type: string)--><xsl:if test="f:measurementPoint">
         <xsl:if test="f:measurementPoint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="measurementPoint">
               <xsl:value-of select="f:measurementPoint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:measurementPoint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_measurementPoint">
               <xsl:apply-templates select="f:measurementPoint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--country 0..* CodeableConcept--><xsl:if test="f:country">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:for-each select="f:country">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referenceStrength 0..* MedicinalProductIngredient.ReferenceStrength--><xsl:if test="f:referenceStrength">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referenceStrength">
            <xsl:for-each select="f:referenceStrength">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductIngredient.ReferenceStrength"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An ingredient of a manufactured item or pharmaceutical product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIngredient.ReferenceStrength">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--substance 0..1 CodeableConcept--><xsl:if test="f:substance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substance">
            <xsl:apply-templates select="f:substance" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--strength 1..1 Ratio--><xsl:if test="f:strength">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
            <xsl:apply-templates select="f:strength" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--strengthLowLimit 0..1 Ratio--><xsl:if test="f:strengthLowLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="strengthLowLimit">
            <xsl:apply-templates select="f:strengthLowLimit" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--measurementPoint 0..1 string (json type: string)--><xsl:if test="f:measurementPoint">
         <xsl:if test="f:measurementPoint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="measurementPoint">
               <xsl:value-of select="f:measurementPoint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:measurementPoint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_measurementPoint">
               <xsl:apply-templates select="f:measurementPoint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--country 0..* CodeableConcept--><xsl:if test="f:country">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="country">
            <xsl:for-each select="f:country">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An ingredient of a manufactured item or pharmaceutical product.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductIngredient.Substance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--strength 0..* MedicinalProductIngredient.Strength--><xsl:if test="f:strength">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
            <xsl:for-each select="f:strength">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductIngredient.Strength"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The interactions of the medicinal product with other medicinal products, or other forms of interactions.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductInteraction">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductInteraction</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--interactant 0..* MedicinalProductInteraction.Interactant--><xsl:if test="f:interactant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interactant">
            <xsl:for-each select="f:interactant">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductInteraction.Interactant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--effect 0..1 CodeableConcept--><xsl:if test="f:effect">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effect">
            <xsl:apply-templates select="f:effect" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--incidence 0..1 CodeableConcept--><xsl:if test="f:incidence">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="incidence">
            <xsl:apply-templates select="f:incidence" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--management 0..1 CodeableConcept--><xsl:if test="f:management">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="management">
            <xsl:apply-templates select="f:management" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The interactions of the medicinal product with other medicinal products, or other forms of interactions.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductInteraction.Interactant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--itemReference 1..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--itemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The manufactured item as contained in the packaged medicinal product.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductManufactured">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductManufactured</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--manufacturedDoseForm 1..1 CodeableConcept--><xsl:if test="f:manufacturedDoseForm">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturedDoseForm">
            <xsl:apply-templates select="f:manufacturedDoseForm" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unitOfPresentation 0..1 CodeableConcept--><xsl:if test="f:unitOfPresentation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitOfPresentation">
            <xsl:apply-templates select="f:unitOfPresentation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--quantity 1..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--manufacturer 0..* Reference--><xsl:if test="f:manufacturer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:for-each select="f:manufacturer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--ingredient 0..* Reference--><xsl:if test="f:ingredient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="ingredient">
            <xsl:for-each select="f:ingredient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--physicalCharacteristics 0..1 ProdCharacteristic--><xsl:if test="f:physicalCharacteristics">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="physicalCharacteristics">
            <xsl:apply-templates select="f:physicalCharacteristics" mode="ProdCharacteristic"/>
         </map>
      </xsl:if>
          <!--otherCharacteristics 0..* CodeableConcept--><xsl:if test="f:otherCharacteristics">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="otherCharacteristics">
            <xsl:for-each select="f:otherCharacteristics">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A medicinal product in a container or package.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPackaged">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductPackaged</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--legalStatusOfSupply 0..1 CodeableConcept--><xsl:if test="f:legalStatusOfSupply">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="legalStatusOfSupply">
            <xsl:apply-templates select="f:legalStatusOfSupply" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--marketingStatus 0..* MarketingStatus--><xsl:if test="f:marketingStatus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="marketingStatus">
            <xsl:for-each select="f:marketingStatus">
               <map>
                  <xsl:apply-templates select="." mode="MarketingStatus"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--marketingAuthorization 0..1 Reference--><xsl:if test="f:marketingAuthorization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="marketingAuthorization">
            <xsl:apply-templates select="f:marketingAuthorization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--manufacturer 0..* Reference--><xsl:if test="f:manufacturer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:for-each select="f:manufacturer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--batchIdentifier 0..* MedicinalProductPackaged.BatchIdentifier--><xsl:if test="f:batchIdentifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="batchIdentifier">
            <xsl:for-each select="f:batchIdentifier">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPackaged.BatchIdentifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--packageItem 1..* MedicinalProductPackaged.PackageItem--><xsl:if test="f:packageItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="packageItem">
            <xsl:for-each select="f:packageItem">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPackaged.PackageItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A medicinal product in a container or package.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPackaged.BatchIdentifier">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--outerPackaging 1..1 Identifier--><xsl:if test="f:outerPackaging">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outerPackaging">
            <xsl:apply-templates select="f:outerPackaging" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--immediatePackaging 0..1 Identifier--><xsl:if test="f:immediatePackaging">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="immediatePackaging">
            <xsl:apply-templates select="f:immediatePackaging" mode="Identifier"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A medicinal product in a container or package.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPackaged.PackageItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--quantity 1..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--material 0..* CodeableConcept--><xsl:if test="f:material">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="material">
            <xsl:for-each select="f:material">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--alternateMaterial 0..* CodeableConcept--><xsl:if test="f:alternateMaterial">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alternateMaterial">
            <xsl:for-each select="f:alternateMaterial">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--device 0..* Reference--><xsl:if test="f:device">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:for-each select="f:device">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--manufacturedItem 0..* Reference--><xsl:if test="f:manufacturedItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturedItem">
            <xsl:for-each select="f:manufacturedItem">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--packageItem 0..* MedicinalProductPackaged.PackageItem--><xsl:if test="f:packageItem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="packageItem">
            <xsl:for-each select="f:packageItem">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPackaged.PackageItem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--physicalCharacteristics 0..1 ProdCharacteristic--><xsl:if test="f:physicalCharacteristics">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="physicalCharacteristics">
            <xsl:apply-templates select="f:physicalCharacteristics" mode="ProdCharacteristic"/>
         </map>
      </xsl:if>
          <!--otherCharacteristics 0..* CodeableConcept--><xsl:if test="f:otherCharacteristics">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="otherCharacteristics">
            <xsl:for-each select="f:otherCharacteristics">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--shelfLifeStorage 0..* ProductShelfLife--><xsl:if test="f:shelfLifeStorage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="shelfLifeStorage">
            <xsl:for-each select="f:shelfLifeStorage">
               <map>
                  <xsl:apply-templates select="." mode="ProductShelfLife"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--manufacturer 0..* Reference--><xsl:if test="f:manufacturer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="manufacturer">
            <xsl:for-each select="f:manufacturer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A pharmaceutical product described in terms of its composition and dose form.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPharmaceutical">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductPharmaceutical</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--administrableDoseForm 1..1 CodeableConcept--><xsl:if test="f:administrableDoseForm">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="administrableDoseForm">
            <xsl:apply-templates select="f:administrableDoseForm" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unitOfPresentation 0..1 CodeableConcept--><xsl:if test="f:unitOfPresentation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitOfPresentation">
            <xsl:apply-templates select="f:unitOfPresentation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--ingredient 0..* Reference--><xsl:if test="f:ingredient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="ingredient">
            <xsl:for-each select="f:ingredient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--device 0..* Reference--><xsl:if test="f:device">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:for-each select="f:device">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--characteristics 0..* MedicinalProductPharmaceutical.Characteristics--><xsl:if test="f:characteristics">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="characteristics">
            <xsl:for-each select="f:characteristics">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPharmaceutical.Characteristics"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--routeOfAdministration 1..* MedicinalProductPharmaceutical.RouteOfAdministration--><xsl:if test="f:routeOfAdministration">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="routeOfAdministration">
            <xsl:for-each select="f:routeOfAdministration">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPharmaceutical.RouteOfAdministration"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A pharmaceutical product described in terms of its composition and dose form.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPharmaceutical.Characteristics">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A pharmaceutical product described in terms of its composition and dose form.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPharmaceutical.RouteOfAdministration">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--firstDose 0..1 Quantity--><xsl:if test="f:firstDose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="firstDose">
            <xsl:apply-templates select="f:firstDose" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--maxSingleDose 0..1 Quantity--><xsl:if test="f:maxSingleDose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxSingleDose">
            <xsl:apply-templates select="f:maxSingleDose" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--maxDosePerDay 0..1 Quantity--><xsl:if test="f:maxDosePerDay">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxDosePerDay">
            <xsl:apply-templates select="f:maxDosePerDay" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--maxDosePerTreatmentPeriod 0..1 Ratio--><xsl:if test="f:maxDosePerTreatmentPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="maxDosePerTreatmentPeriod">
            <xsl:apply-templates select="f:maxDosePerTreatmentPeriod" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--maxTreatmentPeriod 0..1 Duration--><xsl:if test="f:maxTreatmentPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxTreatmentPeriod">
            <xsl:apply-templates select="f:maxTreatmentPeriod" mode="Duration"/>
         </map>
      </xsl:if>
          <!--targetSpecies 0..* MedicinalProductPharmaceutical.TargetSpecies--><xsl:if test="f:targetSpecies">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="targetSpecies">
            <xsl:for-each select="f:targetSpecies">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPharmaceutical.TargetSpecies"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A pharmaceutical product described in terms of its composition and dose form.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPharmaceutical.TargetSpecies">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--withdrawalPeriod 0..* MedicinalProductPharmaceutical.WithdrawalPeriod--><xsl:if test="f:withdrawalPeriod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="withdrawalPeriod">
            <xsl:for-each select="f:withdrawalPeriod">
               <map>
                  <xsl:apply-templates select="." mode="MedicinalProductPharmaceutical.WithdrawalPeriod"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A pharmaceutical product described in terms of its composition and dose form.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductPharmaceutical.WithdrawalPeriod">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--tissue 1..1 CodeableConcept--><xsl:if test="f:tissue">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="tissue">
            <xsl:apply-templates select="f:tissue" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 1..1 Quantity--><xsl:if test="f:value">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:apply-templates select="f:value" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--supportingInformation 0..1 string (json type: string)--><xsl:if test="f:supportingInformation">
         <xsl:if test="f:supportingInformation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInformation">
               <xsl:value-of select="f:supportingInformation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:supportingInformation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_supportingInformation">
               <xsl:apply-templates select="f:supportingInformation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describe the undesirable effects of the medicinal product.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MedicinalProductUndesirableEffect">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MedicinalProductUndesirableEffect</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--subject 0..* Reference--><xsl:if test="f:subject">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:for-each select="f:subject">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--symptomConditionEffect 0..1 CodeableConcept--><xsl:if test="f:symptomConditionEffect">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="symptomConditionEffect">
            <xsl:apply-templates select="f:symptomConditionEffect" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--classification 0..1 CodeableConcept--><xsl:if test="f:classification">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:apply-templates select="f:classification" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--frequencyOfOccurrence 0..1 CodeableConcept--><xsl:if test="f:frequencyOfOccurrence">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="frequencyOfOccurrence">
            <xsl:apply-templates select="f:frequencyOfOccurrence" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--population 0..* Population--><xsl:if test="f:population">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:for-each select="f:population">
               <map>
                  <xsl:apply-templates select="." mode="Population"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MessageDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--replaces 0..* canonical (json type: string)--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:replaces[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_replaces">
               <xsl:for-each select="f:replaces">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--base 0..1 canonical (json type: string)--><xsl:if test="f:base">
         <xsl:if test="f:base/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="base">
               <xsl:value-of select="f:base/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:base[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_base">
               <xsl:apply-templates select="f:base" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parent 0..* canonical (json type: string)--><xsl:if test="f:parent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:for-each select="f:parent">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:parent[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_parent">
               <xsl:for-each select="f:parent">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          
            
            <!--eventCoding 1..1 Coding--><xsl:if test="f:eventCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="eventCoding">
            <xsl:apply-templates select="f:eventCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--eventUri 1..1 uri (json type: string)--><xsl:if test="f:eventUri">
         <xsl:if test="f:eventUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="eventUri">
               <xsl:value-of select="f:eventUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:eventUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_eventUri">
               <xsl:apply-templates select="f:eventUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--category 0..1 MessageSignificanceCategory (json type: string)--><xsl:if test="f:category">
         <xsl:if test="f:category/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="category">
               <xsl:value-of select="f:category/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:category[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_category">
               <xsl:apply-templates select="f:category" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--focus 0..* MessageDefinition.Focus--><xsl:if test="f:focus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:for-each select="f:focus">
               <map>
                  <xsl:apply-templates select="." mode="MessageDefinition.Focus"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--responseRequired 0..1 messageheaderResponseRequest (json type: string)--><xsl:if test="f:responseRequired">
         <xsl:if test="f:responseRequired/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="responseRequired">
               <xsl:value-of select="f:responseRequired/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:responseRequired[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responseRequired">
               <xsl:apply-templates select="f:responseRequired" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--allowedResponse 0..* MessageDefinition.AllowedResponse--><xsl:if test="f:allowedResponse">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="allowedResponse">
            <xsl:for-each select="f:allowedResponse">
               <map>
                  <xsl:apply-templates select="." mode="MessageDefinition.AllowedResponse"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--graph 0..* canonical (json type: string)--><xsl:if test="f:graph">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="graph">
            <xsl:for-each select="f:graph">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:graph[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_graph">
               <xsl:for-each select="f:graph">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageDefinition.Focus">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 0..1 canonical (json type: string)--><xsl:if test="f:profile">
         <xsl:if test="f:profile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
               <xsl:value-of select="f:profile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:profile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_profile">
               <xsl:apply-templates select="f:profile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 1..1 unsignedInt (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 0..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageDefinition.AllowedResponse">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--message 1..1 canonical (json type: string)--><xsl:if test="f:message">
         <xsl:if test="f:message/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="message">
               <xsl:value-of select="f:message/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:message[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_message">
               <xsl:apply-templates select="f:message" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--situation 0..1 markdown (json type: string)--><xsl:if test="f:situation">
         <xsl:if test="f:situation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="situation">
               <xsl:value-of select="f:situation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:situation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_situation">
               <xsl:apply-templates select="f:situation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The impact of the content of a message.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageSignificanceCategory">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="messageheaderResponseRequest">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageHeader">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MessageHeader</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          
            
            <!--eventCoding 1..1 Coding--><xsl:if test="f:eventCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="eventCoding">
            <xsl:apply-templates select="f:eventCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--eventUri 1..1 uri (json type: string)--><xsl:if test="f:eventUri">
         <xsl:if test="f:eventUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="eventUri">
               <xsl:value-of select="f:eventUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:eventUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_eventUri">
               <xsl:apply-templates select="f:eventUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--destination 0..* MessageHeader.Destination--><xsl:if test="f:destination">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
            <xsl:for-each select="f:destination">
               <map>
                  <xsl:apply-templates select="." mode="MessageHeader.Destination"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--sender 0..1 Reference--><xsl:if test="f:sender">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sender">
            <xsl:apply-templates select="f:sender" mode="Reference"/>
         </map>
      </xsl:if>
          <!--enterer 0..1 Reference--><xsl:if test="f:enterer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enterer">
            <xsl:apply-templates select="f:enterer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--source 1..1 MessageHeader.Source--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="MessageHeader.Source"/>
         </map>
      </xsl:if>
          <!--responsible 0..1 Reference--><xsl:if test="f:responsible">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
            <xsl:apply-templates select="f:responsible" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reason 0..1 CodeableConcept--><xsl:if test="f:reason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:apply-templates select="f:reason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--response 0..1 MessageHeader.Response--><xsl:if test="f:response">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="response">
            <xsl:apply-templates select="f:response" mode="MessageHeader.Response"/>
         </map>
      </xsl:if>
          <!--focus 0..* Reference--><xsl:if test="f:focus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:for-each select="f:focus">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--definition 0..1 canonical (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageHeader.Destination">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 0..1 Reference--><xsl:if test="f:target">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:apply-templates select="f:target" mode="Reference"/>
         </map>
      </xsl:if>
          <!--endpoint 1..1 url (json type: string)--><xsl:if test="f:endpoint">
         <xsl:if test="f:endpoint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
               <xsl:value-of select="f:endpoint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:endpoint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_endpoint">
               <xsl:apply-templates select="f:endpoint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--receiver 0..1 Reference--><xsl:if test="f:receiver">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="receiver">
            <xsl:apply-templates select="f:receiver" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageHeader.Source">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--software 0..1 string (json type: string)--><xsl:if test="f:software">
         <xsl:if test="f:software/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="software">
               <xsl:value-of select="f:software/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:software[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_software">
               <xsl:apply-templates select="f:software" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..1 ContactPoint--><xsl:if test="f:contact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:apply-templates select="f:contact" mode="ContactPoint"/>
         </map>
      </xsl:if>
          <!--endpoint 1..1 url (json type: string)--><xsl:if test="f:endpoint">
         <xsl:if test="f:endpoint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
               <xsl:value-of select="f:endpoint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:endpoint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_endpoint">
               <xsl:apply-templates select="f:endpoint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MessageHeader.Response">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 1..1 id (json type: string)--><xsl:if test="f:identifier">
         <xsl:if test="f:identifier/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
               <xsl:value-of select="f:identifier/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identifier">
               <xsl:apply-templates select="f:identifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 ResponseType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--details 0..1 Reference--><xsl:if test="f:details">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="details">
            <xsl:apply-templates select="f:details" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The kind of response to a message.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResponseType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">MolecularSequence</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 sequenceType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--coordinateSystem 1..1 integer (json type: number)--><xsl:if test="f:coordinateSystem">
         <xsl:if test="f:coordinateSystem/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="coordinateSystem">
               <xsl:value-of select="f:coordinateSystem/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:coordinateSystem[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_coordinateSystem">
               <xsl:apply-templates select="f:coordinateSystem" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 0..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--specimen 0..1 Reference--><xsl:if test="f:specimen">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="specimen">
            <xsl:apply-templates select="f:specimen" mode="Reference"/>
         </map>
      </xsl:if>
          <!--device 0..1 Reference--><xsl:if test="f:device">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:apply-templates select="f:device" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--referenceSeq 0..1 MolecularSequence.ReferenceSeq--><xsl:if test="f:referenceSeq">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referenceSeq">
            <xsl:apply-templates select="f:referenceSeq" mode="MolecularSequence.ReferenceSeq"/>
         </map>
      </xsl:if>
          <!--variant 0..* MolecularSequence.Variant--><xsl:if test="f:variant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="variant">
            <xsl:for-each select="f:variant">
               <map>
                  <xsl:apply-templates select="." mode="MolecularSequence.Variant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--observedSeq 0..1 string (json type: string)--><xsl:if test="f:observedSeq">
         <xsl:if test="f:observedSeq/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="observedSeq">
               <xsl:value-of select="f:observedSeq/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:observedSeq[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_observedSeq">
               <xsl:apply-templates select="f:observedSeq" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quality 0..* MolecularSequence.Quality--><xsl:if test="f:quality">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="quality">
            <xsl:for-each select="f:quality">
               <map>
                  <xsl:apply-templates select="." mode="MolecularSequence.Quality"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--readCoverage 0..1 integer (json type: number)--><xsl:if test="f:readCoverage">
         <xsl:if test="f:readCoverage/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="readCoverage">
               <xsl:value-of select="f:readCoverage/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:readCoverage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_readCoverage">
               <xsl:apply-templates select="f:readCoverage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--repository 0..* MolecularSequence.Repository--><xsl:if test="f:repository">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="repository">
            <xsl:for-each select="f:repository">
               <map>
                  <xsl:apply-templates select="." mode="MolecularSequence.Repository"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--pointer 0..* Reference--><xsl:if test="f:pointer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="pointer">
            <xsl:for-each select="f:pointer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--structureVariant 0..* MolecularSequence.StructureVariant--><xsl:if test="f:structureVariant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="structureVariant">
            <xsl:for-each select="f:structureVariant">
               <map>
                  <xsl:apply-templates select="." mode="MolecularSequence.StructureVariant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.ReferenceSeq">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--chromosome 0..1 CodeableConcept--><xsl:if test="f:chromosome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="chromosome">
            <xsl:apply-templates select="f:chromosome" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--genomeBuild 0..1 string (json type: string)--><xsl:if test="f:genomeBuild">
         <xsl:if test="f:genomeBuild/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="genomeBuild">
               <xsl:value-of select="f:genomeBuild/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:genomeBuild[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_genomeBuild">
               <xsl:apply-templates select="f:genomeBuild" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--orientation 0..1 orientationType (json type: string)--><xsl:if test="f:orientation">
         <xsl:if test="f:orientation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="orientation">
               <xsl:value-of select="f:orientation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:orientation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_orientation">
               <xsl:apply-templates select="f:orientation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--referenceSeqId 0..1 CodeableConcept--><xsl:if test="f:referenceSeqId">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referenceSeqId">
            <xsl:apply-templates select="f:referenceSeqId" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--referenceSeqPointer 0..1 Reference--><xsl:if test="f:referenceSeqPointer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referenceSeqPointer">
            <xsl:apply-templates select="f:referenceSeqPointer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--referenceSeqString 0..1 string (json type: string)--><xsl:if test="f:referenceSeqString">
         <xsl:if test="f:referenceSeqString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="referenceSeqString">
               <xsl:value-of select="f:referenceSeqString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:referenceSeqString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_referenceSeqString">
               <xsl:apply-templates select="f:referenceSeqString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--strand 0..1 strandType (json type: string)--><xsl:if test="f:strand">
         <xsl:if test="f:strand/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="strand">
               <xsl:value-of select="f:strand/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:strand[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_strand">
               <xsl:apply-templates select="f:strand" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--windowStart 0..1 integer (json type: number)--><xsl:if test="f:windowStart">
         <xsl:if test="f:windowStart/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="windowStart">
               <xsl:value-of select="f:windowStart/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:windowStart[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_windowStart">
               <xsl:apply-templates select="f:windowStart" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--windowEnd 0..1 integer (json type: number)--><xsl:if test="f:windowEnd">
         <xsl:if test="f:windowEnd/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="windowEnd">
               <xsl:value-of select="f:windowEnd/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:windowEnd[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_windowEnd">
               <xsl:apply-templates select="f:windowEnd" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Variant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--start 0..1 integer (json type: number)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 integer (json type: number)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--observedAllele 0..1 string (json type: string)--><xsl:if test="f:observedAllele">
         <xsl:if test="f:observedAllele/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="observedAllele">
               <xsl:value-of select="f:observedAllele/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:observedAllele[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_observedAllele">
               <xsl:apply-templates select="f:observedAllele" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--referenceAllele 0..1 string (json type: string)--><xsl:if test="f:referenceAllele">
         <xsl:if test="f:referenceAllele/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="referenceAllele">
               <xsl:value-of select="f:referenceAllele/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:referenceAllele[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_referenceAllele">
               <xsl:apply-templates select="f:referenceAllele" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cigar 0..1 string (json type: string)--><xsl:if test="f:cigar">
         <xsl:if test="f:cigar/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="cigar">
               <xsl:value-of select="f:cigar/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:cigar[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cigar">
               <xsl:apply-templates select="f:cigar" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variantPointer 0..1 Reference--><xsl:if test="f:variantPointer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="variantPointer">
            <xsl:apply-templates select="f:variantPointer" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Quality">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 qualityType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--standardSequence 0..1 CodeableConcept--><xsl:if test="f:standardSequence">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="standardSequence">
            <xsl:apply-templates select="f:standardSequence" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--start 0..1 integer (json type: number)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 integer (json type: number)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--score 0..1 Quantity--><xsl:if test="f:score">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="score">
            <xsl:apply-templates select="f:score" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--truthTP 0..1 decimal (json type: number)--><xsl:if test="f:truthTP">
         <xsl:if test="f:truthTP/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="truthTP">
               <xsl:value-of select="f:truthTP/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:truthTP[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_truthTP">
               <xsl:apply-templates select="f:truthTP" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--queryTP 0..1 decimal (json type: number)--><xsl:if test="f:queryTP">
         <xsl:if test="f:queryTP/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="queryTP">
               <xsl:value-of select="f:queryTP/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:queryTP[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_queryTP">
               <xsl:apply-templates select="f:queryTP" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--truthFN 0..1 decimal (json type: number)--><xsl:if test="f:truthFN">
         <xsl:if test="f:truthFN/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="truthFN">
               <xsl:value-of select="f:truthFN/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:truthFN[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_truthFN">
               <xsl:apply-templates select="f:truthFN" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--queryFP 0..1 decimal (json type: number)--><xsl:if test="f:queryFP">
         <xsl:if test="f:queryFP/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="queryFP">
               <xsl:value-of select="f:queryFP/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:queryFP[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_queryFP">
               <xsl:apply-templates select="f:queryFP" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--gtFP 0..1 decimal (json type: number)--><xsl:if test="f:gtFP">
         <xsl:if test="f:gtFP/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="gtFP">
               <xsl:value-of select="f:gtFP/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:gtFP[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gtFP">
               <xsl:apply-templates select="f:gtFP" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--precision 0..1 decimal (json type: number)--><xsl:if test="f:precision">
         <xsl:if test="f:precision/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="precision">
               <xsl:value-of select="f:precision/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:precision[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_precision">
               <xsl:apply-templates select="f:precision" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--recall 0..1 decimal (json type: number)--><xsl:if test="f:recall">
         <xsl:if test="f:recall/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="recall">
               <xsl:value-of select="f:recall/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:recall[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recall">
               <xsl:apply-templates select="f:recall" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--fScore 0..1 decimal (json type: number)--><xsl:if test="f:fScore">
         <xsl:if test="f:fScore/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="fScore">
               <xsl:value-of select="f:fScore/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:fScore[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fScore">
               <xsl:apply-templates select="f:fScore" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--roc 0..1 MolecularSequence.Roc--><xsl:if test="f:roc">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="roc">
            <xsl:apply-templates select="f:roc" mode="MolecularSequence.Roc"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Roc">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--score 0..* integer (json type: number)--><xsl:if test="f:score">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="score">
            <xsl:for-each select="f:score">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:score[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_score">
               <xsl:for-each select="f:score">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--numTP 0..* integer (json type: number)--><xsl:if test="f:numTP">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="numTP">
            <xsl:for-each select="f:numTP">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:numTP[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_numTP">
               <xsl:for-each select="f:numTP">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--numFP 0..* integer (json type: number)--><xsl:if test="f:numFP">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="numFP">
            <xsl:for-each select="f:numFP">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:numFP[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_numFP">
               <xsl:for-each select="f:numFP">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--numFN 0..* integer (json type: number)--><xsl:if test="f:numFN">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="numFN">
            <xsl:for-each select="f:numFN">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:numFN[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_numFN">
               <xsl:for-each select="f:numFN">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--precision 0..* decimal (json type: number)--><xsl:if test="f:precision">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="precision">
            <xsl:for-each select="f:precision">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:precision[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_precision">
               <xsl:for-each select="f:precision">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--sensitivity 0..* decimal (json type: number)--><xsl:if test="f:sensitivity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="sensitivity">
            <xsl:for-each select="f:sensitivity">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:sensitivity[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_sensitivity">
               <xsl:for-each select="f:sensitivity">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--fMeasure 0..* decimal (json type: number)--><xsl:if test="f:fMeasure">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fMeasure">
            <xsl:for-each select="f:fMeasure">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:fMeasure[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_fMeasure">
               <xsl:for-each select="f:fMeasure">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Repository">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 repositoryType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--datasetId 0..1 string (json type: string)--><xsl:if test="f:datasetId">
         <xsl:if test="f:datasetId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="datasetId">
               <xsl:value-of select="f:datasetId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:datasetId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_datasetId">
               <xsl:apply-templates select="f:datasetId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variantsetId 0..1 string (json type: string)--><xsl:if test="f:variantsetId">
         <xsl:if test="f:variantsetId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="variantsetId">
               <xsl:value-of select="f:variantsetId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:variantsetId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_variantsetId">
               <xsl:apply-templates select="f:variantsetId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--readsetId 0..1 string (json type: string)--><xsl:if test="f:readsetId">
         <xsl:if test="f:readsetId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="readsetId">
               <xsl:value-of select="f:readsetId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:readsetId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_readsetId">
               <xsl:apply-templates select="f:readsetId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.StructureVariant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--variantType 0..1 CodeableConcept--><xsl:if test="f:variantType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="variantType">
            <xsl:apply-templates select="f:variantType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--exact 0..1 boolean (json type: boolean)--><xsl:if test="f:exact">
         <xsl:if test="f:exact/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exact">
               <xsl:value-of select="f:exact/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exact[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exact">
               <xsl:apply-templates select="f:exact" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--length 0..1 integer (json type: number)--><xsl:if test="f:length">
         <xsl:if test="f:length/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="length">
               <xsl:value-of select="f:length/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:length[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_length">
               <xsl:apply-templates select="f:length" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--outer 0..1 MolecularSequence.Outer--><xsl:if test="f:outer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outer">
            <xsl:apply-templates select="f:outer" mode="MolecularSequence.Outer"/>
         </map>
      </xsl:if>
          <!--inner 0..1 MolecularSequence.Inner--><xsl:if test="f:inner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="inner">
            <xsl:apply-templates select="f:inner" mode="MolecularSequence.Inner"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Outer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--start 0..1 integer (json type: number)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 integer (json type: number)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Raw data describing a biological sequence.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="MolecularSequence.Inner">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--start 0..1 integer (json type: number)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 0..1 integer (json type: number)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Type for strand.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="strandType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Type for orientation.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="orientationType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Type for access of external URI.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="repositoryType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Type for quality report.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="qualityType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Type if a sequence -- DNA, RNA, or amino acid sequence.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="sequenceType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NamingSystem">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">NamingSystem</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--kind 1..1 NamingSystemType (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--responsible 0..1 string (json type: string)--><xsl:if test="f:responsible">
         <xsl:if test="f:responsible/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
               <xsl:value-of select="f:responsible/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:responsible[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responsible">
               <xsl:apply-templates select="f:responsible" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--uniqueId 1..* NamingSystem.UniqueId--><xsl:if test="f:uniqueId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="uniqueId">
            <xsl:for-each select="f:uniqueId">
               <map>
                  <xsl:apply-templates select="." mode="NamingSystem.UniqueId"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NamingSystem.UniqueId">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 NamingSystemIdentifierType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--preferred 0..1 boolean (json type: boolean)--><xsl:if test="f:preferred">
         <xsl:if test="f:preferred/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="preferred">
               <xsl:value-of select="f:preferred/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:preferred[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preferred">
               <xsl:apply-templates select="f:preferred" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies the style of unique identifier used to identify a namespace.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NamingSystemIdentifierType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Identifies the purpose of the naming system.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NamingSystemType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">NutritionOrder</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiates 0..* uri (json type: string)--><xsl:if test="f:instantiates">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiates">
            <xsl:for-each select="f:instantiates">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiates[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiates">
               <xsl:for-each select="f:instantiates">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intent 1..1 RequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dateTime 1..1 dateTime (json type: string)--><xsl:if test="f:dateTime">
         <xsl:if test="f:dateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dateTime">
               <xsl:value-of select="f:dateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dateTime">
               <xsl:apply-templates select="f:dateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--orderer 0..1 Reference--><xsl:if test="f:orderer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="orderer">
            <xsl:apply-templates select="f:orderer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--allergyIntolerance 0..* Reference--><xsl:if test="f:allergyIntolerance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="allergyIntolerance">
            <xsl:for-each select="f:allergyIntolerance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--foodPreferenceModifier 0..* CodeableConcept--><xsl:if test="f:foodPreferenceModifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="foodPreferenceModifier">
            <xsl:for-each select="f:foodPreferenceModifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--excludeFoodModifier 0..* CodeableConcept--><xsl:if test="f:excludeFoodModifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="excludeFoodModifier">
            <xsl:for-each select="f:excludeFoodModifier">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--oralDiet 0..1 NutritionOrder.OralDiet--><xsl:if test="f:oralDiet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="oralDiet">
            <xsl:apply-templates select="f:oralDiet" mode="NutritionOrder.OralDiet"/>
         </map>
      </xsl:if>
          <!--supplement 0..* NutritionOrder.Supplement--><xsl:if test="f:supplement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supplement">
            <xsl:for-each select="f:supplement">
               <map>
                  <xsl:apply-templates select="." mode="NutritionOrder.Supplement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--enteralFormula 0..1 NutritionOrder.EnteralFormula--><xsl:if test="f:enteralFormula">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="enteralFormula">
            <xsl:apply-templates select="f:enteralFormula" mode="NutritionOrder.EnteralFormula"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.OralDiet">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--schedule 0..* Timing--><xsl:if test="f:schedule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:for-each select="f:schedule">
               <map>
                  <xsl:apply-templates select="." mode="Timing"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--nutrient 0..* NutritionOrder.Nutrient--><xsl:if test="f:nutrient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="nutrient">
            <xsl:for-each select="f:nutrient">
               <map>
                  <xsl:apply-templates select="." mode="NutritionOrder.Nutrient"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--texture 0..* NutritionOrder.Texture--><xsl:if test="f:texture">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="texture">
            <xsl:for-each select="f:texture">
               <map>
                  <xsl:apply-templates select="." mode="NutritionOrder.Texture"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--fluidConsistencyType 0..* CodeableConcept--><xsl:if test="f:fluidConsistencyType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fluidConsistencyType">
            <xsl:for-each select="f:fluidConsistencyType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instruction 0..1 string (json type: string)--><xsl:if test="f:instruction">
         <xsl:if test="f:instruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instruction">
               <xsl:value-of select="f:instruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instruction">
               <xsl:apply-templates select="f:instruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.Nutrient">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--modifier 0..1 CodeableConcept--><xsl:if test="f:modifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:apply-templates select="f:modifier" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Quantity--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.Texture">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--modifier 0..1 CodeableConcept--><xsl:if test="f:modifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:apply-templates select="f:modifier" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--foodType 0..1 CodeableConcept--><xsl:if test="f:foodType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="foodType">
            <xsl:apply-templates select="f:foodType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.Supplement">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--productName 0..1 string (json type: string)--><xsl:if test="f:productName">
         <xsl:if test="f:productName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="productName">
               <xsl:value-of select="f:productName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:productName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_productName">
               <xsl:apply-templates select="f:productName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--schedule 0..* Timing--><xsl:if test="f:schedule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:for-each select="f:schedule">
               <map>
                  <xsl:apply-templates select="." mode="Timing"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--instruction 0..1 string (json type: string)--><xsl:if test="f:instruction">
         <xsl:if test="f:instruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instruction">
               <xsl:value-of select="f:instruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instruction">
               <xsl:apply-templates select="f:instruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.EnteralFormula">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--baseFormulaType 0..1 CodeableConcept--><xsl:if test="f:baseFormulaType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="baseFormulaType">
            <xsl:apply-templates select="f:baseFormulaType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--baseFormulaProductName 0..1 string (json type: string)--><xsl:if test="f:baseFormulaProductName">
         <xsl:if test="f:baseFormulaProductName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="baseFormulaProductName">
               <xsl:value-of select="f:baseFormulaProductName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:baseFormulaProductName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_baseFormulaProductName">
               <xsl:apply-templates select="f:baseFormulaProductName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--additiveType 0..1 CodeableConcept--><xsl:if test="f:additiveType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="additiveType">
            <xsl:apply-templates select="f:additiveType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--additiveProductName 0..1 string (json type: string)--><xsl:if test="f:additiveProductName">
         <xsl:if test="f:additiveProductName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="additiveProductName">
               <xsl:value-of select="f:additiveProductName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:additiveProductName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_additiveProductName">
               <xsl:apply-templates select="f:additiveProductName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--caloricDensity 0..1 Quantity--><xsl:if test="f:caloricDensity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="caloricDensity">
            <xsl:apply-templates select="f:caloricDensity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--routeofAdministration 0..1 CodeableConcept--><xsl:if test="f:routeofAdministration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="routeofAdministration">
            <xsl:apply-templates select="f:routeofAdministration" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--administration 0..* NutritionOrder.Administration--><xsl:if test="f:administration">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="administration">
            <xsl:for-each select="f:administration">
               <map>
                  <xsl:apply-templates select="." mode="NutritionOrder.Administration"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--maxVolumeToDeliver 0..1 Quantity--><xsl:if test="f:maxVolumeToDeliver">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxVolumeToDeliver">
            <xsl:apply-templates select="f:maxVolumeToDeliver" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--administrationInstruction 0..1 string (json type: string)--><xsl:if test="f:administrationInstruction">
         <xsl:if test="f:administrationInstruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="administrationInstruction">
               <xsl:value-of select="f:administrationInstruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:administrationInstruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_administrationInstruction">
               <xsl:apply-templates select="f:administrationInstruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="NutritionOrder.Administration">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--schedule 0..1 Timing--><xsl:if test="f:schedule">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:apply-templates select="f:schedule" mode="Timing"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
            
            <!--rateQuantity 1..1 Quantity--><xsl:if test="f:rateQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateQuantity">
            <xsl:apply-templates select="f:rateQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--rateRatio 1..1 Ratio--><xsl:if test="f:rateRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="rateRatio">
            <xsl:apply-templates select="f:rateRatio" mode="Ratio"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Measurements and simple assertions made about a patient, device or other subject.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Observation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Observation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ObservationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--focus 0..* Reference--><xsl:if test="f:focus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:for-each select="f:focus">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--effectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:effectiveDateTime">
         <xsl:if test="f:effectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveDateTime">
               <xsl:value-of select="f:effectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveDateTime">
               <xsl:apply-templates select="f:effectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--effectivePeriod 1..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--effectiveTiming 1..1 Timing--><xsl:if test="f:effectiveTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveTiming">
            <xsl:apply-templates select="f:effectiveTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--effectiveInstant 1..1 instant (json type: string)--><xsl:if test="f:effectiveInstant">
         <xsl:if test="f:effectiveInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="effectiveInstant">
               <xsl:value-of select="f:effectiveInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:effectiveInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_effectiveInstant">
               <xsl:apply-templates select="f:effectiveInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--issued 0..1 instant (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--performer 0..* Reference--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--dataAbsentReason 0..1 CodeableConcept--><xsl:if test="f:dataAbsentReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dataAbsentReason">
            <xsl:apply-templates select="f:dataAbsentReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--interpretation 0..* CodeableConcept--><xsl:if test="f:interpretation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interpretation">
            <xsl:for-each select="f:interpretation">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--specimen 0..1 Reference--><xsl:if test="f:specimen">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="specimen">
            <xsl:apply-templates select="f:specimen" mode="Reference"/>
         </map>
      </xsl:if>
          <!--device 0..1 Reference--><xsl:if test="f:device">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="device">
            <xsl:apply-templates select="f:device" mode="Reference"/>
         </map>
      </xsl:if>
          <!--referenceRange 0..* Observation.ReferenceRange--><xsl:if test="f:referenceRange">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referenceRange">
            <xsl:for-each select="f:referenceRange">
               <map>
                  <xsl:apply-templates select="." mode="Observation.ReferenceRange"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--hasMember 0..* Reference--><xsl:if test="f:hasMember">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="hasMember">
            <xsl:for-each select="f:hasMember">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--derivedFrom 0..* Reference--><xsl:if test="f:derivedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--component 0..* Observation.Component--><xsl:if test="f:component">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="component">
            <xsl:for-each select="f:component">
               <map>
                  <xsl:apply-templates select="." mode="Observation.Component"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Measurements and simple assertions made about a patient, device or other subject.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Observation.ReferenceRange">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--low 0..1 Quantity--><xsl:if test="f:low">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="low">
            <xsl:apply-templates select="f:low" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--high 0..1 Quantity--><xsl:if test="f:high">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="high">
            <xsl:apply-templates select="f:high" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--appliesTo 0..* CodeableConcept--><xsl:if test="f:appliesTo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="appliesTo">
            <xsl:for-each select="f:appliesTo">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--age 0..1 Range--><xsl:if test="f:age">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="age">
            <xsl:apply-templates select="f:age" mode="Range"/>
         </map>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Measurements and simple assertions made about a patient, device or other subject.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Observation.Component">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--dataAbsentReason 0..1 CodeableConcept--><xsl:if test="f:dataAbsentReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="dataAbsentReason">
            <xsl:apply-templates select="f:dataAbsentReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--interpretation 0..* CodeableConcept--><xsl:if test="f:interpretation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="interpretation">
            <xsl:for-each select="f:interpretation">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referenceRange 0..* Observation.ReferenceRange--><xsl:if test="f:referenceRange">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referenceRange">
            <xsl:for-each select="f:referenceRange">
               <map>
                  <xsl:apply-templates select="." mode="Observation.ReferenceRange"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ObservationDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--permittedDataType 0..* ObservationDataType (json type: string)--><xsl:if test="f:permittedDataType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="permittedDataType">
            <xsl:for-each select="f:permittedDataType">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:permittedDataType[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_permittedDataType">
               <xsl:for-each select="f:permittedDataType">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--multipleResultsAllowed 0..1 boolean (json type: boolean)--><xsl:if test="f:multipleResultsAllowed">
         <xsl:if test="f:multipleResultsAllowed/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="multipleResultsAllowed">
               <xsl:value-of select="f:multipleResultsAllowed/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:multipleResultsAllowed[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_multipleResultsAllowed">
               <xsl:apply-templates select="f:multipleResultsAllowed" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--preferredReportName 0..1 string (json type: string)--><xsl:if test="f:preferredReportName">
         <xsl:if test="f:preferredReportName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preferredReportName">
               <xsl:value-of select="f:preferredReportName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preferredReportName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preferredReportName">
               <xsl:apply-templates select="f:preferredReportName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quantitativeDetails 0..1 ObservationDefinition.QuantitativeDetails--><xsl:if test="f:quantitativeDetails">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantitativeDetails">
            <xsl:apply-templates select="f:quantitativeDetails"
                                 mode="ObservationDefinition.QuantitativeDetails"/>
         </map>
      </xsl:if>
          <!--qualifiedInterval 0..* ObservationDefinition.QualifiedInterval--><xsl:if test="f:qualifiedInterval">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="qualifiedInterval">
            <xsl:for-each select="f:qualifiedInterval">
               <map>
                  <xsl:apply-templates select="." mode="ObservationDefinition.QualifiedInterval"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--validCodedValueSet 0..1 Reference--><xsl:if test="f:validCodedValueSet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validCodedValueSet">
            <xsl:apply-templates select="f:validCodedValueSet" mode="Reference"/>
         </map>
      </xsl:if>
          <!--normalCodedValueSet 0..1 Reference--><xsl:if test="f:normalCodedValueSet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="normalCodedValueSet">
            <xsl:apply-templates select="f:normalCodedValueSet" mode="Reference"/>
         </map>
      </xsl:if>
          <!--abnormalCodedValueSet 0..1 Reference--><xsl:if test="f:abnormalCodedValueSet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="abnormalCodedValueSet">
            <xsl:apply-templates select="f:abnormalCodedValueSet" mode="Reference"/>
         </map>
      </xsl:if>
          <!--criticalCodedValueSet 0..1 Reference--><xsl:if test="f:criticalCodedValueSet">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="criticalCodedValueSet">
            <xsl:apply-templates select="f:criticalCodedValueSet" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationDefinition.QuantitativeDetails">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--customaryUnit 0..1 CodeableConcept--><xsl:if test="f:customaryUnit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="customaryUnit">
            <xsl:apply-templates select="f:customaryUnit" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--unit 0..1 CodeableConcept--><xsl:if test="f:unit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unit">
            <xsl:apply-templates select="f:unit" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--conversionFactor 0..1 decimal (json type: number)--><xsl:if test="f:conversionFactor">
         <xsl:if test="f:conversionFactor/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="conversionFactor">
               <xsl:value-of select="f:conversionFactor/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:conversionFactor[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_conversionFactor">
               <xsl:apply-templates select="f:conversionFactor" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--decimalPrecision 0..1 integer (json type: number)--><xsl:if test="f:decimalPrecision">
         <xsl:if test="f:decimalPrecision/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="decimalPrecision">
               <xsl:value-of select="f:decimalPrecision/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:decimalPrecision[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_decimalPrecision">
               <xsl:apply-templates select="f:decimalPrecision" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationDefinition.QualifiedInterval">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 0..1 ObservationRangeCategory (json type: string)--><xsl:if test="f:category">
         <xsl:if test="f:category/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="category">
               <xsl:value-of select="f:category/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:category[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_category">
               <xsl:apply-templates select="f:category" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--range 0..1 Range--><xsl:if test="f:range">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="range">
            <xsl:apply-templates select="f:range" mode="Range"/>
         </map>
      </xsl:if>
          <!--context 0..1 CodeableConcept--><xsl:if test="f:context">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:apply-templates select="f:context" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--appliesTo 0..* CodeableConcept--><xsl:if test="f:appliesTo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="appliesTo">
            <xsl:for-each select="f:appliesTo">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--age 0..1 Range--><xsl:if test="f:age">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="age">
            <xsl:apply-templates select="f:age" mode="Range"/>
         </map>
      </xsl:if>
          <!--gestationalAge 0..1 Range--><xsl:if test="f:gestationalAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="gestationalAge">
            <xsl:apply-templates select="f:gestationalAge" mode="Range"/>
         </map>
      </xsl:if>
          <!--condition 0..1 string (json type: string)--><xsl:if test="f:condition">
         <xsl:if test="f:condition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
               <xsl:value-of select="f:condition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:condition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_condition">
               <xsl:apply-templates select="f:condition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Permitted data type for observation value.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationDataType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes identifying the category of observation range.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ObservationRangeCategory">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">OperationDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--kind 1..1 OperationKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--affectsState 0..1 boolean (json type: boolean)--><xsl:if test="f:affectsState">
         <xsl:if test="f:affectsState/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="affectsState">
               <xsl:value-of select="f:affectsState/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:affectsState[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_affectsState">
               <xsl:apply-templates select="f:affectsState" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 markdown (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--base 0..1 canonical (json type: string)--><xsl:if test="f:base">
         <xsl:if test="f:base/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="base">
               <xsl:value-of select="f:base/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:base[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_base">
               <xsl:apply-templates select="f:base" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..* code (json type: string)--><xsl:if test="f:resource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:for-each select="f:resource">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:resource[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_resource">
               <xsl:for-each select="f:resource">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--system 1..1 boolean (json type: boolean)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 boolean (json type: boolean)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--instance 1..1 boolean (json type: boolean)--><xsl:if test="f:instance">
         <xsl:if test="f:instance/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
               <xsl:value-of select="f:instance/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:instance[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instance">
               <xsl:apply-templates select="f:instance" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--inputProfile 0..1 canonical (json type: string)--><xsl:if test="f:inputProfile">
         <xsl:if test="f:inputProfile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="inputProfile">
               <xsl:value-of select="f:inputProfile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:inputProfile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_inputProfile">
               <xsl:apply-templates select="f:inputProfile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--outputProfile 0..1 canonical (json type: string)--><xsl:if test="f:outputProfile">
         <xsl:if test="f:outputProfile/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outputProfile">
               <xsl:value-of select="f:outputProfile/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outputProfile[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outputProfile">
               <xsl:apply-templates select="f:outputProfile" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parameter 0..* OperationDefinition.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="OperationDefinition.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--overload 0..* OperationDefinition.Overload--><xsl:if test="f:overload">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="overload">
            <xsl:for-each select="f:overload">
               <map>
                  <xsl:apply-templates select="." mode="OperationDefinition.Overload"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationDefinition.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 code (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--use 1..1 OperationParameterUse (json type: string)--><xsl:if test="f:use">
         <xsl:if test="f:use/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="use">
               <xsl:value-of select="f:use/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:use[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_use">
               <xsl:apply-templates select="f:use" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 1..1 integer (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 1..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 code (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--targetProfile 0..* canonical (json type: string)--><xsl:if test="f:targetProfile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="targetProfile">
            <xsl:for-each select="f:targetProfile">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:targetProfile[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_targetProfile">
               <xsl:for-each select="f:targetProfile">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--searchType 0..1 SearchParamType (json type: string)--><xsl:if test="f:searchType">
         <xsl:if test="f:searchType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="searchType">
               <xsl:value-of select="f:searchType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:searchType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_searchType">
               <xsl:apply-templates select="f:searchType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--binding 0..1 OperationDefinition.Binding--><xsl:if test="f:binding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="binding">
            <xsl:apply-templates select="f:binding" mode="OperationDefinition.Binding"/>
         </map>
      </xsl:if>
          <!--referencedFrom 0..* OperationDefinition.ReferencedFrom--><xsl:if test="f:referencedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="referencedFrom">
            <xsl:for-each select="f:referencedFrom">
               <map>
                  <xsl:apply-templates select="." mode="OperationDefinition.ReferencedFrom"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--part 0..* OperationDefinition.Parameter--><xsl:if test="f:part">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="part">
            <xsl:for-each select="f:part">
               <map>
                  <xsl:apply-templates select="." mode="OperationDefinition.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationDefinition.Binding">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--strength 1..1 BindingStrength (json type: string)--><xsl:if test="f:strength">
         <xsl:if test="f:strength/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="strength">
               <xsl:value-of select="f:strength/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:strength[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_strength">
               <xsl:apply-templates select="f:strength" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--valueSet 1..1 canonical (json type: string)--><xsl:if test="f:valueSet">
         <xsl:if test="f:valueSet/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueSet">
               <xsl:value-of select="f:valueSet/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueSet[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueSet">
               <xsl:apply-templates select="f:valueSet" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationDefinition.ReferencedFrom">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--source 1..1 string (json type: string)--><xsl:if test="f:source">
         <xsl:if test="f:source/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="source">
               <xsl:value-of select="f:source/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:source[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_source">
               <xsl:apply-templates select="f:source" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceId 0..1 string (json type: string)--><xsl:if test="f:sourceId">
         <xsl:if test="f:sourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceId">
               <xsl:value-of select="f:sourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceId">
               <xsl:apply-templates select="f:sourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationDefinition.Overload">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--parameterName 0..* string (json type: string)--><xsl:if test="f:parameterName">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameterName">
            <xsl:for-each select="f:parameterName">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:parameterName[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_parameterName">
               <xsl:for-each select="f:parameterName">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Whether an operation parameter is an input or an output parameter.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationParameterUse">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Whether an operation is a normal operation or a query.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationKind">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A collection of error, warning, or information messages that result from a system action.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationOutcome">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">OperationOutcome</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--issue 1..* OperationOutcome.Issue--><xsl:if test="f:issue">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="issue">
            <xsl:for-each select="f:issue">
               <map>
                  <xsl:apply-templates select="." mode="OperationOutcome.Issue"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A collection of error, warning, or information messages that result from a system action.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OperationOutcome.Issue">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--severity 1..1 IssueSeverity (json type: string)--><xsl:if test="f:severity">
         <xsl:if test="f:severity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="severity">
               <xsl:value-of select="f:severity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:severity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_severity">
               <xsl:apply-templates select="f:severity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 IssueType (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--details 0..1 CodeableConcept--><xsl:if test="f:details">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="details">
            <xsl:apply-templates select="f:details" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--diagnostics 0..1 string (json type: string)--><xsl:if test="f:diagnostics">
         <xsl:if test="f:diagnostics/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="diagnostics">
               <xsl:value-of select="f:diagnostics/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:diagnostics[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_diagnostics">
               <xsl:apply-templates select="f:diagnostics" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--location 0..* string (json type: string)--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:location[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_location">
               <xsl:for-each select="f:location">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--expression 0..* string (json type: string)--><xsl:if test="f:expression">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
            <xsl:for-each select="f:expression">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:expression[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:for-each select="f:expression">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code that describes the type of issue.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="IssueType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How the issue affects the success of the action.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="IssueSeverity">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Organization">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Organization</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..* string (json type: string)--><xsl:if test="f:alias">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
            <xsl:for-each select="f:alias">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:alias[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:for-each select="f:alias">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..* Address--><xsl:if test="f:address">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:for-each select="f:address">
               <map>
                  <xsl:apply-templates select="." mode="Address"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..1 Reference--><xsl:if test="f:partOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:apply-templates select="f:partOf" mode="Reference"/>
         </map>
      </xsl:if>
          <!--contact 0..* Organization.Contact--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="Organization.Contact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Organization.Contact">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--purpose 0..1 CodeableConcept--><xsl:if test="f:purpose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
            <xsl:apply-templates select="f:purpose" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--name 0..1 HumanName--><xsl:if test="f:name">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:apply-templates select="f:name" mode="HumanName"/>
         </map>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..1 Address--><xsl:if test="f:address">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:apply-templates select="f:address" mode="Address"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="OrganizationAffiliation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">OrganizationAffiliation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--organization 0..1 Reference--><xsl:if test="f:organization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:apply-templates select="f:organization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--participatingOrganization 0..1 Reference--><xsl:if test="f:participatingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participatingOrganization">
            <xsl:apply-templates select="f:participatingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--network 0..* Reference--><xsl:if test="f:network">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="network">
            <xsl:for-each select="f:network">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..* Reference--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--healthcareService 0..* Reference--><xsl:if test="f:healthcareService">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="healthcareService">
            <xsl:for-each select="f:healthcareService">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Parameters">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Parameters</string>
      <xsl:apply-templates select="." mode="Resource"/>
          <!--parameter 0..* Parameters.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="Parameters.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Parameters.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:valueCanonical">
         <xsl:if test="f:valueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCanonical">
               <xsl:value-of select="f:valueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCanonical">
               <xsl:apply-templates select="f:valueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInstant 1..1 instant (json type: string)--><xsl:if test="f:valueInstant">
         <xsl:if test="f:valueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueInstant">
               <xsl:value-of select="f:valueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInstant">
               <xsl:apply-templates select="f:valueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:valueMarkdown">
         <xsl:if test="f:valueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueMarkdown">
               <xsl:value-of select="f:valueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueMarkdown">
               <xsl:apply-templates select="f:valueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueOid 1..1 oid (json type: string)--><xsl:if test="f:valueOid">
         <xsl:if test="f:valueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueOid">
               <xsl:value-of select="f:valueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueOid">
               <xsl:apply-templates select="f:valueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:valuePositiveInt">
         <xsl:if test="f:valuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valuePositiveInt">
               <xsl:value-of select="f:valuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valuePositiveInt">
               <xsl:apply-templates select="f:valuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:valueUnsignedInt">
         <xsl:if test="f:valueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueUnsignedInt">
               <xsl:value-of select="f:valueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUnsignedInt">
               <xsl:apply-templates select="f:valueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUrl 1..1 url (json type: string)--><xsl:if test="f:valueUrl">
         <xsl:if test="f:valueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUrl">
               <xsl:value-of select="f:valueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUrl">
               <xsl:apply-templates select="f:valueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUuid 1..1 uuid (json type: string)--><xsl:if test="f:valueUuid">
         <xsl:if test="f:valueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUuid">
               <xsl:value-of select="f:valueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUuid">
               <xsl:apply-templates select="f:valueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAddress 1..1 Address--><xsl:if test="f:valueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAddress">
            <xsl:apply-templates select="f:valueAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--valueAge 1..1 Age--><xsl:if test="f:valueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAge">
            <xsl:apply-templates select="f:valueAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--valueAnnotation 1..1 Annotation--><xsl:if test="f:valueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAnnotation">
            <xsl:apply-templates select="f:valueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueContactPoint 1..1 ContactPoint--><xsl:if test="f:valueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactPoint">
            <xsl:apply-templates select="f:valueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
            <!--valueCount 1..1 Count--><xsl:if test="f:valueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCount">
            <xsl:apply-templates select="f:valueCount" mode="Count"/>
         </map>
      </xsl:if>
            <!--valueDistance 1..1 Distance--><xsl:if test="f:valueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDistance">
            <xsl:apply-templates select="f:valueDistance" mode="Distance"/>
         </map>
      </xsl:if>
            <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--valueHumanName 1..1 HumanName--><xsl:if test="f:valueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueHumanName">
            <xsl:apply-templates select="f:valueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
            <!--valueIdentifier 1..1 Identifier--><xsl:if test="f:valueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueIdentifier">
            <xsl:apply-templates select="f:valueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
            <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
            <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--valueSignature 1..1 Signature--><xsl:if test="f:valueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSignature">
            <xsl:apply-templates select="f:valueSignature" mode="Signature"/>
         </map>
      </xsl:if>
            <!--valueTiming 1..1 Timing--><xsl:if test="f:valueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTiming">
            <xsl:apply-templates select="f:valueTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--valueContactDetail 1..1 ContactDetail--><xsl:if test="f:valueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactDetail">
            <xsl:apply-templates select="f:valueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
            <!--valueContributor 1..1 Contributor--><xsl:if test="f:valueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContributor">
            <xsl:apply-templates select="f:valueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
            <!--valueDataRequirement 1..1 DataRequirement--><xsl:if test="f:valueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDataRequirement">
            <xsl:apply-templates select="f:valueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
            <!--valueExpression 1..1 Expression--><xsl:if test="f:valueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueExpression">
            <xsl:apply-templates select="f:valueExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--valueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:valueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="valueParameterDefinition">
            <xsl:apply-templates select="f:valueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
            <!--valueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:valueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRelatedArtifact">
            <xsl:apply-templates select="f:valueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
            <!--valueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:valueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTriggerDefinition">
            <xsl:apply-templates select="f:valueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
            <!--valueUsageContext 1..1 UsageContext--><xsl:if test="f:valueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueUsageContext">
            <xsl:apply-templates select="f:valueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
            <!--valueDosage 1..1 Dosage--><xsl:if test="f:valueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDosage">
            <xsl:apply-templates select="f:valueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
            <!--valueMeta 1..1 Meta--><xsl:if test="f:valueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMeta">
            <xsl:apply-templates select="f:valueMeta" mode="Meta"/>
         </map>
      </xsl:if>
          
          <!--resource 0..1 ResourceContainer--><xsl:if test="f:resource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:apply-templates select="f:resource" mode="ResourceContainer"/>
         </map>
      </xsl:if>
          <!--part 0..* Parameters.Parameter--><xsl:if test="f:part">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="part">
            <xsl:for-each select="f:part">
               <map>
                  <xsl:apply-templates select="." mode="Parameters.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and other administrative information about an individual or animal receiving care or other health-related services.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Patient">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Patient</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..* HumanName--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="HumanName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--birthDate 0..1 date (json type: string)--><xsl:if test="f:birthDate">
         <xsl:if test="f:birthDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="birthDate">
               <xsl:value-of select="f:birthDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:birthDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_birthDate">
               <xsl:apply-templates select="f:birthDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--deceasedBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:deceasedBoolean">
         <xsl:if test="f:deceasedBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedBoolean">
               <xsl:value-of select="f:deceasedBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:deceasedBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deceasedBoolean">
               <xsl:apply-templates select="f:deceasedBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--deceasedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:deceasedDateTime">
         <xsl:if test="f:deceasedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="deceasedDateTime">
               <xsl:value-of select="f:deceasedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:deceasedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_deceasedDateTime">
               <xsl:apply-templates select="f:deceasedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--address 0..* Address--><xsl:if test="f:address">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:for-each select="f:address">
               <map>
                  <xsl:apply-templates select="." mode="Address"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--maritalStatus 0..1 CodeableConcept--><xsl:if test="f:maritalStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maritalStatus">
            <xsl:apply-templates select="f:maritalStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--multipleBirthBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:multipleBirthBoolean">
         <xsl:if test="f:multipleBirthBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="multipleBirthBoolean">
               <xsl:value-of select="f:multipleBirthBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:multipleBirthBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_multipleBirthBoolean">
               <xsl:apply-templates select="f:multipleBirthBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--multipleBirthInteger 1..1 integer (json type: number)--><xsl:if test="f:multipleBirthInteger">
         <xsl:if test="f:multipleBirthInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="multipleBirthInteger">
               <xsl:value-of select="f:multipleBirthInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:multipleBirthInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_multipleBirthInteger">
               <xsl:apply-templates select="f:multipleBirthInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--photo 0..* Attachment--><xsl:if test="f:photo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="photo">
            <xsl:for-each select="f:photo">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contact 0..* Patient.Contact--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="Patient.Contact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--communication 0..* Patient.Communication--><xsl:if test="f:communication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communication">
            <xsl:for-each select="f:communication">
               <map>
                  <xsl:apply-templates select="." mode="Patient.Communication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--generalPractitioner 0..* Reference--><xsl:if test="f:generalPractitioner">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="generalPractitioner">
            <xsl:for-each select="f:generalPractitioner">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--managingOrganization 0..1 Reference--><xsl:if test="f:managingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:apply-templates select="f:managingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--link 0..* Patient.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="Patient.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and other administrative information about an individual or animal receiving care or other health-related services.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Patient.Contact">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--relationship 0..* CodeableConcept--><xsl:if test="f:relationship">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:for-each select="f:relationship">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..1 HumanName--><xsl:if test="f:name">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:apply-templates select="f:name" mode="HumanName"/>
         </map>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..1 Address--><xsl:if test="f:address">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:apply-templates select="f:address" mode="Address"/>
         </map>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--organization 0..1 Reference--><xsl:if test="f:organization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:apply-templates select="f:organization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and other administrative information about an individual or animal receiving care or other health-related services.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Patient.Communication">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--language 1..1 CodeableConcept--><xsl:if test="f:language">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:apply-templates select="f:language" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--preferred 0..1 boolean (json type: boolean)--><xsl:if test="f:preferred">
         <xsl:if test="f:preferred/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="preferred">
               <xsl:value-of select="f:preferred/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:preferred[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preferred">
               <xsl:apply-templates select="f:preferred" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and other administrative information about an individual or animal receiving care or other health-related services.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Patient.Link">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--other 1..1 Reference--><xsl:if test="f:other">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="other">
            <xsl:apply-templates select="f:other" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 1..1 LinkType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of link between this patient resource and another patient resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="LinkType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the status of the payment for goods and services rendered, and the request and response resource references.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PaymentNotice">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">PaymentNotice</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--response 0..1 Reference--><xsl:if test="f:response">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="response">
            <xsl:apply-templates select="f:response" mode="Reference"/>
         </map>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--provider 0..1 Reference--><xsl:if test="f:provider">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="provider">
            <xsl:apply-templates select="f:provider" mode="Reference"/>
         </map>
      </xsl:if>
          <!--payment 1..1 Reference--><xsl:if test="f:payment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payment">
            <xsl:apply-templates select="f:payment" mode="Reference"/>
         </map>
      </xsl:if>
          <!--paymentDate 0..1 date (json type: string)--><xsl:if test="f:paymentDate">
         <xsl:if test="f:paymentDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paymentDate">
               <xsl:value-of select="f:paymentDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paymentDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paymentDate">
               <xsl:apply-templates select="f:paymentDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--payee 0..1 Reference--><xsl:if test="f:payee">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payee">
            <xsl:apply-templates select="f:payee" mode="Reference"/>
         </map>
      </xsl:if>
          <!--recipient 1..1 Reference--><xsl:if test="f:recipient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:apply-templates select="f:recipient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--amount 1..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
          <!--paymentStatus 0..1 CodeableConcept--><xsl:if test="f:paymentStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="paymentStatus">
            <xsl:apply-templates select="f:paymentStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the details including amount of a payment and allocates the payment items being paid.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PaymentReconciliation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">PaymentReconciliation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paymentIssuer 0..1 Reference--><xsl:if test="f:paymentIssuer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="paymentIssuer">
            <xsl:apply-templates select="f:paymentIssuer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--requestor 0..1 Reference--><xsl:if test="f:requestor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requestor">
            <xsl:apply-templates select="f:requestor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 0..1 RemittanceOutcome (json type: string)--><xsl:if test="f:outcome">
         <xsl:if test="f:outcome/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
               <xsl:value-of select="f:outcome/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:outcome[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_outcome">
               <xsl:apply-templates select="f:outcome" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disposition 0..1 string (json type: string)--><xsl:if test="f:disposition">
         <xsl:if test="f:disposition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="disposition">
               <xsl:value-of select="f:disposition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:disposition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_disposition">
               <xsl:apply-templates select="f:disposition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paymentDate 1..1 date (json type: string)--><xsl:if test="f:paymentDate">
         <xsl:if test="f:paymentDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paymentDate">
               <xsl:value-of select="f:paymentDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paymentDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paymentDate">
               <xsl:apply-templates select="f:paymentDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paymentAmount 1..1 Money--><xsl:if test="f:paymentAmount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="paymentAmount">
            <xsl:apply-templates select="f:paymentAmount" mode="Money"/>
         </map>
      </xsl:if>
          <!--paymentIdentifier 0..1 Identifier--><xsl:if test="f:paymentIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="paymentIdentifier">
            <xsl:apply-templates select="f:paymentIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--detail 0..* PaymentReconciliation.Detail--><xsl:if test="f:detail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
            <xsl:for-each select="f:detail">
               <map>
                  <xsl:apply-templates select="." mode="PaymentReconciliation.Detail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--formCode 0..1 CodeableConcept--><xsl:if test="f:formCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="formCode">
            <xsl:apply-templates select="f:formCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--processNote 0..* PaymentReconciliation.ProcessNote--><xsl:if test="f:processNote">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="processNote">
            <xsl:for-each select="f:processNote">
               <map>
                  <xsl:apply-templates select="." mode="PaymentReconciliation.ProcessNote"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the details including amount of a payment and allocates the payment items being paid.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PaymentReconciliation.Detail">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--predecessor 0..1 Identifier--><xsl:if test="f:predecessor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="predecessor">
            <xsl:apply-templates select="f:predecessor" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--request 0..1 Reference--><xsl:if test="f:request">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:apply-templates select="f:request" mode="Reference"/>
         </map>
      </xsl:if>
          <!--submitter 0..1 Reference--><xsl:if test="f:submitter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="submitter">
            <xsl:apply-templates select="f:submitter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--response 0..1 Reference--><xsl:if test="f:response">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="response">
            <xsl:apply-templates select="f:response" mode="Reference"/>
         </map>
      </xsl:if>
          <!--date 0..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--responsible 0..1 Reference--><xsl:if test="f:responsible">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="responsible">
            <xsl:apply-templates select="f:responsible" mode="Reference"/>
         </map>
      </xsl:if>
          <!--payee 0..1 Reference--><xsl:if test="f:payee">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="payee">
            <xsl:apply-templates select="f:payee" mode="Reference"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Money--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Money"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>This resource provides the details including amount of a payment and allocates the payment items being paid.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PaymentReconciliation.ProcessNote">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 NoteType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and administrative information about a person independent of a specific health-related context.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Person">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Person</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..* HumanName--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="HumanName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--birthDate 0..1 date (json type: string)--><xsl:if test="f:birthDate">
         <xsl:if test="f:birthDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="birthDate">
               <xsl:value-of select="f:birthDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:birthDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_birthDate">
               <xsl:apply-templates select="f:birthDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--address 0..* Address--><xsl:if test="f:address">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:for-each select="f:address">
               <map>
                  <xsl:apply-templates select="." mode="Address"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--photo 0..1 Attachment--><xsl:if test="f:photo">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="photo">
            <xsl:apply-templates select="f:photo" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--managingOrganization 0..1 Reference--><xsl:if test="f:managingOrganization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="managingOrganization">
            <xsl:apply-templates select="f:managingOrganization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--link 0..* Person.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="Person.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Demographics and administrative information about a person independent of a specific health-related context.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Person.Link">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--target 1..1 Reference--><xsl:if test="f:target">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:apply-templates select="f:target" mode="Reference"/>
         </map>
      </xsl:if>
          <!--assurance 0..1 IdentityAssuranceLevel (json type: string)--><xsl:if test="f:assurance">
         <xsl:if test="f:assurance/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="assurance">
               <xsl:value-of select="f:assurance/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:assurance[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_assurance">
               <xsl:apply-templates select="f:assurance" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The level of confidence that this link represents the same actual person, based on NIST Authentication Levels.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="IdentityAssuranceLevel">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">PlanDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--library 0..* canonical (json type: string)--><xsl:if test="f:library">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="library">
            <xsl:for-each select="f:library">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:library[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_library">
               <xsl:for-each select="f:library">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--goal 0..* PlanDefinition.Goal--><xsl:if test="f:goal">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="goal">
            <xsl:for-each select="f:goal">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Goal"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..* PlanDefinition.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.Goal">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 1..1 CodeableConcept--><xsl:if test="f:description">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="description">
            <xsl:apply-templates select="f:description" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--priority 0..1 CodeableConcept--><xsl:if test="f:priority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
            <xsl:apply-templates select="f:priority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--start 0..1 CodeableConcept--><xsl:if test="f:start">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="start">
            <xsl:apply-templates select="f:start" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--addresses 0..* CodeableConcept--><xsl:if test="f:addresses">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="addresses">
            <xsl:for-each select="f:addresses">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--documentation 0..* RelatedArtifact--><xsl:if test="f:documentation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
            <xsl:for-each select="f:documentation">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--target 0..* PlanDefinition.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--measure 0..1 CodeableConcept--><xsl:if test="f:measure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="measure">
            <xsl:apply-templates select="f:measure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--detailQuantity 1..1 Quantity--><xsl:if test="f:detailQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailQuantity">
            <xsl:apply-templates select="f:detailQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--detailRange 1..1 Range--><xsl:if test="f:detailRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailRange">
            <xsl:apply-templates select="f:detailRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--detailCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:detailCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="detailCodeableConcept">
            <xsl:apply-templates select="f:detailCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--due 0..1 Duration--><xsl:if test="f:due">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="due">
            <xsl:apply-templates select="f:due" mode="Duration"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.Action">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--prefix 0..1 string (json type: string)--><xsl:if test="f:prefix">
         <xsl:if test="f:prefix/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="prefix">
               <xsl:value-of select="f:prefix/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:prefix[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_prefix">
               <xsl:apply-templates select="f:prefix" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--textEquivalent 0..1 string (json type: string)--><xsl:if test="f:textEquivalent">
         <xsl:if test="f:textEquivalent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="textEquivalent">
               <xsl:value-of select="f:textEquivalent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:textEquivalent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_textEquivalent">
               <xsl:apply-templates select="f:textEquivalent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reason 0..* CodeableConcept--><xsl:if test="f:reason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:for-each select="f:reason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--documentation 0..* RelatedArtifact--><xsl:if test="f:documentation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
            <xsl:for-each select="f:documentation">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--goalId 0..* id (json type: string)--><xsl:if test="f:goalId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="goalId">
            <xsl:for-each select="f:goalId">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:goalId[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_goalId">
               <xsl:for-each select="f:goalId">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--trigger 0..* TriggerDefinition--><xsl:if test="f:trigger">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="trigger">
            <xsl:for-each select="f:trigger">
               <map>
                  <xsl:apply-templates select="." mode="TriggerDefinition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..* PlanDefinition.Condition--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Condition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--input 0..* DataRequirement--><xsl:if test="f:input">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="input">
            <xsl:for-each select="f:input">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--output 0..* DataRequirement--><xsl:if test="f:output">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="output">
            <xsl:for-each select="f:output">
               <map>
                  <xsl:apply-templates select="." mode="DataRequirement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedAction 0..* PlanDefinition.RelatedAction--><xsl:if test="f:relatedAction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedAction">
            <xsl:for-each select="f:relatedAction">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.RelatedAction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--timingDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timingDateTime">
         <xsl:if test="f:timingDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDateTime">
               <xsl:value-of select="f:timingDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDateTime">
               <xsl:apply-templates select="f:timingDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timingAge 1..1 Age--><xsl:if test="f:timingAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingAge">
            <xsl:apply-templates select="f:timingAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--timingDuration 1..1 Duration--><xsl:if test="f:timingDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingDuration">
            <xsl:apply-templates select="f:timingDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--timingRange 1..1 Range--><xsl:if test="f:timingRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingRange">
            <xsl:apply-templates select="f:timingRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--timingTiming 1..1 Timing--><xsl:if test="f:timingTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingTiming">
            <xsl:apply-templates select="f:timingTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--participant 0..* PlanDefinition.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--groupingBehavior 0..1 ActionGroupingBehavior (json type: string)--><xsl:if test="f:groupingBehavior">
         <xsl:if test="f:groupingBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="groupingBehavior">
               <xsl:value-of select="f:groupingBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:groupingBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_groupingBehavior">
               <xsl:apply-templates select="f:groupingBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--selectionBehavior 0..1 ActionSelectionBehavior (json type: string)--><xsl:if test="f:selectionBehavior">
         <xsl:if test="f:selectionBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="selectionBehavior">
               <xsl:value-of select="f:selectionBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:selectionBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_selectionBehavior">
               <xsl:apply-templates select="f:selectionBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requiredBehavior 0..1 ActionRequiredBehavior (json type: string)--><xsl:if test="f:requiredBehavior">
         <xsl:if test="f:requiredBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requiredBehavior">
               <xsl:value-of select="f:requiredBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requiredBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requiredBehavior">
               <xsl:apply-templates select="f:requiredBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--precheckBehavior 0..1 ActionPrecheckBehavior (json type: string)--><xsl:if test="f:precheckBehavior">
         <xsl:if test="f:precheckBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="precheckBehavior">
               <xsl:value-of select="f:precheckBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:precheckBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_precheckBehavior">
               <xsl:apply-templates select="f:precheckBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cardinalityBehavior 0..1 ActionCardinalityBehavior (json type: string)--><xsl:if test="f:cardinalityBehavior">
         <xsl:if test="f:cardinalityBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="cardinalityBehavior">
               <xsl:value-of select="f:cardinalityBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:cardinalityBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cardinalityBehavior">
               <xsl:apply-templates select="f:cardinalityBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--definitionCanonical 1..1 canonical (json type: string)--><xsl:if test="f:definitionCanonical">
         <xsl:if test="f:definitionCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definitionCanonical">
               <xsl:value-of select="f:definitionCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definitionCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionCanonical">
               <xsl:apply-templates select="f:definitionCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--definitionUri 1..1 uri (json type: string)--><xsl:if test="f:definitionUri">
         <xsl:if test="f:definitionUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definitionUri">
               <xsl:value-of select="f:definitionUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definitionUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionUri">
               <xsl:apply-templates select="f:definitionUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--transform 0..1 canonical (json type: string)--><xsl:if test="f:transform">
         <xsl:if test="f:transform/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="transform">
               <xsl:value-of select="f:transform/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:transform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_transform">
               <xsl:apply-templates select="f:transform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--dynamicValue 0..* PlanDefinition.DynamicValue--><xsl:if test="f:dynamicValue">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dynamicValue">
            <xsl:for-each select="f:dynamicValue">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.DynamicValue"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..* PlanDefinition.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="PlanDefinition.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.Condition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--kind 1..1 ActionConditionKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 Expression--><xsl:if test="f:expression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
            <xsl:apply-templates select="f:expression" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.RelatedAction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--actionId 1..1 id (json type: string)--><xsl:if test="f:actionId">
         <xsl:if test="f:actionId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="actionId">
               <xsl:value-of select="f:actionId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:actionId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actionId">
               <xsl:apply-templates select="f:actionId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--relationship 1..1 ActionRelationshipType (json type: string)--><xsl:if test="f:relationship">
         <xsl:if test="f:relationship/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
               <xsl:value-of select="f:relationship/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:relationship[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relationship">
               <xsl:apply-templates select="f:relationship" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--offsetDuration 1..1 Duration--><xsl:if test="f:offsetDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="offsetDuration">
            <xsl:apply-templates select="f:offsetDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--offsetRange 1..1 Range--><xsl:if test="f:offsetRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="offsetRange">
            <xsl:apply-templates select="f:offsetRange" mode="Range"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 ActionParticipantType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PlanDefinition.DynamicValue">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 Expression--><xsl:if test="f:expression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
            <xsl:apply-templates select="f:expression" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines expectations around whether an action or action group is required.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionRequiredBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines the types of relationships between actions.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionRelationshipType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines organization behavior of a group.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionGroupingBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines selection behavior of a group.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionSelectionBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines behavior for an action or a group for how many times that item may be repeated.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionCardinalityBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines selection frequency behavior for an action or group.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionPrecheckBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines the kinds of conditions that can appear on actions.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ActionConditionKind">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A person who is directly or indirectly involved in the provisioning of healthcare.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Practitioner">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Practitioner</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..* HumanName--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="HumanName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--address 0..* Address--><xsl:if test="f:address">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:for-each select="f:address">
               <map>
                  <xsl:apply-templates select="." mode="Address"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--birthDate 0..1 date (json type: string)--><xsl:if test="f:birthDate">
         <xsl:if test="f:birthDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="birthDate">
               <xsl:value-of select="f:birthDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:birthDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_birthDate">
               <xsl:apply-templates select="f:birthDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--photo 0..* Attachment--><xsl:if test="f:photo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="photo">
            <xsl:for-each select="f:photo">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--qualification 0..* Practitioner.Qualification--><xsl:if test="f:qualification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="qualification">
            <xsl:for-each select="f:qualification">
               <map>
                  <xsl:apply-templates select="." mode="Practitioner.Qualification"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--communication 0..* CodeableConcept--><xsl:if test="f:communication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communication">
            <xsl:for-each select="f:communication">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A person who is directly or indirectly involved in the provisioning of healthcare.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Practitioner.Qualification">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--issuer 0..1 Reference--><xsl:if test="f:issuer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="issuer">
            <xsl:apply-templates select="f:issuer" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PractitionerRole">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">PractitionerRole</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--practitioner 0..1 Reference--><xsl:if test="f:practitioner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="practitioner">
            <xsl:apply-templates select="f:practitioner" mode="Reference"/>
         </map>
      </xsl:if>
          <!--organization 0..1 Reference--><xsl:if test="f:organization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:apply-templates select="f:organization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..* Reference--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--healthcareService 0..* Reference--><xsl:if test="f:healthcareService">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="healthcareService">
            <xsl:for-each select="f:healthcareService">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--availableTime 0..* PractitionerRole.AvailableTime--><xsl:if test="f:availableTime">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="availableTime">
            <xsl:for-each select="f:availableTime">
               <map>
                  <xsl:apply-templates select="." mode="PractitionerRole.AvailableTime"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--notAvailable 0..* PractitionerRole.NotAvailable--><xsl:if test="f:notAvailable">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="notAvailable">
            <xsl:for-each select="f:notAvailable">
               <map>
                  <xsl:apply-templates select="." mode="PractitionerRole.NotAvailable"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--availabilityExceptions 0..1 string (json type: string)--><xsl:if test="f:availabilityExceptions">
         <xsl:if test="f:availabilityExceptions/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availabilityExceptions">
               <xsl:value-of select="f:availabilityExceptions/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availabilityExceptions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_availabilityExceptions">
               <xsl:apply-templates select="f:availabilityExceptions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--endpoint 0..* Reference--><xsl:if test="f:endpoint">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
            <xsl:for-each select="f:endpoint">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PractitionerRole.AvailableTime">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--daysOfWeek 0..* DaysOfWeek (json type: string)--><xsl:if test="f:daysOfWeek">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="daysOfWeek">
            <xsl:for-each select="f:daysOfWeek">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:daysOfWeek[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_daysOfWeek">
               <xsl:for-each select="f:daysOfWeek">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--allDay 0..1 boolean (json type: boolean)--><xsl:if test="f:allDay">
         <xsl:if test="f:allDay/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="allDay">
               <xsl:value-of select="f:allDay/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:allDay[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_allDay">
               <xsl:apply-templates select="f:allDay" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--availableStartTime 0..1 time (json type: string)--><xsl:if test="f:availableStartTime">
         <xsl:if test="f:availableStartTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availableStartTime">
               <xsl:value-of select="f:availableStartTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availableStartTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_availableStartTime">
               <xsl:apply-templates select="f:availableStartTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--availableEndTime 0..1 time (json type: string)--><xsl:if test="f:availableEndTime">
         <xsl:if test="f:availableEndTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="availableEndTime">
               <xsl:value-of select="f:availableEndTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:availableEndTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_availableEndTime">
               <xsl:apply-templates select="f:availableEndTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="PractitionerRole.NotAvailable">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 1..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--during 0..1 Period--><xsl:if test="f:during">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="during">
            <xsl:apply-templates select="f:during" mode="Period"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Procedure">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Procedure</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 EventStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--performedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:performedDateTime">
         <xsl:if test="f:performedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="performedDateTime">
               <xsl:value-of select="f:performedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:performedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_performedDateTime">
               <xsl:apply-templates select="f:performedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--performedPeriod 1..1 Period--><xsl:if test="f:performedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performedPeriod">
            <xsl:apply-templates select="f:performedPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--performedString 1..1 string (json type: string)--><xsl:if test="f:performedString">
         <xsl:if test="f:performedString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="performedString">
               <xsl:value-of select="f:performedString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:performedString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_performedString">
               <xsl:apply-templates select="f:performedString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--performedAge 1..1 Age--><xsl:if test="f:performedAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performedAge">
            <xsl:apply-templates select="f:performedAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--performedRange 1..1 Range--><xsl:if test="f:performedRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performedRange">
            <xsl:apply-templates select="f:performedRange" mode="Range"/>
         </map>
      </xsl:if>
          
          <!--recorder 0..1 Reference--><xsl:if test="f:recorder">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="recorder">
            <xsl:apply-templates select="f:recorder" mode="Reference"/>
         </map>
      </xsl:if>
          <!--asserter 0..1 Reference--><xsl:if test="f:asserter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="asserter">
            <xsl:apply-templates select="f:asserter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performer 0..* Procedure.Performer--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Procedure.Performer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..* CodeableConcept--><xsl:if test="f:bodySite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:for-each select="f:bodySite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--outcome 0..1 CodeableConcept--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--report 0..* Reference--><xsl:if test="f:report">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="report">
            <xsl:for-each select="f:report">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--complication 0..* CodeableConcept--><xsl:if test="f:complication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="complication">
            <xsl:for-each select="f:complication">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--complicationDetail 0..* Reference--><xsl:if test="f:complicationDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="complicationDetail">
            <xsl:for-each select="f:complicationDetail">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--followUp 0..* CodeableConcept--><xsl:if test="f:followUp">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="followUp">
            <xsl:for-each select="f:followUp">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--focalDevice 0..* Procedure.FocalDevice--><xsl:if test="f:focalDevice">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="focalDevice">
            <xsl:for-each select="f:focalDevice">
               <map>
                  <xsl:apply-templates select="." mode="Procedure.FocalDevice"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--usedReference 0..* Reference--><xsl:if test="f:usedReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usedReference">
            <xsl:for-each select="f:usedReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--usedCode 0..* CodeableConcept--><xsl:if test="f:usedCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usedCode">
            <xsl:for-each select="f:usedCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Procedure.Performer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--function 0..1 CodeableConcept--><xsl:if test="f:function">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="function">
            <xsl:apply-templates select="f:function" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--actor 1..1 Reference--><xsl:if test="f:actor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:apply-templates select="f:actor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onBehalfOf 0..1 Reference--><xsl:if test="f:onBehalfOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onBehalfOf">
            <xsl:apply-templates select="f:onBehalfOf" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Procedure.FocalDevice">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 0..1 CodeableConcept--><xsl:if test="f:action">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:apply-templates select="f:action" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--manipulated 1..1 Reference--><xsl:if test="f:manipulated">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="manipulated">
            <xsl:apply-templates select="f:manipulated" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Provenance">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Provenance</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--target 1..* Reference--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--occurredPeriod 1..1 Period--><xsl:if test="f:occurredPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurredPeriod">
            <xsl:apply-templates select="f:occurredPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurredDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurredDateTime">
         <xsl:if test="f:occurredDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurredDateTime">
               <xsl:value-of select="f:occurredDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurredDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurredDateTime">
               <xsl:apply-templates select="f:occurredDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--recorded 1..1 instant (json type: string)--><xsl:if test="f:recorded">
         <xsl:if test="f:recorded/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="recorded">
               <xsl:value-of select="f:recorded/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:recorded[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_recorded">
               <xsl:apply-templates select="f:recorded" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--policy 0..* uri (json type: string)--><xsl:if test="f:policy">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="policy">
            <xsl:for-each select="f:policy">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:policy[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_policy">
               <xsl:for-each select="f:policy">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reason 0..* CodeableConcept--><xsl:if test="f:reason">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
            <xsl:for-each select="f:reason">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--activity 0..1 CodeableConcept--><xsl:if test="f:activity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="activity">
            <xsl:apply-templates select="f:activity" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--agent 1..* Provenance.Agent--><xsl:if test="f:agent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="agent">
            <xsl:for-each select="f:agent">
               <map>
                  <xsl:apply-templates select="." mode="Provenance.Agent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--entity 0..* Provenance.Entity--><xsl:if test="f:entity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="entity">
            <xsl:for-each select="f:entity">
               <map>
                  <xsl:apply-templates select="." mode="Provenance.Entity"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--signature 0..* Signature--><xsl:if test="f:signature">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="signature">
            <xsl:for-each select="f:signature">
               <map>
                  <xsl:apply-templates select="." mode="Signature"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Provenance.Agent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--role 0..* CodeableConcept--><xsl:if test="f:role">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:for-each select="f:role">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--who 1..1 Reference--><xsl:if test="f:who">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="who">
            <xsl:apply-templates select="f:who" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onBehalfOf 0..1 Reference--><xsl:if test="f:onBehalfOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onBehalfOf">
            <xsl:apply-templates select="f:onBehalfOf" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Provenance.Entity">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--role 1..1 ProvenanceEntityRole (json type: string)--><xsl:if test="f:role">
         <xsl:if test="f:role/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="role">
               <xsl:value-of select="f:role/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:role[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_role">
               <xsl:apply-templates select="f:role" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--what 1..1 Reference--><xsl:if test="f:what">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="what">
            <xsl:apply-templates select="f:what" mode="Reference"/>
         </map>
      </xsl:if>
          <!--agent 0..* Provenance.Agent--><xsl:if test="f:agent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="agent">
            <xsl:for-each select="f:agent">
               <map>
                  <xsl:apply-templates select="." mode="Provenance.Agent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How an entity was used in an activity.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ProvenanceEntityRole">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Questionnaire">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Questionnaire</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--derivedFrom 0..* canonical (json type: string)--><xsl:if test="f:derivedFrom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
            <xsl:for-each select="f:derivedFrom">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:derivedFrom[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_derivedFrom">
               <xsl:for-each select="f:derivedFrom">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subjectType 0..* code (json type: string)--><xsl:if test="f:subjectType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subjectType">
            <xsl:for-each select="f:subjectType">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:subjectType[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_subjectType">
               <xsl:for-each select="f:subjectType">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--code 0..* Coding--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--item 0..* Questionnaire.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="Questionnaire.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Questionnaire.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--linkId 1..1 string (json type: string)--><xsl:if test="f:linkId">
         <xsl:if test="f:linkId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
               <xsl:value-of select="f:linkId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:linkId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:apply-templates select="f:linkId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 0..1 uri (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..* Coding--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prefix 0..1 string (json type: string)--><xsl:if test="f:prefix">
         <xsl:if test="f:prefix/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="prefix">
               <xsl:value-of select="f:prefix/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:prefix[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_prefix">
               <xsl:apply-templates select="f:prefix" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 QuestionnaireItemType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enableWhen 0..* Questionnaire.EnableWhen--><xsl:if test="f:enableWhen">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="enableWhen">
            <xsl:for-each select="f:enableWhen">
               <map>
                  <xsl:apply-templates select="." mode="Questionnaire.EnableWhen"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--enableBehavior 0..1 EnableWhenBehavior (json type: string)--><xsl:if test="f:enableBehavior">
         <xsl:if test="f:enableBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="enableBehavior">
               <xsl:value-of select="f:enableBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:enableBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_enableBehavior">
               <xsl:apply-templates select="f:enableBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--required 0..1 boolean (json type: boolean)--><xsl:if test="f:required">
         <xsl:if test="f:required/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="required">
               <xsl:value-of select="f:required/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:required[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_required">
               <xsl:apply-templates select="f:required" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--repeats 0..1 boolean (json type: boolean)--><xsl:if test="f:repeats">
         <xsl:if test="f:repeats/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="repeats">
               <xsl:value-of select="f:repeats/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:repeats[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_repeats">
               <xsl:apply-templates select="f:repeats" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--readOnly 0..1 boolean (json type: boolean)--><xsl:if test="f:readOnly">
         <xsl:if test="f:readOnly/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="readOnly">
               <xsl:value-of select="f:readOnly/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:readOnly[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_readOnly">
               <xsl:apply-templates select="f:readOnly" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--maxLength 0..1 integer (json type: number)--><xsl:if test="f:maxLength">
         <xsl:if test="f:maxLength/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="maxLength">
               <xsl:value-of select="f:maxLength/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:maxLength[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maxLength">
               <xsl:apply-templates select="f:maxLength" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--answerValueSet 0..1 canonical (json type: string)--><xsl:if test="f:answerValueSet">
         <xsl:if test="f:answerValueSet/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="answerValueSet">
               <xsl:value-of select="f:answerValueSet/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:answerValueSet[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerValueSet">
               <xsl:apply-templates select="f:answerValueSet" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--answerOption 0..* Questionnaire.AnswerOption--><xsl:if test="f:answerOption">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="answerOption">
            <xsl:for-each select="f:answerOption">
               <map>
                  <xsl:apply-templates select="." mode="Questionnaire.AnswerOption"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--initial 0..* Questionnaire.Initial--><xsl:if test="f:initial">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="initial">
            <xsl:for-each select="f:initial">
               <map>
                  <xsl:apply-templates select="." mode="Questionnaire.Initial"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--item 0..* Questionnaire.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="Questionnaire.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Questionnaire.EnableWhen">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--question 1..1 string (json type: string)--><xsl:if test="f:question">
         <xsl:if test="f:question/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="question">
               <xsl:value-of select="f:question/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:question[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_question">
               <xsl:apply-templates select="f:question" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operator 1..1 QuestionnaireItemOperator (json type: string)--><xsl:if test="f:operator">
         <xsl:if test="f:operator/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="operator">
               <xsl:value-of select="f:operator/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:operator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_operator">
               <xsl:apply-templates select="f:operator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--answerBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:answerBoolean">
         <xsl:if test="f:answerBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="answerBoolean">
               <xsl:value-of select="f:answerBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:answerBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerBoolean">
               <xsl:apply-templates select="f:answerBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerDecimal 1..1 decimal (json type: number)--><xsl:if test="f:answerDecimal">
         <xsl:if test="f:answerDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="answerDecimal">
               <xsl:value-of select="f:answerDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:answerDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerDecimal">
               <xsl:apply-templates select="f:answerDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerInteger 1..1 integer (json type: number)--><xsl:if test="f:answerInteger">
         <xsl:if test="f:answerInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="answerInteger">
               <xsl:value-of select="f:answerInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:answerInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerInteger">
               <xsl:apply-templates select="f:answerInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerDate 1..1 date (json type: string)--><xsl:if test="f:answerDate">
         <xsl:if test="f:answerDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="answerDate">
               <xsl:value-of select="f:answerDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:answerDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerDate">
               <xsl:apply-templates select="f:answerDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:answerDateTime">
         <xsl:if test="f:answerDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="answerDateTime">
               <xsl:value-of select="f:answerDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:answerDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerDateTime">
               <xsl:apply-templates select="f:answerDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerTime 1..1 time (json type: string)--><xsl:if test="f:answerTime">
         <xsl:if test="f:answerTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="answerTime">
               <xsl:value-of select="f:answerTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:answerTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerTime">
               <xsl:apply-templates select="f:answerTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerString 1..1 string (json type: string)--><xsl:if test="f:answerString">
         <xsl:if test="f:answerString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="answerString">
               <xsl:value-of select="f:answerString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:answerString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_answerString">
               <xsl:apply-templates select="f:answerString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--answerCoding 1..1 Coding--><xsl:if test="f:answerCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="answerCoding">
            <xsl:apply-templates select="f:answerCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--answerQuantity 1..1 Quantity--><xsl:if test="f:answerQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="answerQuantity">
            <xsl:apply-templates select="f:answerQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--answerReference 1..1 Reference--><xsl:if test="f:answerReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="answerReference">
            <xsl:apply-templates select="f:answerReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Questionnaire.AnswerOption">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--initialSelected 0..1 boolean (json type: boolean)--><xsl:if test="f:initialSelected">
         <xsl:if test="f:initialSelected/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="initialSelected">
               <xsl:value-of select="f:initialSelected/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:initialSelected[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_initialSelected">
               <xsl:apply-templates select="f:initialSelected" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Questionnaire.Initial">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Distinguishes groups from questions and display text and indicates data type for questions.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireItemType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Controls how multiple enableWhen values are interpreted -  whether all or any must be true.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="EnableWhenBehavior">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The criteria by which a question is enabled.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireItemOperator">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireResponse">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">QuestionnaireResponse</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--questionnaire 0..1 canonical (json type: string)--><xsl:if test="f:questionnaire">
         <xsl:if test="f:questionnaire/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="questionnaire">
               <xsl:value-of select="f:questionnaire/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:questionnaire[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_questionnaire">
               <xsl:apply-templates select="f:questionnaire" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 QuestionnaireResponseStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--authored 0..1 dateTime (json type: string)--><xsl:if test="f:authored">
         <xsl:if test="f:authored/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authored">
               <xsl:value-of select="f:authored/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authored[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authored">
               <xsl:apply-templates select="f:authored" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--source 0..1 Reference--><xsl:if test="f:source">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:apply-templates select="f:source" mode="Reference"/>
         </map>
      </xsl:if>
          <!--item 0..* QuestionnaireResponse.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="QuestionnaireResponse.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireResponse.Item">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--linkId 1..1 string (json type: string)--><xsl:if test="f:linkId">
         <xsl:if test="f:linkId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="linkId">
               <xsl:value-of select="f:linkId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:linkId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_linkId">
               <xsl:apply-templates select="f:linkId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--definition 0..1 uri (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--text 0..1 string (json type: string)--><xsl:if test="f:text">
         <xsl:if test="f:text/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="text">
               <xsl:value-of select="f:text/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:text[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_text">
               <xsl:apply-templates select="f:text" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--answer 0..* QuestionnaireResponse.Answer--><xsl:if test="f:answer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="answer">
            <xsl:for-each select="f:answer">
               <map>
                  <xsl:apply-templates select="." mode="QuestionnaireResponse.Answer"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--item 0..* QuestionnaireResponse.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="QuestionnaireResponse.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireResponse.Answer">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--item 0..* QuestionnaireResponse.Item--><xsl:if test="f:item">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="item">
            <xsl:for-each select="f:item">
               <map>
                  <xsl:apply-templates select="." mode="QuestionnaireResponse.Item"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Lifecycle status of the questionnaire response.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="QuestionnaireResponseStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RelatedPerson">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">RelatedPerson</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--relationship 0..* CodeableConcept--><xsl:if test="f:relationship">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:for-each select="f:relationship">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..* HumanName--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="HumanName"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--telecom 0..* ContactPoint--><xsl:if test="f:telecom">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="telecom">
            <xsl:for-each select="f:telecom">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--gender 0..1 AdministrativeGender (json type: string)--><xsl:if test="f:gender">
         <xsl:if test="f:gender/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="gender">
               <xsl:value-of select="f:gender/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:gender[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_gender">
               <xsl:apply-templates select="f:gender" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--birthDate 0..1 date (json type: string)--><xsl:if test="f:birthDate">
         <xsl:if test="f:birthDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="birthDate">
               <xsl:value-of select="f:birthDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:birthDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_birthDate">
               <xsl:apply-templates select="f:birthDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--address 0..* Address--><xsl:if test="f:address">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="address">
            <xsl:for-each select="f:address">
               <map>
                  <xsl:apply-templates select="." mode="Address"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--photo 0..* Attachment--><xsl:if test="f:photo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="photo">
            <xsl:for-each select="f:photo">
               <map>
                  <xsl:apply-templates select="." mode="Attachment"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--communication 0..* RelatedPerson.Communication--><xsl:if test="f:communication">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communication">
            <xsl:for-each select="f:communication">
               <map>
                  <xsl:apply-templates select="." mode="RelatedPerson.Communication"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RelatedPerson.Communication">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--language 1..1 CodeableConcept--><xsl:if test="f:language">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:apply-templates select="f:language" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--preferred 0..1 boolean (json type: boolean)--><xsl:if test="f:preferred">
         <xsl:if test="f:preferred/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="preferred">
               <xsl:value-of select="f:preferred/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:preferred[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preferred">
               <xsl:apply-templates select="f:preferred" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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".</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestGroup">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">RequestGroup</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--replaces 0..* Reference--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--groupIdentifier 0..1 Identifier--><xsl:if test="f:groupIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="groupIdentifier">
            <xsl:apply-templates select="f:groupIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 1..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intent 1..1 RequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..1 Reference--><xsl:if test="f:author">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:apply-templates select="f:author" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--action 0..* RequestGroup.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="RequestGroup.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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".</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestGroup.Action">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--prefix 0..1 string (json type: string)--><xsl:if test="f:prefix">
         <xsl:if test="f:prefix/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="prefix">
               <xsl:value-of select="f:prefix/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:prefix[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_prefix">
               <xsl:apply-templates select="f:prefix" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--textEquivalent 0..1 string (json type: string)--><xsl:if test="f:textEquivalent">
         <xsl:if test="f:textEquivalent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="textEquivalent">
               <xsl:value-of select="f:textEquivalent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:textEquivalent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_textEquivalent">
               <xsl:apply-templates select="f:textEquivalent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..* CodeableConcept--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--documentation 0..* RelatedArtifact--><xsl:if test="f:documentation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
            <xsl:for-each select="f:documentation">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..* RequestGroup.Condition--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <map>
                  <xsl:apply-templates select="." mode="RequestGroup.Condition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedAction 0..* RequestGroup.RelatedAction--><xsl:if test="f:relatedAction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedAction">
            <xsl:for-each select="f:relatedAction">
               <map>
                  <xsl:apply-templates select="." mode="RequestGroup.RelatedAction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--timingDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timingDateTime">
         <xsl:if test="f:timingDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timingDateTime">
               <xsl:value-of select="f:timingDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timingDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timingDateTime">
               <xsl:apply-templates select="f:timingDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timingAge 1..1 Age--><xsl:if test="f:timingAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingAge">
            <xsl:apply-templates select="f:timingAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--timingPeriod 1..1 Period--><xsl:if test="f:timingPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingPeriod">
            <xsl:apply-templates select="f:timingPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--timingDuration 1..1 Duration--><xsl:if test="f:timingDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingDuration">
            <xsl:apply-templates select="f:timingDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--timingRange 1..1 Range--><xsl:if test="f:timingRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingRange">
            <xsl:apply-templates select="f:timingRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--timingTiming 1..1 Timing--><xsl:if test="f:timingTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timingTiming">
            <xsl:apply-templates select="f:timingTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--participant 0..* Reference--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--groupingBehavior 0..1 ActionGroupingBehavior (json type: string)--><xsl:if test="f:groupingBehavior">
         <xsl:if test="f:groupingBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="groupingBehavior">
               <xsl:value-of select="f:groupingBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:groupingBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_groupingBehavior">
               <xsl:apply-templates select="f:groupingBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--selectionBehavior 0..1 ActionSelectionBehavior (json type: string)--><xsl:if test="f:selectionBehavior">
         <xsl:if test="f:selectionBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="selectionBehavior">
               <xsl:value-of select="f:selectionBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:selectionBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_selectionBehavior">
               <xsl:apply-templates select="f:selectionBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requiredBehavior 0..1 ActionRequiredBehavior (json type: string)--><xsl:if test="f:requiredBehavior">
         <xsl:if test="f:requiredBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requiredBehavior">
               <xsl:value-of select="f:requiredBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requiredBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requiredBehavior">
               <xsl:apply-templates select="f:requiredBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--precheckBehavior 0..1 ActionPrecheckBehavior (json type: string)--><xsl:if test="f:precheckBehavior">
         <xsl:if test="f:precheckBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="precheckBehavior">
               <xsl:value-of select="f:precheckBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:precheckBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_precheckBehavior">
               <xsl:apply-templates select="f:precheckBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cardinalityBehavior 0..1 ActionCardinalityBehavior (json type: string)--><xsl:if test="f:cardinalityBehavior">
         <xsl:if test="f:cardinalityBehavior/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="cardinalityBehavior">
               <xsl:value-of select="f:cardinalityBehavior/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:cardinalityBehavior[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cardinalityBehavior">
               <xsl:apply-templates select="f:cardinalityBehavior" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..1 Reference--><xsl:if test="f:resource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:apply-templates select="f:resource" mode="Reference"/>
         </map>
      </xsl:if>
          <!--action 0..* RequestGroup.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="RequestGroup.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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".</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestGroup.Condition">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--kind 1..1 ActionConditionKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 Expression--><xsl:if test="f:expression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
            <xsl:apply-templates select="f:expression" mode="Expression"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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".</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RequestGroup.RelatedAction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--actionId 1..1 id (json type: string)--><xsl:if test="f:actionId">
         <xsl:if test="f:actionId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="actionId">
               <xsl:value-of select="f:actionId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:actionId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actionId">
               <xsl:apply-templates select="f:actionId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--relationship 1..1 ActionRelationshipType (json type: string)--><xsl:if test="f:relationship">
         <xsl:if test="f:relationship/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
               <xsl:value-of select="f:relationship/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:relationship[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relationship">
               <xsl:apply-templates select="f:relationship" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--offsetDuration 1..1 Duration--><xsl:if test="f:offsetDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="offsetDuration">
            <xsl:apply-templates select="f:offsetDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--offsetRange 1..1 Range--><xsl:if test="f:offsetRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="offsetRange">
            <xsl:apply-templates select="f:offsetRange" mode="Range"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ResearchDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--shortTitle 0..1 string (json type: string)--><xsl:if test="f:shortTitle">
         <xsl:if test="f:shortTitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="shortTitle">
               <xsl:value-of select="f:shortTitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:shortTitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_shortTitle">
               <xsl:apply-templates select="f:shortTitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..* string (json type: string)--><xsl:if test="f:comment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
            <xsl:for-each select="f:comment">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:comment[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:for-each select="f:comment">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--library 0..* canonical (json type: string)--><xsl:if test="f:library">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="library">
            <xsl:for-each select="f:library">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:library[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_library">
               <xsl:for-each select="f:library">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--population 1..1 Reference--><xsl:if test="f:population">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:apply-templates select="f:population" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposure 0..1 Reference--><xsl:if test="f:exposure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposure">
            <xsl:apply-templates select="f:exposure" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposureAlternative 0..1 Reference--><xsl:if test="f:exposureAlternative">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposureAlternative">
            <xsl:apply-templates select="f:exposureAlternative" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 0..1 Reference--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchElementDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ResearchElementDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--shortTitle 0..1 string (json type: string)--><xsl:if test="f:shortTitle">
         <xsl:if test="f:shortTitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="shortTitle">
               <xsl:value-of select="f:shortTitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:shortTitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_shortTitle">
               <xsl:apply-templates select="f:shortTitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--subtitle 0..1 string (json type: string)--><xsl:if test="f:subtitle">
         <xsl:if test="f:subtitle/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="subtitle">
               <xsl:value-of select="f:subtitle/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:subtitle[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subtitle">
               <xsl:apply-templates select="f:subtitle" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--subjectCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:subjectCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectCodeableConcept">
            <xsl:apply-templates select="f:subjectCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--subjectReference 1..1 Reference--><xsl:if test="f:subjectReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subjectReference">
            <xsl:apply-templates select="f:subjectReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..* string (json type: string)--><xsl:if test="f:comment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
            <xsl:for-each select="f:comment">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:comment[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:for-each select="f:comment">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--usage 0..1 string (json type: string)--><xsl:if test="f:usage">
         <xsl:if test="f:usage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="usage">
               <xsl:value-of select="f:usage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:usage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_usage">
               <xsl:apply-templates select="f:usage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--library 0..* canonical (json type: string)--><xsl:if test="f:library">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="library">
            <xsl:for-each select="f:library">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:library[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_library">
               <xsl:for-each select="f:library">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 ResearchElementType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variableType 0..1 VariableType (json type: string)--><xsl:if test="f:variableType">
         <xsl:if test="f:variableType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="variableType">
               <xsl:value-of select="f:variableType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:variableType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_variableType">
               <xsl:apply-templates select="f:variableType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--characteristic 1..* ResearchElementDefinition.Characteristic--><xsl:if test="f:characteristic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="characteristic">
            <xsl:for-each select="f:characteristic">
               <map>
                  <xsl:apply-templates select="." mode="ResearchElementDefinition.Characteristic"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchElementDefinition.Characteristic">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--definitionCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:definitionCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definitionCodeableConcept">
            <xsl:apply-templates select="f:definitionCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--definitionCanonical 1..1 canonical (json type: string)--><xsl:if test="f:definitionCanonical">
         <xsl:if test="f:definitionCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definitionCanonical">
               <xsl:value-of select="f:definitionCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definitionCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definitionCanonical">
               <xsl:apply-templates select="f:definitionCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--definitionExpression 1..1 Expression--><xsl:if test="f:definitionExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="definitionExpression">
            <xsl:apply-templates select="f:definitionExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--definitionDataRequirement 1..1 DataRequirement--><xsl:if test="f:definitionDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definitionDataRequirement">
            <xsl:apply-templates select="f:definitionDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
          
          <!--usageContext 0..* UsageContext--><xsl:if test="f:usageContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="usageContext">
            <xsl:for-each select="f:usageContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--exclude 0..1 boolean (json type: boolean)--><xsl:if test="f:exclude">
         <xsl:if test="f:exclude/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="exclude">
               <xsl:value-of select="f:exclude/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:exclude[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_exclude">
               <xsl:apply-templates select="f:exclude" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--unitOfMeasure 0..1 CodeableConcept--><xsl:if test="f:unitOfMeasure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitOfMeasure">
            <xsl:apply-templates select="f:unitOfMeasure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--studyEffectiveDescription 0..1 string (json type: string)--><xsl:if test="f:studyEffectiveDescription">
         <xsl:if test="f:studyEffectiveDescription/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="studyEffectiveDescription">
               <xsl:value-of select="f:studyEffectiveDescription/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:studyEffectiveDescription[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_studyEffectiveDescription">
               <xsl:apply-templates select="f:studyEffectiveDescription" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--studyEffectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:studyEffectiveDateTime">
         <xsl:if test="f:studyEffectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="studyEffectiveDateTime">
               <xsl:value-of select="f:studyEffectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:studyEffectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_studyEffectiveDateTime">
               <xsl:apply-templates select="f:studyEffectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--studyEffectivePeriod 1..1 Period--><xsl:if test="f:studyEffectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="studyEffectivePeriod">
            <xsl:apply-templates select="f:studyEffectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--studyEffectiveDuration 1..1 Duration--><xsl:if test="f:studyEffectiveDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="studyEffectiveDuration">
            <xsl:apply-templates select="f:studyEffectiveDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--studyEffectiveTiming 1..1 Timing--><xsl:if test="f:studyEffectiveTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="studyEffectiveTiming">
            <xsl:apply-templates select="f:studyEffectiveTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--studyEffectiveTimeFromStart 0..1 Duration--><xsl:if test="f:studyEffectiveTimeFromStart">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="studyEffectiveTimeFromStart">
            <xsl:apply-templates select="f:studyEffectiveTimeFromStart" mode="Duration"/>
         </map>
      </xsl:if>
          <!--studyEffectiveGroupMeasure 0..1 GroupMeasure (json type: string)--><xsl:if test="f:studyEffectiveGroupMeasure">
         <xsl:if test="f:studyEffectiveGroupMeasure/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="studyEffectiveGroupMeasure">
               <xsl:value-of select="f:studyEffectiveGroupMeasure/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:studyEffectiveGroupMeasure[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_studyEffectiveGroupMeasure">
               <xsl:apply-templates select="f:studyEffectiveGroupMeasure" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--participantEffectiveDescription 0..1 string (json type: string)--><xsl:if test="f:participantEffectiveDescription">
         <xsl:if test="f:participantEffectiveDescription/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="participantEffectiveDescription">
               <xsl:value-of select="f:participantEffectiveDescription/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:participantEffectiveDescription[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_participantEffectiveDescription">
               <xsl:apply-templates select="f:participantEffectiveDescription" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--participantEffectiveDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:participantEffectiveDateTime">
         <xsl:if test="f:participantEffectiveDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="participantEffectiveDateTime">
               <xsl:value-of select="f:participantEffectiveDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:participantEffectiveDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_participantEffectiveDateTime">
               <xsl:apply-templates select="f:participantEffectiveDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--participantEffectivePeriod 1..1 Period--><xsl:if test="f:participantEffectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectivePeriod">
            <xsl:apply-templates select="f:participantEffectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--participantEffectiveDuration 1..1 Duration--><xsl:if test="f:participantEffectiveDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectiveDuration">
            <xsl:apply-templates select="f:participantEffectiveDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--participantEffectiveTiming 1..1 Timing--><xsl:if test="f:participantEffectiveTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectiveTiming">
            <xsl:apply-templates select="f:participantEffectiveTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--participantEffectiveTimeFromStart 0..1 Duration--><xsl:if test="f:participantEffectiveTimeFromStart">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="participantEffectiveTimeFromStart">
            <xsl:apply-templates select="f:participantEffectiveTimeFromStart" mode="Duration"/>
         </map>
      </xsl:if>
          <!--participantEffectiveGroupMeasure 0..1 GroupMeasure (json type: string)--><xsl:if test="f:participantEffectiveGroupMeasure">
         <xsl:if test="f:participantEffectiveGroupMeasure/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="participantEffectiveGroupMeasure">
               <xsl:value-of select="f:participantEffectiveGroupMeasure/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:participantEffectiveGroupMeasure[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_participantEffectiveGroupMeasure">
               <xsl:apply-templates select="f:participantEffectiveGroupMeasure" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The possible types of research elements (E.g. Population, Exposure, Outcome).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchElementType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The possible types of variables for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VariableType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchStudy">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ResearchStudy</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--protocol 0..* Reference--><xsl:if test="f:protocol">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="protocol">
            <xsl:for-each select="f:protocol">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ResearchStudyStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--primaryPurposeType 0..1 CodeableConcept--><xsl:if test="f:primaryPurposeType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="primaryPurposeType">
            <xsl:apply-templates select="f:primaryPurposeType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--phase 0..1 CodeableConcept--><xsl:if test="f:phase">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="phase">
            <xsl:apply-templates select="f:phase" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--focus 0..* CodeableConcept--><xsl:if test="f:focus">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:for-each select="f:focus">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..* CodeableConcept--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--keyword 0..* CodeableConcept--><xsl:if test="f:keyword">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="keyword">
            <xsl:for-each select="f:keyword">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--location 0..* CodeableConcept--><xsl:if test="f:location">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:for-each select="f:location">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--enrollment 0..* Reference--><xsl:if test="f:enrollment">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="enrollment">
            <xsl:for-each select="f:enrollment">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--sponsor 0..1 Reference--><xsl:if test="f:sponsor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sponsor">
            <xsl:apply-templates select="f:sponsor" mode="Reference"/>
         </map>
      </xsl:if>
          <!--principalInvestigator 0..1 Reference--><xsl:if test="f:principalInvestigator">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="principalInvestigator">
            <xsl:apply-templates select="f:principalInvestigator" mode="Reference"/>
         </map>
      </xsl:if>
          <!--site 0..* Reference--><xsl:if test="f:site">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="site">
            <xsl:for-each select="f:site">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonStopped 0..1 CodeableConcept--><xsl:if test="f:reasonStopped">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reasonStopped">
            <xsl:apply-templates select="f:reasonStopped" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--arm 0..* ResearchStudy.Arm--><xsl:if test="f:arm">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="arm">
            <xsl:for-each select="f:arm">
               <map>
                  <xsl:apply-templates select="." mode="ResearchStudy.Arm"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--objective 0..* ResearchStudy.Objective--><xsl:if test="f:objective">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="objective">
            <xsl:for-each select="f:objective">
               <map>
                  <xsl:apply-templates select="." mode="ResearchStudy.Objective"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchStudy.Arm">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchStudy.Objective">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes that convey the current status of the research study.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchStudyStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A physical entity which is the primary unit of operational and/or administrative interest in a study.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchSubject">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ResearchSubject</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 ResearchSubjectStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--study 1..1 Reference--><xsl:if test="f:study">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="study">
            <xsl:apply-templates select="f:study" mode="Reference"/>
         </map>
      </xsl:if>
          <!--individual 1..1 Reference--><xsl:if test="f:individual">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="individual">
            <xsl:apply-templates select="f:individual" mode="Reference"/>
         </map>
      </xsl:if>
          <!--assignedArm 0..1 string (json type: string)--><xsl:if test="f:assignedArm">
         <xsl:if test="f:assignedArm/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="assignedArm">
               <xsl:value-of select="f:assignedArm/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:assignedArm[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_assignedArm">
               <xsl:apply-templates select="f:assignedArm" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--actualArm 0..1 string (json type: string)--><xsl:if test="f:actualArm">
         <xsl:if test="f:actualArm/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="actualArm">
               <xsl:value-of select="f:actualArm/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:actualArm[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_actualArm">
               <xsl:apply-templates select="f:actualArm" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--consent 0..1 Reference--><xsl:if test="f:consent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="consent">
            <xsl:apply-templates select="f:consent" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Indicates the progression of a study subject through a study.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ResearchSubjectStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskAssessment">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">RiskAssessment</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..1 Reference--><xsl:if test="f:basedOn">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:apply-templates select="f:basedOn" mode="Reference"/>
         </map>
      </xsl:if>
          <!--parent 0..1 Reference--><xsl:if test="f:parent">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:apply-templates select="f:parent" mode="Reference"/>
         </map>
      </xsl:if>
          <!--status 1..1 ObservationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--condition 0..1 Reference--><xsl:if test="f:condition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:apply-templates select="f:condition" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performer 0..1 Reference--><xsl:if test="f:performer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:apply-templates select="f:performer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basis 0..* Reference--><xsl:if test="f:basis">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basis">
            <xsl:for-each select="f:basis">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--prediction 0..* RiskAssessment.Prediction--><xsl:if test="f:prediction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="prediction">
            <xsl:for-each select="f:prediction">
               <map>
                  <xsl:apply-templates select="." mode="RiskAssessment.Prediction"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--mitigation 0..1 string (json type: string)--><xsl:if test="f:mitigation">
         <xsl:if test="f:mitigation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mitigation">
               <xsl:value-of select="f:mitigation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mitigation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mitigation">
               <xsl:apply-templates select="f:mitigation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskAssessment.Prediction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--outcome 0..1 CodeableConcept--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--probabilityDecimal 1..1 decimal (json type: number)--><xsl:if test="f:probabilityDecimal">
         <xsl:if test="f:probabilityDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="probabilityDecimal">
               <xsl:value-of select="f:probabilityDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:probabilityDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_probabilityDecimal">
               <xsl:apply-templates select="f:probabilityDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--probabilityRange 1..1 Range--><xsl:if test="f:probabilityRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="probabilityRange">
            <xsl:apply-templates select="f:probabilityRange" mode="Range"/>
         </map>
      </xsl:if>
          
          <!--qualitativeRisk 0..1 CodeableConcept--><xsl:if test="f:qualitativeRisk">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="qualitativeRisk">
            <xsl:apply-templates select="f:qualitativeRisk" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--relativeRisk 0..1 decimal (json type: number)--><xsl:if test="f:relativeRisk">
         <xsl:if test="f:relativeRisk/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="relativeRisk">
               <xsl:value-of select="f:relativeRisk/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:relativeRisk[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_relativeRisk">
               <xsl:apply-templates select="f:relativeRisk" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--whenPeriod 1..1 Period--><xsl:if test="f:whenPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="whenPeriod">
            <xsl:apply-templates select="f:whenPeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--whenRange 1..1 Range--><xsl:if test="f:whenRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="whenRange">
            <xsl:apply-templates select="f:whenRange" mode="Range"/>
         </map>
      </xsl:if>
          
          <!--rationale 0..1 string (json type: string)--><xsl:if test="f:rationale">
         <xsl:if test="f:rationale/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="rationale">
               <xsl:value-of select="f:rationale/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:rationale[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_rationale">
               <xsl:apply-templates select="f:rationale" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">RiskEvidenceSynthesis</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--approvalDate 0..1 date (json type: string)--><xsl:if test="f:approvalDate">
         <xsl:if test="f:approvalDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="approvalDate">
               <xsl:value-of select="f:approvalDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:approvalDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_approvalDate">
               <xsl:apply-templates select="f:approvalDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastReviewDate 0..1 date (json type: string)--><xsl:if test="f:lastReviewDate">
         <xsl:if test="f:lastReviewDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastReviewDate">
               <xsl:value-of select="f:lastReviewDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastReviewDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastReviewDate">
               <xsl:apply-templates select="f:lastReviewDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--effectivePeriod 0..1 Period--><xsl:if test="f:effectivePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="effectivePeriod">
            <xsl:apply-templates select="f:effectivePeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--topic 0..* CodeableConcept--><xsl:if test="f:topic">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="topic">
            <xsl:for-each select="f:topic">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--author 0..* ContactDetail--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--editor 0..* ContactDetail--><xsl:if test="f:editor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="editor">
            <xsl:for-each select="f:editor">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reviewer 0..* ContactDetail--><xsl:if test="f:reviewer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reviewer">
            <xsl:for-each select="f:reviewer">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--endorser 0..* ContactDetail--><xsl:if test="f:endorser">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="endorser">
            <xsl:for-each select="f:endorser">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relatedArtifact 0..* RelatedArtifact--><xsl:if test="f:relatedArtifact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relatedArtifact">
            <xsl:for-each select="f:relatedArtifact">
               <map>
                  <xsl:apply-templates select="." mode="RelatedArtifact"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--synthesisType 0..1 CodeableConcept--><xsl:if test="f:synthesisType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="synthesisType">
            <xsl:apply-templates select="f:synthesisType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--studyType 0..1 CodeableConcept--><xsl:if test="f:studyType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="studyType">
            <xsl:apply-templates select="f:studyType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--population 1..1 Reference--><xsl:if test="f:population">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="population">
            <xsl:apply-templates select="f:population" mode="Reference"/>
         </map>
      </xsl:if>
          <!--exposure 0..1 Reference--><xsl:if test="f:exposure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="exposure">
            <xsl:apply-templates select="f:exposure" mode="Reference"/>
         </map>
      </xsl:if>
          <!--outcome 1..1 Reference--><xsl:if test="f:outcome">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="outcome">
            <xsl:apply-templates select="f:outcome" mode="Reference"/>
         </map>
      </xsl:if>
          <!--sampleSize 0..1 RiskEvidenceSynthesis.SampleSize--><xsl:if test="f:sampleSize">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sampleSize">
            <xsl:apply-templates select="f:sampleSize" mode="RiskEvidenceSynthesis.SampleSize"/>
         </map>
      </xsl:if>
          <!--riskEstimate 0..1 RiskEvidenceSynthesis.RiskEstimate--><xsl:if test="f:riskEstimate">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="riskEstimate">
            <xsl:apply-templates select="f:riskEstimate" mode="RiskEvidenceSynthesis.RiskEstimate"/>
         </map>
      </xsl:if>
          <!--certainty 0..* RiskEvidenceSynthesis.Certainty--><xsl:if test="f:certainty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="certainty">
            <xsl:for-each select="f:certainty">
               <map>
                  <xsl:apply-templates select="." mode="RiskEvidenceSynthesis.Certainty"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis.SampleSize">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfStudies 0..1 integer (json type: number)--><xsl:if test="f:numberOfStudies">
         <xsl:if test="f:numberOfStudies/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfStudies">
               <xsl:value-of select="f:numberOfStudies/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfStudies[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfStudies">
               <xsl:apply-templates select="f:numberOfStudies" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numberOfParticipants 0..1 integer (json type: number)--><xsl:if test="f:numberOfParticipants">
         <xsl:if test="f:numberOfParticipants/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfParticipants">
               <xsl:value-of select="f:numberOfParticipants/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfParticipants[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfParticipants">
               <xsl:apply-templates select="f:numberOfParticipants" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis.RiskEstimate">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--value 0..1 decimal (json type: number)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--unitOfMeasure 0..1 CodeableConcept--><xsl:if test="f:unitOfMeasure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="unitOfMeasure">
            <xsl:apply-templates select="f:unitOfMeasure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--denominatorCount 0..1 integer (json type: number)--><xsl:if test="f:denominatorCount">
         <xsl:if test="f:denominatorCount/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="denominatorCount">
               <xsl:value-of select="f:denominatorCount/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:denominatorCount[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_denominatorCount">
               <xsl:apply-templates select="f:denominatorCount" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--numeratorCount 0..1 integer (json type: number)--><xsl:if test="f:numeratorCount">
         <xsl:if test="f:numeratorCount/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numeratorCount">
               <xsl:value-of select="f:numeratorCount/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numeratorCount[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numeratorCount">
               <xsl:apply-templates select="f:numeratorCount" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--precisionEstimate 0..* RiskEvidenceSynthesis.PrecisionEstimate--><xsl:if test="f:precisionEstimate">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="precisionEstimate">
            <xsl:for-each select="f:precisionEstimate">
               <map>
                  <xsl:apply-templates select="." mode="RiskEvidenceSynthesis.PrecisionEstimate"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis.PrecisionEstimate">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--level 0..1 decimal (json type: number)--><xsl:if test="f:level">
         <xsl:if test="f:level/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="level">
               <xsl:value-of select="f:level/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:level[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_level">
               <xsl:apply-templates select="f:level" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--from 0..1 decimal (json type: number)--><xsl:if test="f:from">
         <xsl:if test="f:from/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="from">
               <xsl:value-of select="f:from/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:from[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_from">
               <xsl:apply-templates select="f:from" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--to 0..1 decimal (json type: number)--><xsl:if test="f:to">
         <xsl:if test="f:to/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="to">
               <xsl:value-of select="f:to/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:to[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_to">
               <xsl:apply-templates select="f:to" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis.Certainty">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--rating 0..* CodeableConcept--><xsl:if test="f:rating">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rating">
            <xsl:for-each select="f:rating">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--certaintySubcomponent 0..* RiskEvidenceSynthesis.CertaintySubcomponent--><xsl:if test="f:certaintySubcomponent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="certaintySubcomponent">
            <xsl:for-each select="f:certaintySubcomponent">
               <map>
                  <xsl:apply-templates select="." mode="RiskEvidenceSynthesis.CertaintySubcomponent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="RiskEvidenceSynthesis.CertaintySubcomponent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--rating 0..* CodeableConcept--><xsl:if test="f:rating">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rating">
            <xsl:for-each select="f:rating">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A container for slots of time that may be available for booking appointments.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Schedule">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Schedule</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--active 0..1 boolean (json type: boolean)--><xsl:if test="f:active">
         <xsl:if test="f:active/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="active">
               <xsl:value-of select="f:active/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:active[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_active">
               <xsl:apply-templates select="f:active" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--serviceCategory 0..* CodeableConcept--><xsl:if test="f:serviceCategory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceCategory">
            <xsl:for-each select="f:serviceCategory">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceType 0..* CodeableConcept--><xsl:if test="f:serviceType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceType">
            <xsl:for-each select="f:serviceType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--actor 1..* Reference--><xsl:if test="f:actor">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="actor">
            <xsl:for-each select="f:actor">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--planningHorizon 0..1 Period--><xsl:if test="f:planningHorizon">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="planningHorizon">
            <xsl:apply-templates select="f:planningHorizon" mode="Period"/>
         </map>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A search parameter that defines a named search item that can be used to search/filter on a resource.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchParameter">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SearchParameter</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--derivedFrom 0..1 canonical (json type: string)--><xsl:if test="f:derivedFrom">
         <xsl:if test="f:derivedFrom/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="derivedFrom">
               <xsl:value-of select="f:derivedFrom/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:derivedFrom[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_derivedFrom">
               <xsl:apply-templates select="f:derivedFrom" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 1..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--base 1..* code (json type: string)--><xsl:if test="f:base">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="base">
            <xsl:for-each select="f:base">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:base[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_base">
               <xsl:for-each select="f:base">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 SearchParamType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--xpath 0..1 string (json type: string)--><xsl:if test="f:xpath">
         <xsl:if test="f:xpath/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="xpath">
               <xsl:value-of select="f:xpath/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:xpath[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_xpath">
               <xsl:apply-templates select="f:xpath" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--xpathUsage 0..1 XPathUsageType (json type: string)--><xsl:if test="f:xpathUsage">
         <xsl:if test="f:xpathUsage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="xpathUsage">
               <xsl:value-of select="f:xpathUsage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:xpathUsage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_xpathUsage">
               <xsl:apply-templates select="f:xpathUsage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--target 0..* code (json type: string)--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:target[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_target">
               <xsl:for-each select="f:target">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--multipleOr 0..1 boolean (json type: boolean)--><xsl:if test="f:multipleOr">
         <xsl:if test="f:multipleOr/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="multipleOr">
               <xsl:value-of select="f:multipleOr/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:multipleOr[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_multipleOr">
               <xsl:apply-templates select="f:multipleOr" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--multipleAnd 0..1 boolean (json type: boolean)--><xsl:if test="f:multipleAnd">
         <xsl:if test="f:multipleAnd/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="multipleAnd">
               <xsl:value-of select="f:multipleAnd/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:multipleAnd[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_multipleAnd">
               <xsl:apply-templates select="f:multipleAnd" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comparator 0..* SearchComparator (json type: string)--><xsl:if test="f:comparator">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="comparator">
            <xsl:for-each select="f:comparator">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:comparator[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_comparator">
               <xsl:for-each select="f:comparator">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--modifier 0..* SearchModifierCode (json type: string)--><xsl:if test="f:modifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modifier">
            <xsl:for-each select="f:modifier">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:modifier[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_modifier">
               <xsl:for-each select="f:modifier">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--chain 0..* string (json type: string)--><xsl:if test="f:chain">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="chain">
            <xsl:for-each select="f:chain">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:chain[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_chain">
               <xsl:for-each select="f:chain">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--component 0..* SearchParameter.Component--><xsl:if test="f:component">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="component">
            <xsl:for-each select="f:component">
               <map>
                  <xsl:apply-templates select="." mode="SearchParameter.Component"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A search parameter that defines a named search item that can be used to search/filter on a resource.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchParameter.Component">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--definition 1..1 canonical (json type: string)--><xsl:if test="f:definition">
         <xsl:if test="f:definition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="definition">
               <xsl:value-of select="f:definition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:definition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_definition">
               <xsl:apply-templates select="f:definition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 1..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a search parameter relates to the set of elements returned by evaluating its xpath query.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="XPathUsageType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A supported modifier for a search parameter.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchModifierCode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>What Search Comparator Codes are supported in search.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SearchComparator">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ServiceRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ServiceRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..* canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
            <xsl:for-each select="f:instantiatesCanonical">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:for-each select="f:instantiatesCanonical">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..* uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
            <xsl:for-each select="f:instantiatesUri">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:for-each select="f:instantiatesUri">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--replaces 0..* Reference--><xsl:if test="f:replaces">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="replaces">
            <xsl:for-each select="f:replaces">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--requisition 0..1 Identifier--><xsl:if test="f:requisition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requisition">
            <xsl:apply-templates select="f:requisition" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 1..1 RequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--intent 1..1 RequestIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--doNotPerform 0..1 boolean (json type: boolean)--><xsl:if test="f:doNotPerform">
         <xsl:if test="f:doNotPerform/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="doNotPerform">
               <xsl:value-of select="f:doNotPerform/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:doNotPerform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_doNotPerform">
               <xsl:apply-templates select="f:doNotPerform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--orderDetail 0..* CodeableConcept--><xsl:if test="f:orderDetail">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="orderDetail">
            <xsl:for-each select="f:orderDetail">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--quantityQuantity 1..1 Quantity--><xsl:if test="f:quantityQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantityQuantity">
            <xsl:apply-templates select="f:quantityQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--quantityRatio 1..1 Ratio--><xsl:if test="f:quantityRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantityRatio">
            <xsl:apply-templates select="f:quantityRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--quantityRange 1..1 Range--><xsl:if test="f:quantityRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantityRange">
            <xsl:apply-templates select="f:quantityRange" mode="Range"/>
         </map>
      </xsl:if>
          
          <!--subject 1..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          
            
            <!--asNeededBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:asNeededBoolean">
         <xsl:if test="f:asNeededBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="asNeededBoolean">
               <xsl:value-of select="f:asNeededBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:asNeededBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_asNeededBoolean">
               <xsl:apply-templates select="f:asNeededBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--asNeededCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:asNeededCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="asNeededCodeableConcept">
            <xsl:apply-templates select="f:asNeededCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performerType 0..1 CodeableConcept--><xsl:if test="f:performerType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="performerType">
            <xsl:apply-templates select="f:performerType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--performer 0..* Reference--><xsl:if test="f:performer">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performer">
            <xsl:for-each select="f:performer">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--locationCode 0..* CodeableConcept--><xsl:if test="f:locationCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="locationCode">
            <xsl:for-each select="f:locationCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--locationReference 0..* Reference--><xsl:if test="f:locationReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="locationReference">
            <xsl:for-each select="f:locationReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--insurance 0..* Reference--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--supportingInfo 0..* Reference--><xsl:if test="f:supportingInfo">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supportingInfo">
            <xsl:for-each select="f:supportingInfo">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specimen 0..* Reference--><xsl:if test="f:specimen">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specimen">
            <xsl:for-each select="f:specimen">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--bodySite 0..* CodeableConcept--><xsl:if test="f:bodySite">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:for-each select="f:bodySite">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--patientInstruction 0..1 string (json type: string)--><xsl:if test="f:patientInstruction">
         <xsl:if test="f:patientInstruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="patientInstruction">
               <xsl:value-of select="f:patientInstruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:patientInstruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_patientInstruction">
               <xsl:apply-templates select="f:patientInstruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--relevantHistory 0..* Reference--><xsl:if test="f:relevantHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relevantHistory">
            <xsl:for-each select="f:relevantHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A slot of time on a schedule that may be available for booking appointments.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Slot">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Slot</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceCategory 0..* CodeableConcept--><xsl:if test="f:serviceCategory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceCategory">
            <xsl:for-each select="f:serviceCategory">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--serviceType 0..* CodeableConcept--><xsl:if test="f:serviceType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="serviceType">
            <xsl:for-each select="f:serviceType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--specialty 0..* CodeableConcept--><xsl:if test="f:specialty">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="specialty">
            <xsl:for-each select="f:specialty">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--appointmentType 0..1 CodeableConcept--><xsl:if test="f:appointmentType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="appointmentType">
            <xsl:apply-templates select="f:appointmentType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--schedule 1..1 Reference--><xsl:if test="f:schedule">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="schedule">
            <xsl:apply-templates select="f:schedule" mode="Reference"/>
         </map>
      </xsl:if>
          <!--status 1..1 SlotStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--start 1..1 instant (json type: string)--><xsl:if test="f:start">
         <xsl:if test="f:start/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="start">
               <xsl:value-of select="f:start/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:start[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_start">
               <xsl:apply-templates select="f:start" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--end 1..1 instant (json type: string)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--overbooked 0..1 boolean (json type: boolean)--><xsl:if test="f:overbooked">
         <xsl:if test="f:overbooked/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="overbooked">
               <xsl:value-of select="f:overbooked/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:overbooked[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_overbooked">
               <xsl:apply-templates select="f:overbooked" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The free/busy status of the slot.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SlotStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A sample to be used for analysis.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Specimen">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Specimen</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--accessionIdentifier 0..1 Identifier--><xsl:if test="f:accessionIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="accessionIdentifier">
            <xsl:apply-templates select="f:accessionIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--status 0..1 SpecimenStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subject 0..1 Reference--><xsl:if test="f:subject">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="subject">
            <xsl:apply-templates select="f:subject" mode="Reference"/>
         </map>
      </xsl:if>
          <!--receivedTime 0..1 dateTime (json type: string)--><xsl:if test="f:receivedTime">
         <xsl:if test="f:receivedTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="receivedTime">
               <xsl:value-of select="f:receivedTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:receivedTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_receivedTime">
               <xsl:apply-templates select="f:receivedTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parent 0..* Reference--><xsl:if test="f:parent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parent">
            <xsl:for-each select="f:parent">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--request 0..* Reference--><xsl:if test="f:request">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="request">
            <xsl:for-each select="f:request">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--collection 0..1 Specimen.Collection--><xsl:if test="f:collection">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collection">
            <xsl:apply-templates select="f:collection" mode="Specimen.Collection"/>
         </map>
      </xsl:if>
          <!--processing 0..* Specimen.Processing--><xsl:if test="f:processing">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="processing">
            <xsl:for-each select="f:processing">
               <map>
                  <xsl:apply-templates select="." mode="Specimen.Processing"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--container 0..* Specimen.Container--><xsl:if test="f:container">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="container">
            <xsl:for-each select="f:container">
               <map>
                  <xsl:apply-templates select="." mode="Specimen.Container"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--condition 0..* CodeableConcept--><xsl:if test="f:condition">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
            <xsl:for-each select="f:condition">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A sample to be used for analysis.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Specimen.Collection">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--collector 0..1 Reference--><xsl:if test="f:collector">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collector">
            <xsl:apply-templates select="f:collector" mode="Reference"/>
         </map>
      </xsl:if>
          
            
            <!--collectedDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:collectedDateTime">
         <xsl:if test="f:collectedDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="collectedDateTime">
               <xsl:value-of select="f:collectedDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:collectedDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_collectedDateTime">
               <xsl:apply-templates select="f:collectedDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--collectedPeriod 1..1 Period--><xsl:if test="f:collectedPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="collectedPeriod">
            <xsl:apply-templates select="f:collectedPeriod" mode="Period"/>
         </map>
      </xsl:if>
          
          <!--duration 0..1 Duration--><xsl:if test="f:duration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
            <xsl:apply-templates select="f:duration" mode="Duration"/>
         </map>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--bodySite 0..1 CodeableConcept--><xsl:if test="f:bodySite">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="bodySite">
            <xsl:apply-templates select="f:bodySite" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--fastingStatusCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:fastingStatusCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="fastingStatusCodeableConcept">
            <xsl:apply-templates select="f:fastingStatusCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--fastingStatusDuration 1..1 Duration--><xsl:if test="f:fastingStatusDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fastingStatusDuration">
            <xsl:apply-templates select="f:fastingStatusDuration" mode="Duration"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A sample to be used for analysis.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Specimen.Processing">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--procedure 0..1 CodeableConcept--><xsl:if test="f:procedure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="procedure">
            <xsl:apply-templates select="f:procedure" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--additive 0..* Reference--><xsl:if test="f:additive">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="additive">
            <xsl:for-each select="f:additive">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--timeDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:timeDateTime">
         <xsl:if test="f:timeDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timeDateTime">
               <xsl:value-of select="f:timeDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timeDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timeDateTime">
               <xsl:apply-templates select="f:timeDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--timePeriod 1..1 Period--><xsl:if test="f:timePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="timePeriod">
            <xsl:apply-templates select="f:timePeriod" mode="Period"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A sample to be used for analysis.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Specimen.Container">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--capacity 0..1 Quantity--><xsl:if test="f:capacity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="capacity">
            <xsl:apply-templates select="f:capacity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--specimenQuantity 0..1 Quantity--><xsl:if test="f:specimenQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="specimenQuantity">
            <xsl:apply-templates select="f:specimenQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
            
            <!--additiveCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:additiveCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="additiveCodeableConcept">
            <xsl:apply-templates select="f:additiveCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--additiveReference 1..1 Reference--><xsl:if test="f:additiveReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="additiveReference">
            <xsl:apply-templates select="f:additiveReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Codes providing the status/availability of a specimen.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A kind of specimen with associated set of requirements.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SpecimenDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--typeCollected 0..1 CodeableConcept--><xsl:if test="f:typeCollected">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="typeCollected">
            <xsl:apply-templates select="f:typeCollected" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--patientPreparation 0..* CodeableConcept--><xsl:if test="f:patientPreparation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="patientPreparation">
            <xsl:for-each select="f:patientPreparation">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--timeAspect 0..1 string (json type: string)--><xsl:if test="f:timeAspect">
         <xsl:if test="f:timeAspect/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timeAspect">
               <xsl:value-of select="f:timeAspect/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timeAspect[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timeAspect">
               <xsl:apply-templates select="f:timeAspect" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--collection 0..* CodeableConcept--><xsl:if test="f:collection">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="collection">
            <xsl:for-each select="f:collection">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--typeTested 0..* SpecimenDefinition.TypeTested--><xsl:if test="f:typeTested">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="typeTested">
            <xsl:for-each select="f:typeTested">
               <map>
                  <xsl:apply-templates select="." mode="SpecimenDefinition.TypeTested"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A kind of specimen with associated set of requirements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenDefinition.TypeTested">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--isDerived 0..1 boolean (json type: boolean)--><xsl:if test="f:isDerived">
         <xsl:if test="f:isDerived/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isDerived">
               <xsl:value-of select="f:isDerived/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isDerived[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isDerived">
               <xsl:apply-templates select="f:isDerived" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--preference 1..1 SpecimenContainedPreference (json type: string)--><xsl:if test="f:preference">
         <xsl:if test="f:preference/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preference">
               <xsl:value-of select="f:preference/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preference[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preference">
               <xsl:apply-templates select="f:preference" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--container 0..1 SpecimenDefinition.Container--><xsl:if test="f:container">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="container">
            <xsl:apply-templates select="f:container" mode="SpecimenDefinition.Container"/>
         </map>
      </xsl:if>
          <!--requirement 0..1 string (json type: string)--><xsl:if test="f:requirement">
         <xsl:if test="f:requirement/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requirement">
               <xsl:value-of select="f:requirement/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requirement[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requirement">
               <xsl:apply-templates select="f:requirement" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--retentionTime 0..1 Duration--><xsl:if test="f:retentionTime">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="retentionTime">
            <xsl:apply-templates select="f:retentionTime" mode="Duration"/>
         </map>
      </xsl:if>
          <!--rejectionCriterion 0..* CodeableConcept--><xsl:if test="f:rejectionCriterion">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rejectionCriterion">
            <xsl:for-each select="f:rejectionCriterion">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--handling 0..* SpecimenDefinition.Handling--><xsl:if test="f:handling">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="handling">
            <xsl:for-each select="f:handling">
               <map>
                  <xsl:apply-templates select="." mode="SpecimenDefinition.Handling"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A kind of specimen with associated set of requirements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenDefinition.Container">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--material 0..1 CodeableConcept--><xsl:if test="f:material">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="material">
            <xsl:apply-templates select="f:material" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--cap 0..1 CodeableConcept--><xsl:if test="f:cap">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="cap">
            <xsl:apply-templates select="f:cap" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--capacity 0..1 Quantity--><xsl:if test="f:capacity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="capacity">
            <xsl:apply-templates select="f:capacity" mode="Quantity"/>
         </map>
      </xsl:if>
          
            
            <!--minimumVolumeQuantity 1..1 Quantity--><xsl:if test="f:minimumVolumeQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="minimumVolumeQuantity">
            <xsl:apply-templates select="f:minimumVolumeQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--minimumVolumeString 1..1 string (json type: string)--><xsl:if test="f:minimumVolumeString">
         <xsl:if test="f:minimumVolumeString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minimumVolumeString">
               <xsl:value-of select="f:minimumVolumeString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minimumVolumeString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minimumVolumeString">
               <xsl:apply-templates select="f:minimumVolumeString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--additive 0..* SpecimenDefinition.Additive--><xsl:if test="f:additive">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="additive">
            <xsl:for-each select="f:additive">
               <map>
                  <xsl:apply-templates select="." mode="SpecimenDefinition.Additive"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--preparation 0..1 string (json type: string)--><xsl:if test="f:preparation">
         <xsl:if test="f:preparation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="preparation">
               <xsl:value-of select="f:preparation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:preparation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preparation">
               <xsl:apply-templates select="f:preparation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A kind of specimen with associated set of requirements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenDefinition.Additive">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--additiveCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:additiveCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="additiveCodeableConcept">
            <xsl:apply-templates select="f:additiveCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--additiveReference 1..1 Reference--><xsl:if test="f:additiveReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="additiveReference">
            <xsl:apply-templates select="f:additiveReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A kind of specimen with associated set of requirements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenDefinition.Handling">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--temperatureQualifier 0..1 CodeableConcept--><xsl:if test="f:temperatureQualifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="temperatureQualifier">
            <xsl:apply-templates select="f:temperatureQualifier" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--temperatureRange 0..1 Range--><xsl:if test="f:temperatureRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="temperatureRange">
            <xsl:apply-templates select="f:temperatureRange" mode="Range"/>
         </map>
      </xsl:if>
          <!--maxDuration 0..1 Duration--><xsl:if test="f:maxDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="maxDuration">
            <xsl:apply-templates select="f:maxDuration" mode="Duration"/>
         </map>
      </xsl:if>
          <!--instruction 0..1 string (json type: string)--><xsl:if test="f:instruction">
         <xsl:if test="f:instruction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instruction">
               <xsl:value-of select="f:instruction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instruction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instruction">
               <xsl:apply-templates select="f:instruction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Degree of preference of a type of conditioned specimen.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SpecimenContainedPreference">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinition">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">StructureDefinition</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--keyword 0..* Coding--><xsl:if test="f:keyword">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="keyword">
            <xsl:for-each select="f:keyword">
               <map>
                  <xsl:apply-templates select="." mode="Coding"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--fhirVersion 0..1 FHIRVersion (json type: string)--><xsl:if test="f:fhirVersion">
         <xsl:if test="f:fhirVersion/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fhirVersion">
               <xsl:value-of select="f:fhirVersion/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fhirVersion[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fhirVersion">
               <xsl:apply-templates select="f:fhirVersion" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mapping 0..* StructureDefinition.Mapping--><xsl:if test="f:mapping">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="mapping">
            <xsl:for-each select="f:mapping">
               <map>
                  <xsl:apply-templates select="." mode="StructureDefinition.Mapping"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--kind 1..1 StructureDefinitionKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--abstract 1..1 boolean (json type: boolean)--><xsl:if test="f:abstract">
         <xsl:if test="f:abstract/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="abstract">
               <xsl:value-of select="f:abstract/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:abstract[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_abstract">
               <xsl:apply-templates select="f:abstract" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--context 0..* StructureDefinition.Context--><xsl:if test="f:context">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="context">
            <xsl:for-each select="f:context">
               <map>
                  <xsl:apply-templates select="." mode="StructureDefinition.Context"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contextInvariant 0..* string (json type: string)--><xsl:if test="f:contextInvariant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contextInvariant">
            <xsl:for-each select="f:contextInvariant">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:contextInvariant[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_contextInvariant">
               <xsl:for-each select="f:contextInvariant">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--type 1..1 uri (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--baseDefinition 0..1 canonical (json type: string)--><xsl:if test="f:baseDefinition">
         <xsl:if test="f:baseDefinition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="baseDefinition">
               <xsl:value-of select="f:baseDefinition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:baseDefinition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_baseDefinition">
               <xsl:apply-templates select="f:baseDefinition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--derivation 0..1 TypeDerivationRule (json type: string)--><xsl:if test="f:derivation">
         <xsl:if test="f:derivation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="derivation">
               <xsl:value-of select="f:derivation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:derivation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_derivation">
               <xsl:apply-templates select="f:derivation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--snapshot 0..1 StructureDefinition.Snapshot--><xsl:if test="f:snapshot">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="snapshot">
            <xsl:apply-templates select="f:snapshot" mode="StructureDefinition.Snapshot"/>
         </map>
      </xsl:if>
          <!--differential 0..1 StructureDefinition.Differential--><xsl:if test="f:differential">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="differential">
            <xsl:apply-templates select="f:differential" mode="StructureDefinition.Differential"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinition.Mapping">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identity 1..1 id (json type: string)--><xsl:if test="f:identity">
         <xsl:if test="f:identity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identity">
               <xsl:value-of select="f:identity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identity">
               <xsl:apply-templates select="f:identity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--uri 0..1 uri (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinition.Context">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 ExtensionContextType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 1..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinition.Snapshot">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--element 1..* ElementDefinition--><xsl:if test="f:element">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="element">
            <xsl:for-each select="f:element">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinition.Differential">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--element 1..* ElementDefinition--><xsl:if test="f:element">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="element">
            <xsl:for-each select="f:element">
               <map>
                  <xsl:apply-templates select="." mode="ElementDefinition"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Defines the type of structure that a definition is describing.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureDefinitionKind">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How a type relates to its baseDefinition.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TypeDerivationRule">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How an extension context is interpreted.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ExtensionContextType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">StructureMap</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--structure 0..* StructureMap.Structure--><xsl:if test="f:structure">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="structure">
            <xsl:for-each select="f:structure">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Structure"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--import 0..* canonical (json type: string)--><xsl:if test="f:import">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="import">
            <xsl:for-each select="f:import">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:import[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_import">
               <xsl:for-each select="f:import">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--group 1..* StructureMap.Group--><xsl:if test="f:group">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="group">
            <xsl:for-each select="f:group">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Group"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Structure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--url 1..1 canonical (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mode 1..1 StructureMapModelMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--alias 0..1 string (json type: string)--><xsl:if test="f:alias">
         <xsl:if test="f:alias/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="alias">
               <xsl:value-of select="f:alias/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:alias[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_alias">
               <xsl:apply-templates select="f:alias" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Group">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 id (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--extends 0..1 id (json type: string)--><xsl:if test="f:extends">
         <xsl:if test="f:extends/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="extends">
               <xsl:value-of select="f:extends/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:extends[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_extends">
               <xsl:apply-templates select="f:extends" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--typeMode 1..1 StructureMapGroupTypeMode (json type: string)--><xsl:if test="f:typeMode">
         <xsl:if test="f:typeMode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="typeMode">
               <xsl:value-of select="f:typeMode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:typeMode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_typeMode">
               <xsl:apply-templates select="f:typeMode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--input 1..* StructureMap.Input--><xsl:if test="f:input">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="input">
            <xsl:for-each select="f:input">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Input"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--rule 1..* StructureMap.Rule--><xsl:if test="f:rule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rule">
            <xsl:for-each select="f:rule">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Rule"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Input">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 id (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 string (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--mode 1..1 StructureMapInputMode (json type: string)--><xsl:if test="f:mode">
         <xsl:if test="f:mode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="mode">
               <xsl:value-of select="f:mode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:mode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_mode">
               <xsl:apply-templates select="f:mode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Rule">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 id (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 1..* StructureMap.Source--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Source"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--target 0..* StructureMap.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--rule 0..* StructureMap.Rule--><xsl:if test="f:rule">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="rule">
            <xsl:for-each select="f:rule">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Rule"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--dependent 0..* StructureMap.Dependent--><xsl:if test="f:dependent">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="dependent">
            <xsl:for-each select="f:dependent">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Dependent"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Source">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--context 1..1 id (json type: string)--><xsl:if test="f:context">
         <xsl:if test="f:context/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="context">
               <xsl:value-of select="f:context/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:context[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_context">
               <xsl:apply-templates select="f:context" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--min 0..1 integer (json type: number)--><xsl:if test="f:min">
         <xsl:if test="f:min/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="min">
               <xsl:value-of select="f:min/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:min[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_min">
               <xsl:apply-templates select="f:min" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--max 0..1 string (json type: string)--><xsl:if test="f:max">
         <xsl:if test="f:max/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="max">
               <xsl:value-of select="f:max/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:max[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_max">
               <xsl:apply-templates select="f:max" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 string (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--defaultValueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:defaultValueBase64Binary">
         <xsl:if test="f:defaultValueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValueBase64Binary">
               <xsl:value-of select="f:defaultValueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValueBase64Binary">
               <xsl:apply-templates select="f:defaultValueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:defaultValueBoolean">
         <xsl:if test="f:defaultValueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueBoolean">
               <xsl:value-of select="f:defaultValueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:defaultValueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueBoolean">
               <xsl:apply-templates select="f:defaultValueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:defaultValueCanonical">
         <xsl:if test="f:defaultValueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCanonical">
               <xsl:value-of select="f:defaultValueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueCanonical">
               <xsl:apply-templates select="f:defaultValueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueCode 1..1 code (json type: string)--><xsl:if test="f:defaultValueCode">
         <xsl:if test="f:defaultValueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCode">
               <xsl:value-of select="f:defaultValueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueCode">
               <xsl:apply-templates select="f:defaultValueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueDate 1..1 date (json type: string)--><xsl:if test="f:defaultValueDate">
         <xsl:if test="f:defaultValueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDate">
               <xsl:value-of select="f:defaultValueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDate">
               <xsl:apply-templates select="f:defaultValueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:defaultValueDateTime">
         <xsl:if test="f:defaultValueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDateTime">
               <xsl:value-of select="f:defaultValueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDateTime">
               <xsl:apply-templates select="f:defaultValueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:defaultValueDecimal">
         <xsl:if test="f:defaultValueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDecimal">
               <xsl:value-of select="f:defaultValueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueDecimal">
               <xsl:apply-templates select="f:defaultValueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueId 1..1 id (json type: string)--><xsl:if test="f:defaultValueId">
         <xsl:if test="f:defaultValueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueId">
               <xsl:value-of select="f:defaultValueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueId">
               <xsl:apply-templates select="f:defaultValueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueInstant 1..1 instant (json type: string)--><xsl:if test="f:defaultValueInstant">
         <xsl:if test="f:defaultValueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueInstant">
               <xsl:value-of select="f:defaultValueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueInstant">
               <xsl:apply-templates select="f:defaultValueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueInteger 1..1 integer (json type: number)--><xsl:if test="f:defaultValueInteger">
         <xsl:if test="f:defaultValueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueInteger">
               <xsl:value-of select="f:defaultValueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueInteger">
               <xsl:apply-templates select="f:defaultValueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:defaultValueMarkdown">
         <xsl:if test="f:defaultValueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMarkdown">
               <xsl:value-of select="f:defaultValueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueMarkdown">
               <xsl:apply-templates select="f:defaultValueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueOid 1..1 oid (json type: string)--><xsl:if test="f:defaultValueOid">
         <xsl:if test="f:defaultValueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueOid">
               <xsl:value-of select="f:defaultValueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueOid">
               <xsl:apply-templates select="f:defaultValueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:defaultValuePositiveInt">
         <xsl:if test="f:defaultValuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValuePositiveInt">
               <xsl:value-of select="f:defaultValuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValuePositiveInt">
               <xsl:apply-templates select="f:defaultValuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueString 1..1 string (json type: string)--><xsl:if test="f:defaultValueString">
         <xsl:if test="f:defaultValueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueString">
               <xsl:value-of select="f:defaultValueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueString">
               <xsl:apply-templates select="f:defaultValueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueTime 1..1 time (json type: string)--><xsl:if test="f:defaultValueTime">
         <xsl:if test="f:defaultValueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueTime">
               <xsl:value-of select="f:defaultValueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueTime">
               <xsl:apply-templates select="f:defaultValueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:defaultValueUnsignedInt">
         <xsl:if test="f:defaultValueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions"
                    key="defaultValueUnsignedInt">
               <xsl:value-of select="f:defaultValueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:defaultValueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_defaultValueUnsignedInt">
               <xsl:apply-templates select="f:defaultValueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueUri 1..1 uri (json type: string)--><xsl:if test="f:defaultValueUri">
         <xsl:if test="f:defaultValueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUri">
               <xsl:value-of select="f:defaultValueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUri">
               <xsl:apply-templates select="f:defaultValueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueUrl 1..1 url (json type: string)--><xsl:if test="f:defaultValueUrl">
         <xsl:if test="f:defaultValueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUrl">
               <xsl:value-of select="f:defaultValueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUrl">
               <xsl:apply-templates select="f:defaultValueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueUuid 1..1 uuid (json type: string)--><xsl:if test="f:defaultValueUuid">
         <xsl:if test="f:defaultValueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueUuid">
               <xsl:value-of select="f:defaultValueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValueUuid">
               <xsl:apply-templates select="f:defaultValueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--defaultValueAddress 1..1 Address--><xsl:if test="f:defaultValueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAddress">
            <xsl:apply-templates select="f:defaultValueAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--defaultValueAge 1..1 Age--><xsl:if test="f:defaultValueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAge">
            <xsl:apply-templates select="f:defaultValueAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--defaultValueAnnotation 1..1 Annotation--><xsl:if test="f:defaultValueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAnnotation">
            <xsl:apply-templates select="f:defaultValueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
            <!--defaultValueAttachment 1..1 Attachment--><xsl:if test="f:defaultValueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueAttachment">
            <xsl:apply-templates select="f:defaultValueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--defaultValueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:defaultValueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueCodeableConcept">
            <xsl:apply-templates select="f:defaultValueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--defaultValueCoding 1..1 Coding--><xsl:if test="f:defaultValueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCoding">
            <xsl:apply-templates select="f:defaultValueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--defaultValueContactPoint 1..1 ContactPoint--><xsl:if test="f:defaultValueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContactPoint">
            <xsl:apply-templates select="f:defaultValueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
            <!--defaultValueCount 1..1 Count--><xsl:if test="f:defaultValueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueCount">
            <xsl:apply-templates select="f:defaultValueCount" mode="Count"/>
         </map>
      </xsl:if>
            <!--defaultValueDistance 1..1 Distance--><xsl:if test="f:defaultValueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDistance">
            <xsl:apply-templates select="f:defaultValueDistance" mode="Distance"/>
         </map>
      </xsl:if>
            <!--defaultValueDuration 1..1 Duration--><xsl:if test="f:defaultValueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDuration">
            <xsl:apply-templates select="f:defaultValueDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--defaultValueHumanName 1..1 HumanName--><xsl:if test="f:defaultValueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueHumanName">
            <xsl:apply-templates select="f:defaultValueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
            <!--defaultValueIdentifier 1..1 Identifier--><xsl:if test="f:defaultValueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueIdentifier">
            <xsl:apply-templates select="f:defaultValueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
            <!--defaultValueMoney 1..1 Money--><xsl:if test="f:defaultValueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMoney">
            <xsl:apply-templates select="f:defaultValueMoney" mode="Money"/>
         </map>
      </xsl:if>
            <!--defaultValuePeriod 1..1 Period--><xsl:if test="f:defaultValuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValuePeriod">
            <xsl:apply-templates select="f:defaultValuePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--defaultValueQuantity 1..1 Quantity--><xsl:if test="f:defaultValueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueQuantity">
            <xsl:apply-templates select="f:defaultValueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--defaultValueRange 1..1 Range--><xsl:if test="f:defaultValueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueRange">
            <xsl:apply-templates select="f:defaultValueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--defaultValueRatio 1..1 Ratio--><xsl:if test="f:defaultValueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueRatio">
            <xsl:apply-templates select="f:defaultValueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--defaultValueReference 1..1 Reference--><xsl:if test="f:defaultValueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueReference">
            <xsl:apply-templates select="f:defaultValueReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--defaultValueSampledData 1..1 SampledData--><xsl:if test="f:defaultValueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueSampledData">
            <xsl:apply-templates select="f:defaultValueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--defaultValueSignature 1..1 Signature--><xsl:if test="f:defaultValueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueSignature">
            <xsl:apply-templates select="f:defaultValueSignature" mode="Signature"/>
         </map>
      </xsl:if>
            <!--defaultValueTiming 1..1 Timing--><xsl:if test="f:defaultValueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueTiming">
            <xsl:apply-templates select="f:defaultValueTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--defaultValueContactDetail 1..1 ContactDetail--><xsl:if test="f:defaultValueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContactDetail">
            <xsl:apply-templates select="f:defaultValueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
            <!--defaultValueContributor 1..1 Contributor--><xsl:if test="f:defaultValueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueContributor">
            <xsl:apply-templates select="f:defaultValueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
            <!--defaultValueDataRequirement 1..1 DataRequirement--><xsl:if test="f:defaultValueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueDataRequirement">
            <xsl:apply-templates select="f:defaultValueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
            <!--defaultValueExpression 1..1 Expression--><xsl:if test="f:defaultValueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueExpression">
            <xsl:apply-templates select="f:defaultValueExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--defaultValueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:defaultValueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueParameterDefinition">
            <xsl:apply-templates select="f:defaultValueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
            <!--defaultValueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:defaultValueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueRelatedArtifact">
            <xsl:apply-templates select="f:defaultValueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
            <!--defaultValueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:defaultValueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueTriggerDefinition">
            <xsl:apply-templates select="f:defaultValueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
            <!--defaultValueUsageContext 1..1 UsageContext--><xsl:if test="f:defaultValueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="defaultValueUsageContext">
            <xsl:apply-templates select="f:defaultValueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
            <!--defaultValueDosage 1..1 Dosage--><xsl:if test="f:defaultValueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueDosage">
            <xsl:apply-templates select="f:defaultValueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
            <!--defaultValueMeta 1..1 Meta--><xsl:if test="f:defaultValueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValueMeta">
            <xsl:apply-templates select="f:defaultValueMeta" mode="Meta"/>
         </map>
      </xsl:if>
          
          <!--element 0..1 string (json type: string)--><xsl:if test="f:element">
         <xsl:if test="f:element/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="element">
               <xsl:value-of select="f:element/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:element[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_element">
               <xsl:apply-templates select="f:element" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--listMode 0..1 StructureMapSourceListMode (json type: string)--><xsl:if test="f:listMode">
         <xsl:if test="f:listMode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="listMode">
               <xsl:value-of select="f:listMode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:listMode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_listMode">
               <xsl:apply-templates select="f:listMode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variable 0..1 id (json type: string)--><xsl:if test="f:variable">
         <xsl:if test="f:variable/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="variable">
               <xsl:value-of select="f:variable/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:variable[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_variable">
               <xsl:apply-templates select="f:variable" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--condition 0..1 string (json type: string)--><xsl:if test="f:condition">
         <xsl:if test="f:condition/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="condition">
               <xsl:value-of select="f:condition/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:condition[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_condition">
               <xsl:apply-templates select="f:condition" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--check 0..1 string (json type: string)--><xsl:if test="f:check">
         <xsl:if test="f:check/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="check">
               <xsl:value-of select="f:check/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:check[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_check">
               <xsl:apply-templates select="f:check" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--logMessage 0..1 string (json type: string)--><xsl:if test="f:logMessage">
         <xsl:if test="f:logMessage/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="logMessage">
               <xsl:value-of select="f:logMessage/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:logMessage[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_logMessage">
               <xsl:apply-templates select="f:logMessage" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--context 0..1 id (json type: string)--><xsl:if test="f:context">
         <xsl:if test="f:context/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="context">
               <xsl:value-of select="f:context/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:context[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_context">
               <xsl:apply-templates select="f:context" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contextType 0..1 StructureMapContextType (json type: string)--><xsl:if test="f:contextType">
         <xsl:if test="f:contextType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contextType">
               <xsl:value-of select="f:contextType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contextType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contextType">
               <xsl:apply-templates select="f:contextType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--element 0..1 string (json type: string)--><xsl:if test="f:element">
         <xsl:if test="f:element/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="element">
               <xsl:value-of select="f:element/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:element[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_element">
               <xsl:apply-templates select="f:element" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variable 0..1 id (json type: string)--><xsl:if test="f:variable">
         <xsl:if test="f:variable/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="variable">
               <xsl:value-of select="f:variable/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:variable[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_variable">
               <xsl:apply-templates select="f:variable" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--listMode 0..* StructureMapTargetListMode (json type: string)--><xsl:if test="f:listMode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="listMode">
            <xsl:for-each select="f:listMode">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:listMode[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_listMode">
               <xsl:for-each select="f:listMode">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--listRuleId 0..1 id (json type: string)--><xsl:if test="f:listRuleId">
         <xsl:if test="f:listRuleId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="listRuleId">
               <xsl:value-of select="f:listRuleId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:listRuleId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_listRuleId">
               <xsl:apply-templates select="f:listRuleId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--transform 0..1 StructureMapTransform (json type: string)--><xsl:if test="f:transform">
         <xsl:if test="f:transform/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="transform">
               <xsl:value-of select="f:transform/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:transform[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_transform">
               <xsl:apply-templates select="f:transform" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parameter 0..* StructureMap.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="StructureMap.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A Map of relationships between 2 structures that can be used to transform data.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMap.Dependent">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 id (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--variable 1..* string (json type: string)--><xsl:if test="f:variable">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="variable">
            <xsl:for-each select="f:variable">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:variable[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_variable">
               <xsl:for-each select="f:variable">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Mode for this instance of data.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapInputMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How to interpret the context.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapContextType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>If field is a list, how to manage the production.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapTargetListMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How data is copied/created.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapTransform">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>If field is a list, how to manage the source.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapSourceListMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>If this is the default rule set to apply for the source type, or this combination of types.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapGroupTypeMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>How the referenced structure is used in this mapping.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="StructureMapModelMode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Subscription">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Subscription</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--status 1..1 SubscriptionStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactPoint--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactPoint"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--end 0..1 instant (json type: string)--><xsl:if test="f:end">
         <xsl:if test="f:end/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="end">
               <xsl:value-of select="f:end/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:end[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_end">
               <xsl:apply-templates select="f:end" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--reason 1..1 string (json type: string)--><xsl:if test="f:reason">
         <xsl:if test="f:reason/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="reason">
               <xsl:value-of select="f:reason/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:reason[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_reason">
               <xsl:apply-templates select="f:reason" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--criteria 1..1 string (json type: string)--><xsl:if test="f:criteria">
         <xsl:if test="f:criteria/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="criteria">
               <xsl:value-of select="f:criteria/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:criteria[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_criteria">
               <xsl:apply-templates select="f:criteria" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--error 0..1 string (json type: string)--><xsl:if test="f:error">
         <xsl:if test="f:error/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="error">
               <xsl:value-of select="f:error/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:error[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_error">
               <xsl:apply-templates select="f:error" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--channel 1..1 Subscription.Channel--><xsl:if test="f:channel">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="channel">
            <xsl:apply-templates select="f:channel" mode="Subscription.Channel"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Subscription.Channel">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 SubscriptionChannelType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--endpoint 0..1 url (json type: string)--><xsl:if test="f:endpoint">
         <xsl:if test="f:endpoint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="endpoint">
               <xsl:value-of select="f:endpoint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:endpoint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_endpoint">
               <xsl:apply-templates select="f:endpoint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--payload 0..1 code (json type: string)--><xsl:if test="f:payload">
         <xsl:if test="f:payload/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="payload">
               <xsl:value-of select="f:payload/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:payload[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_payload">
               <xsl:apply-templates select="f:payload" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--header 0..* string (json type: string)--><xsl:if test="f:header">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="header">
            <xsl:for-each select="f:header">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:header[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_header">
               <xsl:for-each select="f:header">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The status of a subscription.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubscriptionStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of method used to execute a subscription.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubscriptionChannelType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A homogeneous material with a definite composition.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Substance">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Substance</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 FHIRSubstanceStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..* CodeableConcept--><xsl:if test="f:category">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:for-each select="f:category">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--code 1..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--instance 0..* Substance.Instance--><xsl:if test="f:instance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="instance">
            <xsl:for-each select="f:instance">
               <map>
                  <xsl:apply-templates select="." mode="Substance.Instance"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--ingredient 0..* Substance.Ingredient--><xsl:if test="f:ingredient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="ingredient">
            <xsl:for-each select="f:ingredient">
               <map>
                  <xsl:apply-templates select="." mode="Substance.Ingredient"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A homogeneous material with a definite composition.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Substance.Instance">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--expiry 0..1 dateTime (json type: string)--><xsl:if test="f:expiry">
         <xsl:if test="f:expiry/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expiry">
               <xsl:value-of select="f:expiry/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expiry[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expiry">
               <xsl:apply-templates select="f:expiry" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A homogeneous material with a definite composition.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Substance.Ingredient">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--quantity 0..1 Ratio--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Ratio"/>
         </map>
      </xsl:if>
          
            
            <!--substanceCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:substanceCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="substanceCodeableConcept">
            <xsl:apply-templates select="f:substanceCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--substanceReference 1..1 Reference--><xsl:if test="f:substanceReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substanceReference">
            <xsl:apply-templates select="f:substanceReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A code to indicate if the substance is actively used.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="FHIRSubstanceStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceNucleicAcid">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstanceNucleicAcid</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--sequenceType 0..1 CodeableConcept--><xsl:if test="f:sequenceType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sequenceType">
            <xsl:apply-templates select="f:sequenceType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--numberOfSubunits 0..1 integer (json type: number)--><xsl:if test="f:numberOfSubunits">
         <xsl:if test="f:numberOfSubunits/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfSubunits">
               <xsl:value-of select="f:numberOfSubunits/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfSubunits[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfSubunits">
               <xsl:apply-templates select="f:numberOfSubunits" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--areaOfHybridisation 0..1 string (json type: string)--><xsl:if test="f:areaOfHybridisation">
         <xsl:if test="f:areaOfHybridisation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="areaOfHybridisation">
               <xsl:value-of select="f:areaOfHybridisation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:areaOfHybridisation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_areaOfHybridisation">
               <xsl:apply-templates select="f:areaOfHybridisation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--oligoNucleotideType 0..1 CodeableConcept--><xsl:if test="f:oligoNucleotideType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="oligoNucleotideType">
            <xsl:apply-templates select="f:oligoNucleotideType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subunit 0..* SubstanceNucleicAcid.Subunit--><xsl:if test="f:subunit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subunit">
            <xsl:for-each select="f:subunit">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceNucleicAcid.Subunit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceNucleicAcid.Subunit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--subunit 0..1 integer (json type: number)--><xsl:if test="f:subunit">
         <xsl:if test="f:subunit/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="subunit">
               <xsl:value-of select="f:subunit/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:subunit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subunit">
               <xsl:apply-templates select="f:subunit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sequence 0..1 string (json type: string)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--length 0..1 integer (json type: number)--><xsl:if test="f:length">
         <xsl:if test="f:length/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="length">
               <xsl:value-of select="f:length/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:length[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_length">
               <xsl:apply-templates select="f:length" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sequenceAttachment 0..1 Attachment--><xsl:if test="f:sequenceAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sequenceAttachment">
            <xsl:apply-templates select="f:sequenceAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--fivePrime 0..1 CodeableConcept--><xsl:if test="f:fivePrime">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="fivePrime">
            <xsl:apply-templates select="f:fivePrime" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--threePrime 0..1 CodeableConcept--><xsl:if test="f:threePrime">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="threePrime">
            <xsl:apply-templates select="f:threePrime" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--linkage 0..* SubstanceNucleicAcid.Linkage--><xsl:if test="f:linkage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="linkage">
            <xsl:for-each select="f:linkage">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceNucleicAcid.Linkage"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--sugar 0..* SubstanceNucleicAcid.Sugar--><xsl:if test="f:sugar">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="sugar">
            <xsl:for-each select="f:sugar">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceNucleicAcid.Sugar"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceNucleicAcid.Linkage">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--connectivity 0..1 string (json type: string)--><xsl:if test="f:connectivity">
         <xsl:if test="f:connectivity/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="connectivity">
               <xsl:value-of select="f:connectivity/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:connectivity[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_connectivity">
               <xsl:apply-templates select="f:connectivity" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--residueSite 0..1 string (json type: string)--><xsl:if test="f:residueSite">
         <xsl:if test="f:residueSite/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="residueSite">
               <xsl:value-of select="f:residueSite/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:residueSite[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_residueSite">
               <xsl:apply-templates select="f:residueSite" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceNucleicAcid.Sugar">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--residueSite 0..1 string (json type: string)--><xsl:if test="f:residueSite">
         <xsl:if test="f:residueSite/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="residueSite">
               <xsl:value-of select="f:residueSite/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:residueSite[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_residueSite">
               <xsl:apply-templates select="f:residueSite" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstancePolymer</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--class 0..1 CodeableConcept--><xsl:if test="f:class">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:apply-templates select="f:class" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--geometry 0..1 CodeableConcept--><xsl:if test="f:geometry">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="geometry">
            <xsl:apply-templates select="f:geometry" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--copolymerConnectivity 0..* CodeableConcept--><xsl:if test="f:copolymerConnectivity">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="copolymerConnectivity">
            <xsl:for-each select="f:copolymerConnectivity">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--modification 0..* string (json type: string)--><xsl:if test="f:modification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="modification">
            <xsl:for-each select="f:modification">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:modification[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_modification">
               <xsl:for-each select="f:modification">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--monomerSet 0..* SubstancePolymer.MonomerSet--><xsl:if test="f:monomerSet">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="monomerSet">
            <xsl:for-each select="f:monomerSet">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.MonomerSet"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--repeat 0..* SubstancePolymer.Repeat--><xsl:if test="f:repeat">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="repeat">
            <xsl:for-each select="f:repeat">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.Repeat"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.MonomerSet">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--ratioType 0..1 CodeableConcept--><xsl:if test="f:ratioType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="ratioType">
            <xsl:apply-templates select="f:ratioType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--startingMaterial 0..* SubstancePolymer.StartingMaterial--><xsl:if test="f:startingMaterial">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="startingMaterial">
            <xsl:for-each select="f:startingMaterial">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.StartingMaterial"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.StartingMaterial">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--material 0..1 CodeableConcept--><xsl:if test="f:material">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="material">
            <xsl:apply-templates select="f:material" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--isDefining 0..1 boolean (json type: boolean)--><xsl:if test="f:isDefining">
         <xsl:if test="f:isDefining/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isDefining">
               <xsl:value-of select="f:isDefining/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isDefining[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isDefining">
               <xsl:apply-templates select="f:isDefining" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 0..1 SubstanceAmount--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="SubstanceAmount"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.Repeat">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--numberOfUnits 0..1 integer (json type: number)--><xsl:if test="f:numberOfUnits">
         <xsl:if test="f:numberOfUnits/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfUnits">
               <xsl:value-of select="f:numberOfUnits/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfUnits[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfUnits">
               <xsl:apply-templates select="f:numberOfUnits" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--averageMolecularFormula 0..1 string (json type: string)--><xsl:if test="f:averageMolecularFormula">
         <xsl:if test="f:averageMolecularFormula/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="averageMolecularFormula">
               <xsl:value-of select="f:averageMolecularFormula/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:averageMolecularFormula[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_averageMolecularFormula">
               <xsl:apply-templates select="f:averageMolecularFormula" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--repeatUnitAmountType 0..1 CodeableConcept--><xsl:if test="f:repeatUnitAmountType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="repeatUnitAmountType">
            <xsl:apply-templates select="f:repeatUnitAmountType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--repeatUnit 0..* SubstancePolymer.RepeatUnit--><xsl:if test="f:repeatUnit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="repeatUnit">
            <xsl:for-each select="f:repeatUnit">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.RepeatUnit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.RepeatUnit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--orientationOfPolymerisation 0..1 CodeableConcept--><xsl:if test="f:orientationOfPolymerisation">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="orientationOfPolymerisation">
            <xsl:apply-templates select="f:orientationOfPolymerisation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--repeatUnit 0..1 string (json type: string)--><xsl:if test="f:repeatUnit">
         <xsl:if test="f:repeatUnit/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="repeatUnit">
               <xsl:value-of select="f:repeatUnit/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:repeatUnit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_repeatUnit">
               <xsl:apply-templates select="f:repeatUnit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--amount 0..1 SubstanceAmount--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="SubstanceAmount"/>
         </map>
      </xsl:if>
          <!--degreeOfPolymerisation 0..* SubstancePolymer.DegreeOfPolymerisation--><xsl:if test="f:degreeOfPolymerisation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="degreeOfPolymerisation">
            <xsl:for-each select="f:degreeOfPolymerisation">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.DegreeOfPolymerisation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--structuralRepresentation 0..* SubstancePolymer.StructuralRepresentation--><xsl:if test="f:structuralRepresentation">
         <array xmlns="http://www.w3.org/2005/xpath-functions"
                key="structuralRepresentation">
            <xsl:for-each select="f:structuralRepresentation">
               <map>
                  <xsl:apply-templates select="." mode="SubstancePolymer.StructuralRepresentation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.DegreeOfPolymerisation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--degree 0..1 CodeableConcept--><xsl:if test="f:degree">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="degree">
            <xsl:apply-templates select="f:degree" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 SubstanceAmount--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="SubstanceAmount"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstancePolymer.StructuralRepresentation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--representation 0..1 string (json type: string)--><xsl:if test="f:representation">
         <xsl:if test="f:representation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="representation">
               <xsl:value-of select="f:representation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:representation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_representation">
               <xsl:apply-templates select="f:representation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--attachment 0..1 Attachment--><xsl:if test="f:attachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="attachment">
            <xsl:apply-templates select="f:attachment" mode="Attachment"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceProtein">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstanceProtein</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--sequenceType 0..1 CodeableConcept--><xsl:if test="f:sequenceType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sequenceType">
            <xsl:apply-templates select="f:sequenceType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--numberOfSubunits 0..1 integer (json type: number)--><xsl:if test="f:numberOfSubunits">
         <xsl:if test="f:numberOfSubunits/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="numberOfSubunits">
               <xsl:value-of select="f:numberOfSubunits/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:numberOfSubunits[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_numberOfSubunits">
               <xsl:apply-templates select="f:numberOfSubunits" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--disulfideLinkage 0..* string (json type: string)--><xsl:if test="f:disulfideLinkage">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="disulfideLinkage">
            <xsl:for-each select="f:disulfideLinkage">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:disulfideLinkage[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_disulfideLinkage">
               <xsl:for-each select="f:disulfideLinkage">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--subunit 0..* SubstanceProtein.Subunit--><xsl:if test="f:subunit">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subunit">
            <xsl:for-each select="f:subunit">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceProtein.Subunit"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceProtein.Subunit">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--subunit 0..1 integer (json type: number)--><xsl:if test="f:subunit">
         <xsl:if test="f:subunit/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="subunit">
               <xsl:value-of select="f:subunit/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:subunit[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subunit">
               <xsl:apply-templates select="f:subunit" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sequence 0..1 string (json type: string)--><xsl:if test="f:sequence">
         <xsl:if test="f:sequence/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sequence">
               <xsl:value-of select="f:sequence/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sequence[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sequence">
               <xsl:apply-templates select="f:sequence" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--length 0..1 integer (json type: number)--><xsl:if test="f:length">
         <xsl:if test="f:length/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="length">
               <xsl:value-of select="f:length/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:length[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_length">
               <xsl:apply-templates select="f:length" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sequenceAttachment 0..1 Attachment--><xsl:if test="f:sequenceAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sequenceAttachment">
            <xsl:apply-templates select="f:sequenceAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
          <!--nTerminalModificationId 0..1 Identifier--><xsl:if test="f:nTerminalModificationId">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="nTerminalModificationId">
            <xsl:apply-templates select="f:nTerminalModificationId" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--nTerminalModification 0..1 string (json type: string)--><xsl:if test="f:nTerminalModification">
         <xsl:if test="f:nTerminalModification/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="nTerminalModification">
               <xsl:value-of select="f:nTerminalModification/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:nTerminalModification[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_nTerminalModification">
               <xsl:apply-templates select="f:nTerminalModification" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cTerminalModificationId 0..1 Identifier--><xsl:if test="f:cTerminalModificationId">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="cTerminalModificationId">
            <xsl:apply-templates select="f:cTerminalModificationId" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--cTerminalModification 0..1 string (json type: string)--><xsl:if test="f:cTerminalModification">
         <xsl:if test="f:cTerminalModification/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="cTerminalModification">
               <xsl:value-of select="f:cTerminalModification/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:cTerminalModification[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cTerminalModification">
               <xsl:apply-templates select="f:cTerminalModification" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceReferenceInformation">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstanceReferenceInformation</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--gene 0..* SubstanceReferenceInformation.Gene--><xsl:if test="f:gene">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="gene">
            <xsl:for-each select="f:gene">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceReferenceInformation.Gene"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--geneElement 0..* SubstanceReferenceInformation.GeneElement--><xsl:if test="f:geneElement">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="geneElement">
            <xsl:for-each select="f:geneElement">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceReferenceInformation.GeneElement"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--classification 0..* SubstanceReferenceInformation.Classification--><xsl:if test="f:classification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:for-each select="f:classification">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceReferenceInformation.Classification"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--target 0..* SubstanceReferenceInformation.Target--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceReferenceInformation.Target"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceReferenceInformation.Gene">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--geneSequenceOrigin 0..1 CodeableConcept--><xsl:if test="f:geneSequenceOrigin">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="geneSequenceOrigin">
            <xsl:apply-templates select="f:geneSequenceOrigin" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--gene 0..1 CodeableConcept--><xsl:if test="f:gene">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="gene">
            <xsl:apply-templates select="f:gene" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceReferenceInformation.GeneElement">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--element 0..1 Identifier--><xsl:if test="f:element">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="element">
            <xsl:apply-templates select="f:element" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceReferenceInformation.Classification">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--domain 0..1 CodeableConcept--><xsl:if test="f:domain">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="domain">
            <xsl:apply-templates select="f:domain" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--classification 0..1 CodeableConcept--><xsl:if test="f:classification">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="classification">
            <xsl:apply-templates select="f:classification" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--subtype 0..* CodeableConcept--><xsl:if test="f:subtype">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="subtype">
            <xsl:for-each select="f:subtype">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Todo.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceReferenceInformation.Target">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--target 0..1 Identifier--><xsl:if test="f:target">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:apply-templates select="f:target" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--interaction 0..1 CodeableConcept--><xsl:if test="f:interaction">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="interaction">
            <xsl:apply-templates select="f:interaction" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--organism 0..1 CodeableConcept--><xsl:if test="f:organism">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organism">
            <xsl:apply-templates select="f:organism" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--organismType 0..1 CodeableConcept--><xsl:if test="f:organismType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organismType">
            <xsl:apply-templates select="f:organismType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--amountQuantity 1..1 Quantity--><xsl:if test="f:amountQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountQuantity">
            <xsl:apply-templates select="f:amountQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--amountRange 1..1 Range--><xsl:if test="f:amountRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountRange">
            <xsl:apply-templates select="f:amountRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--amountString 1..1 string (json type: string)--><xsl:if test="f:amountString">
         <xsl:if test="f:amountString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountString">
               <xsl:value-of select="f:amountString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountString">
               <xsl:apply-templates select="f:amountString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--amountType 0..1 CodeableConcept--><xsl:if test="f:amountType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountType">
            <xsl:apply-templates select="f:amountType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstanceSourceMaterial</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--sourceMaterialClass 0..1 CodeableConcept--><xsl:if test="f:sourceMaterialClass">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceMaterialClass">
            <xsl:apply-templates select="f:sourceMaterialClass" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--sourceMaterialType 0..1 CodeableConcept--><xsl:if test="f:sourceMaterialType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceMaterialType">
            <xsl:apply-templates select="f:sourceMaterialType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--sourceMaterialState 0..1 CodeableConcept--><xsl:if test="f:sourceMaterialState">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceMaterialState">
            <xsl:apply-templates select="f:sourceMaterialState" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--organismId 0..1 Identifier--><xsl:if test="f:organismId">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organismId">
            <xsl:apply-templates select="f:organismId" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--organismName 0..1 string (json type: string)--><xsl:if test="f:organismName">
         <xsl:if test="f:organismName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="organismName">
               <xsl:value-of select="f:organismName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:organismName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_organismName">
               <xsl:apply-templates select="f:organismName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parentSubstanceId 0..* Identifier--><xsl:if test="f:parentSubstanceId">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parentSubstanceId">
            <xsl:for-each select="f:parentSubstanceId">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--parentSubstanceName 0..* string (json type: string)--><xsl:if test="f:parentSubstanceName">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parentSubstanceName">
            <xsl:for-each select="f:parentSubstanceName">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:parentSubstanceName[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_parentSubstanceName">
               <xsl:for-each select="f:parentSubstanceName">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--countryOfOrigin 0..* CodeableConcept--><xsl:if test="f:countryOfOrigin">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="countryOfOrigin">
            <xsl:for-each select="f:countryOfOrigin">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--geographicalLocation 0..* string (json type: string)--><xsl:if test="f:geographicalLocation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="geographicalLocation">
            <xsl:for-each select="f:geographicalLocation">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:geographicalLocation[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_geographicalLocation">
               <xsl:for-each select="f:geographicalLocation">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--developmentStage 0..1 CodeableConcept--><xsl:if test="f:developmentStage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="developmentStage">
            <xsl:apply-templates select="f:developmentStage" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--fractionDescription 0..* SubstanceSourceMaterial.FractionDescription--><xsl:if test="f:fractionDescription">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fractionDescription">
            <xsl:for-each select="f:fractionDescription">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSourceMaterial.FractionDescription"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--organism 0..1 SubstanceSourceMaterial.Organism--><xsl:if test="f:organism">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organism">
            <xsl:apply-templates select="f:organism" mode="SubstanceSourceMaterial.Organism"/>
         </map>
      </xsl:if>
          <!--partDescription 0..* SubstanceSourceMaterial.PartDescription--><xsl:if test="f:partDescription">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partDescription">
            <xsl:for-each select="f:partDescription">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSourceMaterial.PartDescription"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.FractionDescription">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--fraction 0..1 string (json type: string)--><xsl:if test="f:fraction">
         <xsl:if test="f:fraction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="fraction">
               <xsl:value-of select="f:fraction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:fraction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_fraction">
               <xsl:apply-templates select="f:fraction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--materialType 0..1 CodeableConcept--><xsl:if test="f:materialType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="materialType">
            <xsl:apply-templates select="f:materialType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.Organism">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--family 0..1 CodeableConcept--><xsl:if test="f:family">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="family">
            <xsl:apply-templates select="f:family" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--genus 0..1 CodeableConcept--><xsl:if test="f:genus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="genus">
            <xsl:apply-templates select="f:genus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--species 0..1 CodeableConcept--><xsl:if test="f:species">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="species">
            <xsl:apply-templates select="f:species" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intraspecificType 0..1 CodeableConcept--><xsl:if test="f:intraspecificType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="intraspecificType">
            <xsl:apply-templates select="f:intraspecificType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intraspecificDescription 0..1 string (json type: string)--><xsl:if test="f:intraspecificDescription">
         <xsl:if test="f:intraspecificDescription/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="intraspecificDescription">
               <xsl:value-of select="f:intraspecificDescription/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intraspecificDescription[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_intraspecificDescription">
               <xsl:apply-templates select="f:intraspecificDescription" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--author 0..* SubstanceSourceMaterial.Author--><xsl:if test="f:author">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="author">
            <xsl:for-each select="f:author">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSourceMaterial.Author"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--hybrid 0..1 SubstanceSourceMaterial.Hybrid--><xsl:if test="f:hybrid">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="hybrid">
            <xsl:apply-templates select="f:hybrid" mode="SubstanceSourceMaterial.Hybrid"/>
         </map>
      </xsl:if>
          <!--organismGeneral 0..1 SubstanceSourceMaterial.OrganismGeneral--><xsl:if test="f:organismGeneral">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organismGeneral">
            <xsl:apply-templates select="f:organismGeneral"
                                 mode="SubstanceSourceMaterial.OrganismGeneral"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.Author">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--authorType 0..1 CodeableConcept--><xsl:if test="f:authorType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authorType">
            <xsl:apply-templates select="f:authorType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--authorDescription 0..1 string (json type: string)--><xsl:if test="f:authorDescription">
         <xsl:if test="f:authorDescription/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authorDescription">
               <xsl:value-of select="f:authorDescription/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authorDescription[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authorDescription">
               <xsl:apply-templates select="f:authorDescription" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.Hybrid">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--maternalOrganismId 0..1 string (json type: string)--><xsl:if test="f:maternalOrganismId">
         <xsl:if test="f:maternalOrganismId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maternalOrganismId">
               <xsl:value-of select="f:maternalOrganismId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maternalOrganismId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maternalOrganismId">
               <xsl:apply-templates select="f:maternalOrganismId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--maternalOrganismName 0..1 string (json type: string)--><xsl:if test="f:maternalOrganismName">
         <xsl:if test="f:maternalOrganismName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="maternalOrganismName">
               <xsl:value-of select="f:maternalOrganismName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:maternalOrganismName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_maternalOrganismName">
               <xsl:apply-templates select="f:maternalOrganismName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paternalOrganismId 0..1 string (json type: string)--><xsl:if test="f:paternalOrganismId">
         <xsl:if test="f:paternalOrganismId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paternalOrganismId">
               <xsl:value-of select="f:paternalOrganismId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paternalOrganismId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paternalOrganismId">
               <xsl:apply-templates select="f:paternalOrganismId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paternalOrganismName 0..1 string (json type: string)--><xsl:if test="f:paternalOrganismName">
         <xsl:if test="f:paternalOrganismName/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="paternalOrganismName">
               <xsl:value-of select="f:paternalOrganismName/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:paternalOrganismName[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paternalOrganismName">
               <xsl:apply-templates select="f:paternalOrganismName" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--hybridType 0..1 CodeableConcept--><xsl:if test="f:hybridType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="hybridType">
            <xsl:apply-templates select="f:hybridType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.OrganismGeneral">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--kingdom 0..1 CodeableConcept--><xsl:if test="f:kingdom">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="kingdom">
            <xsl:apply-templates select="f:kingdom" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--phylum 0..1 CodeableConcept--><xsl:if test="f:phylum">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="phylum">
            <xsl:apply-templates select="f:phylum" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--class 0..1 CodeableConcept--><xsl:if test="f:class">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="class">
            <xsl:apply-templates select="f:class" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--order 0..1 CodeableConcept--><xsl:if test="f:order">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="order">
            <xsl:apply-templates select="f:order" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSourceMaterial.PartDescription">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--part 0..1 CodeableConcept--><xsl:if test="f:part">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="part">
            <xsl:apply-templates select="f:part" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--partLocation 0..1 CodeableConcept--><xsl:if test="f:partLocation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="partLocation">
            <xsl:apply-templates select="f:partLocation" mode="CodeableConcept"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SubstanceSpecification</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--domain 0..1 CodeableConcept--><xsl:if test="f:domain">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="domain">
            <xsl:apply-templates select="f:domain" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--moiety 0..* SubstanceSpecification.Moiety--><xsl:if test="f:moiety">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="moiety">
            <xsl:for-each select="f:moiety">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Moiety"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* SubstanceSpecification.Property--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Property"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--referenceInformation 0..1 Reference--><xsl:if test="f:referenceInformation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="referenceInformation">
            <xsl:apply-templates select="f:referenceInformation" mode="Reference"/>
         </map>
      </xsl:if>
          <!--structure 0..1 SubstanceSpecification.Structure--><xsl:if test="f:structure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="structure">
            <xsl:apply-templates select="f:structure" mode="SubstanceSpecification.Structure"/>
         </map>
      </xsl:if>
          <!--code 0..* SubstanceSpecification.Code--><xsl:if test="f:code">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:for-each select="f:code">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Code"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--name 0..* SubstanceSpecification.Name--><xsl:if test="f:name">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:for-each select="f:name">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Name"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--molecularWeight 0..* SubstanceSpecification.MolecularWeight--><xsl:if test="f:molecularWeight">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="molecularWeight">
            <xsl:for-each select="f:molecularWeight">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.MolecularWeight"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relationship 0..* SubstanceSpecification.Relationship--><xsl:if test="f:relationship">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:for-each select="f:relationship">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Relationship"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--nucleicAcid 0..1 Reference--><xsl:if test="f:nucleicAcid">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="nucleicAcid">
            <xsl:apply-templates select="f:nucleicAcid" mode="Reference"/>
         </map>
      </xsl:if>
          <!--polymer 0..1 Reference--><xsl:if test="f:polymer">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="polymer">
            <xsl:apply-templates select="f:polymer" mode="Reference"/>
         </map>
      </xsl:if>
          <!--protein 0..1 Reference--><xsl:if test="f:protein">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="protein">
            <xsl:apply-templates select="f:protein" mode="Reference"/>
         </map>
      </xsl:if>
          <!--sourceMaterial 0..1 Reference--><xsl:if test="f:sourceMaterial">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceMaterial">
            <xsl:apply-templates select="f:sourceMaterial" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Moiety">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--role 0..1 CodeableConcept--><xsl:if test="f:role">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="role">
            <xsl:apply-templates select="f:role" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--stereochemistry 0..1 CodeableConcept--><xsl:if test="f:stereochemistry">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="stereochemistry">
            <xsl:apply-templates select="f:stereochemistry" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--opticalActivity 0..1 CodeableConcept--><xsl:if test="f:opticalActivity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="opticalActivity">
            <xsl:apply-templates select="f:opticalActivity" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--molecularFormula 0..1 string (json type: string)--><xsl:if test="f:molecularFormula">
         <xsl:if test="f:molecularFormula/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="molecularFormula">
               <xsl:value-of select="f:molecularFormula/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:molecularFormula[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_molecularFormula">
               <xsl:apply-templates select="f:molecularFormula" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--amountQuantity 1..1 Quantity--><xsl:if test="f:amountQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountQuantity">
            <xsl:apply-templates select="f:amountQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--amountString 1..1 string (json type: string)--><xsl:if test="f:amountString">
         <xsl:if test="f:amountString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountString">
               <xsl:value-of select="f:amountString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountString">
               <xsl:apply-templates select="f:amountString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Property">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--parameters 0..1 string (json type: string)--><xsl:if test="f:parameters">
         <xsl:if test="f:parameters/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="parameters">
               <xsl:value-of select="f:parameters/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:parameters[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_parameters">
               <xsl:apply-templates select="f:parameters" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--definingSubstanceReference 1..1 Reference--><xsl:if test="f:definingSubstanceReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definingSubstanceReference">
            <xsl:apply-templates select="f:definingSubstanceReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--definingSubstanceCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:definingSubstanceCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="definingSubstanceCodeableConcept">
            <xsl:apply-templates select="f:definingSubstanceCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          
            
            <!--amountQuantity 1..1 Quantity--><xsl:if test="f:amountQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountQuantity">
            <xsl:apply-templates select="f:amountQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--amountString 1..1 string (json type: string)--><xsl:if test="f:amountString">
         <xsl:if test="f:amountString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountString">
               <xsl:value-of select="f:amountString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountString">
               <xsl:apply-templates select="f:amountString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Structure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--stereochemistry 0..1 CodeableConcept--><xsl:if test="f:stereochemistry">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="stereochemistry">
            <xsl:apply-templates select="f:stereochemistry" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--opticalActivity 0..1 CodeableConcept--><xsl:if test="f:opticalActivity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="opticalActivity">
            <xsl:apply-templates select="f:opticalActivity" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--molecularFormula 0..1 string (json type: string)--><xsl:if test="f:molecularFormula">
         <xsl:if test="f:molecularFormula/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="molecularFormula">
               <xsl:value-of select="f:molecularFormula/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:molecularFormula[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_molecularFormula">
               <xsl:apply-templates select="f:molecularFormula" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--molecularFormulaByMoiety 0..1 string (json type: string)--><xsl:if test="f:molecularFormulaByMoiety">
         <xsl:if test="f:molecularFormulaByMoiety/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="molecularFormulaByMoiety">
               <xsl:value-of select="f:molecularFormulaByMoiety/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:molecularFormulaByMoiety[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_molecularFormulaByMoiety">
               <xsl:apply-templates select="f:molecularFormulaByMoiety" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--isotope 0..* SubstanceSpecification.Isotope--><xsl:if test="f:isotope">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="isotope">
            <xsl:for-each select="f:isotope">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Isotope"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--molecularWeight 0..1 SubstanceSpecification.MolecularWeight--><xsl:if test="f:molecularWeight">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="molecularWeight">
            <xsl:apply-templates select="f:molecularWeight"
                                 mode="SubstanceSpecification.MolecularWeight"/>
         </map>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--representation 0..* SubstanceSpecification.Representation--><xsl:if test="f:representation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="representation">
            <xsl:for-each select="f:representation">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Representation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Isotope">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--name 0..1 CodeableConcept--><xsl:if test="f:name">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="name">
            <xsl:apply-templates select="f:name" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--substitution 0..1 CodeableConcept--><xsl:if test="f:substitution">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substitution">
            <xsl:apply-templates select="f:substitution" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--halfLife 0..1 Quantity--><xsl:if test="f:halfLife">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="halfLife">
            <xsl:apply-templates select="f:halfLife" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--molecularWeight 0..1 SubstanceSpecification.MolecularWeight--><xsl:if test="f:molecularWeight">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="molecularWeight">
            <xsl:apply-templates select="f:molecularWeight"
                                 mode="SubstanceSpecification.MolecularWeight"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.MolecularWeight">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--method 0..1 CodeableConcept--><xsl:if test="f:method">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="method">
            <xsl:apply-templates select="f:method" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--amount 0..1 Quantity--><xsl:if test="f:amount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
            <xsl:apply-templates select="f:amount" mode="Quantity"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Representation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--representation 0..1 string (json type: string)--><xsl:if test="f:representation">
         <xsl:if test="f:representation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="representation">
               <xsl:value-of select="f:representation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:representation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_representation">
               <xsl:apply-templates select="f:representation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--attachment 0..1 Attachment--><xsl:if test="f:attachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="attachment">
            <xsl:apply-templates select="f:attachment" mode="Attachment"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Code">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--statusDate 0..1 dateTime (json type: string)--><xsl:if test="f:statusDate">
         <xsl:if test="f:statusDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="statusDate">
               <xsl:value-of select="f:statusDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:statusDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_statusDate">
               <xsl:apply-templates select="f:statusDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--comment 0..1 string (json type: string)--><xsl:if test="f:comment">
         <xsl:if test="f:comment/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="comment">
               <xsl:value-of select="f:comment/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:comment[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_comment">
               <xsl:apply-templates select="f:comment" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Name">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--preferred 0..1 boolean (json type: boolean)--><xsl:if test="f:preferred">
         <xsl:if test="f:preferred/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="preferred">
               <xsl:value-of select="f:preferred/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:preferred[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_preferred">
               <xsl:apply-templates select="f:preferred" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..* CodeableConcept--><xsl:if test="f:language">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:for-each select="f:language">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--domain 0..* CodeableConcept--><xsl:if test="f:domain">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="domain">
            <xsl:for-each select="f:domain">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--synonym 0..* SubstanceSpecification.Name--><xsl:if test="f:synonym">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="synonym">
            <xsl:for-each select="f:synonym">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Name"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--translation 0..* SubstanceSpecification.Name--><xsl:if test="f:translation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="translation">
            <xsl:for-each select="f:translation">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Name"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--official 0..* SubstanceSpecification.Official--><xsl:if test="f:official">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="official">
            <xsl:for-each select="f:official">
               <map>
                  <xsl:apply-templates select="." mode="SubstanceSpecification.Official"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Official">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--authority 0..1 CodeableConcept--><xsl:if test="f:authority">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="authority">
            <xsl:apply-templates select="f:authority" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 0..1 CodeableConcept--><xsl:if test="f:status">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="status">
            <xsl:apply-templates select="f:status" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The detailed description of a substance, typically at a level beyond what is used for prescribing.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SubstanceSpecification.Relationship">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          
            
            <!--substanceReference 1..1 Reference--><xsl:if test="f:substanceReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="substanceReference">
            <xsl:apply-templates select="f:substanceReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--substanceCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:substanceCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="substanceCodeableConcept">
            <xsl:apply-templates select="f:substanceCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
          <!--relationship 0..1 CodeableConcept--><xsl:if test="f:relationship">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="relationship">
            <xsl:apply-templates select="f:relationship" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--isDefining 0..1 boolean (json type: boolean)--><xsl:if test="f:isDefining">
         <xsl:if test="f:isDefining/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isDefining">
               <xsl:value-of select="f:isDefining/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isDefining[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isDefining">
               <xsl:apply-templates select="f:isDefining" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--amountQuantity 1..1 Quantity--><xsl:if test="f:amountQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountQuantity">
            <xsl:apply-templates select="f:amountQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--amountRange 1..1 Range--><xsl:if test="f:amountRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountRange">
            <xsl:apply-templates select="f:amountRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--amountRatio 1..1 Ratio--><xsl:if test="f:amountRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountRatio">
            <xsl:apply-templates select="f:amountRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--amountString 1..1 string (json type: string)--><xsl:if test="f:amountString">
         <xsl:if test="f:amountString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="amountString">
               <xsl:value-of select="f:amountString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:amountString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amountString">
               <xsl:apply-templates select="f:amountString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
          <!--amountRatioLowLimit 0..1 Ratio--><xsl:if test="f:amountRatioLowLimit">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountRatioLowLimit">
            <xsl:apply-templates select="f:amountRatioLowLimit" mode="Ratio"/>
         </map>
      </xsl:if>
          <!--amountType 0..1 CodeableConcept--><xsl:if test="f:amountType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="amountType">
            <xsl:apply-templates select="f:amountType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--source 0..* Reference--><xsl:if test="f:source">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="source">
            <xsl:for-each select="f:source">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Record of delivery of what is supplied.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyDelivery">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SupplyDelivery</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 SupplyDeliveryStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 0..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 0..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--suppliedItem 0..1 SupplyDelivery.SuppliedItem--><xsl:if test="f:suppliedItem">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="suppliedItem">
            <xsl:apply-templates select="f:suppliedItem" mode="SupplyDelivery.SuppliedItem"/>
         </map>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--supplier 0..1 Reference--><xsl:if test="f:supplier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="supplier">
            <xsl:apply-templates select="f:supplier" mode="Reference"/>
         </map>
      </xsl:if>
          <!--destination 0..1 Reference--><xsl:if test="f:destination">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
            <xsl:apply-templates select="f:destination" mode="Reference"/>
         </map>
      </xsl:if>
          <!--receiver 0..* Reference--><xsl:if test="f:receiver">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="receiver">
            <xsl:for-each select="f:receiver">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Record of delivery of what is supplied.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyDelivery.SuppliedItem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--quantity 0..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          
            
            <!--itemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--itemReference 1..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Status of the supply delivery.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyDeliveryStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A record of a request for a medication, substance or device used in the healthcare setting.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyRequest">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">SupplyRequest</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 0..1 SupplyRequestStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--category 0..1 CodeableConcept--><xsl:if test="f:category">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="category">
            <xsl:apply-templates select="f:category" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--itemCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:itemCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemCodeableConcept">
            <xsl:apply-templates select="f:itemCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--itemReference 1..1 Reference--><xsl:if test="f:itemReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="itemReference">
            <xsl:apply-templates select="f:itemReference" mode="Reference"/>
         </map>
      </xsl:if>
          
          <!--quantity 1..1 Quantity--><xsl:if test="f:quantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="quantity">
            <xsl:apply-templates select="f:quantity" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--parameter 0..* SupplyRequest.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="SupplyRequest.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          
            
            <!--occurrenceDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:occurrenceDateTime">
         <xsl:if test="f:occurrenceDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceDateTime">
               <xsl:value-of select="f:occurrenceDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:occurrenceDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_occurrenceDateTime">
               <xsl:apply-templates select="f:occurrenceDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--occurrencePeriod 1..1 Period--><xsl:if test="f:occurrencePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrencePeriod">
            <xsl:apply-templates select="f:occurrencePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--occurrenceTiming 1..1 Timing--><xsl:if test="f:occurrenceTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="occurrenceTiming">
            <xsl:apply-templates select="f:occurrenceTiming" mode="Timing"/>
         </map>
      </xsl:if>
          
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--supplier 0..* Reference--><xsl:if test="f:supplier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="supplier">
            <xsl:for-each select="f:supplier">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonCode 0..* CodeableConcept--><xsl:if test="f:reasonCode">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:for-each select="f:reasonCode">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--reasonReference 0..* Reference--><xsl:if test="f:reasonReference">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:for-each select="f:reasonReference">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--deliverFrom 0..1 Reference--><xsl:if test="f:deliverFrom">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="deliverFrom">
            <xsl:apply-templates select="f:deliverFrom" mode="Reference"/>
         </map>
      </xsl:if>
          <!--deliverTo 0..1 Reference--><xsl:if test="f:deliverTo">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="deliverTo">
            <xsl:apply-templates select="f:deliverTo" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A record of a request for a medication, substance or device used in the healthcare setting.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyRequest.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Status of the supply request.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="SupplyRequestStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A task to be performed.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Task">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">Task</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--instantiatesCanonical 0..1 canonical (json type: string)--><xsl:if test="f:instantiatesCanonical">
         <xsl:if test="f:instantiatesCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesCanonical">
               <xsl:value-of select="f:instantiatesCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instantiatesCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesCanonical">
               <xsl:apply-templates select="f:instantiatesCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--instantiatesUri 0..1 uri (json type: string)--><xsl:if test="f:instantiatesUri">
         <xsl:if test="f:instantiatesUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="instantiatesUri">
               <xsl:value-of select="f:instantiatesUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:instantiatesUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_instantiatesUri">
               <xsl:apply-templates select="f:instantiatesUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--basedOn 0..* Reference--><xsl:if test="f:basedOn">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="basedOn">
            <xsl:for-each select="f:basedOn">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--groupIdentifier 0..1 Identifier--><xsl:if test="f:groupIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="groupIdentifier">
            <xsl:apply-templates select="f:groupIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--partOf 0..* Reference--><xsl:if test="f:partOf">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="partOf">
            <xsl:for-each select="f:partOf">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 TaskStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusReason 0..1 CodeableConcept--><xsl:if test="f:statusReason">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="statusReason">
            <xsl:apply-templates select="f:statusReason" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--businessStatus 0..1 CodeableConcept--><xsl:if test="f:businessStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="businessStatus">
            <xsl:apply-templates select="f:businessStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--intent 1..1 TaskIntent (json type: string)--><xsl:if test="f:intent">
         <xsl:if test="f:intent/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="intent">
               <xsl:value-of select="f:intent/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:intent[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_intent">
               <xsl:apply-templates select="f:intent" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--priority 0..1 RequestPriority (json type: string)--><xsl:if test="f:priority">
         <xsl:if test="f:priority/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="priority">
               <xsl:value-of select="f:priority/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:priority[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_priority">
               <xsl:apply-templates select="f:priority" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 CodeableConcept--><xsl:if test="f:code">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="code">
            <xsl:apply-templates select="f:code" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--focus 0..1 Reference--><xsl:if test="f:focus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="focus">
            <xsl:apply-templates select="f:focus" mode="Reference"/>
         </map>
      </xsl:if>
          <!--for 0..1 Reference--><xsl:if test="f:for">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="for">
            <xsl:apply-templates select="f:for" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--executionPeriod 0..1 Period--><xsl:if test="f:executionPeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="executionPeriod">
            <xsl:apply-templates select="f:executionPeriod" mode="Period"/>
         </map>
      </xsl:if>
          <!--authoredOn 0..1 dateTime (json type: string)--><xsl:if test="f:authoredOn">
         <xsl:if test="f:authoredOn/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="authoredOn">
               <xsl:value-of select="f:authoredOn/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:authoredOn[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_authoredOn">
               <xsl:apply-templates select="f:authoredOn" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--lastModified 0..1 dateTime (json type: string)--><xsl:if test="f:lastModified">
         <xsl:if test="f:lastModified/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastModified">
               <xsl:value-of select="f:lastModified/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastModified[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastModified">
               <xsl:apply-templates select="f:lastModified" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requester 0..1 Reference--><xsl:if test="f:requester">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="requester">
            <xsl:apply-templates select="f:requester" mode="Reference"/>
         </map>
      </xsl:if>
          <!--performerType 0..* CodeableConcept--><xsl:if test="f:performerType">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="performerType">
            <xsl:for-each select="f:performerType">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--owner 0..1 Reference--><xsl:if test="f:owner">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="owner">
            <xsl:apply-templates select="f:owner" mode="Reference"/>
         </map>
      </xsl:if>
          <!--location 0..1 Reference--><xsl:if test="f:location">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="location">
            <xsl:apply-templates select="f:location" mode="Reference"/>
         </map>
      </xsl:if>
          <!--reasonCode 0..1 CodeableConcept--><xsl:if test="f:reasonCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reasonCode">
            <xsl:apply-templates select="f:reasonCode" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--reasonReference 0..1 Reference--><xsl:if test="f:reasonReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="reasonReference">
            <xsl:apply-templates select="f:reasonReference" mode="Reference"/>
         </map>
      </xsl:if>
          <!--insurance 0..* Reference--><xsl:if test="f:insurance">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="insurance">
            <xsl:for-each select="f:insurance">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--relevantHistory 0..* Reference--><xsl:if test="f:relevantHistory">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="relevantHistory">
            <xsl:for-each select="f:relevantHistory">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--restriction 0..1 Task.Restriction--><xsl:if test="f:restriction">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="restriction">
            <xsl:apply-templates select="f:restriction" mode="Task.Restriction"/>
         </map>
      </xsl:if>
          <!--input 0..* Task.Input--><xsl:if test="f:input">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="input">
            <xsl:for-each select="f:input">
               <map>
                  <xsl:apply-templates select="." mode="Task.Input"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--output 0..* Task.Output--><xsl:if test="f:output">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="output">
            <xsl:for-each select="f:output">
               <map>
                  <xsl:apply-templates select="." mode="Task.Output"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A task to be performed.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Task.Restriction">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--repetitions 0..1 positiveInt (json type: number)--><xsl:if test="f:repetitions">
         <xsl:if test="f:repetitions/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="repetitions">
               <xsl:value-of select="f:repetitions/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:repetitions[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_repetitions">
               <xsl:apply-templates select="f:repetitions" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--period 0..1 Period--><xsl:if test="f:period">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="period">
            <xsl:apply-templates select="f:period" mode="Period"/>
         </map>
      </xsl:if>
          <!--recipient 0..* Reference--><xsl:if test="f:recipient">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="recipient">
            <xsl:for-each select="f:recipient">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A task to be performed.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Task.Input">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:valueCanonical">
         <xsl:if test="f:valueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCanonical">
               <xsl:value-of select="f:valueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCanonical">
               <xsl:apply-templates select="f:valueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInstant 1..1 instant (json type: string)--><xsl:if test="f:valueInstant">
         <xsl:if test="f:valueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueInstant">
               <xsl:value-of select="f:valueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInstant">
               <xsl:apply-templates select="f:valueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:valueMarkdown">
         <xsl:if test="f:valueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueMarkdown">
               <xsl:value-of select="f:valueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueMarkdown">
               <xsl:apply-templates select="f:valueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueOid 1..1 oid (json type: string)--><xsl:if test="f:valueOid">
         <xsl:if test="f:valueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueOid">
               <xsl:value-of select="f:valueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueOid">
               <xsl:apply-templates select="f:valueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:valuePositiveInt">
         <xsl:if test="f:valuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valuePositiveInt">
               <xsl:value-of select="f:valuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valuePositiveInt">
               <xsl:apply-templates select="f:valuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:valueUnsignedInt">
         <xsl:if test="f:valueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueUnsignedInt">
               <xsl:value-of select="f:valueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUnsignedInt">
               <xsl:apply-templates select="f:valueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUrl 1..1 url (json type: string)--><xsl:if test="f:valueUrl">
         <xsl:if test="f:valueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUrl">
               <xsl:value-of select="f:valueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUrl">
               <xsl:apply-templates select="f:valueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUuid 1..1 uuid (json type: string)--><xsl:if test="f:valueUuid">
         <xsl:if test="f:valueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUuid">
               <xsl:value-of select="f:valueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUuid">
               <xsl:apply-templates select="f:valueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAddress 1..1 Address--><xsl:if test="f:valueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAddress">
            <xsl:apply-templates select="f:valueAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--valueAge 1..1 Age--><xsl:if test="f:valueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAge">
            <xsl:apply-templates select="f:valueAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--valueAnnotation 1..1 Annotation--><xsl:if test="f:valueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAnnotation">
            <xsl:apply-templates select="f:valueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueContactPoint 1..1 ContactPoint--><xsl:if test="f:valueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactPoint">
            <xsl:apply-templates select="f:valueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
            <!--valueCount 1..1 Count--><xsl:if test="f:valueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCount">
            <xsl:apply-templates select="f:valueCount" mode="Count"/>
         </map>
      </xsl:if>
            <!--valueDistance 1..1 Distance--><xsl:if test="f:valueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDistance">
            <xsl:apply-templates select="f:valueDistance" mode="Distance"/>
         </map>
      </xsl:if>
            <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--valueHumanName 1..1 HumanName--><xsl:if test="f:valueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueHumanName">
            <xsl:apply-templates select="f:valueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
            <!--valueIdentifier 1..1 Identifier--><xsl:if test="f:valueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueIdentifier">
            <xsl:apply-templates select="f:valueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
            <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
            <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--valueSignature 1..1 Signature--><xsl:if test="f:valueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSignature">
            <xsl:apply-templates select="f:valueSignature" mode="Signature"/>
         </map>
      </xsl:if>
            <!--valueTiming 1..1 Timing--><xsl:if test="f:valueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTiming">
            <xsl:apply-templates select="f:valueTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--valueContactDetail 1..1 ContactDetail--><xsl:if test="f:valueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactDetail">
            <xsl:apply-templates select="f:valueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
            <!--valueContributor 1..1 Contributor--><xsl:if test="f:valueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContributor">
            <xsl:apply-templates select="f:valueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
            <!--valueDataRequirement 1..1 DataRequirement--><xsl:if test="f:valueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDataRequirement">
            <xsl:apply-templates select="f:valueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
            <!--valueExpression 1..1 Expression--><xsl:if test="f:valueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueExpression">
            <xsl:apply-templates select="f:valueExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--valueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:valueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="valueParameterDefinition">
            <xsl:apply-templates select="f:valueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
            <!--valueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:valueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRelatedArtifact">
            <xsl:apply-templates select="f:valueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
            <!--valueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:valueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTriggerDefinition">
            <xsl:apply-templates select="f:valueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
            <!--valueUsageContext 1..1 UsageContext--><xsl:if test="f:valueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueUsageContext">
            <xsl:apply-templates select="f:valueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
            <!--valueDosage 1..1 Dosage--><xsl:if test="f:valueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDosage">
            <xsl:apply-templates select="f:valueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
            <!--valueMeta 1..1 Meta--><xsl:if test="f:valueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMeta">
            <xsl:apply-templates select="f:valueMeta" mode="Meta"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A task to be performed.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="Task.Output">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 CodeableConcept--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          
            
            <!--valueBase64Binary 1..1 base64Binary (json type: string)--><xsl:if test="f:valueBase64Binary">
         <xsl:if test="f:valueBase64Binary/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueBase64Binary">
               <xsl:value-of select="f:valueBase64Binary/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueBase64Binary[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBase64Binary">
               <xsl:apply-templates select="f:valueBase64Binary" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCanonical 1..1 canonical (json type: string)--><xsl:if test="f:valueCanonical">
         <xsl:if test="f:valueCanonical/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCanonical">
               <xsl:value-of select="f:valueCanonical/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCanonical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCanonical">
               <xsl:apply-templates select="f:valueCanonical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDate 1..1 date (json type: string)--><xsl:if test="f:valueDate">
         <xsl:if test="f:valueDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDate">
               <xsl:value-of select="f:valueDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDate">
               <xsl:apply-templates select="f:valueDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueId 1..1 id (json type: string)--><xsl:if test="f:valueId">
         <xsl:if test="f:valueId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueId">
               <xsl:value-of select="f:valueId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueId">
               <xsl:apply-templates select="f:valueId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInstant 1..1 instant (json type: string)--><xsl:if test="f:valueInstant">
         <xsl:if test="f:valueInstant/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueInstant">
               <xsl:value-of select="f:valueInstant/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueInstant[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInstant">
               <xsl:apply-templates select="f:valueInstant" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueMarkdown 1..1 markdown (json type: string)--><xsl:if test="f:valueMarkdown">
         <xsl:if test="f:valueMarkdown/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueMarkdown">
               <xsl:value-of select="f:valueMarkdown/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueMarkdown[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueMarkdown">
               <xsl:apply-templates select="f:valueMarkdown" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueOid 1..1 oid (json type: string)--><xsl:if test="f:valueOid">
         <xsl:if test="f:valueOid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueOid">
               <xsl:value-of select="f:valueOid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueOid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueOid">
               <xsl:apply-templates select="f:valueOid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valuePositiveInt 1..1 positiveInt (json type: number)--><xsl:if test="f:valuePositiveInt">
         <xsl:if test="f:valuePositiveInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valuePositiveInt">
               <xsl:value-of select="f:valuePositiveInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valuePositiveInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valuePositiveInt">
               <xsl:apply-templates select="f:valuePositiveInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueTime 1..1 time (json type: string)--><xsl:if test="f:valueTime">
         <xsl:if test="f:valueTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueTime">
               <xsl:value-of select="f:valueTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueTime">
               <xsl:apply-templates select="f:valueTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUnsignedInt 1..1 unsignedInt (json type: number)--><xsl:if test="f:valueUnsignedInt">
         <xsl:if test="f:valueUnsignedInt/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueUnsignedInt">
               <xsl:value-of select="f:valueUnsignedInt/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueUnsignedInt[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUnsignedInt">
               <xsl:apply-templates select="f:valueUnsignedInt" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUrl 1..1 url (json type: string)--><xsl:if test="f:valueUrl">
         <xsl:if test="f:valueUrl/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUrl">
               <xsl:value-of select="f:valueUrl/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUrl">
               <xsl:apply-templates select="f:valueUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUuid 1..1 uuid (json type: string)--><xsl:if test="f:valueUuid">
         <xsl:if test="f:valueUuid/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUuid">
               <xsl:value-of select="f:valueUuid/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUuid[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUuid">
               <xsl:apply-templates select="f:valueUuid" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueAddress 1..1 Address--><xsl:if test="f:valueAddress">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAddress">
            <xsl:apply-templates select="f:valueAddress" mode="Address"/>
         </map>
      </xsl:if>
            <!--valueAge 1..1 Age--><xsl:if test="f:valueAge">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAge">
            <xsl:apply-templates select="f:valueAge" mode="Age"/>
         </map>
      </xsl:if>
            <!--valueAnnotation 1..1 Annotation--><xsl:if test="f:valueAnnotation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAnnotation">
            <xsl:apply-templates select="f:valueAnnotation" mode="Annotation"/>
         </map>
      </xsl:if>
            <!--valueAttachment 1..1 Attachment--><xsl:if test="f:valueAttachment">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueAttachment">
            <xsl:apply-templates select="f:valueAttachment" mode="Attachment"/>
         </map>
      </xsl:if>
            <!--valueCodeableConcept 1..1 CodeableConcept--><xsl:if test="f:valueCodeableConcept">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCodeableConcept">
            <xsl:apply-templates select="f:valueCodeableConcept" mode="CodeableConcept"/>
         </map>
      </xsl:if>
            <!--valueCoding 1..1 Coding--><xsl:if test="f:valueCoding">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCoding">
            <xsl:apply-templates select="f:valueCoding" mode="Coding"/>
         </map>
      </xsl:if>
            <!--valueContactPoint 1..1 ContactPoint--><xsl:if test="f:valueContactPoint">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactPoint">
            <xsl:apply-templates select="f:valueContactPoint" mode="ContactPoint"/>
         </map>
      </xsl:if>
            <!--valueCount 1..1 Count--><xsl:if test="f:valueCount">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueCount">
            <xsl:apply-templates select="f:valueCount" mode="Count"/>
         </map>
      </xsl:if>
            <!--valueDistance 1..1 Distance--><xsl:if test="f:valueDistance">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDistance">
            <xsl:apply-templates select="f:valueDistance" mode="Distance"/>
         </map>
      </xsl:if>
            <!--valueDuration 1..1 Duration--><xsl:if test="f:valueDuration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDuration">
            <xsl:apply-templates select="f:valueDuration" mode="Duration"/>
         </map>
      </xsl:if>
            <!--valueHumanName 1..1 HumanName--><xsl:if test="f:valueHumanName">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueHumanName">
            <xsl:apply-templates select="f:valueHumanName" mode="HumanName"/>
         </map>
      </xsl:if>
            <!--valueIdentifier 1..1 Identifier--><xsl:if test="f:valueIdentifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueIdentifier">
            <xsl:apply-templates select="f:valueIdentifier" mode="Identifier"/>
         </map>
      </xsl:if>
            <!--valueMoney 1..1 Money--><xsl:if test="f:valueMoney">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMoney">
            <xsl:apply-templates select="f:valueMoney" mode="Money"/>
         </map>
      </xsl:if>
            <!--valuePeriod 1..1 Period--><xsl:if test="f:valuePeriod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valuePeriod">
            <xsl:apply-templates select="f:valuePeriod" mode="Period"/>
         </map>
      </xsl:if>
            <!--valueQuantity 1..1 Quantity--><xsl:if test="f:valueQuantity">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueQuantity">
            <xsl:apply-templates select="f:valueQuantity" mode="Quantity"/>
         </map>
      </xsl:if>
            <!--valueRange 1..1 Range--><xsl:if test="f:valueRange">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRange">
            <xsl:apply-templates select="f:valueRange" mode="Range"/>
         </map>
      </xsl:if>
            <!--valueRatio 1..1 Ratio--><xsl:if test="f:valueRatio">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRatio">
            <xsl:apply-templates select="f:valueRatio" mode="Ratio"/>
         </map>
      </xsl:if>
            <!--valueReference 1..1 Reference--><xsl:if test="f:valueReference">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueReference">
            <xsl:apply-templates select="f:valueReference" mode="Reference"/>
         </map>
      </xsl:if>
            <!--valueSampledData 1..1 SampledData--><xsl:if test="f:valueSampledData">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSampledData">
            <xsl:apply-templates select="f:valueSampledData" mode="SampledData"/>
         </map>
      </xsl:if>
            <!--valueSignature 1..1 Signature--><xsl:if test="f:valueSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueSignature">
            <xsl:apply-templates select="f:valueSignature" mode="Signature"/>
         </map>
      </xsl:if>
            <!--valueTiming 1..1 Timing--><xsl:if test="f:valueTiming">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTiming">
            <xsl:apply-templates select="f:valueTiming" mode="Timing"/>
         </map>
      </xsl:if>
            <!--valueContactDetail 1..1 ContactDetail--><xsl:if test="f:valueContactDetail">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContactDetail">
            <xsl:apply-templates select="f:valueContactDetail" mode="ContactDetail"/>
         </map>
      </xsl:if>
            <!--valueContributor 1..1 Contributor--><xsl:if test="f:valueContributor">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueContributor">
            <xsl:apply-templates select="f:valueContributor" mode="Contributor"/>
         </map>
      </xsl:if>
            <!--valueDataRequirement 1..1 DataRequirement--><xsl:if test="f:valueDataRequirement">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDataRequirement">
            <xsl:apply-templates select="f:valueDataRequirement" mode="DataRequirement"/>
         </map>
      </xsl:if>
            <!--valueExpression 1..1 Expression--><xsl:if test="f:valueExpression">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueExpression">
            <xsl:apply-templates select="f:valueExpression" mode="Expression"/>
         </map>
      </xsl:if>
            <!--valueParameterDefinition 1..1 ParameterDefinition--><xsl:if test="f:valueParameterDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions"
              key="valueParameterDefinition">
            <xsl:apply-templates select="f:valueParameterDefinition" mode="ParameterDefinition"/>
         </map>
      </xsl:if>
            <!--valueRelatedArtifact 1..1 RelatedArtifact--><xsl:if test="f:valueRelatedArtifact">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueRelatedArtifact">
            <xsl:apply-templates select="f:valueRelatedArtifact" mode="RelatedArtifact"/>
         </map>
      </xsl:if>
            <!--valueTriggerDefinition 1..1 TriggerDefinition--><xsl:if test="f:valueTriggerDefinition">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueTriggerDefinition">
            <xsl:apply-templates select="f:valueTriggerDefinition" mode="TriggerDefinition"/>
         </map>
      </xsl:if>
            <!--valueUsageContext 1..1 UsageContext--><xsl:if test="f:valueUsageContext">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueUsageContext">
            <xsl:apply-templates select="f:valueUsageContext" mode="UsageContext"/>
         </map>
      </xsl:if>
            <!--valueDosage 1..1 Dosage--><xsl:if test="f:valueDosage">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueDosage">
            <xsl:apply-templates select="f:valueDosage" mode="Dosage"/>
         </map>
      </xsl:if>
            <!--valueMeta 1..1 Meta--><xsl:if test="f:valueMeta">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="valueMeta">
            <xsl:apply-templates select="f:valueMeta" mode="Meta"/>
         </map>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The current status of the task.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TaskStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Distinguishes whether the task is a proposal, plan or full order.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TaskIntent">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">TerminologyCapabilities</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 1..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--kind 1..1 CapabilityStatementKind (json type: string)--><xsl:if test="f:kind">
         <xsl:if test="f:kind/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="kind">
               <xsl:value-of select="f:kind/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:kind[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_kind">
               <xsl:apply-templates select="f:kind" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--software 0..1 TerminologyCapabilities.Software--><xsl:if test="f:software">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="software">
            <xsl:apply-templates select="f:software" mode="TerminologyCapabilities.Software"/>
         </map>
      </xsl:if>
          <!--implementation 0..1 TerminologyCapabilities.Implementation--><xsl:if test="f:implementation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="implementation">
            <xsl:apply-templates select="f:implementation" mode="TerminologyCapabilities.Implementation"/>
         </map>
      </xsl:if>
          <!--lockedDate 0..1 boolean (json type: boolean)--><xsl:if test="f:lockedDate">
         <xsl:if test="f:lockedDate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="lockedDate">
               <xsl:value-of select="f:lockedDate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:lockedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lockedDate">
               <xsl:apply-templates select="f:lockedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--codeSystem 0..* TerminologyCapabilities.CodeSystem--><xsl:if test="f:codeSystem">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="codeSystem">
            <xsl:for-each select="f:codeSystem">
               <map>
                  <xsl:apply-templates select="." mode="TerminologyCapabilities.CodeSystem"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--expansion 0..1 TerminologyCapabilities.Expansion--><xsl:if test="f:expansion">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expansion">
            <xsl:apply-templates select="f:expansion" mode="TerminologyCapabilities.Expansion"/>
         </map>
      </xsl:if>
          <!--codeSearch 0..1 CodeSearchSupport (json type: string)--><xsl:if test="f:codeSearch">
         <xsl:if test="f:codeSearch/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="codeSearch">
               <xsl:value-of select="f:codeSearch/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:codeSearch[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_codeSearch">
               <xsl:apply-templates select="f:codeSearch" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validateCode 0..1 TerminologyCapabilities.ValidateCode--><xsl:if test="f:validateCode">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validateCode">
            <xsl:apply-templates select="f:validateCode" mode="TerminologyCapabilities.ValidateCode"/>
         </map>
      </xsl:if>
          <!--translation 0..1 TerminologyCapabilities.Translation--><xsl:if test="f:translation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="translation">
            <xsl:apply-templates select="f:translation" mode="TerminologyCapabilities.Translation"/>
         </map>
      </xsl:if>
          <!--closure 0..1 TerminologyCapabilities.Closure--><xsl:if test="f:closure">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="closure">
            <xsl:apply-templates select="f:closure" mode="TerminologyCapabilities.Closure"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Software">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Implementation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--description 1..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 url (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.CodeSystem">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--uri 0..1 canonical (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..* TerminologyCapabilities.Version--><xsl:if test="f:version">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="version">
            <xsl:for-each select="f:version">
               <map>
                  <xsl:apply-templates select="." mode="TerminologyCapabilities.Version"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--subsumption 0..1 boolean (json type: boolean)--><xsl:if test="f:subsumption">
         <xsl:if test="f:subsumption/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="subsumption">
               <xsl:value-of select="f:subsumption/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:subsumption[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_subsumption">
               <xsl:apply-templates select="f:subsumption" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Version">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 0..1 string (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--isDefault 0..1 boolean (json type: boolean)--><xsl:if test="f:isDefault">
         <xsl:if test="f:isDefault/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="isDefault">
               <xsl:value-of select="f:isDefault/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:isDefault[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_isDefault">
               <xsl:apply-templates select="f:isDefault" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compositional 0..1 boolean (json type: boolean)--><xsl:if test="f:compositional">
         <xsl:if test="f:compositional/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="compositional">
               <xsl:value-of select="f:compositional/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:compositional[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_compositional">
               <xsl:apply-templates select="f:compositional" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--language 0..* code (json type: string)--><xsl:if test="f:language">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="language">
            <xsl:for-each select="f:language">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:language[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:for-each select="f:language">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--filter 0..* TerminologyCapabilities.Filter--><xsl:if test="f:filter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="filter">
            <xsl:for-each select="f:filter">
               <map>
                  <xsl:apply-templates select="." mode="TerminologyCapabilities.Filter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--property 0..* code (json type: string)--><xsl:if test="f:property">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="property">
            <xsl:for-each select="f:property">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:property[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_property">
               <xsl:for-each select="f:property">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Filter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--op 1..* code (json type: string)--><xsl:if test="f:op">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="op">
            <xsl:for-each select="f:op">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:op[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_op">
               <xsl:for-each select="f:op">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Expansion">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--hierarchical 0..1 boolean (json type: boolean)--><xsl:if test="f:hierarchical">
         <xsl:if test="f:hierarchical/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="hierarchical">
               <xsl:value-of select="f:hierarchical/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:hierarchical[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_hierarchical">
               <xsl:apply-templates select="f:hierarchical" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--paging 0..1 boolean (json type: boolean)--><xsl:if test="f:paging">
         <xsl:if test="f:paging/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="paging">
               <xsl:value-of select="f:paging/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:paging[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_paging">
               <xsl:apply-templates select="f:paging" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--incomplete 0..1 boolean (json type: boolean)--><xsl:if test="f:incomplete">
         <xsl:if test="f:incomplete/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="incomplete">
               <xsl:value-of select="f:incomplete/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:incomplete[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_incomplete">
               <xsl:apply-templates select="f:incomplete" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parameter 0..* TerminologyCapabilities.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="TerminologyCapabilities.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--textFilter 0..1 markdown (json type: string)--><xsl:if test="f:textFilter">
         <xsl:if test="f:textFilter/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="textFilter">
               <xsl:value-of select="f:textFilter/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:textFilter[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_textFilter">
               <xsl:apply-templates select="f:textFilter" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 code (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--documentation 0..1 string (json type: string)--><xsl:if test="f:documentation">
         <xsl:if test="f:documentation/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="documentation">
               <xsl:value-of select="f:documentation/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:documentation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_documentation">
               <xsl:apply-templates select="f:documentation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.ValidateCode">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--translations 1..1 boolean (json type: boolean)--><xsl:if test="f:translations">
         <xsl:if test="f:translations/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="translations">
               <xsl:value-of select="f:translations/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:translations[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_translations">
               <xsl:apply-templates select="f:translations" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Translation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--needsMap 1..1 boolean (json type: boolean)--><xsl:if test="f:needsMap">
         <xsl:if test="f:needsMap/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="needsMap">
               <xsl:value-of select="f:needsMap/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:needsMap[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_needsMap">
               <xsl:apply-templates select="f:needsMap" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TerminologyCapabilities.Closure">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--translation 0..1 boolean (json type: boolean)--><xsl:if test="f:translation">
         <xsl:if test="f:translation/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="translation">
               <xsl:value-of select="f:translation/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:translation[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_translation">
               <xsl:apply-templates select="f:translation" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The degree to which the server supports the code search parameter on ValueSet, if it is supported.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="CodeSearchSupport">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">TestReport</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 TestReportStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--testScript 1..1 Reference--><xsl:if test="f:testScript">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="testScript">
            <xsl:apply-templates select="f:testScript" mode="Reference"/>
         </map>
      </xsl:if>
          <!--result 1..1 TestReportResult (json type: string)--><xsl:if test="f:result">
         <xsl:if test="f:result/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="result">
               <xsl:value-of select="f:result/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:result[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_result">
               <xsl:apply-templates select="f:result" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--score 0..1 decimal (json type: number)--><xsl:if test="f:score">
         <xsl:if test="f:score/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="score">
               <xsl:value-of select="f:score/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:score[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_score">
               <xsl:apply-templates select="f:score" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--tester 0..1 string (json type: string)--><xsl:if test="f:tester">
         <xsl:if test="f:tester/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="tester">
               <xsl:value-of select="f:tester/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:tester[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_tester">
               <xsl:apply-templates select="f:tester" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--issued 0..1 dateTime (json type: string)--><xsl:if test="f:issued">
         <xsl:if test="f:issued/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="issued">
               <xsl:value-of select="f:issued/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:issued[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_issued">
               <xsl:apply-templates select="f:issued" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--participant 0..* TestReport.Participant--><xsl:if test="f:participant">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="participant">
            <xsl:for-each select="f:participant">
               <map>
                  <xsl:apply-templates select="." mode="TestReport.Participant"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--setup 0..1 TestReport.Setup--><xsl:if test="f:setup">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="setup">
            <xsl:apply-templates select="f:setup" mode="TestReport.Setup"/>
         </map>
      </xsl:if>
          <!--test 0..* TestReport.Test--><xsl:if test="f:test">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="test">
            <xsl:for-each select="f:test">
               <map>
                  <xsl:apply-templates select="." mode="TestReport.Test"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--teardown 0..1 TestReport.Teardown--><xsl:if test="f:teardown">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="teardown">
            <xsl:apply-templates select="f:teardown" mode="TestReport.Teardown"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Participant">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 1..1 TestReportParticipantType (json type: string)--><xsl:if test="f:type">
         <xsl:if test="f:type/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="type">
               <xsl:value-of select="f:type/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:type[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_type">
               <xsl:apply-templates select="f:type" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--uri 1..1 uri (json type: string)--><xsl:if test="f:uri">
         <xsl:if test="f:uri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="uri">
               <xsl:value-of select="f:uri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:uri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_uri">
               <xsl:apply-templates select="f:uri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Setup">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 1..* TestReport.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestReport.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Action">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 0..1 TestReport.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestReport.Operation"/>
         </map>
      </xsl:if>
          <!--assert 0..1 TestReport.Assert--><xsl:if test="f:assert">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assert">
            <xsl:apply-templates select="f:assert" mode="TestReport.Assert"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Operation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--result 1..1 TestReportActionResult (json type: string)--><xsl:if test="f:result">
         <xsl:if test="f:result/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="result">
               <xsl:value-of select="f:result/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:result[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_result">
               <xsl:apply-templates select="f:result" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--message 0..1 markdown (json type: string)--><xsl:if test="f:message">
         <xsl:if test="f:message/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="message">
               <xsl:value-of select="f:message/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:message[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_message">
               <xsl:apply-templates select="f:message" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detail 0..1 uri (json type: string)--><xsl:if test="f:detail">
         <xsl:if test="f:detail/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
               <xsl:value-of select="f:detail/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:detail[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detail">
               <xsl:apply-templates select="f:detail" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Assert">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--result 1..1 TestReportActionResult (json type: string)--><xsl:if test="f:result">
         <xsl:if test="f:result/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="result">
               <xsl:value-of select="f:result/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:result[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_result">
               <xsl:apply-templates select="f:result" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--message 0..1 markdown (json type: string)--><xsl:if test="f:message">
         <xsl:if test="f:message/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="message">
               <xsl:value-of select="f:message/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:message[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_message">
               <xsl:apply-templates select="f:message" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--detail 0..1 string (json type: string)--><xsl:if test="f:detail">
         <xsl:if test="f:detail/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="detail">
               <xsl:value-of select="f:detail/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:detail[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_detail">
               <xsl:apply-templates select="f:detail" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Test">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--action 1..* TestReport.Action1--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestReport.Action1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Action1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 0..1 TestReport.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestReport.Operation"/>
         </map>
      </xsl:if>
          <!--assert 0..1 TestReport.Assert--><xsl:if test="f:assert">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assert">
            <xsl:apply-templates select="f:assert" mode="TestReport.Assert"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Teardown">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 1..* TestReport.Action2--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestReport.Action2"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A summary of information based on the results of executing a TestScript.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReport.Action2">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 1..1 TestReport.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestReport.Operation"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The current status of the test report.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReportStatus">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The results of executing an action.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReportActionResult">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of participant.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReportParticipantType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The reported execution result.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestReportResult">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">TestScript</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..1 Identifier--><xsl:if test="f:identifier">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:apply-templates select="f:identifier" mode="Identifier"/>
         </map>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--origin 0..* TestScript.Origin--><xsl:if test="f:origin">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="origin">
            <xsl:for-each select="f:origin">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Origin"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--destination 0..* TestScript.Destination--><xsl:if test="f:destination">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
            <xsl:for-each select="f:destination">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Destination"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--metadata 0..1 TestScript.Metadata--><xsl:if test="f:metadata">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="metadata">
            <xsl:apply-templates select="f:metadata" mode="TestScript.Metadata"/>
         </map>
      </xsl:if>
          <!--fixture 0..* TestScript.Fixture--><xsl:if test="f:fixture">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="fixture">
            <xsl:for-each select="f:fixture">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Fixture"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--profile 0..* Reference--><xsl:if test="f:profile">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:for-each select="f:profile">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--variable 0..* TestScript.Variable--><xsl:if test="f:variable">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="variable">
            <xsl:for-each select="f:variable">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Variable"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--setup 0..1 TestScript.Setup--><xsl:if test="f:setup">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="setup">
            <xsl:apply-templates select="f:setup" mode="TestScript.Setup"/>
         </map>
      </xsl:if>
          <!--test 0..* TestScript.Test--><xsl:if test="f:test">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="test">
            <xsl:for-each select="f:test">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Test"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--teardown 0..1 TestScript.Teardown--><xsl:if test="f:teardown">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="teardown">
            <xsl:apply-templates select="f:teardown" mode="TestScript.Teardown"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Origin">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--index 1..1 integer (json type: number)--><xsl:if test="f:index">
         <xsl:if test="f:index/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="index">
               <xsl:value-of select="f:index/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:index[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_index">
               <xsl:apply-templates select="f:index" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 1..1 Coding--><xsl:if test="f:profile">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:apply-templates select="f:profile" mode="Coding"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Destination">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--index 1..1 integer (json type: number)--><xsl:if test="f:index">
         <xsl:if test="f:index/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="index">
               <xsl:value-of select="f:index/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:index[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_index">
               <xsl:apply-templates select="f:index" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--profile 1..1 Coding--><xsl:if test="f:profile">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="profile">
            <xsl:apply-templates select="f:profile" mode="Coding"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Metadata">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--link 0..* TestScript.Link--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Link"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--capability 1..* TestScript.Capability--><xsl:if test="f:capability">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="capability">
            <xsl:for-each select="f:capability">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Capability"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Link">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--url 1..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Capability">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--required 1..1 boolean (json type: boolean)--><xsl:if test="f:required">
         <xsl:if test="f:required/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="required">
               <xsl:value-of select="f:required/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:required[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_required">
               <xsl:apply-templates select="f:required" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validated 1..1 boolean (json type: boolean)--><xsl:if test="f:validated">
         <xsl:if test="f:validated/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="validated">
               <xsl:value-of select="f:validated/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:validated[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_validated">
               <xsl:apply-templates select="f:validated" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--origin 0..* integer (json type: number)--><xsl:if test="f:origin">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="origin">
            <xsl:for-each select="f:origin">
               <xsl:choose>
                  <xsl:when test="@value">
                     <number>
                        <xsl:value-of select="@value"/>
                     </number>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:origin[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_origin">
               <xsl:for-each select="f:origin">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--destination 0..1 integer (json type: number)--><xsl:if test="f:destination">
         <xsl:if test="f:destination/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
               <xsl:value-of select="f:destination/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:destination[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_destination">
               <xsl:apply-templates select="f:destination" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--link 0..* uri (json type: string)--><xsl:if test="f:link">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="link">
            <xsl:for-each select="f:link">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:link[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_link">
               <xsl:for-each select="f:link">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--capabilities 1..1 canonical (json type: string)--><xsl:if test="f:capabilities">
         <xsl:if test="f:capabilities/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="capabilities">
               <xsl:value-of select="f:capabilities/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:capabilities[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_capabilities">
               <xsl:apply-templates select="f:capabilities" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Fixture">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--autocreate 1..1 boolean (json type: boolean)--><xsl:if test="f:autocreate">
         <xsl:if test="f:autocreate/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="autocreate">
               <xsl:value-of select="f:autocreate/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:autocreate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_autocreate">
               <xsl:apply-templates select="f:autocreate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--autodelete 1..1 boolean (json type: boolean)--><xsl:if test="f:autodelete">
         <xsl:if test="f:autodelete/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="autodelete">
               <xsl:value-of select="f:autodelete/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:autodelete[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_autodelete">
               <xsl:apply-templates select="f:autodelete" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..1 Reference--><xsl:if test="f:resource">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
            <xsl:apply-templates select="f:resource" mode="Reference"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Variable">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--defaultValue 0..1 string (json type: string)--><xsl:if test="f:defaultValue">
         <xsl:if test="f:defaultValue/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="defaultValue">
               <xsl:value-of select="f:defaultValue/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:defaultValue[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_defaultValue">
               <xsl:apply-templates select="f:defaultValue" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--headerField 0..1 string (json type: string)--><xsl:if test="f:headerField">
         <xsl:if test="f:headerField/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="headerField">
               <xsl:value-of select="f:headerField/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:headerField[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_headerField">
               <xsl:apply-templates select="f:headerField" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--hint 0..1 string (json type: string)--><xsl:if test="f:hint">
         <xsl:if test="f:hint/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="hint">
               <xsl:value-of select="f:hint/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:hint[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_hint">
               <xsl:apply-templates select="f:hint" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceId 0..1 id (json type: string)--><xsl:if test="f:sourceId">
         <xsl:if test="f:sourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceId">
               <xsl:value-of select="f:sourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceId">
               <xsl:apply-templates select="f:sourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Setup">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 1..* TestScript.Action--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Action"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Action">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 0..1 TestScript.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestScript.Operation"/>
         </map>
      </xsl:if>
          <!--assert 0..1 TestScript.Assert--><xsl:if test="f:assert">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assert">
            <xsl:apply-templates select="f:assert" mode="TestScript.Assert"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Operation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--type 0..1 Coding--><xsl:if test="f:type">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:apply-templates select="f:type" mode="Coding"/>
         </map>
      </xsl:if>
          <!--resource 0..1 code (json type: string)--><xsl:if test="f:resource">
         <xsl:if test="f:resource/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
               <xsl:value-of select="f:resource/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resource[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resource">
               <xsl:apply-templates select="f:resource" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--label 0..1 string (json type: string)--><xsl:if test="f:label">
         <xsl:if test="f:label/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="label">
               <xsl:value-of select="f:label/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:label[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_label">
               <xsl:apply-templates select="f:label" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--accept 0..1 code (json type: string)--><xsl:if test="f:accept">
         <xsl:if test="f:accept/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="accept">
               <xsl:value-of select="f:accept/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:accept[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_accept">
               <xsl:apply-templates select="f:accept" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contentType 0..1 code (json type: string)--><xsl:if test="f:contentType">
         <xsl:if test="f:contentType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentType">
               <xsl:value-of select="f:contentType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentType">
               <xsl:apply-templates select="f:contentType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--destination 0..1 integer (json type: number)--><xsl:if test="f:destination">
         <xsl:if test="f:destination/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="destination">
               <xsl:value-of select="f:destination/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:destination[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_destination">
               <xsl:apply-templates select="f:destination" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--encodeRequestUrl 1..1 boolean (json type: boolean)--><xsl:if test="f:encodeRequestUrl">
         <xsl:if test="f:encodeRequestUrl/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="encodeRequestUrl">
               <xsl:value-of select="f:encodeRequestUrl/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:encodeRequestUrl[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_encodeRequestUrl">
               <xsl:apply-templates select="f:encodeRequestUrl" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--method 0..1 TestScriptRequestMethodCode (json type: string)--><xsl:if test="f:method">
         <xsl:if test="f:method/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="method">
               <xsl:value-of select="f:method/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:method[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_method">
               <xsl:apply-templates select="f:method" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--origin 0..1 integer (json type: number)--><xsl:if test="f:origin">
         <xsl:if test="f:origin/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="origin">
               <xsl:value-of select="f:origin/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:origin[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_origin">
               <xsl:apply-templates select="f:origin" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--params 0..1 string (json type: string)--><xsl:if test="f:params">
         <xsl:if test="f:params/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="params">
               <xsl:value-of select="f:params/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:params[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_params">
               <xsl:apply-templates select="f:params" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requestHeader 0..* TestScript.RequestHeader--><xsl:if test="f:requestHeader">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="requestHeader">
            <xsl:for-each select="f:requestHeader">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.RequestHeader"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--requestId 0..1 id (json type: string)--><xsl:if test="f:requestId">
         <xsl:if test="f:requestId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requestId">
               <xsl:value-of select="f:requestId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requestId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requestId">
               <xsl:apply-templates select="f:requestId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--responseId 0..1 id (json type: string)--><xsl:if test="f:responseId">
         <xsl:if test="f:responseId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="responseId">
               <xsl:value-of select="f:responseId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:responseId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responseId">
               <xsl:apply-templates select="f:responseId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceId 0..1 id (json type: string)--><xsl:if test="f:sourceId">
         <xsl:if test="f:sourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceId">
               <xsl:value-of select="f:sourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceId">
               <xsl:apply-templates select="f:sourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--targetId 0..1 id (json type: string)--><xsl:if test="f:targetId">
         <xsl:if test="f:targetId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="targetId">
               <xsl:value-of select="f:targetId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:targetId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_targetId">
               <xsl:apply-templates select="f:targetId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--url 0..1 string (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.RequestHeader">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--field 1..1 string (json type: string)--><xsl:if test="f:field">
         <xsl:if test="f:field/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="field">
               <xsl:value-of select="f:field/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:field[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_field">
               <xsl:apply-templates select="f:field" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Assert">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--label 0..1 string (json type: string)--><xsl:if test="f:label">
         <xsl:if test="f:label/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="label">
               <xsl:value-of select="f:label/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:label[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_label">
               <xsl:apply-templates select="f:label" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--direction 0..1 AssertionDirectionType (json type: string)--><xsl:if test="f:direction">
         <xsl:if test="f:direction/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="direction">
               <xsl:value-of select="f:direction/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:direction[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_direction">
               <xsl:apply-templates select="f:direction" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compareToSourceId 0..1 string (json type: string)--><xsl:if test="f:compareToSourceId">
         <xsl:if test="f:compareToSourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="compareToSourceId">
               <xsl:value-of select="f:compareToSourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:compareToSourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_compareToSourceId">
               <xsl:apply-templates select="f:compareToSourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compareToSourceExpression 0..1 string (json type: string)--><xsl:if test="f:compareToSourceExpression">
         <xsl:if test="f:compareToSourceExpression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="compareToSourceExpression">
               <xsl:value-of select="f:compareToSourceExpression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:compareToSourceExpression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_compareToSourceExpression">
               <xsl:apply-templates select="f:compareToSourceExpression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compareToSourcePath 0..1 string (json type: string)--><xsl:if test="f:compareToSourcePath">
         <xsl:if test="f:compareToSourcePath/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="compareToSourcePath">
               <xsl:value-of select="f:compareToSourcePath/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:compareToSourcePath[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_compareToSourcePath">
               <xsl:apply-templates select="f:compareToSourcePath" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contentType 0..1 code (json type: string)--><xsl:if test="f:contentType">
         <xsl:if test="f:contentType/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="contentType">
               <xsl:value-of select="f:contentType/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:contentType[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_contentType">
               <xsl:apply-templates select="f:contentType" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--expression 0..1 string (json type: string)--><xsl:if test="f:expression">
         <xsl:if test="f:expression/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="expression">
               <xsl:value-of select="f:expression/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:expression[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_expression">
               <xsl:apply-templates select="f:expression" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--headerField 0..1 string (json type: string)--><xsl:if test="f:headerField">
         <xsl:if test="f:headerField/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="headerField">
               <xsl:value-of select="f:headerField/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:headerField[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_headerField">
               <xsl:apply-templates select="f:headerField" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--minimumId 0..1 string (json type: string)--><xsl:if test="f:minimumId">
         <xsl:if test="f:minimumId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="minimumId">
               <xsl:value-of select="f:minimumId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:minimumId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_minimumId">
               <xsl:apply-templates select="f:minimumId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--navigationLinks 0..1 boolean (json type: boolean)--><xsl:if test="f:navigationLinks">
         <xsl:if test="f:navigationLinks/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="navigationLinks">
               <xsl:value-of select="f:navigationLinks/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:navigationLinks[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_navigationLinks">
               <xsl:apply-templates select="f:navigationLinks" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--operator 0..1 AssertionOperatorType (json type: string)--><xsl:if test="f:operator">
         <xsl:if test="f:operator/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="operator">
               <xsl:value-of select="f:operator/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:operator[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_operator">
               <xsl:apply-templates select="f:operator" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--path 0..1 string (json type: string)--><xsl:if test="f:path">
         <xsl:if test="f:path/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="path">
               <xsl:value-of select="f:path/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:path[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_path">
               <xsl:apply-templates select="f:path" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requestMethod 0..1 TestScriptRequestMethodCode (json type: string)--><xsl:if test="f:requestMethod">
         <xsl:if test="f:requestMethod/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requestMethod">
               <xsl:value-of select="f:requestMethod/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requestMethod[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requestMethod">
               <xsl:apply-templates select="f:requestMethod" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--requestURL 0..1 string (json type: string)--><xsl:if test="f:requestURL">
         <xsl:if test="f:requestURL/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="requestURL">
               <xsl:value-of select="f:requestURL/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:requestURL[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_requestURL">
               <xsl:apply-templates select="f:requestURL" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--resource 0..1 code (json type: string)--><xsl:if test="f:resource">
         <xsl:if test="f:resource/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="resource">
               <xsl:value-of select="f:resource/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:resource[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_resource">
               <xsl:apply-templates select="f:resource" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--response 0..1 AssertionResponseTypes (json type: string)--><xsl:if test="f:response">
         <xsl:if test="f:response/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="response">
               <xsl:value-of select="f:response/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:response[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_response">
               <xsl:apply-templates select="f:response" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--responseCode 0..1 string (json type: string)--><xsl:if test="f:responseCode">
         <xsl:if test="f:responseCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="responseCode">
               <xsl:value-of select="f:responseCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:responseCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_responseCode">
               <xsl:apply-templates select="f:responseCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceId 0..1 id (json type: string)--><xsl:if test="f:sourceId">
         <xsl:if test="f:sourceId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="sourceId">
               <xsl:value-of select="f:sourceId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sourceId">
               <xsl:apply-templates select="f:sourceId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validateProfileId 0..1 id (json type: string)--><xsl:if test="f:validateProfileId">
         <xsl:if test="f:validateProfileId/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="validateProfileId">
               <xsl:value-of select="f:validateProfileId/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:validateProfileId[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_validateProfileId">
               <xsl:apply-templates select="f:validateProfileId" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 0..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--warningOnly 1..1 boolean (json type: boolean)--><xsl:if test="f:warningOnly">
         <xsl:if test="f:warningOnly/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="warningOnly">
               <xsl:value-of select="f:warningOnly/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:warningOnly[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_warningOnly">
               <xsl:apply-templates select="f:warningOnly" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Test">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--description 0..1 string (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--action 1..* TestScript.Action1--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Action1"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Action1">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 0..1 TestScript.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestScript.Operation"/>
         </map>
      </xsl:if>
          <!--assert 0..1 TestScript.Assert--><xsl:if test="f:assert">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="assert">
            <xsl:apply-templates select="f:assert" mode="TestScript.Assert"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Teardown">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--action 1..* TestScript.Action2--><xsl:if test="f:action">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="action">
            <xsl:for-each select="f:action">
               <map>
                  <xsl:apply-templates select="." mode="TestScript.Action2"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScript.Action2">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--operation 1..1 TestScript.Operation--><xsl:if test="f:operation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="operation">
            <xsl:apply-templates select="f:operation" mode="TestScript.Operation"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of direction to use for assertion.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AssertionDirectionType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of operator to use for assertion.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AssertionOperatorType">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The type of response code to use for assertion.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="AssertionResponseTypes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The allowable request method or HTTP operation codes.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="TestScriptRequestMethodCode">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">ValueSet</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--url 0..1 uri (json type: string)--><xsl:if test="f:url">
         <xsl:if test="f:url/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="url">
               <xsl:value-of select="f:url/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:url[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_url">
               <xsl:apply-templates select="f:url" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--name 0..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--title 0..1 string (json type: string)--><xsl:if test="f:title">
         <xsl:if test="f:title/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="title">
               <xsl:value-of select="f:title/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:title[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_title">
               <xsl:apply-templates select="f:title" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--status 1..1 PublicationStatus (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--experimental 0..1 boolean (json type: boolean)--><xsl:if test="f:experimental">
         <xsl:if test="f:experimental/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="experimental">
               <xsl:value-of select="f:experimental/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:experimental[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_experimental">
               <xsl:apply-templates select="f:experimental" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--date 0..1 dateTime (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--publisher 0..1 string (json type: string)--><xsl:if test="f:publisher">
         <xsl:if test="f:publisher/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="publisher">
               <xsl:value-of select="f:publisher/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:publisher[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_publisher">
               <xsl:apply-templates select="f:publisher" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--contact 0..* ContactDetail--><xsl:if test="f:contact">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contact">
            <xsl:for-each select="f:contact">
               <map>
                  <xsl:apply-templates select="." mode="ContactDetail"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--description 0..1 markdown (json type: string)--><xsl:if test="f:description">
         <xsl:if test="f:description/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="description">
               <xsl:value-of select="f:description/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:description[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_description">
               <xsl:apply-templates select="f:description" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--useContext 0..* UsageContext--><xsl:if test="f:useContext">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="useContext">
            <xsl:for-each select="f:useContext">
               <map>
                  <xsl:apply-templates select="." mode="UsageContext"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--jurisdiction 0..* CodeableConcept--><xsl:if test="f:jurisdiction">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="jurisdiction">
            <xsl:for-each select="f:jurisdiction">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--immutable 0..1 boolean (json type: boolean)--><xsl:if test="f:immutable">
         <xsl:if test="f:immutable/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="immutable">
               <xsl:value-of select="f:immutable/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:immutable[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_immutable">
               <xsl:apply-templates select="f:immutable" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--purpose 0..1 markdown (json type: string)--><xsl:if test="f:purpose">
         <xsl:if test="f:purpose/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="purpose">
               <xsl:value-of select="f:purpose/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:purpose[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_purpose">
               <xsl:apply-templates select="f:purpose" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--copyright 0..1 markdown (json type: string)--><xsl:if test="f:copyright">
         <xsl:if test="f:copyright/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="copyright">
               <xsl:value-of select="f:copyright/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:copyright[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_copyright">
               <xsl:apply-templates select="f:copyright" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--compose 0..1 ValueSet.Compose--><xsl:if test="f:compose">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="compose">
            <xsl:apply-templates select="f:compose" mode="ValueSet.Compose"/>
         </map>
      </xsl:if>
          <!--expansion 0..1 ValueSet.Expansion--><xsl:if test="f:expansion">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="expansion">
            <xsl:apply-templates select="f:expansion" mode="ValueSet.Expansion"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Compose">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--lockedDate 0..1 date (json type: string)--><xsl:if test="f:lockedDate">
         <xsl:if test="f:lockedDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lockedDate">
               <xsl:value-of select="f:lockedDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lockedDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lockedDate">
               <xsl:apply-templates select="f:lockedDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--inactive 0..1 boolean (json type: boolean)--><xsl:if test="f:inactive">
         <xsl:if test="f:inactive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="inactive">
               <xsl:value-of select="f:inactive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:inactive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_inactive">
               <xsl:apply-templates select="f:inactive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--include 1..* ValueSet.Include--><xsl:if test="f:include">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="include">
            <xsl:for-each select="f:include">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Include"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--exclude 0..* ValueSet.Include--><xsl:if test="f:exclude">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="exclude">
            <xsl:for-each select="f:exclude">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Include"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Include">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--system 0..1 uri (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--concept 0..* ValueSet.Concept--><xsl:if test="f:concept">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="concept">
            <xsl:for-each select="f:concept">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Concept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--filter 0..* ValueSet.Filter--><xsl:if test="f:filter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="filter">
            <xsl:for-each select="f:filter">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Filter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--valueSet 0..* canonical (json type: string)--><xsl:if test="f:valueSet">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="valueSet">
            <xsl:for-each select="f:valueSet">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:valueSet[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_valueSet">
               <xsl:for-each select="f:valueSet">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Concept">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--code 1..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--designation 0..* ValueSet.Designation--><xsl:if test="f:designation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="designation">
            <xsl:for-each select="f:designation">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Designation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Designation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--language 0..1 code (json type: string)--><xsl:if test="f:language">
         <xsl:if test="f:language/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="language">
               <xsl:value-of select="f:language/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:language[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_language">
               <xsl:apply-templates select="f:language" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--use 0..1 Coding--><xsl:if test="f:use">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="use">
            <xsl:apply-templates select="f:use" mode="Coding"/>
         </map>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Filter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--property 1..1 code (json type: string)--><xsl:if test="f:property">
         <xsl:if test="f:property/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="property">
               <xsl:value-of select="f:property/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:property[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_property">
               <xsl:apply-templates select="f:property" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--op 1..1 FilterOperator (json type: string)--><xsl:if test="f:op">
         <xsl:if test="f:op/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="op">
               <xsl:value-of select="f:op/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:op[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_op">
               <xsl:apply-templates select="f:op" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--value 1..1 string (json type: string)--><xsl:if test="f:value">
         <xsl:if test="f:value/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
               <xsl:value-of select="f:value/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:value[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_value">
               <xsl:apply-templates select="f:value" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Expansion">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--identifier 0..1 uri (json type: string)--><xsl:if test="f:identifier">
         <xsl:if test="f:identifier/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
               <xsl:value-of select="f:identifier/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identifier[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identifier">
               <xsl:apply-templates select="f:identifier" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--timestamp 1..1 dateTime (json type: string)--><xsl:if test="f:timestamp">
         <xsl:if test="f:timestamp/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="timestamp">
               <xsl:value-of select="f:timestamp/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:timestamp[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_timestamp">
               <xsl:apply-templates select="f:timestamp" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--total 0..1 integer (json type: number)--><xsl:if test="f:total">
         <xsl:if test="f:total/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="total">
               <xsl:value-of select="f:total/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:total[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_total">
               <xsl:apply-templates select="f:total" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--offset 0..1 integer (json type: number)--><xsl:if test="f:offset">
         <xsl:if test="f:offset/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="offset">
               <xsl:value-of select="f:offset/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:offset[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_offset">
               <xsl:apply-templates select="f:offset" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--parameter 0..* ValueSet.Parameter--><xsl:if test="f:parameter">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="parameter">
            <xsl:for-each select="f:parameter">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Parameter"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contains 0..* ValueSet.Contains--><xsl:if test="f:contains">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contains">
            <xsl:for-each select="f:contains">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Contains"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Parameter">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--name 1..1 string (json type: string)--><xsl:if test="f:name">
         <xsl:if test="f:name/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="name">
               <xsl:value-of select="f:name/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:name[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_name">
               <xsl:apply-templates select="f:name" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
            
            <!--valueString 1..1 string (json type: string)--><xsl:if test="f:valueString">
         <xsl:if test="f:valueString/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueString">
               <xsl:value-of select="f:valueString/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueString[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueString">
               <xsl:apply-templates select="f:valueString" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueBoolean 1..1 boolean (json type: boolean)--><xsl:if test="f:valueBoolean">
         <xsl:if test="f:valueBoolean/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="valueBoolean">
               <xsl:value-of select="f:valueBoolean/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:valueBoolean[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueBoolean">
               <xsl:apply-templates select="f:valueBoolean" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueInteger 1..1 integer (json type: number)--><xsl:if test="f:valueInteger">
         <xsl:if test="f:valueInteger/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueInteger">
               <xsl:value-of select="f:valueInteger/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueInteger[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueInteger">
               <xsl:apply-templates select="f:valueInteger" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDecimal 1..1 decimal (json type: number)--><xsl:if test="f:valueDecimal">
         <xsl:if test="f:valueDecimal/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="valueDecimal">
               <xsl:value-of select="f:valueDecimal/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:valueDecimal[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDecimal">
               <xsl:apply-templates select="f:valueDecimal" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueUri 1..1 uri (json type: string)--><xsl:if test="f:valueUri">
         <xsl:if test="f:valueUri/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueUri">
               <xsl:value-of select="f:valueUri/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueUri[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueUri">
               <xsl:apply-templates select="f:valueUri" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueCode 1..1 code (json type: string)--><xsl:if test="f:valueCode">
         <xsl:if test="f:valueCode/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueCode">
               <xsl:value-of select="f:valueCode/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueCode[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueCode">
               <xsl:apply-templates select="f:valueCode" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
            <!--valueDateTime 1..1 dateTime (json type: string)--><xsl:if test="f:valueDateTime">
         <xsl:if test="f:valueDateTime/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="valueDateTime">
               <xsl:value-of select="f:valueDateTime/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:valueDateTime[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_valueDateTime">
               <xsl:apply-templates select="f:valueDateTime" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>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).</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="ValueSet.Contains">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--system 0..1 uri (json type: string)--><xsl:if test="f:system">
         <xsl:if test="f:system/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="system">
               <xsl:value-of select="f:system/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:system[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_system">
               <xsl:apply-templates select="f:system" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--abstract 0..1 boolean (json type: boolean)--><xsl:if test="f:abstract">
         <xsl:if test="f:abstract/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="abstract">
               <xsl:value-of select="f:abstract/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:abstract[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_abstract">
               <xsl:apply-templates select="f:abstract" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--inactive 0..1 boolean (json type: boolean)--><xsl:if test="f:inactive">
         <xsl:if test="f:inactive/@value">
            <boolean xmlns="http://www.w3.org/2005/xpath-functions" key="inactive">
               <xsl:value-of select="f:inactive/@value"/>
            </boolean>
         </xsl:if>
         <xsl:if test="f:inactive[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_inactive">
               <xsl:apply-templates select="f:inactive" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--version 0..1 string (json type: string)--><xsl:if test="f:version">
         <xsl:if test="f:version/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="version">
               <xsl:value-of select="f:version/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:version[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_version">
               <xsl:apply-templates select="f:version" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--code 0..1 code (json type: string)--><xsl:if test="f:code">
         <xsl:if test="f:code/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="code">
               <xsl:value-of select="f:code/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:code[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_code">
               <xsl:apply-templates select="f:code" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--display 0..1 string (json type: string)--><xsl:if test="f:display">
         <xsl:if test="f:display/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="display">
               <xsl:value-of select="f:display/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:display[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_display">
               <xsl:apply-templates select="f:display" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--designation 0..* ValueSet.Designation--><xsl:if test="f:designation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="designation">
            <xsl:for-each select="f:designation">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Designation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--contains 0..* ValueSet.Contains--><xsl:if test="f:contains">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="contains">
            <xsl:for-each select="f:contains">
               <map>
                  <xsl:apply-templates select="." mode="ValueSet.Contains"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes validation requirements, source(s), status and dates for one or more elements.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VerificationResult">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">VerificationResult</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--target 0..* Reference--><xsl:if test="f:target">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="target">
            <xsl:for-each select="f:target">
               <map>
                  <xsl:apply-templates select="." mode="Reference"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--targetLocation 0..* string (json type: string)--><xsl:if test="f:targetLocation">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="targetLocation">
            <xsl:for-each select="f:targetLocation">
               <xsl:choose>
                  <xsl:when test="@value">
                     <string>
                        <xsl:value-of select="@value"/>
                     </string>
                  </xsl:when>
                  <xsl:otherwise>
                     <null/>
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:for-each>
         </array>
         <xsl:if test="f:targetLocation[@id | f:extension]">
            <array xmlns="http://www.w3.org/2005/xpath-functions" key="_targetLocation">
               <xsl:for-each select="f:targetLocation">
                  <xsl:choose>
                     <xsl:when test=".[@id | f:extension]">
                        <map>
                           <xsl:apply-templates select="." mode="Element"/>
                        </map>
                     </xsl:when>
                     <xsl:otherwise>
                        <null/>
                     </xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>
            </array>
         </xsl:if>
      </xsl:if>
          <!--need 0..1 CodeableConcept--><xsl:if test="f:need">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="need">
            <xsl:apply-templates select="f:need" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--status 1..1 status (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--statusDate 0..1 dateTime (json type: string)--><xsl:if test="f:statusDate">
         <xsl:if test="f:statusDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="statusDate">
               <xsl:value-of select="f:statusDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:statusDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_statusDate">
               <xsl:apply-templates select="f:statusDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--validationType 0..1 CodeableConcept--><xsl:if test="f:validationType">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validationType">
            <xsl:apply-templates select="f:validationType" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--validationProcess 0..* CodeableConcept--><xsl:if test="f:validationProcess">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="validationProcess">
            <xsl:for-each select="f:validationProcess">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--frequency 0..1 Timing--><xsl:if test="f:frequency">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="frequency">
            <xsl:apply-templates select="f:frequency" mode="Timing"/>
         </map>
      </xsl:if>
          <!--lastPerformed 0..1 dateTime (json type: string)--><xsl:if test="f:lastPerformed">
         <xsl:if test="f:lastPerformed/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="lastPerformed">
               <xsl:value-of select="f:lastPerformed/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:lastPerformed[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_lastPerformed">
               <xsl:apply-templates select="f:lastPerformed" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--nextScheduled 0..1 date (json type: string)--><xsl:if test="f:nextScheduled">
         <xsl:if test="f:nextScheduled/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="nextScheduled">
               <xsl:value-of select="f:nextScheduled/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:nextScheduled[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_nextScheduled">
               <xsl:apply-templates select="f:nextScheduled" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--failureAction 0..1 CodeableConcept--><xsl:if test="f:failureAction">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="failureAction">
            <xsl:apply-templates select="f:failureAction" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--primarySource 0..* VerificationResult.PrimarySource--><xsl:if test="f:primarySource">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="primarySource">
            <xsl:for-each select="f:primarySource">
               <map>
                  <xsl:apply-templates select="." mode="VerificationResult.PrimarySource"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--attestation 0..1 VerificationResult.Attestation--><xsl:if test="f:attestation">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="attestation">
            <xsl:apply-templates select="f:attestation" mode="VerificationResult.Attestation"/>
         </map>
      </xsl:if>
          <!--validator 0..* VerificationResult.Validator--><xsl:if test="f:validator">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="validator">
            <xsl:for-each select="f:validator">
               <map>
                  <xsl:apply-templates select="." mode="VerificationResult.Validator"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes validation requirements, source(s), status and dates for one or more elements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VerificationResult.PrimarySource">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--who 0..1 Reference--><xsl:if test="f:who">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="who">
            <xsl:apply-templates select="f:who" mode="Reference"/>
         </map>
      </xsl:if>
          <!--type 0..* CodeableConcept--><xsl:if test="f:type">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="type">
            <xsl:for-each select="f:type">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--communicationMethod 0..* CodeableConcept--><xsl:if test="f:communicationMethod">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="communicationMethod">
            <xsl:for-each select="f:communicationMethod">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--validationStatus 0..1 CodeableConcept--><xsl:if test="f:validationStatus">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="validationStatus">
            <xsl:apply-templates select="f:validationStatus" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--validationDate 0..1 dateTime (json type: string)--><xsl:if test="f:validationDate">
         <xsl:if test="f:validationDate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="validationDate">
               <xsl:value-of select="f:validationDate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:validationDate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_validationDate">
               <xsl:apply-templates select="f:validationDate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--canPushUpdates 0..1 CodeableConcept--><xsl:if test="f:canPushUpdates">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="canPushUpdates">
            <xsl:apply-templates select="f:canPushUpdates" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--pushTypeAvailable 0..* CodeableConcept--><xsl:if test="f:pushTypeAvailable">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="pushTypeAvailable">
            <xsl:for-each select="f:pushTypeAvailable">
               <map>
                  <xsl:apply-templates select="." mode="CodeableConcept"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes validation requirements, source(s), status and dates for one or more elements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VerificationResult.Attestation">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--who 0..1 Reference--><xsl:if test="f:who">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="who">
            <xsl:apply-templates select="f:who" mode="Reference"/>
         </map>
      </xsl:if>
          <!--onBehalfOf 0..1 Reference--><xsl:if test="f:onBehalfOf">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="onBehalfOf">
            <xsl:apply-templates select="f:onBehalfOf" mode="Reference"/>
         </map>
      </xsl:if>
          <!--communicationMethod 0..1 CodeableConcept--><xsl:if test="f:communicationMethod">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="communicationMethod">
            <xsl:apply-templates select="f:communicationMethod" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--date 0..1 date (json type: string)--><xsl:if test="f:date">
         <xsl:if test="f:date/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="date">
               <xsl:value-of select="f:date/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:date[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_date">
               <xsl:apply-templates select="f:date" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sourceIdentityCertificate 0..1 string (json type: string)--><xsl:if test="f:sourceIdentityCertificate">
         <xsl:if test="f:sourceIdentityCertificate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="sourceIdentityCertificate">
               <xsl:value-of select="f:sourceIdentityCertificate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:sourceIdentityCertificate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_sourceIdentityCertificate">
               <xsl:apply-templates select="f:sourceIdentityCertificate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--proxyIdentityCertificate 0..1 string (json type: string)--><xsl:if test="f:proxyIdentityCertificate">
         <xsl:if test="f:proxyIdentityCertificate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions"
                    key="proxyIdentityCertificate">
               <xsl:value-of select="f:proxyIdentityCertificate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:proxyIdentityCertificate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions"
                 key="_proxyIdentityCertificate">
               <xsl:apply-templates select="f:proxyIdentityCertificate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--proxySignature 0..1 Signature--><xsl:if test="f:proxySignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="proxySignature">
            <xsl:apply-templates select="f:proxySignature" mode="Signature"/>
         </map>
      </xsl:if>
          <!--sourceSignature 0..1 Signature--><xsl:if test="f:sourceSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="sourceSignature">
            <xsl:apply-templates select="f:sourceSignature" mode="Signature"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>Describes validation requirements, source(s), status and dates for one or more elements.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VerificationResult.Validator">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--organization 1..1 Reference--><xsl:if test="f:organization">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="organization">
            <xsl:apply-templates select="f:organization" mode="Reference"/>
         </map>
      </xsl:if>
          <!--identityCertificate 0..1 string (json type: string)--><xsl:if test="f:identityCertificate">
         <xsl:if test="f:identityCertificate/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="identityCertificate">
               <xsl:value-of select="f:identityCertificate/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:identityCertificate[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_identityCertificate">
               <xsl:apply-templates select="f:identityCertificate" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--attestationSignature 0..1 Signature--><xsl:if test="f:attestationSignature">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="attestationSignature">
            <xsl:apply-templates select="f:attestationSignature" mode="Signature"/>
         </map>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>The validation status of the target.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="status">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An authorization for the provision of glasses and/or contact lenses to a patient.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VisionPrescription">
      <string xmlns="http://www.w3.org/2005/xpath-functions" key="resourceType">VisionPrescription</string>
      <xsl:apply-templates select="." mode="DomainResource"/>
          <!--identifier 0..* Identifier--><xsl:if test="f:identifier">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="identifier">
            <xsl:for-each select="f:identifier">
               <map>
                  <xsl:apply-templates select="." mode="Identifier"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--status 1..1 FinancialResourceStatusCodes (json type: string)--><xsl:if test="f:status">
         <xsl:if test="f:status/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="status">
               <xsl:value-of select="f:status/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:status[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_status">
               <xsl:apply-templates select="f:status" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--created 1..1 dateTime (json type: string)--><xsl:if test="f:created">
         <xsl:if test="f:created/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="created">
               <xsl:value-of select="f:created/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:created[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_created">
               <xsl:apply-templates select="f:created" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--patient 1..1 Reference--><xsl:if test="f:patient">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="patient">
            <xsl:apply-templates select="f:patient" mode="Reference"/>
         </map>
      </xsl:if>
          <!--encounter 0..1 Reference--><xsl:if test="f:encounter">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="encounter">
            <xsl:apply-templates select="f:encounter" mode="Reference"/>
         </map>
      </xsl:if>
          <!--dateWritten 1..1 dateTime (json type: string)--><xsl:if test="f:dateWritten">
         <xsl:if test="f:dateWritten/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="dateWritten">
               <xsl:value-of select="f:dateWritten/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:dateWritten[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_dateWritten">
               <xsl:apply-templates select="f:dateWritten" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--prescriber 1..1 Reference--><xsl:if test="f:prescriber">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="prescriber">
            <xsl:apply-templates select="f:prescriber" mode="Reference"/>
         </map>
      </xsl:if>
          <!--lensSpecification 1..* VisionPrescription.LensSpecification--><xsl:if test="f:lensSpecification">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="lensSpecification">
            <xsl:for-each select="f:lensSpecification">
               <map>
                  <xsl:apply-templates select="." mode="VisionPrescription.LensSpecification"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An authorization for the provision of glasses and/or contact lenses to a patient.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VisionPrescription.LensSpecification">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--product 1..1 CodeableConcept--><xsl:if test="f:product">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="product">
            <xsl:apply-templates select="f:product" mode="CodeableConcept"/>
         </map>
      </xsl:if>
          <!--eye 1..1 VisionEyes (json type: string)--><xsl:if test="f:eye">
         <xsl:if test="f:eye/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="eye">
               <xsl:value-of select="f:eye/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:eye[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_eye">
               <xsl:apply-templates select="f:eye" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--sphere 0..1 decimal (json type: number)--><xsl:if test="f:sphere">
         <xsl:if test="f:sphere/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="sphere">
               <xsl:value-of select="f:sphere/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:sphere[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_sphere">
               <xsl:apply-templates select="f:sphere" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--cylinder 0..1 decimal (json type: number)--><xsl:if test="f:cylinder">
         <xsl:if test="f:cylinder/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="cylinder">
               <xsl:value-of select="f:cylinder/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:cylinder[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_cylinder">
               <xsl:apply-templates select="f:cylinder" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--axis 0..1 integer (json type: number)--><xsl:if test="f:axis">
         <xsl:if test="f:axis/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="axis">
               <xsl:value-of select="f:axis/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:axis[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_axis">
               <xsl:apply-templates select="f:axis" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--prism 0..* VisionPrescription.Prism--><xsl:if test="f:prism">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="prism">
            <xsl:for-each select="f:prism">
               <map>
                  <xsl:apply-templates select="." mode="VisionPrescription.Prism"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
          <!--add 0..1 decimal (json type: number)--><xsl:if test="f:add">
         <xsl:if test="f:add/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="add">
               <xsl:value-of select="f:add/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:add[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_add">
               <xsl:apply-templates select="f:add" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--power 0..1 decimal (json type: number)--><xsl:if test="f:power">
         <xsl:if test="f:power/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="power">
               <xsl:value-of select="f:power/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:power[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_power">
               <xsl:apply-templates select="f:power" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--backCurve 0..1 decimal (json type: number)--><xsl:if test="f:backCurve">
         <xsl:if test="f:backCurve/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="backCurve">
               <xsl:value-of select="f:backCurve/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:backCurve[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_backCurve">
               <xsl:apply-templates select="f:backCurve" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--diameter 0..1 decimal (json type: number)--><xsl:if test="f:diameter">
         <xsl:if test="f:diameter/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="diameter">
               <xsl:value-of select="f:diameter/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:diameter[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_diameter">
               <xsl:apply-templates select="f:diameter" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--duration 0..1 Quantity--><xsl:if test="f:duration">
         <map xmlns="http://www.w3.org/2005/xpath-functions" key="duration">
            <xsl:apply-templates select="f:duration" mode="Quantity"/>
         </map>
      </xsl:if>
          <!--color 0..1 string (json type: string)--><xsl:if test="f:color">
         <xsl:if test="f:color/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="color">
               <xsl:value-of select="f:color/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:color[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_color">
               <xsl:apply-templates select="f:color" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--brand 0..1 string (json type: string)--><xsl:if test="f:brand">
         <xsl:if test="f:brand/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="brand">
               <xsl:value-of select="f:brand/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:brand[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_brand">
               <xsl:apply-templates select="f:brand" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--note 0..* Annotation--><xsl:if test="f:note">
         <array xmlns="http://www.w3.org/2005/xpath-functions" key="note">
            <xsl:for-each select="f:note">
               <map>
                  <xsl:apply-templates select="." mode="Annotation"/>
               </map>
            </xsl:for-each>
         </array>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>An authorization for the provision of glasses and/or contact lenses to a patient.</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VisionPrescription.Prism">
      <xsl:apply-templates select="." mode="BackboneElement"/>
          <!--amount 1..1 decimal (json type: number)--><xsl:if test="f:amount">
         <xsl:if test="f:amount/@value">
            <number xmlns="http://www.w3.org/2005/xpath-functions" key="amount">
               <xsl:value-of select="f:amount/@value"/>
            </number>
         </xsl:if>
         <xsl:if test="f:amount[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_amount">
               <xsl:apply-templates select="f:amount" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
          <!--base 1..1 VisionBase (json type: string)--><xsl:if test="f:base">
         <xsl:if test="f:base/@value">
            <string xmlns="http://www.w3.org/2005/xpath-functions" key="base">
               <xsl:value-of select="f:base/@value"/>
            </string>
         </xsl:if>
         <xsl:if test="f:base[@id | f:extension]">
            <map xmlns="http://www.w3.org/2005/xpath-functions" key="_base">
               <xsl:apply-templates select="f:base" mode="Element"/>
            </map>
         </xsl:if>
      </xsl:if>
        </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A coded concept listing the base codes.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VisionBase">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
   <xd:doc>
      <xd:desc>
         <xd:p>A coded concept listing the eye codes.</xd:p>
         <xd:p>If the element is present, it must have either a @value, an @id, or extensions</xd:p>
      </xd:desc>
   </xd:doc>
   <xsl:template match="*" mode="VisionEyes">
      <xsl:if test="@value">
         <string xmlns="http://www.w3.org/2005/xpath-functions" key="value">
            <xsl:value-of select="@value"/>
         </string>
      </xsl:if>
      <xsl:apply-templates select="." mode="Element"/>
   </xsl:template>
</xsl:stylesheet>
