{
  "resourceType": "StructureDefinition",
  "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-HealthcareService",
  "version": "1.1.0",
  "name": "EReferralHealthcareService",
  "status": "draft",
  "description": "HealthcareService contains the details of a healthcare service available at a location.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "HealthcareService",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-HealthcareService",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "HealthcareService.meta",
        "path": "HealthcareService.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "HealthcareService.meta.profile",
        "path": "HealthcareService.meta.profile",
        "comment": "It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set.\r\n\r\n#### **_` FOR eREFERRAL USAGE: The meta.profile = http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-HealthcareService|1.1.0 `_**",
        "min": 1
      },
      {
        "id": "HealthcareService.meta.security",
        "path": "HealthcareService.meta.security",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/security-labels"
        }
      },
      {
        "id": "HealthcareService.meta.tag",
        "path": "HealthcareService.meta.tag",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.meta.tag.system",
        "path": "HealthcareService.meta.tag.system",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.meta.tag.code",
        "path": "HealthcareService.meta.tag.code",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.meta.tag.display",
        "path": "HealthcareService.meta.tag.display",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.text",
        "path": "HealthcareService.text",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.extension:UsageLicense",
        "path": "HealthcareService.extension",
        "sliceName": "UsageLicense",
        "definition": "Extension to describe the licensing conditions under which this HealthcareService (and related) resources may be used.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-usage-license"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.extension:Media",
        "path": "HealthcareService.extension",
        "sliceName": "Media",
        "definition": "Extension to capture photos, documents and files that relate to a HealthcareService.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-media"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.extension:AccessInstructions",
        "path": "HealthcareService.extension",
        "sliceName": "AccessInstructions",
        "definition": "Extension describes how a person gets started with this HealthcareService.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-access-instructions"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.extension:DeliveryMethod",
        "path": "HealthcareService.extension",
        "sliceName": "DeliveryMethod",
        "definition": "Extension to describe how the service is delivered to the client. Usually there is only one deliveryMethod, but in some case there are multiple (e.g., On “site” counseling with a “video-call” option.)",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-delivery-method"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.identifier.use",
        "path": "HealthcareService.identifier.use",
        "binding": {
          "strength": "required",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/ereferral-identifier-use"
        }
      },
      {
        "id": "HealthcareService.identifier.type",
        "path": "HealthcareService.identifier.type",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/ereferral-identifier-type"
        }
      },
      {
        "id": "HealthcareService.identifier.type.coding",
        "path": "HealthcareService.identifier.type.coding",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.identifier.type.coding.system",
        "path": "HealthcareService.identifier.type.coding.system",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.identifier.type.coding.code",
        "path": "HealthcareService.identifier.type.coding.code",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.identifier.type.coding.display",
        "path": "HealthcareService.identifier.type.coding.display",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.identifier.assigner",
        "path": "HealthcareService.identifier.assigner",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.active",
        "path": "HealthcareService.active",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "HealthcareService.providedBy",
        "path": "HealthcareService.providedBy",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Organization"
            ]
          }
        ],
        "mustSupport": false
      },
      {
        "id": "HealthcareService.providedBy.display",
        "path": "HealthcareService.providedBy.display",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.category",
        "path": "HealthcareService.category",
        "comment": "Selecting a Service Category then determines the list of relevant service types that can be selected in the primary service type.\r\nThe high level healthcare sector of the listing. (e.g.,  Mental health service, Community health services, Laboratory service, etc)",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/healthcareservice-categories"
        }
      },
      {
        "id": "HealthcareService.type",
        "path": "HealthcareService.type",
        "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.\r\n\r\n<a href=\"https://tgateway.infoway-inforoute.ca/singlesubset.html?id=2.16.840.1.113883.3.239.12.38&versionid=20220429\">LINK TO VALUE SET</a>",
        "binding": {
          "strength": "preferred",
          "description": "Defines the clinical, medical, surgical or other healthcare-related service specialty of a practitioner who interacts, treats or provides such services to or for a patient.",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/practitionerspecialty"
        }
      },
      {
        "id": "HealthcareService.type.extension:IsPrimary",
        "path": "HealthcareService.type.extension",
        "sliceName": "IsPrimary",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-is-primary"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.type.extension:Facet",
        "path": "HealthcareService.type.extension",
        "sliceName": "Facet",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-facet"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "HealthcareService.type.coding",
        "path": "HealthcareService.type.coding",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.type.coding.system",
        "path": "HealthcareService.type.coding.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "HealthcareService.type.coding.code",
        "path": "HealthcareService.type.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "HealthcareService.type.coding.display",
        "path": "HealthcareService.type.coding.display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "HealthcareService.location",
        "path": "HealthcareService.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Location"
            ]
          }
        ],
        "mustSupport": false
      },
      {
        "id": "HealthcareService.location.reference",
        "path": "HealthcareService.location.reference",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.location.display",
        "path": "HealthcareService.location.display",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.comment",
        "path": "HealthcareService.comment",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.extraDetails",
        "path": "HealthcareService.extraDetails",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.telecom",
        "path": "HealthcareService.telecom",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.telecom.system",
        "path": "HealthcareService.telecom.system",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.telecom.value",
        "path": "HealthcareService.telecom.value",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.telecom.period.start",
        "path": "HealthcareService.telecom.period.start",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.telecom.period.end",
        "path": "HealthcareService.telecom.period.end",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.serviceProvisionCode",
        "path": "HealthcareService.serviceProvisionCode",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/service-provision-conditions"
        }
      },
      {
        "id": "HealthcareService.eligibility.code",
        "path": "HealthcareService.eligibility.code",
        "mustSupport": false,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/eligibility-criteria"
        }
      },
      {
        "id": "HealthcareService.program.coding.system",
        "path": "HealthcareService.program.coding.system",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.program.coding.code",
        "path": "HealthcareService.program.coding.code",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.program.coding.display",
        "path": "HealthcareService.program.coding.display",
        "min": 1,
        "mustSupport": false
      },
      {
        "id": "HealthcareService.characteristic.extension:Facet",
        "path": "HealthcareService.characteristic.extension",
        "sliceName": "Facet",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ehealthontario.ca/fhir/StructureDefinition/ext-facet"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "HealthcareService.characteristic.extension:Facet.value[x]",
        "path": "HealthcareService.characteristic.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "HealthcareService.communication",
        "path": "HealthcareService.communication",
        "binding": {
          "strength": "preferred",
          "description": "Languages understood or supported by Ontario clients and organizations. This value set represents the subset of all ISO living languages as of April 22, 2020.",
          "valueSet": "http://ehealthontario.ca/fhir/ValueSet/human-language"
        }
      },
      {
        "id": "HealthcareService.endpoint",
        "path": "HealthcareService.endpoint",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.endpoint.reference",
        "path": "HealthcareService.endpoint.reference",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.endpoint.type",
        "path": "HealthcareService.endpoint.type",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.endpoint.identifier",
        "path": "HealthcareService.endpoint.identifier",
        "mustSupport": false
      },
      {
        "id": "HealthcareService.endpoint.display",
        "path": "HealthcareService.endpoint.display",
        "mustSupport": false
      }
    ]
  }
}