{
  "resourceType": "StructureDefinition",
  "id": "1.3.6.1.4.1.38760.FHIR.1.52.2.1",
  "url": "https://lab.vvis.gov.lv/fhir/StructureDefinition/Coverage/PrivateInsurance-v1",
  "version": "1",
  "name": "PrivateInsurance",
  "status": "active",
  "publisher": "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.meta.tag:entererMedicalPersonRole",
        "path": "Coverage.meta.tag",
        "sliceName": "entererMedicalPersonRole",
        "definition": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.\r\n\r\n©NHS: Values SHALL be provided in CREATE and UPDATE requests of Medical Institutions when Medical Person Role is used for authorization. When provided SHALL be validated against JWT ."
      },
      {
        "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",
        "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: Insurance number is expected.",
        "min": 1
      },
      {
        "id": "Coverage.identifier.period",
        "path": "Coverage.identifier.period",
        "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",
        "max": "0"
      },
      {
        "id": "Coverage.type.coding",
        "path": "Coverage.type.coding",
        "max": "1"
      },
      {
        "id": "Coverage.policyHolder",
        "path": "Coverage.policyHolder",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "Coverage.subscriber",
        "path": "Coverage.subscriber",
        "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",
        "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.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",
        "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.\r\n\r\n©NHS: Reference to Insurance Company is expected. Originates from VVIS classifier 1.3.6.1.4.1.38760.2.834. In NHS FHIR system is represented by Organization resource (profile: https://vvis.gov.lv/fhir/StructureDefinition/Organization/InsurerInstitution-v1)",
        "min": 1
      },
      {
        "id": "Coverage.payor.type",
        "path": "Coverage.payor.type",
        "min": 1,
        "fixedUri": "Organization"
      },
      {
        "id": "Coverage.payor.identifier",
        "path": "Coverage.payor.identifier",
        "max": "0"
      },
      {
        "id": "Coverage.payor.display",
        "path": "Coverage.payor.display",
        "max": "0",
        "fixedString": "Nacionālais veselības dienests"
      },
      {
        "id": "Coverage.class",
        "path": "Coverage.class",
        "max": "0"
      },
      {
        "id": "Coverage.class.id",
        "path": "Coverage.class.id",
        "max": "0"
      },
      {
        "id": "Coverage.class.type.id",
        "path": "Coverage.class.type.id",
        "max": "0"
      },
      {
        "id": "Coverage.class.type.coding",
        "path": "Coverage.class.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Coverage.class.type.coding.id",
        "path": "Coverage.class.type.coding.id",
        "max": "0"
      },
      {
        "id": "Coverage.class.type.coding.system",
        "path": "Coverage.class.type.coding.system",
        "min": 1,
        "fixedUri": "https://vvis.gov.lv/fhir/ValueSet/1.3.6.1.4.1.38760.2.163"
      },
      {
        "id": "Coverage.class.type.coding.version",
        "path": "Coverage.class.type.coding.version",
        "max": "0"
      },
      {
        "id": "Coverage.class.type.coding.code",
        "path": "Coverage.class.type.coding.code",
        "min": 1
      },
      {
        "id": "Coverage.class.type.coding.display",
        "path": "Coverage.class.type.coding.display",
        "min": 1
      },
      {
        "id": "Coverage.class.type.coding.userSelected",
        "path": "Coverage.class.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Coverage.class.type.text",
        "path": "Coverage.class.type.text",
        "max": "0"
      },
      {
        "id": "Coverage.class.name",
        "path": "Coverage.class.name",
        "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 private insurance existance does not affect requested service payor: NHS or patient. This is additional information for all parties to reimburse costs.",
        "min": 1,
        "fixedBoolean": true
      },
      {
        "id": "Coverage.contract",
        "path": "Coverage.contract",
        "max": "0"
      }
    ]
  }
}