{
  "resourceType": "StructureDefinition",
  "id": "67255ab0-3299-40cb-8942-ec88d50d880c",
  "meta": {
    "lastUpdated": "2019-02-08T11:17:45.053+00:00"
  },
  "url": "http://medico-emr.net/stu3/sd/Condition-Diagnosis-1",
  "name": "Condition-Diagnosis-1",
  "status": "active",
  "date": "2019-02-08T11:17:44.9005795+00:00",
  "description": "A condition resource based on this profile represents a diagnosis entered in medico.\r\nTable: x1280dia.control where control<1000",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Condition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Condition",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Condition",
        "path": "Condition",
        "definition": "A FHIR resource of this profile represents a diganosis"
      },
      {
        "id": "Condition.meta",
        "path": "Condition.meta",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Meta",
            "profile": "http://medico-emr.net/stu3/sd/Meta-ProfileOnly-1"
          }
        ]
      },
      {
        "id": "Condition.meta.profile",
        "path": "Condition.meta.profile",
        "fixedUri": "http://medico-emr.net/stu3/sd/Condition-Diagnosis-1"
      },
      {
        "id": "Condition.meta.extension",
        "path": "Condition.meta.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Condition.meta.Extension:responsibleDepartment",
        "path": "Condition.meta.extension",
        "sliceName": "responsibleDepartment",
        "definition": "references the department the encounter was located at the time the diagnosis was made",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Organizational-Responsibility-1"
          }
        ]
      },
      {
        "id": "Condition.implicitRules",
        "path": "Condition.implicitRules",
        "max": "0"
      },
      {
        "id": "Condition.language",
        "path": "Condition.language",
        "max": "0"
      },
      {
        "id": "Condition.text",
        "path": "Condition.text",
        "max": "0"
      },
      {
        "id": "Condition.contained",
        "path": "Condition.contained",
        "max": "0"
      },
      {
        "id": "Condition.extension",
        "path": "Condition.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Condition.extension:createChangeInfo",
        "path": "Condition.extension",
        "sliceName": "createChangeInfo",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-MetaCreateChangeInfo-1"
          }
        ]
      },
      {
        "id": "Condition.extension:diagnosisAttributes",
        "path": "Condition.extension",
        "sliceName": "diagnosisAttributes",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Condition-DiagnosisAttributes-1"
          }
        ]
      },
      {
        "id": "Condition.extension:diagnosisWorkflow",
        "path": "Condition.extension",
        "sliceName": "diagnosisWorkflow",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://medico-emr.net/stu3/sd/MXT-Condition-DiagnosisWorkflow-1"
          }
        ]
      },
      {
        "id": "Condition.identifier",
        "path": "Condition.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "Condition.identifier:medicoResourceId",
        "path": "Condition.identifier",
        "sliceName": "medicoResourceId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "Condition.identifier:medicoResourceId.system",
        "path": "Condition.identifier.system",
        "definition": "Must be a constant underneath http://medico-emr.net/%KUNDE%/sid1/Diag",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier\r\nDynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/sid1/Diag"
      },
      {
        "id": "Condition.category",
        "path": "Condition.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Condition.category.id",
        "path": "Condition.category.id",
        "max": "0"
      },
      {
        "id": "Condition.category.coding",
        "path": "Condition.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Condition.category.coding.id",
        "path": "Condition.category.coding.id",
        "max": "0"
      },
      {
        "id": "Condition.category.coding.system",
        "path": "Condition.category.coding.system",
        "min": 1,
        "fixedUri": "http://medico-emr.net/cs1"
      },
      {
        "id": "Condition.category.coding.version",
        "path": "Condition.category.coding.version",
        "max": "0"
      },
      {
        "id": "Condition.category.coding.code",
        "path": "Condition.category.coding.code",
        "min": 1,
        "fixedCode": "Diagnosis"
      },
      {
        "id": "Condition.category.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.category.coding.display",
        "max": "0"
      },
      {
        "id": "Condition.category.coding.userSelected",
        "path": "Condition.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Condition.category.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.category.text",
        "max": "0"
      },
      {
        "id": "Condition.severity",
        "path": "Condition.severity",
        "definition": "Provides a rough ranking based on x1280dia.sortseq (not a number, a text).\r\nWhen sorted across all diagnosis - results in an invidual hierarchy",
        "min": 1
      },
      {
        "id": "Condition.severity.id",
        "path": "Condition.severity.id",
        "max": "0"
      },
      {
        "id": "Condition.severity.coding",
        "path": "Condition.severity.coding",
        "max": "0"
      },
      {
        "id": "Condition.severity.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.severity.text",
        "definition": "provides rough ranking of the diagnosis (x1280dia.sortseq)\r\ni.e. by sorting all diagnosis using this value the ranks of the conditions relative to others can be computed",
        "min": 1
      },
      {
        "id": "Condition.code",
        "path": "Condition.code",
        "min": 1
      },
      {
        "id": "Condition.code.id",
        "path": "Condition.code.id",
        "max": "0"
      },
      {
        "id": "Condition.code.coding",
        "path": "Condition.code.coding",
        "max": "1"
      },
      {
        "id": "Condition.code.coding.id",
        "path": "Condition.code.coding.id",
        "max": "0"
      },
      {
        "id": "Condition.code.coding.system",
        "path": "Condition.code.coding.system",
        "definition": "a customer specific codesystem\r\nhttp://medico-emr.net/%KUNDE%/cs/Diagnosis-1/[CatalogueId from x1280dia.dcaoff]"
      },
      {
        "id": "Condition.code.coding.version",
        "path": "Condition.code.coding.version",
        "max": "0"
      },
      {
        "id": "Condition.code.coding.code",
        "path": "Condition.code.coding.code",
        "definition": "the diagnosis detailcode (x1280dia.ddcoff)",
        "meaningWhenMissing": "then this is a free text diagnosis, only text is provided"
      },
      {
        "id": "Condition.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.code.coding.display",
        "max": "0"
      },
      {
        "id": "Condition.code.coding.userSelected",
        "path": "Condition.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Condition.code.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.code.text",
        "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.\r\nmedico: x1280dia.text",
        "min": 1
      },
      {
        "id": "Condition.bodySite",
        "path": "Condition.bodySite",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.code"
            }
          ],
          "rules": "open"
        },
        "max": "1"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB",
        "path": "Condition.bodySite",
        "sliceName": "Bodysite-LRB",
        "definition": "Provides if a diagnosis appear on \"L\"eft, \"R\"ight or \"B\"oth sides\r\nBelow /Bodysite/LRB/*",
        "max": "1",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "BodySite"
            }
          ],
          "strength": "preferred",
          "valueSetReference": {
            "reference": "http://medico-emr.net/%KUNDE%/vs/Condition-BodySite-1"
          }
        }
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.id",
        "path": "Condition.bodySite.id",
        "max": "0"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding",
        "path": "Condition.bodySite.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.id",
        "path": "Condition.bodySite.coding.id",
        "max": "0"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.system",
        "path": "Condition.bodySite.coding.system",
        "definition": "Must be a constant underneath http://medico-emr.net/%KUNDE%/cs/Condition-BodySite",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier\r\nDynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/cs/Condition-BodySite",
        "min": 1
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.version",
        "path": "Condition.bodySite.coding.version",
        "max": "0"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.code",
        "path": "Condition.bodySite.coding.code",
        "definition": "medico: L, R or B (left, rigt, both sides)",
        "min": 1
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.bodySite.coding.display",
        "max": "0"
      },
      {
        "id": "Condition.bodySite:Bodysite-LRB.coding.userSelected",
        "path": "Condition.bodySite.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Condition.subject",
        "path": "Condition.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-SubjectPatient-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Patient-Patient-1"
          }
        ]
      },
      {
        "id": "Condition.context",
        "path": "Condition.context",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-ContextEncounter-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Encounter-Case-1"
          }
        ]
      },
      {
        "id": "Condition.onset[x]:onsetDateTime",
        "path": "Condition.onsetDateTime",
        "sliceName": "onsetDateTime",
        "max": "0",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Condition.abatement[x]",
        "path": "Condition.abatement[x]",
        "max": "0"
      },
      {
        "id": "Condition.assertedDate",
        "path": "Condition.assertedDate",
        "definition": "if provided - that date of surgery for which this diagnosis was created"
      },
      {
        "id": "Condition.asserter",
        "path": "Condition.asserter",
        "definition": "reference to create or change user",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/Practitioner-User-1"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          }
        ]
      },
      {
        "id": "Condition.asserter.id",
        "path": "Condition.asserter.id",
        "max": "0"
      },
      {
        "id": "Condition.asserter.identifier",
        "path": "Condition.asserter.identifier",
        "max": "0"
      },
      {
        "id": "Condition.asserter.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Condition.asserter.display",
        "max": "0"
      },
      {
        "id": "Condition.stage",
        "path": "Condition.stage",
        "max": "0"
      },
      {
        "id": "Condition.evidence",
        "path": "Condition.evidence",
        "max": "0"
      },
      {
        "id": "Condition.note",
        "path": "Condition.note",
        "max": "0"
      }
    ]
  }
}