{
  "resourceType": "StructureDefinition",
  "id": "1.3.6.1.4.1.38760.FHIR.1.52.1.1",
  "url": "https://lab.vvis.gov.lv/fhir/StructureDefinition/Coverage/EUStateInsurance-v1",
  "version": "1",
  "name": "EUStateInsurance",
  "status": "active",
  "publisher": "NHS Latvia",
  "description": "Resource provides information on EU or EEA, Switzerland or United Kingdom patient insurance.",
  "purpose": "To provide NHS of Latvia information on insurance to requst reimbursement from the insurer.",
  "copyright": "©NHS Latvia",
  "fhirVersion": "4.3.0",
  "kind": "resource",
  "abstract": false,
  "type": "Coverage",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Coverage",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Coverage.meta",
        "path": "Coverage.meta",
        "min": 1,
        "type": [
          {
            "code": "Meta",
            "profile": [
              "https://vvis.gov.lv/fhir/Datatype/Meta/MedicalMeta-v1"
            ]
          }
        ]
      },
      {
        "id": "Coverage.meta.tag",
        "path": "Coverage.meta.tag"
      },
      {
        "id": "Coverage.meta.tag:authorMedicalInstitution",
        "path": "Coverage.meta.tag",
        "sliceName": "authorMedicalInstitution",
        "min": 1
      },
      {
        "id": "Coverage.meta.tag:entererMedicalPerson",
        "path": "Coverage.meta.tag",
        "sliceName": "entererMedicalPerson",
        "min": 1
      },
      {
        "id": "Coverage.meta.tag:entererPersonId",
        "path": "Coverage.meta.tag",
        "sliceName": "entererPersonId",
        "max": "0"
      },
      {
        "id": "Coverage.meta.tag:entererSystem",
        "path": "Coverage.meta.tag",
        "sliceName": "entererSystem",
        "min": 1
      },
      {
        "id": "Coverage.implicitRules",
        "path": "Coverage.implicitRules",
        "max": "0"
      },
      {
        "id": "Coverage.language",
        "path": "Coverage.language",
        "max": "0"
      },
      {
        "id": "Coverage.text",
        "path": "Coverage.text",
        "max": "0"
      },
      {
        "id": "Coverage.contained",
        "path": "Coverage.contained",
        "max": "0"
      },
      {
        "id": "Coverage.identifier",
        "path": "Coverage.identifier",
        "definition": "A unique identifier assigned to this coverage.\r\n\r\n©NHS: Insurance document information is expected.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Coverage.identifier.id",
        "path": "Coverage.identifier.id",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.use",
        "path": "Coverage.identifier.use",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.type",
        "path": "Coverage.identifier.type",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.system",
        "path": "Coverage.identifier.system",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.value",
        "path": "Coverage.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.\r\n\r\n©NHS: SHALL be provided for EHIC and EHIC Replacement Certificate.",
        "maxLength": 50
      },
      {
        "id": "Coverage.identifier.period",
        "path": "Coverage.identifier.period",
        "min": 1
      },
      {
        "id": "Coverage.identifier.period.id",
        "path": "Coverage.identifier.period.id",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.period.start",
        "path": "Coverage.identifier.period.start",
        "definition": "The start of the period. The boundary is inclusive.\r\n\r\n©NHS: Date when document was issued is expected.",
        "min": 1,
        "constraint": [
          {
            "key": "lab-date-only",
            "severity": "error",
            "human": "This value shall be a date (without time)",
            "expression": "toString().matches('^\\\\d{4}(-\\\\d{2}){2}$')"
          }
        ]
      },
      {
        "id": "Coverage.identifier.period.end",
        "path": "Coverage.identifier.period.end",
        "max": "0"
      },
      {
        "id": "Coverage.identifier.assigner",
        "path": "Coverage.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Coverage.status",
        "path": "Coverage.status",
        "definition": "The status of the resource instance.\r\n\r\n©NHS: Only active or entered-in-error status is expected."
      },
      {
        "id": "Coverage.type",
        "path": "Coverage.type",
        "definition": "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health or payment by an individual or organization.\r\n\r\n©NHS: Insurance document type is expected.",
        "min": 1
      },
      {
        "id": "Coverage.type.id",
        "path": "Coverage.type.id",
        "max": "0"
      },
      {
        "id": "Coverage.type.coding",
        "path": "Coverage.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Coverage.type.coding.id",
        "path": "Coverage.type.coding.id",
        "max": "0"
      },
      {
        "id": "Coverage.type.coding.system",
        "path": "Coverage.type.coding.system",
        "min": 1,
        "fixedUri": "https://vvis.gov.lv/fhir/ValueSet/1.3.6.1.4.1.38760.2.833"
      },
      {
        "id": "Coverage.type.coding.version",
        "path": "Coverage.type.coding.version",
        "max": "0"
      },
      {
        "id": "Coverage.type.coding.code",
        "path": "Coverage.type.coding.code",
        "min": 1
      },
      {
        "id": "Coverage.type.coding.display",
        "path": "Coverage.type.coding.display",
        "min": 1
      },
      {
        "id": "Coverage.type.coding.userSelected",
        "path": "Coverage.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Coverage.type.text",
        "path": "Coverage.type.text",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder",
        "path": "Coverage.policyHolder",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "Coverage.policyHolder.id",
        "path": "Coverage.policyHolder.id",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.reference",
        "path": "Coverage.policyHolder.reference",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.type",
        "path": "Coverage.policyHolder.type",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier",
        "path": "Coverage.policyHolder.identifier",
        "min": 1
      },
      {
        "id": "Coverage.policyHolder.identifier.id",
        "path": "Coverage.policyHolder.identifier.id",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.use",
        "path": "Coverage.policyHolder.identifier.use",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.type",
        "path": "Coverage.policyHolder.identifier.type",
        "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.\r\n\r\n©NHS: Insurer country is expected.",
        "min": 1
      },
      {
        "id": "Coverage.policyHolder.identifier.type.id",
        "path": "Coverage.policyHolder.identifier.type.id",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding",
        "path": "Coverage.policyHolder.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.id",
        "path": "Coverage.policyHolder.identifier.type.coding.id",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.system",
        "path": "Coverage.policyHolder.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "https://vvis.gov.lv/fhir/ValueSet/1.3.6.1.4.1.38760.2.832"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.version",
        "path": "Coverage.policyHolder.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.code",
        "path": "Coverage.policyHolder.identifier.type.coding.code",
        "min": 1
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.display",
        "path": "Coverage.policyHolder.identifier.type.coding.display",
        "min": 1
      },
      {
        "id": "Coverage.policyHolder.identifier.type.coding.userSelected",
        "path": "Coverage.policyHolder.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.type.text",
        "path": "Coverage.policyHolder.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.system",
        "path": "Coverage.policyHolder.identifier.system",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.value",
        "path": "Coverage.policyHolder.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.\r\n\r\n©NHS: Institution code which issued the insurance document is expected.",
        "min": 1
      },
      {
        "id": "Coverage.policyHolder.identifier.period",
        "path": "Coverage.policyHolder.identifier.period",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.identifier.assigner",
        "path": "Coverage.policyHolder.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Coverage.policyHolder.display",
        "path": "Coverage.policyHolder.display",
        "max": "0"
      },
      {
        "id": "Coverage.subscriber",
        "path": "Coverage.subscriber",
        "max": "0"
      },
      {
        "id": "Coverage.subscriber.id",
        "path": "Coverage.subscriber.id",
        "max": "0"
      },
      {
        "id": "Coverage.subscriber.reference",
        "path": "Coverage.subscriber.reference",
        "min": 1
      },
      {
        "id": "Coverage.subscriber.type",
        "path": "Coverage.subscriber.type",
        "min": 1
      },
      {
        "id": "Coverage.subscriber.identifier",
        "path": "Coverage.subscriber.identifier",
        "max": "0"
      },
      {
        "id": "Coverage.subscriber.display",
        "path": "Coverage.subscriber.display",
        "max": "0"
      },
      {
        "id": "Coverage.subscriberId",
        "path": "Coverage.subscriberId",
        "max": "0"
      },
      {
        "id": "Coverage.beneficiary.id",
        "path": "Coverage.beneficiary.id",
        "max": "0"
      },
      {
        "id": "Coverage.beneficiary.reference",
        "path": "Coverage.beneficiary.reference",
        "min": 1
      },
      {
        "id": "Coverage.beneficiary.type",
        "path": "Coverage.beneficiary.type",
        "min": 1,
        "fixedUri": "Patient"
      },
      {
        "id": "Coverage.beneficiary.identifier",
        "path": "Coverage.beneficiary.identifier",
        "max": "0"
      },
      {
        "id": "Coverage.beneficiary.display",
        "path": "Coverage.beneficiary.display",
        "max": "0"
      },
      {
        "id": "Coverage.dependent",
        "path": "Coverage.dependent",
        "max": "0"
      },
      {
        "id": "Coverage.relationship",
        "path": "Coverage.relationship",
        "max": "0"
      },
      {
        "id": "Coverage.period",
        "path": "Coverage.period",
        "min": 1
      },
      {
        "id": "Coverage.period.id",
        "path": "Coverage.period.id",
        "max": "0"
      },
      {
        "id": "Coverage.period.start",
        "path": "Coverage.period.start",
        "definition": "The start of the period. The boundary is inclusive.\r\n\r\n©NHS: SHALL be provided if neither EHIC nor EHIC Replacement Certificate is stated in Coverage.type.",
        "constraint": [
          {
            "key": "lab-date-only",
            "severity": "error",
            "human": "This value shall be a date (without a time component)",
            "expression": "toString().matches('^\\\\d{4}(-\\\\d{2}){2}$')"
          }
        ]
      },
      {
        "id": "Coverage.period.end",
        "path": "Coverage.period.end",
        "min": 1,
        "constraint": [
          {
            "key": "lab-date-only",
            "severity": "error",
            "human": "This value shall be a date (without a time component)",
            "expression": "toString().matches('^\\\\d{4}(-\\\\d{2}){2}$')"
          }
        ]
      },
      {
        "id": "Coverage.payor",
        "path": "Coverage.payor",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "Coverage.payor.id",
        "path": "Coverage.payor.id",
        "max": "0"
      },
      {
        "id": "Coverage.payor.reference",
        "path": "Coverage.payor.reference",
        "max": "0"
      },
      {
        "id": "Coverage.payor.type",
        "path": "Coverage.payor.type",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier",
        "path": "Coverage.payor.identifier",
        "min": 1
      },
      {
        "id": "Coverage.payor.identifier.id",
        "path": "Coverage.payor.identifier.id",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.use",
        "path": "Coverage.payor.identifier.use",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.type",
        "path": "Coverage.payor.identifier.type",
        "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.\r\n\r\n©NHS: Insurer country is expected.",
        "min": 1
      },
      {
        "id": "Coverage.payor.identifier.type.id",
        "path": "Coverage.payor.identifier.type.id",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.type.coding",
        "path": "Coverage.payor.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Coverage.payor.identifier.type.coding.id",
        "path": "Coverage.payor.identifier.type.coding.id",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.type.coding.system",
        "path": "Coverage.payor.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "https://vvis.gov.lv/fhir/ValueSet/1.3.6.1.4.1.38760.2.832"
      },
      {
        "id": "Coverage.payor.identifier.type.coding.version",
        "path": "Coverage.payor.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.type.coding.code",
        "path": "Coverage.payor.identifier.type.coding.code",
        "min": 1
      },
      {
        "id": "Coverage.payor.identifier.type.coding.display",
        "path": "Coverage.payor.identifier.type.coding.display",
        "min": 1
      },
      {
        "id": "Coverage.payor.identifier.type.coding.userSelected",
        "path": "Coverage.payor.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.type.text",
        "path": "Coverage.payor.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.system",
        "path": "Coverage.payor.identifier.system",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.value",
        "path": "Coverage.payor.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.\r\n\r\n©NHS: Institution code that issued the insurance document is expected.",
        "min": 1
      },
      {
        "id": "Coverage.payor.identifier.period",
        "path": "Coverage.payor.identifier.period",
        "max": "0"
      },
      {
        "id": "Coverage.payor.identifier.assigner",
        "path": "Coverage.payor.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Coverage.payor.display",
        "path": "Coverage.payor.display",
        "max": "0"
      },
      {
        "id": "Coverage.class",
        "path": "Coverage.class",
        "max": "0"
      },
      {
        "id": "Coverage.order",
        "path": "Coverage.order",
        "max": "0"
      },
      {
        "id": "Coverage.network",
        "path": "Coverage.network",
        "max": "0"
      },
      {
        "id": "Coverage.costToBeneficiary",
        "path": "Coverage.costToBeneficiary",
        "max": "0"
      },
      {
        "id": "Coverage.subrogation",
        "path": "Coverage.subrogation",
        "definition": "When 'subrogation=true' this insurance instance has been included not for adjudication but to provide insurers with the details to recover costs.\r\n\r\n©NHS: subrogation=true in this case means that EU coverage existance does not affect requested service payor: NHS or patient. This is additional information for NHS to reimburse costs from EU.",
        "min": 1,
        "fixedBoolean": true
      },
      {
        "id": "Coverage.contract",
        "path": "Coverage.contract",
        "max": "0"
      }
    ]
  }
}