From e62278de6086dc76aa5a8547644e59bc13985cff Mon Sep 17 00:00:00 2001 From: Alexander Zautke Date: Wed, 5 Jun 2024 11:09:57 +0200 Subject: [PATCH] Update ERGDocumentReferenceMarkierung --- ...tion-erg-documentreference-markierung.json | 165 ++++++++++++++++-- .../erg-documentreference-markierung.fsh | 39 ++++- 2 files changed, 188 insertions(+), 16 deletions(-) diff --git a/Resources/fsh-generated/resources/StructureDefinition-erg-documentreference-markierung.json b/Resources/fsh-generated/resources/StructureDefinition-erg-documentreference-markierung.json index 85ed72a..8bcf0b8 100644 --- a/Resources/fsh-generated/resources/StructureDefinition-erg-documentreference-markierung.json +++ b/Resources/fsh-generated/resources/StructureDefinition-erg-documentreference-markierung.json @@ -20,13 +20,6 @@ } ], "fhirVersion": "4.0.1", - "mapping": [ - { - "identity": "rim", - "uri": "http://hl7.org/v3", - "name": "RIM Mapping" - } - ], "kind": "complex-type", "abstract": false, "context": [ @@ -43,27 +36,173 @@ { "id": "Extension.extension", "path": "Extension.extension", + "min": 1 + }, + { + "id": "Extension.extension:markierung", + "path": "Extension.extension", + "sliceName": "markierung", + "min": 1, + "max": "1" + }, + { + "id": "Extension.extension:markierung.extension", + "path": "Extension.extension.extension", "max": "0" }, { - "id": "Extension.url", - "path": "Extension.url", - "fixedUri": "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-markierung" + "id": "Extension.extension:markierung.url", + "path": "Extension.extension.url", + "fixedUri": "markierung" }, { - "id": "Extension.value[x]", - "path": "Extension.value[x]", + "id": "Extension.extension:markierung.value[x]", + "path": "Extension.extension.value[x]", "min": 1, "type": [ { "code": "Coding" } ], - "mustSupport": true, "binding": { "strength": "required", "valueSet": "https://gematik.de/fhir/erg/ValueSet/erg-rechnung-markierung-vs" } + }, + { + "id": "Extension.extension:zeitpunkt", + "path": "Extension.extension", + "sliceName": "zeitpunkt", + "min": 0, + "max": "1" + }, + { + "id": "Extension.extension:zeitpunkt.extension", + "path": "Extension.extension.extension", + "max": "0" + }, + { + "id": "Extension.extension:zeitpunkt.url", + "path": "Extension.extension.url", + "fixedUri": "zeitpunkt" + }, + { + "id": "Extension.extension:zeitpunkt.value[x]", + "path": "Extension.extension.value[x]", + "min": 1, + "type": [ + { + "code": "dateTime" + } + ] + }, + { + "id": "Extension.extension:details", + "path": "Extension.extension", + "sliceName": "details", + "min": 0, + "max": "1" + }, + { + "id": "Extension.extension:details.extension", + "path": "Extension.extension.extension", + "max": "0" + }, + { + "id": "Extension.extension:details.url", + "path": "Extension.extension.url", + "fixedUri": "details" + }, + { + "id": "Extension.extension:details.value[x]", + "path": "Extension.extension.value[x]", + "min": 1, + "type": [ + { + "code": "string" + } + ] + }, + { + "id": "Extension.extension:gelesen", + "path": "Extension.extension", + "sliceName": "gelesen", + "min": 0, + "max": "1", + "constraint": [ + { + "key": "ERGDocumentReferenceMarkierung-2", + "source": "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-markierung", + "severity": "error", + "human": "Details zum Gelesen-Status können nur angegeben werden wenn die Markierung vom Typ 'Gelesen' ist", + "expression": "extension.where(url = 'gelesen').value.exists() implies extension.where(url = 'markierung').value.coding.where(code = 'gelesen').exists()" + } + ] + }, + { + "id": "Extension.extension:gelesen.extension", + "path": "Extension.extension.extension", + "max": "0" + }, + { + "id": "Extension.extension:gelesen.url", + "path": "Extension.extension.url", + "fixedUri": "gelesen" + }, + { + "id": "Extension.extension:gelesen.value[x]", + "path": "Extension.extension.value[x]", + "min": 1, + "type": [ + { + "code": "boolean" + } + ] + }, + { + "id": "Extension.extension:artDerArchivierung", + "path": "Extension.extension", + "sliceName": "artDerArchivierung", + "min": 0, + "max": "1", + "constraint": [ + { + "key": "ERGDocumentReferenceMarkierung-1", + "source": "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-markierung", + "severity": "error", + "human": "Details zur Art der Archivierung können nur angegeben werden wenn die Markierung vom Typ 'Archiviert' ist", + "expression": "extension.where(url = 'artDerArchivierung').value.exists() implies extension.where(url = 'markierung').value.coding.where(code = 'archiviert').exists()" + } + ] + }, + { + "id": "Extension.extension:artDerArchivierung.extension", + "path": "Extension.extension.extension", + "max": "0" + }, + { + "id": "Extension.extension:artDerArchivierung.url", + "path": "Extension.extension.url", + "fixedUri": "artDerArchivierung" + }, + { + "id": "Extension.extension:artDerArchivierung.value[x]", + "path": "Extension.extension.value[x]", + "type": [ + { + "code": "Coding" + } + ] + }, + { + "id": "Extension.url", + "path": "Extension.url", + "fixedUri": "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-markierung" + }, + { + "id": "Extension.value[x]", + "path": "Extension.value[x]", + "max": "0" } ] } diff --git a/Resources/input/fsh/Extensions/erg-documentreference-markierung.fsh b/Resources/input/fsh/Extensions/erg-documentreference-markierung.fsh index 870aec4..8a5e000 100644 --- a/Resources/input/fsh/Extensions/erg-documentreference-markierung.fsh +++ b/Resources/input/fsh/Extensions/erg-documentreference-markierung.fsh @@ -2,6 +2,39 @@ Extension: ERGDocumentReferenceMarkierung Id: erg-documentreference-markierung Title: "ERG DocumentReference Markierung" * insert Meta -* value[x] only Coding -* value[x] 1..1 MS -* value[x] from ERGRechnungMarkierungVS (required) \ No newline at end of file +* extension contains markierung 1..1 +* extension contains zeitpunkt 0..1 +* extension contains details 0..1 +* extension contains gelesen 0..1 +* extension contains artDerArchivierung 0..1 + +* extension[markierung].value[x] only Coding +* extension[markierung].value[x] 1..1 +* extension[markierung].value[x] from ERGRechnungMarkierungVS (required) + +* extension[zeitpunkt].value[x] only dateTime +* extension[zeitpunkt].value[x] 1..1 + +* extension[details].value[x] only string +* extension[details].value[x] 1..1 + +* extension[gelesen] obeys gelesen +* extension[gelesen].value[x] only boolean +* extension[gelesen].value[x] 1..1 + +* extension[artDerArchivierung] obeys artDerArchivierung +* extension[artDerArchivierung].value[x] only Coding +* extension[details].value[x] 1..1 + + +Invariant: artDerArchivierung +* key = "ERGDocumentReferenceMarkierung-1" +* severity = #error +* human = "Details zur Art der Archivierung können nur angegeben werden wenn die Markierung vom Typ 'Archiviert' ist" +* expression = "extension.where(url = 'artDerArchivierung').value.exists() implies extension.where(url = 'markierung').value.coding.where(code = 'archiviert').exists()" + +Invariant: gelesen +* key = "ERGDocumentReferenceMarkierung-2" +* severity = #error +* human = "Details zum Gelesen-Status können nur angegeben werden wenn die Markierung vom Typ 'Gelesen' ist" +* expression = "extension.where(url = 'gelesen').value.exists() implies extension.where(url = 'markierung').value.coding.where(code = 'gelesen').exists()" \ No newline at end of file