{
  "resourceType": "StructureDefinition",
  "id": "1.3.6.1.4.1.38760.FHIR.2.1.3.1",
  "url": "https://vvis.gov.lv/fhir/Datatype/Meta/OncologyMeta-v1",
  "version": "1",
  "name": "OncologyMeta",
  "status": "active",
  "description": "Metadata needed for medical document processing. Reference Oncology information metadata.",
  "fhirVersion": "4.3.0",
  "kind": "complex-type",
  "abstract": false,
  "type": "Meta",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Meta",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Meta",
        "path": "Meta",
        "constraint": [
          {
            "key": "Meta-con-1",
            "severity": "error",
            "human": "Data enterer medical person role (Profile: Meta/OnkoMeta, Field: Meta.tag with id \"entererMedicalPersonRole\") or data enterer person iId (Profile: Meta/OnkoMeta, Field: Meta.tag with id \"entererPersonId\") must be provided",
            "expression": "tag.where(id='entererMedicalPersonRole').exists() or tag.where(id='entererPersonId').exists()"
          }
        ]
      },
      {
        "id": "Meta.id",
        "path": "Meta.id",
        "max": "0"
      },
      {
        "id": "Meta.versionId",
        "path": "Meta.versionId",
        "definition": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted. \r\n\r\n©NHS: Value SHALL NOT be provided in CREATE and UPDATE requests. It is only available in READ response."
      },
      {
        "id": "Meta.lastUpdated",
        "path": "Meta.lastUpdated",
        "definition": "When the resource last changed - e.g. when the version changed.\r\n\r\n©NHS: Value SHALL NOT be provided in CREATE and UPDATE requests. It is only available in READ response."
      },
      {
        "id": "Meta.source",
        "path": "Meta.source",
        "definition": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.\r\n\r\n©NHS: Value SHALL NOT be provided in CREATE and UPDATE requests. It is only available in READ response."
      },
      {
        "id": "Meta.profile",
        "path": "Meta.profile",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Meta.security",
        "path": "Meta.security",
        "max": "0"
      },
      {
        "id": "Meta.tag",
        "path": "Meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "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:  Tags are requiered to identify who is responsible for the information in the resource, i.e who typed it in.",
        "min": 1
      },
      {
        "id": "Meta.tag:authorMedicalInstitution",
        "path": "Meta.tag",
        "sliceName": "authorMedicalInstitution",
        "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 provided will be validated against JWT.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.id",
        "path": "Meta.tag.id",
        "min": 1,
        "fixedId": "authorMedicalInstitution"
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.system",
        "path": "Meta.tag.system",
        "min": 1,
        "fixedUri": "urn:oid:1.3.6.1.4.1.38760.2.23"
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.version",
        "path": "Meta.tag.version",
        "max": "0"
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.code",
        "path": "Meta.tag.code",
        "min": 1
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.display",
        "path": "Meta.tag.display",
        "min": 1
      },
      {
        "id": "Meta.tag:authorMedicalInstitution.userSelected",
        "path": "Meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererMedicalPerson",
        "path": "Meta.tag",
        "sliceName": "entererMedicalPerson",
        "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 SHOULD be provided in CREATE and UPDATE requests of Medical Personal. When provided will be validated against JWT.",
        "max": "1"
      },
      {
        "id": "Meta.tag:entererMedicalPerson.id",
        "path": "Meta.tag.id",
        "min": 1,
        "fixedId": "entererMedicalPerson"
      },
      {
        "id": "Meta.tag:entererMedicalPerson.system",
        "path": "Meta.tag.system",
        "min": 1,
        "fixedUri": "urn:oid:1.3.6.1.4.1.38760.2.1"
      },
      {
        "id": "Meta.tag:entererMedicalPerson.version",
        "path": "Meta.tag.version",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererMedicalPerson.code",
        "path": "Meta.tag.code",
        "min": 1
      },
      {
        "id": "Meta.tag:entererMedicalPerson.display",
        "path": "Meta.tag.display",
        "min": 1
      },
      {
        "id": "Meta.tag:entererMedicalPerson.userSelected",
        "path": "Meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererPersonId",
        "path": "Meta.tag",
        "sliceName": "entererPersonId",
        "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 any human actor. When provided will be validated against JWT.",
        "max": "1"
      },
      {
        "id": "Meta.tag:entererPersonId.id",
        "path": "Meta.tag.id",
        "min": 1,
        "fixedId": "entererPersonId"
      },
      {
        "id": "Meta.tag:entererPersonId.system",
        "path": "Meta.tag.system",
        "min": 1,
        "fixedUri": "urn:oid:1.3.6.1.4.1.38760.3.1.1"
      },
      {
        "id": "Meta.tag:entererPersonId.version",
        "path": "Meta.tag.version",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererPersonId.code",
        "path": "Meta.tag.code",
        "definition": "Doctor or patient personal identity number is expected.",
        "min": 1
      },
      {
        "id": "Meta.tag:entererPersonId.display",
        "path": "Meta.tag.display",
        "min": 1
      },
      {
        "id": "Meta.tag:entererPersonId.userSelected",
        "path": "Meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererSystem",
        "path": "Meta.tag",
        "sliceName": "entererSystem",
        "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. When provided will be validated against JWT.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Meta.tag:entererSystem.id",
        "path": "Meta.tag.id",
        "min": 1,
        "fixedId": "entererSystem"
      },
      {
        "id": "Meta.tag:entererSystem.system",
        "path": "Meta.tag.system",
        "min": 1,
        "fixedUri": "https://vvis.gov.lv/fhir/CodeSystem/1.3.6.1.4.1.38760.2.3"
      },
      {
        "id": "Meta.tag:entererSystem.version",
        "path": "Meta.tag.version",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererSystem.code",
        "path": "Meta.tag.code",
        "min": 1
      },
      {
        "id": "Meta.tag:entererSystem.display",
        "path": "Meta.tag.display",
        "min": 1
      },
      {
        "id": "Meta.tag:entererSystem.userSelected",
        "path": "Meta.tag.userSelected",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole",
        "path": "Meta.tag",
        "sliceName": "entererMedicalPersonRole",
        "max": "1"
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole.id",
        "path": "Meta.tag.id",
        "min": 1,
        "fixedId": "entererMedicalPersonRole"
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole.system",
        "path": "Meta.tag.system",
        "min": 1,
        "fixedUri": "urn:oid:1.3.6.1.4.1.38760.2.37"
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole.version",
        "path": "Meta.tag.version",
        "max": "0"
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole.code",
        "path": "Meta.tag.code",
        "min": 1
      },
      {
        "id": "Meta.tag:entererMedicalPersonRole.userSelected",
        "path": "Meta.tag.userSelected",
        "max": "0"
      }
    ]
  }
}