{
  "resourceType": "StructureDefinition",
  "id": "pl-lab-panel",
  "url": "http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-panel",
  "name": "Panel",
  "title": "Panel",
  "status": "draft",
  "description": "Panel definicji badań laboratoryjnych",
  "fhirVersion": "5.0.0",
  "kind": "logical",
  "abstract": false,
  "type": "http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-panel",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Base",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "pl-lab-panel",
        "path": "pl-lab-panel",
        "short": "Panel",
        "definition": "Panel definicji badań laboratoryjnych",
        "min": 0,
        "max": "*",
        "base": {
          "path": "pl-lab-panel",
          "min": 0,
          "max": "*"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pl-lab-panel.kod",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pl-lab-panel.kod",
        "short": "Kod panelu",
        "definition": "Kod panelu",
        "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.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "pl-lab-panel.kod",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org.pl/fhir/ig/pl-lab/ValueSet/pl-lab-loincServiceCodeVS"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CE/CNE/CWE"
          },
          {
            "identity": "rim",
            "map": "CD"
          },
          {
            "identity": "orim",
            "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
          }
        ]
      },
      {
        "id": "pl-lab-panel.nazwa",
        "path": "pl-lab-panel.nazwa",
        "short": "Nazwa panelu",
        "definition": "Nazwa panelu",
        "comment": "Note that FHIR strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "pl-lab-panel.nazwa",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "pl-lab-panel.definicjaBadania",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "pl-lab-panel.definicjaBadania",
        "short": "Definicja badania laboratoryjnego",
        "definition": "Definicja badania laboratoryjnego",
        "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "pl-lab-panel.definicjaBadania",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-definicjaBadaniaLaboratoryjnego"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a contained resource if a local reference is provided",
            "expression": "reference.exists()  implies (reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource))",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          },
          {
            "key": "ref-2",
            "severity": "error",
            "human": "At least one of reference, identifier and display SHALL be present (unless an extension is provided).",
            "expression": "reference.exists() or identifier.exists() or display.exists() or extension.exists()",
            "source": "http://hl7.org/fhir/StructureDefinition/Reference"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "pl-lab-panel",
        "path": "pl-lab-panel",
        "short": "Panel",
        "definition": "Panel definicji badań laboratoryjnych"
      },
      {
        "id": "pl-lab-panel.kod",
        "path": "pl-lab-panel.kod",
        "short": "Kod panelu",
        "definition": "Kod panelu",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org.pl/fhir/ig/pl-lab/ValueSet/pl-lab-loincServiceCodeVS"
        }
      },
      {
        "id": "pl-lab-panel.nazwa",
        "path": "pl-lab-panel.nazwa",
        "short": "Nazwa panelu",
        "definition": "Nazwa panelu",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "pl-lab-panel.definicjaBadania",
        "path": "pl-lab-panel.definicjaBadania",
        "short": "Definicja badania laboratoryjnego",
        "definition": "Definicja badania laboratoryjnego",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org.pl/fhir/ig/pl-lab/StructureDefinition/pl-lab-definicjaBadaniaLaboratoryjnego"
            ]
          }
        ]
      }
    ]
  }
}