{
  "resourceType": "StructureDefinition",
  "url": "https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1",
  "name": "DocumentReference_StandardDocument_1",
  "status": "draft",
  "description": "A resource of this profile type represents a medico document - i.e. as it is stored/referenced by x1350dre/x1351dme.\r\nThe references documents can be of many different format types. The most common ones are word, rtf, pdf, plain text, images as jpg or tiff.",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "fhircomposition",
      "uri": "http://hl7.org/fhir/composition",
      "name": "FHIR Composition"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "xds",
      "uri": "http://ihe.net/xds",
      "name": "XDS metadata equivalent"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.id",
        "path": "DocumentReference.id",
        "definition": "Format: StandardDocument-####\r\nwhere #### maps to x1350dre.dre",
        "min": 1
      },
      {
        "id": "DocumentReference.meta",
        "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": "DocumentReference.meta",
        "min": 1
      },
      {
        "id": "DocumentReference.meta.id",
        "path": "DocumentReference.meta.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.versionId",
        "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": "DocumentReference.meta.versionId",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.lastUpdated",
        "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": "DocumentReference.meta.lastUpdated",
        "definition": "When the resource last changed - e.g. when the version changed.\r\nmaps to x1350dre.chd - or if not present to x1350dre.crd",
        "min": 1
      },
      {
        "id": "DocumentReference.meta.source",
        "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": "DocumentReference.meta.source",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.profile",
        "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": "DocumentReference.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1"
      },
      {
        "id": "DocumentReference.meta.security",
        "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": "DocumentReference.meta.security",
        "max": "0"
      },
      {
        "id": "DocumentReference.meta.tag",
        "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": "DocumentReference.meta.tag",
        "max": "0"
      },
      {
        "id": "DocumentReference.implicitRules",
        "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": "DocumentReference.implicitRules",
        "max": "0"
      },
      {
        "id": "DocumentReference.language",
        "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": "DocumentReference.language",
        "max": "0"
      },
      {
        "id": "DocumentReference.text",
        "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": "DocumentReference.text",
        "short": "maps to x1350dre.textr",
        "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. \r\nmedico: maps to x1350dre.textr - this field may contain text or not - dependant on that it is contained in the DocumentReference resource or not."
      },
      {
        "id": "DocumentReference.contained",
        "path": "DocumentReference.contained",
        "max": "0"
      },
      {
        "id": "DocumentReference.extension",
        "path": "DocumentReference.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DocumentReference.extension:authenticatedDate",
        "path": "DocumentReference.extension",
        "sliceName": "authenticatedDate",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/ext/DocumentReference_AuthenticatedDate"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.masterIdentifier",
        "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": "DocumentReference.masterIdentifier",
        "definition": "medico does currently not offer a reference to a versioned document from FHIR",
        "max": "0"
      },
      {
        "id": "DocumentReference.identifier",
        "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": "DocumentReference.identifier",
        "slicing": {
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "DocumentReference.identifier:medicoResourceId",
        "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": "DocumentReference.identifier",
        "sliceName": "medicoResourceId",
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/Identifier_medicoResourceId_1"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.identifier:medicoResourceId.system",
        "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": "DocumentReference.identifier.system",
        "definition": "Resolves to https://medico-emr.net/medico/%KUNDE%/sid1/StandardDocument"
      },
      {
        "id": "DocumentReference.status",
        "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": "DocumentReference.status",
        "short": "current | entered-in-error",
        "definition": "Since medico references can only point to the latest version of a document - it is either current or was cancalled (=entered-in-error)"
      },
      {
        "id": "DocumentReference.docStatus",
        "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": "DocumentReference.docStatus",
        "short": "preliminary | final | entered-in-error",
        "definition": "medico documents are either draft (i.e. preliminary), released (i.e. final) or cancelled ( i.e. entered-in-error)",
        "min": 1
      },
      {
        "id": "DocumentReference.type",
        "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": "DocumentReference.type",
        "definition": "content-wise refers to x1350dre.doctyp (which can be found in conding.code)",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/CodeableConcept_CustomerDefined_1"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.type.coding.system",
        "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": "DocumentReference.type.coding.system",
        "definition": "https://medico-emr.net/medico/%KUNDE%/cs/* is a virtual customer specific Code System that does not exist as a single download.\r\nBinding to real values are established through .code's Valueset binding",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=https://medico-emr.net/medico/%KUNDE%/cs/DocumentType"
      },
      {
        "id": "DocumentReference.type.coding.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.type.coding.display",
        "definition": "retrieves a human-readable name for the document type\r\nmaps to x9205dty.des",
        "min": 1
      },
      {
        "id": "DocumentReference.type.text",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.type.text",
        "max": "0"
      },
      {
        "id": "DocumentReference.category",
        "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": "DocumentReference.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DocumentReference.category:classtype1",
        "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": "DocumentReference.category",
        "sliceName": "classtype1",
        "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.\r\nthis slice maps to x1350dre.classtype1. If this field is empty, the slice is omitted",
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype1.id",
        "path": "DocumentReference.category.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype1.coding",
        "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": "DocumentReference.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype1.coding.id",
        "path": "DocumentReference.category.coding.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype1.coding.system",
        "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": "DocumentReference.category.coding.system",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype1",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype1.coding.version",
        "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": "DocumentReference.category.coding.version",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype1.coding.code",
        "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": "DocumentReference.category.coding.code",
        "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).\r\nmaps to x1350dre.classtype1",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype1.coding.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.coding.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype1.coding.userSelected",
        "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": "DocumentReference.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype1.text",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.text",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2",
        "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": "DocumentReference.category",
        "sliceName": "classtype2",
        "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.\r\nthis slice maps to x1350dre.classtype1. If this field is empty, the slice is omitted",
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype2.id",
        "path": "DocumentReference.category.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2.coding",
        "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": "DocumentReference.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype2.coding.id",
        "path": "DocumentReference.category.coding.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2.coding.system",
        "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": "DocumentReference.category.coding.system",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype2",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype2.coding.version",
        "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": "DocumentReference.category.coding.version",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2.coding.code",
        "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": "DocumentReference.category.coding.code",
        "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).\r\nmaps to x1350dre.classtype2",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype2.coding.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.coding.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2.coding.userSelected",
        "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": "DocumentReference.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype2.text",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.text",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3",
        "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": "DocumentReference.category",
        "sliceName": "classtype3",
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype3.id",
        "path": "DocumentReference.category.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3.coding",
        "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": "DocumentReference.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DocumentReference.category:classtype3.coding.id",
        "path": "DocumentReference.category.coding.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3.coding.system",
        "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": "DocumentReference.category.coding.system",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype3",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype3.coding.version",
        "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": "DocumentReference.category.coding.version",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3.coding.code",
        "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": "DocumentReference.category.coding.code",
        "min": 1
      },
      {
        "id": "DocumentReference.category:classtype3.coding.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.coding.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3.coding.userSelected",
        "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": "DocumentReference.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DocumentReference.category:classtype3.text",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.category.text",
        "max": "0"
      },
      {
        "id": "DocumentReference.subject",
        "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": "DocumentReference.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/Reference_SubjectPatient_1"
            ],
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Patient_Patient_1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.date",
        "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": "DocumentReference.date",
        "label": "Document creation time (x1350dre.crd)",
        "min": 1
      },
      {
        "id": "DocumentReference.author",
        "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": "DocumentReference.author",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "min": 2,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Practitioner_User_1",
              "https://medico-emr.net/medico/r4/sd/Organization_Department_1"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.author:sliceCreatingUser",
        "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": "DocumentReference.author",
        "sliceName": "sliceCreatingUser",
        "definition": "Identifies who is responsible for adding the information to the document.\r\nmedico: maps to x1350dre.cruser",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/Reference_User_1"
            ],
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Practitioner_User_1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.author:sliceCreatingDepartment",
        "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": "DocumentReference.author",
        "sliceName": "sliceCreatingDepartment",
        "definition": "Identifies who is responsible for adding the information to the document.\r\nmedico: maps to x1350dre.dep",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://medico-emr.net/medico/sd/r4/Reference_Department_1"
            ],
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Organization_Department_1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.authenticator",
        "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": "DocumentReference.authenticator",
        "label": "User releasing document",
        "definition": "Which person or organization authenticates that this document is valid.\r\nmedico: represents the medico user who released the document (freeuser)",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/Reference_User_1"
            ],
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Practitioner_User_1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.custodian",
        "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": "DocumentReference.custodian",
        "max": "0"
      },
      {
        "id": "DocumentReference.relatesTo",
        "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": "DocumentReference.relatesTo",
        "definition": "Relationships that this document has with other document references that already exist.\r\nmedico: present only, if x1350dre.maindre (main document is provided)",
        "max": "1"
      },
      {
        "id": "DocumentReference.relatesTo.id",
        "path": "DocumentReference.relatesTo.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.relatesTo.code",
        "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": "DocumentReference.relatesTo.code",
        "fixedCode": "appends"
      },
      {
        "id": "DocumentReference.relatesTo.target",
        "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": "DocumentReference.relatesTo.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.relatesTo.target.id",
        "path": "DocumentReference.relatesTo.target.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.relatesTo.target.reference",
        "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": "DocumentReference.relatesTo.target.reference",
        "min": 1
      },
      {
        "id": "DocumentReference.relatesTo.target.type",
        "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": "DocumentReference.relatesTo.target.type",
        "max": "0"
      },
      {
        "id": "DocumentReference.relatesTo.target.identifier",
        "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": "DocumentReference.relatesTo.target.identifier",
        "max": "0"
      },
      {
        "id": "DocumentReference.relatesTo.target.display",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.relatesTo.target.display",
        "max": "0"
      },
      {
        "id": "DocumentReference.description",
        "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": "DocumentReference.description",
        "definition": "Human-readable description of the source document.\r\nmedico: maps to x1350dre.info"
      },
      {
        "id": "DocumentReference.securityLabel",
        "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": "DocumentReference.securityLabel",
        "max": "0"
      },
      {
        "id": "DocumentReference.content",
        "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": "DocumentReference.content",
        "definition": "The document and format referenced. \r\nEach document is often readable in different format / MimeTypes"
      },
      {
        "id": "DocumentReference.content.id",
        "path": "DocumentReference.content.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.id",
        "path": "DocumentReference.content.attachment.id",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.\r\nmedico: id of document characteristic x1351dme.dme"
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "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": "DocumentReference.content.attachment.contentType",
        "label": "MimeType of document",
        "definition": "medico",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.language",
        "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": "DocumentReference.content.attachment.language",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.data",
        "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": "DocumentReference.content.attachment.data",
        "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.\r\ndata is only present if the documentreference is retrieved via GetDocumentAttachement operation, or if the DocumentReference is sent for upate/create"
      },
      {
        "id": "DocumentReference.content.attachment.url",
        "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": "DocumentReference.content.attachment.url",
        "definition": "The url points to the fhir server itself - though it will not not be read through FHIR mechanisms\r\nUse the same JSON webtoken for access when 'GET'ting the document",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "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": "DocumentReference.content.attachment.size",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.hash",
        "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": "DocumentReference.content.attachment.hash",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.title",
        "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"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.content.attachment.title",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.attachment.creation",
        "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": "DocumentReference.content.attachment.creation",
        "max": "0"
      },
      {
        "id": "DocumentReference.content.format",
        "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": "DocumentReference.content.format",
        "max": "0"
      },
      {
        "id": "DocumentReference.context",
        "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": "DocumentReference.context",
        "min": 1
      },
      {
        "id": "DocumentReference.context.id",
        "path": "DocumentReference.context.id",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.encounter",
        "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": "DocumentReference.context.encounter",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "https://medico-emr.net/medico/r4/sd/Reference_ContextEncounter_1"
            ],
            "targetProfile": [
              "https://medico-emr.net/medico/r4/sd/Encounter_Case_1"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.context.event",
        "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": "DocumentReference.context.event",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.period",
        "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": "DocumentReference.context.period",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.facilityType",
        "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": "DocumentReference.context.facilityType",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.practiceSetting",
        "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": "DocumentReference.context.practiceSetting",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.sourcePatientInfo",
        "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": "DocumentReference.context.sourcePatientInfo",
        "max": "0"
      },
      {
        "id": "DocumentReference.context.related",
        "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": "DocumentReference.context.related",
        "max": "0"
      }
    ]
  }
}