VRIS - Viljatusravi infosüsteem
0.1.0 - draft

VRIS - Viljatusravi infosüsteem, published by TEHIK. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/TEHIK-EE/ig-ee-vris/ and changes regularly. See the Directory of published versions

## Resource Profile: EEVRISEpisodeOfCare - TTL Profile

Draft as of 2026-07-16

TTL representation of the ee-vris-episode-of-care resource profile.

Raw ttl | Download

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

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

    <http://hl7.org/fhir/StructureDefinition/ee-vris-episode-of-care> a fhir:StructureDefinition ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:id [ fhir:v "ee-vris-episode-of-care"] ; #
      fhir:text [
         fhir:status [ fhir:v "extensions" ] ;
         fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureDefinition ee-vris-episode-of-care</b></p><a name=\"ee-vris-episode-of-care\"> </a><a name=\"hcee-vris-episode-of-care\"> </a><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;\"><tr style=\"border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top\"><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"The logical name of the element\">Name</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Information about the use of the element\">Flags</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Minimum and Maximum # of times the element can appear in the instance\">Card.</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px; width: 100px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Reference to the type of the element\">Type</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Additional information about the element\">Description &amp; Constraints</a><span style=\"float: right\"><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64, \" alt=\"doco\" style=\"background-color: inherit\"/></a></span></th></tr><tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_resource.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare\">EpisodeOfCare</a><a name=\"EpisodeOfCare\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R5/episodeofcare.html\">EpisodeOfCare</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.identifier\">identifier</a><a name=\"EpisodeOfCare.identifier\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/datatypes.html#Identifier\">Identifier</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Episoodi identifikaator)</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.type\">type</a><a name=\"EpisodeOfCare.type\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Episoodi tüüp, nt viljatusravi tsükkel)</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.reason\">reason</a><a name=\"EpisodeOfCare.reason\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/types.html#BackboneElement\">BackboneElement</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Episoodi põhjus, nt viljatuse näidustus)</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_reference.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.patient\">patient</a><a name=\"EpisodeOfCare.patient\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R5/references.html\">Reference</a>(<a href=\"StructureDefinition-ee-vris-recipient.html\">Patient: EE VRIS Recipient</a> | <a href=\"StructureDefinition-ee-vris-donor.html\">Patient: EE VRIS Donor</a> | <a href=\"StructureDefinition-ee-vris-donor-anonymous.html\">Patient: EE VRIS Anonymous Patient</a> | <a href=\"https://fhir.ee/packages/mpi/1.5.0/site/StructureDefinition-ee-mpi-patient-verified.html\">EE MPI Patient Verified</a> | <a href=\"StructureDefinition-ee-vris-patient-child.html\">Patient: EE VRIS Child</a>)</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">The patient who is the focus of this episode of care</span></td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.managingOrganization\">managingOrganization</a><a name=\"EpisodeOfCare.managingOrganization\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R5/references.html\">Reference</a>(<a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/organization.html\">Organization</a>)</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Vastutav organisatsioon, viide SPD-le)</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.period\">period</a><a name=\"EpisodeOfCare.period\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/datatypes.html#Period\">Period</a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Episoodi periood: algus ja lõpp)</td></tr>#xD;\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck00.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-ee-vris-episode-of-care-definitions.html#EpisodeOfCare.careManager\">careManager</a><a name=\"EpisodeOfCare.careManager\"> </a></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R5/references.html\">Reference</a>(<a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/practitioner.html\">Practitioner</a> | <a style=\"opacity: 0.5; opacity: 0.5\" href=\"http://hl7.org/fhir/R5/practitionerrole.html\">PractitionerRole</a>)</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\">(ee Vastutav arst, viide SPD-le)</td></tr>#xD;\n<tr><td colspan=\"5\" class=\"hierarchy\"><br/><a href=\"https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views\" title=\"Legend for this format\"><img src=\"data:image/png;base64, \" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"^^rdf:XMLLiteral ]
      ] ; #
      fhir:url [ fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-episode-of-care"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "EEVRISEpisodeOfCare"] ; #
      fhir:title [ fhir:v "EpisodeOfCare: EE VRIS Episode of Care"] ; #
      fhir:status [ fhir:v "draft"] ; #
      fhir:date [ fhir:v "2026-07-16T13:10:38+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "TEHIK"] ; #
      fhir:contact ( [
         fhir:name [ fhir:v "TEHIK" ] ;
         fhir:telecom ( [
           fhir:system [ fhir:v "url" ] ;
           fhir:value [ fhir:v "https://www.tehik.ee" ]
         ] [
           fhir:system [ fhir:v "email" ] ;
           fhir:value [ fhir:v "fhir@tehik.ee" ]
         ] )
      ] [
         fhir:name [ fhir:v "TEHIK Andmekorraldus" ] ;
         fhir:telecom ( [
           fhir:system [ fhir:v "email" ] ;
           fhir:value [ fhir:v "andmekorraldus@tehik.ee" ] ;
           fhir:use [ fhir:v "work" ]
         ] )
      ] ) ; #
      fhir:description [ fhir:v "Episode of care profile for VRIS fertility treatment. Groups related encounters, procedures and observations within a longer treatment period. (ee Viljatusravi episood ühendab ravitsükli piires toimuvad visiidid, protseduurid ja vaatlused. NB! Tulevikus viidata Encounter-Episode teenusele!)"] ; #
      fhir:jurisdiction ( [
         fhir:coding ( [
           fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
           fhir:code [ fhir:v "EE" ] ;
           fhir:display [ fhir:v "Estonia" ]
         ] )
      ] ) ; #
      fhir:fhirVersion [ fhir:v "5.0.0"] ; #
      fhir:mapping ( [
         fhir:identity [ fhir:v "workflow" ] ;
         fhir:uri [ fhir:v "http://hl7.org/fhir/workflow"^^xsd:anyURI ] ;
         fhir:name [ fhir:v "Workflow Pattern" ]
      ] [
         fhir:identity [ fhir:v "w5" ] ;
         fhir:uri [ fhir:v "http://hl7.org/fhir/fivews"^^xsd:anyURI ] ;
         fhir:name [ fhir:v "FiveWs Pattern Mapping" ]
      ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:uri [ fhir:v "http://hl7.org/v3"^^xsd:anyURI ] ;
         fhir:name [ fhir:v "RIM Mapping" ]
      ] ) ; #
      fhir:kind [ fhir:v "resource"] ; #
      fhir:abstract [ fhir:v false] ; #
      fhir:type [ fhir:v "EpisodeOfCare"^^xsd:anyURI] ; #
      fhir:baseDefinition [
         fhir:v "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"^^xsd:anyURI ;
         fhir:link <http://hl7.org/fhir/StructureDefinition/EpisodeOfCare>
      ] ; #
      fhir:derivation [ fhir:v "constraint"] ; #
      fhir:snapshot [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version"^^xsd:anyURI ] ;
           fhir:value [
             a fhir:string ;
             fhir:v "5.0.0"
           ]
         ] ) ;
         fhir:element ( [
           fhir:id [ fhir:v "EpisodeOfCare" ] ;
           fhir:path [ fhir:v "EpisodeOfCare" ] ;
           fhir:short [ fhir:v "An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility" ] ;
           fhir:definition [ fhir:v "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." ] ;
           fhir:alias ( [ fhir:v "Case Program Problem" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:constraint ( [
             fhir:key [ fhir:v "dom-2" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ] ;
             fhir:expression [ fhir:v "contained.contained.empty()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>
             ]
           ] [
             fhir:key [ fhir:v "dom-3" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource" ] ;
             fhir:expression [ fhir:v "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>
             ]
           ] [
             fhir:key [ fhir:v "dom-4" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ] ;
             fhir:expression [ fhir:v "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>
             ]
           ] [
             fhir:key [ fhir:v "dom-5" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "If a resource is contained in another resource, it SHALL NOT have a security label" ] ;
             fhir:expression [ fhir:v "contained.meta.security.empty()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>
             ]
           ] [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:boolean ;
                 fhir:v true
               ]
             ] [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:markdown ;
                 fhir:v "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
               ]
             ] ) ;
             fhir:key [ fhir:v "dom-6" ] ;
             fhir:severity [ fhir:v "warning" ] ;
             fhir:human [ fhir:v "A resource should have narrative for robust management" ] ;
             fhir:expression [ fhir:v "text.`div`.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/DomainResource"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "Entity, Role, or Act,n/a" ]
           ] [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "workflow.encounter" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.id" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.id" ] ;
           fhir:short [ fhir:v "Logical id of this artifact" ] ;
           fhir:definition [ fhir:v "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ] ;
           fhir:comment [ fhir:v "Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Resource.id" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:url ;
                 fhir:v "id"^^xsd:anyURI
               ]
             ] ) ;
             fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.meta" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.meta" ] ;
           fhir:short [ fhir:v "Metadata about the resource" ] ;
           fhir:definition [ fhir:v "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Resource.meta" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Meta"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.implicitRules" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.implicitRules" ] ;
           fhir:short [ fhir:v "A set of rules under which this content was created" ] ;
           fhir:definition [ fhir:v "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc." ] ;
           fhir:comment [ fhir:v "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Resource.implicitRules" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "uri"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation" ] ;
           fhir:isSummary [ fhir:v true ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.language" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.language" ] ;
           fhir:short [ fhir:v "Language of the resource content" ] ;
           fhir:definition [ fhir:v "The base language in which the resource is written." ] ;
           fhir:comment [ fhir:v "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Resource.language" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "code"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "Language"
               ]
             ] ) ;
             fhir:strength [ fhir:v "required" ] ;
             fhir:description [ fhir:v "IETF language tag for a human language" ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/all-languages|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/all-languages|5.0.0>
             ] ;
             fhir:additional ( [
               fhir:purpose [ fhir:v "starter" ] ;
               fhir:valueSet [
                 fhir:v "http://hl7.org/fhir/ValueSet/languages|5.0.0"^^xsd:anyURI ;
                 fhir:link <http://hl7.org/fhir/ValueSet/languages|5.0.0>
               ]
             ] )
           ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.text" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.text" ] ;
           fhir:short [ fhir:v "Text summary of the resource, for human interpretation" ] ;
           fhir:definition [ fhir:v "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ] ;
           fhir:comment [ fhir:v "Contained resources do not have a narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later." ] ;
           fhir:alias ( [ fhir:v "narrative" ] [ fhir:v "html" ] [ fhir:v "xhtml" ] [ fhir:v "display" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "DomainResource.text" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Narrative"^^xsd:anyURI ]
           ] ) ;
           fhir:condition ( [ fhir:v "dom-6" ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "Act.text?" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.contained" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.contained" ] ;
           fhir:short [ fhir:v "Contained, inline Resources" ] ;
           fhir:definition [ fhir:v "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning." ] ;
           fhir:comment [ fhir:v "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags in their meta elements, but SHALL NOT have security labels." ] ;
           fhir:alias ( [ fhir:v "inline resources" ] [ fhir:v "anonymous resources" ] [ fhir:v "contained resources" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "DomainResource.contained" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Resource"^^xsd:anyURI ]
           ] ) ;
           fhir:condition ( [ fhir:v "dom-2" ] [ fhir:v "dom-4" ] [ fhir:v "dom-3" ] [ fhir:v "dom-5" ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.extension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.extension" ] ;
           fhir:short [ fhir:v "Additional content defined by implementations" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "DomainResource.extension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.modifierExtension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.modifierExtension" ] ;
           fhir:short [ fhir:v "Extensions that cannot be ignored" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension)." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "DomainResource.modifierExtension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.identifier" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.identifier" ] ;
           fhir:short [ fhir:v "(ee Episoodi identifikaator)" ] ;
           fhir:definition [ fhir:v "The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.identifier" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Identifier"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.identifier" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.identifier" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.status" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.status" ] ;
           fhir:short [ fhir:v "planned | waitlist | active | onhold | finished | cancelled | entered-in-error" ] ;
           fhir:definition [ fhir:v "planned | waitlist | active | onhold | finished | cancelled." ] ;
           fhir:comment [ fhir:v "This element is labeled as a modifier because the status contains codes that mark the episode as not currently valid." ] ;
           fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.status" ] ;
             fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "code"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "EpisodeOfCareStatus"
               ]
             ] ) ;
             fhir:strength [ fhir:v "required" ] ;
             fhir:description [ fhir:v "The status of the episode of care." ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/episode-of-care-status|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/episode-of-care-status|5.0.0>
             ]
           ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.status" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.status" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory" ] ;
           fhir:short [ fhir:v "Past list of status codes (the current status may be included to cover the start date of the status)" ] ;
           fhir:definition [ fhir:v "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.statusHistory" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "BackboneElement"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory.id" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory.id" ] ;
           fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
           fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
           fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.id" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:url ;
                 fhir:v "string"^^xsd:anyURI
               ]
             ] ) ;
             fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
           ] ) ;
           fhir:condition ( [ fhir:v "ele-1" ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory.extension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory.extension" ] ;
           fhir:short [ fhir:v "Additional content defined by implementations" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.extension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory.modifierExtension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory.modifierExtension" ] ;
           fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension)." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory.status" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory.status" ] ;
           fhir:short [ fhir:v "planned | waitlist | active | onhold | finished | cancelled | entered-in-error" ] ;
           fhir:definition [ fhir:v "planned | waitlist | active | onhold | finished | cancelled." ] ;
           fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.statusHistory.status" ] ;
             fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "code"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "EpisodeOfCareStatus"
               ]
             ] ) ;
             fhir:strength [ fhir:v "required" ] ;
             fhir:description [ fhir:v "The status of the episode of care." ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/episode-of-care-status|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/episode-of-care-status|5.0.0>
             ]
           ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.statusHistory.period" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.statusHistory.period" ] ;
           fhir:short [ fhir:v "Duration the EpisodeOfCare was in the specified status" ] ;
           fhir:definition [ fhir:v "The period during this EpisodeOfCare that the specific status applied." ] ;
           fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.statusHistory.period" ] ;
             fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Period"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.type" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.type" ] ;
           fhir:short [ fhir:v "(ee Episoodi tüüp, nt viljatusravi tsükkel)" ] ;
           fhir:definition [ fhir:v "A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care." ] ;
           fhir:comment [ fhir:v "The type can be very important in processing as this could be used in determining if the EpisodeOfCare is relevant to specific government reporting, or other types of classifications." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.type" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "EpisodeOfCareType"
               ]
             ] ) ;
             fhir:strength [ fhir:v "example" ] ;
             fhir:description [ fhir:v "The type of the episode of care." ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/episodeofcare-type|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/episodeofcare-type|5.0.0>
             ]
           ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.code" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.class" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason" ] ;
           fhir:short [ fhir:v "(ee Episoodi põhjus, nt viljatuse näidustus)" ] ;
           fhir:definition [ fhir:v "The list of medical reasons that are expected to be addressed during the episode of care." ] ;
           fhir:comment [ fhir:v "The reason communicates what medical problem the patient has that should be addressed during the episode of care.  This reason could be patient reported complaint, a clinical indication that was determined in a previous encounter or episode of care, or some planned care such as an immunization recommendation.  In the case where you have a primary reason, but are expecting to also address other problems, you can list the primary reason with a use code of 'Chief Complaint', while the other problems being addressed would have a use code of 'Reason for Visit'.\r\rExamples:\r * pregnancy would use HealthcareService or a coding as the reason\r * patient home monitoring could use Condition as the reason" ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.reason" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "BackboneElement"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason.id" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason.id" ] ;
           fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
           fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
           fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.id" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:url ;
                 fhir:v "string"^^xsd:anyURI
               ]
             ] ) ;
             fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
           ] ) ;
           fhir:condition ( [ fhir:v "ele-1" ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason.extension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason.extension" ] ;
           fhir:short [ fhir:v "Additional content defined by implementations" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.extension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason.modifierExtension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason.modifierExtension" ] ;
           fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension)." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason.use" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason.use" ] ;
           fhir:short [ fhir:v "What the reason value should be used for/as" ] ;
           fhir:definition [ fhir:v "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening)." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.reason.use" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "reason-use"
               ]
             ] ) ;
             fhir:strength [ fhir:v "example" ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/encounter-reason-use|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/encounter-reason-use|5.0.0>
             ]
           ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason.value" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason.value" ] ;
           fhir:short [ fhir:v "Medical reason to be addressed" ] ;
           fhir:definition [ fhir:v "The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.reason.value" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "CodeableReference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Condition|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Condition|5.0.0>
             ] [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Procedure|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure|5.0.0>
             ] [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Observation|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|5.0.0>
             ] [
               fhir:v "http://hl7.org/fhir/StructureDefinition/HealthcareService|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/HealthcareService|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "reason-code"
               ]
             ] ) ;
             fhir:strength [ fhir:v "example" ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/encounter-reason|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/encounter-reason|5.0.0>
             ]
           ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.reason" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.what[x]" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis" ] ;
           fhir:short [ fhir:v "The list of medical conditions that were addressed during the episode of care" ] ;
           fhir:definition [ fhir:v "The list of medical conditions that were addressed during the episode of care." ] ;
           fhir:comment [ fhir:v "The diagnosis communicates what medical conditions were actually addressed during the episode of care.  If a diagnosis was provided as a reason, and was treated during the episode of care, it may be listed in both EpisodeOfCare.reason and EpisodeOfCare.diagnosis.\r\rDiagnoses related to billing can be documented on the Account resources which supports ranking for the purpose of reimbursement." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.diagnosis" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "BackboneElement"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis.id" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis.id" ] ;
           fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
           fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
           fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.id" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:url ;
                 fhir:v "string"^^xsd:anyURI
               ]
             ] ) ;
             fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String"^^xsd:anyURI ]
           ] ) ;
           fhir:condition ( [ fhir:v "ele-1" ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis.extension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis.extension" ] ;
           fhir:short [ fhir:v "Additional content defined by implementations" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "Element.extension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "n/a" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis.modifierExtension" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis.modifierExtension" ] ;
           fhir:short [ fhir:v "Extensions that cannot be ignored even if unrecognized" ] ;
           fhir:definition [ fhir:v "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ] ;
           fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
           fhir:requirements [ fhir:v "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R5/extensibility.html#modifierExtension)." ] ;
           fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] [ fhir:v "modifiers" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "BackboneElement.modifierExtension" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Extension"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] [
             fhir:key [ fhir:v "ext-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "Must have either extensions or value[x], not both" ] ;
             fhir:expression [ fhir:v "extension.exists() != value.exists()" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Extension"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>
             ]
           ] ) ;
           fhir:isModifier [ fhir:v true ] ;
           fhir:isModifierReason [ fhir:v "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "rim" ] ;
             fhir:map [ fhir:v "N/A" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis.condition" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis.condition" ] ;
           fhir:short [ fhir:v "The medical condition that was addressed during the episode of care" ] ;
           fhir:definition [ fhir:v "The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.diagnosis.condition" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "CodeableReference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Condition|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Condition|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "condition-code"
               ]
             ] ) ;
             fhir:strength [ fhir:v "example" ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/condition-code|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/condition-code|5.0.0>
             ]
           ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.reason" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.what[x]" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.diagnosis.use" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.diagnosis.use" ] ;
           fhir:short [ fhir:v "Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)" ] ;
           fhir:definition [ fhir:v "Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.diagnosis.use" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "CodeableConcept"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:binding [
             fhir:extension ( [
               fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName"^^xsd:anyURI ] ;
               fhir:value [
                 a fhir:string ;
                 fhir:v "DiagnosisUse"
               ]
             ] ) ;
             fhir:strength [ fhir:v "preferred" ] ;
             fhir:description [ fhir:v "The type of diagnosis this condition represents." ] ;
             fhir:valueSet [
               fhir:v "http://hl7.org/fhir/ValueSet/encounter-diagnosis-use|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/ValueSet/encounter-diagnosis-use|5.0.0>
             ]
           ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.patient" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.patient" ] ;
           fhir:short [ fhir:v "The patient who is the focus of this episode of care" ] ;
           fhir:definition [ fhir:v "The patient who is the focus of this episode of care." ] ;
           fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.patient" ] ;
             fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-recipient"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-recipient>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-donor"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-donor>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-donor-anonymous"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-donor-anonymous>
             ] [
               fhir:v "https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient-verified"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient-verified>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-patient-child"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-patient-child>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.subject" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.subject[x]" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.managingOrganization" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.managingOrganization" ] ;
           fhir:short [ fhir:v "(ee Vastutav organisatsioon, viide SPD-le)" ] ;
           fhir:definition [ fhir:v "The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration." ] ;
           fhir:comment [ fhir:v "If multiple organizations are involved in care delivery, the care teams from those organizations would be represented in EpisodeOfCare.team, while the primary organization managing the care would be listed in EpisodeOfCare.managingOrganization.   Other organizations may have their own EpisodeOfCare for tracking their activities." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.managingOrganization" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Organization|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Organization|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.performer.actor" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.period" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.period" ] ;
           fhir:short [ fhir:v "(ee Episoodi periood: algus ja lõpp)" ] ;
           fhir:definition [ fhir:v "The interval during which the managing organization assumes the defined responsibility." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.period" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Period"^^xsd:anyURI ]
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v true ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.occurrence[x]" ]
           ] [
             fhir:identity [ fhir:v "w5" ] ;
             fhir:map [ fhir:v "FiveWs.init" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.referralRequest" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.referralRequest" ] ;
           fhir:short [ fhir:v "Originating Referral Request(s)" ] ;
           fhir:definition [ fhir:v "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.referralRequest" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.basedOn" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.careManager" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.careManager" ] ;
           fhir:short [ fhir:v "(ee Vastutav arst, viide SPD-le)" ] ;
           fhir:definition [ fhir:v "The practitioner that is the care manager/care coordinator for this patient." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "1" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.careManager" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "1" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0>
             ] [
               fhir:v "http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.performer.actor" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.careTeam" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.careTeam" ] ;
           fhir:short [ fhir:v "Other practitioners facilitating this episode of care" ] ;
           fhir:definition [ fhir:v "The list of practitioners that may be facilitating this episode of care for specific purposes." ] ;
           fhir:alias ( [ fhir:v "CareTeam" ] ) ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.careTeam" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/CareTeam|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/CareTeam|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ] ;
           fhir:mapping ( [
             fhir:identity [ fhir:v "workflow" ] ;
             fhir:map [ fhir:v "Event.performer.actor" ]
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.account" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.account" ] ;
           fhir:short [ fhir:v "The set of accounts that may be used for billing for this EpisodeOfCare" ] ;
           fhir:definition [ fhir:v "The set of accounts that may be used for billing for this EpisodeOfCare." ] ;
           fhir:comment [ fhir:v "The billing system may choose to allocate billable items associated with the EpisodeOfCare to different referenced Accounts based on internal business rules." ] ;
           fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
           fhir:max [ fhir:v "*" ] ;
           fhir:base [
             fhir:path [ fhir:v "EpisodeOfCare.account" ] ;
             fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
             fhir:max [ fhir:v "*" ]
           ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Account|5.0.0"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Account|5.0.0>
             ] )
           ] ) ;
           fhir:constraint ( [
             fhir:key [ fhir:v "ele-1" ] ;
             fhir:severity [ fhir:v "error" ] ;
             fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
             fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
             fhir:source [
               fhir:v "http://hl7.org/fhir/StructureDefinition/Element"^^xsd:anyURI ;
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>
             ]
           ] ) ;
           fhir:mustSupport [ fhir:v false ] ;
           fhir:isModifier [ fhir:v false ] ;
           fhir:isSummary [ fhir:v false ]
         ] )
      ] ; #
      fhir:differential [
         fhir:element ( [
           fhir:id [ fhir:v "EpisodeOfCare" ] ;
           fhir:path [ fhir:v "EpisodeOfCare" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.identifier" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.identifier" ] ;
           fhir:short [ fhir:v "(ee Episoodi identifikaator)" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.type" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.type" ] ;
           fhir:short [ fhir:v "(ee Episoodi tüüp, nt viljatusravi tsükkel)" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.reason" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.reason" ] ;
           fhir:short [ fhir:v "(ee Episoodi põhjus, nt viljatuse näidustus)" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.patient" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.patient" ] ;
           fhir:type ( [
             fhir:code [ fhir:v "Reference"^^xsd:anyURI ] ;
             fhir:targetProfile ( [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-recipient"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-recipient>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-donor"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-donor>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-donor-anonymous"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-donor-anonymous>
             ] [
               fhir:v "https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient-verified"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient-verified>
             ] [
               fhir:v "https://fhir.ee/vris/StructureDefinition/ee-vris-patient-child"^^xsd:anyURI ;
               fhir:link <https://fhir.ee/vris/StructureDefinition/ee-vris-patient-child>
             ] )
           ] )
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.managingOrganization" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.managingOrganization" ] ;
           fhir:short [ fhir:v "(ee Vastutav organisatsioon, viide SPD-le)" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.period" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.period" ] ;
           fhir:short [ fhir:v "(ee Episoodi periood: algus ja lõpp)" ]
         ] [
           fhir:id [ fhir:v "EpisodeOfCare.careManager" ] ;
           fhir:path [ fhir:v "EpisodeOfCare.careManager" ] ;
           fhir:short [ fhir:v "(ee Vastutav arst, viide SPD-le)" ]
         ] )
      ] . #