From c1dec44feddca6233b108c76e611c1a79fde2368 Mon Sep 17 00:00:00 2001 From: Gregor Lichtner Date: Wed, 29 May 2024 12:06:38 +0200 Subject: [PATCH] fix: slicing error --- .../p-eligibility-criteria.fsh | 134 ++++++++++++------ 1 file changed, 87 insertions(+), 47 deletions(-) diff --git a/input/fsh/eligibility-criteria/p-eligibility-criteria.fsh b/input/fsh/eligibility-criteria/p-eligibility-criteria.fsh index 99ea6cd95..fe77139fd 100644 --- a/input/fsh/eligibility-criteria/p-eligibility-criteria.fsh +++ b/input/fsh/eligibility-criteria/p-eligibility-criteria.fsh @@ -6,10 +6,11 @@ Title: "Eligibility Criteria" Description: "Definition of a population (e.g. for guideline recommendation, clinical study) via the eligibility criteria." * insert metadata(2022-05-15, #draft, 0.2.0) * ^abstract = true +// recursive profiling should be perfomred using the http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element extension +// (see "Extension for Profiling BackboneElements" in https://github.com/FHIR/sushi/releases/tag/v2.0.0), but this doesn't seem to work for slice definitions +// (see https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/define.20slices.20recursively.20on.20backbone.20element/near/440505865) * insert characteristic-definition -* characteristic.definitionByCombination // ecursive profiling should be perfomred using the - // http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element extension - // (see "Extension for Profiling BackboneElements" in https://github.com/FHIR/sushi/releases/tag/v2.0.0) +* characteristic.definitionByCombination * insert characteristic-definition * characteristic.definitionByCombination * insert characteristic-definition @@ -21,9 +22,6 @@ Description: "Definition of a population (e.g. for guideline recommendation, cli RuleSet: characteristic-definition * characteristic 1..* MS * extension contains RelativeTime named relativeTime 0..* - * definitionByTypeAndValue // allow only a single type and single valueCodeableConcept coding - * type.coding 1..1 MS - * valueCodeableConcept.coding 1..1 MS * characteristic ^slicing.discriminator.type = #pattern * characteristic ^slicing.discriminator.path = "definitionByTypeAndValue.type" * characteristic ^slicing.rules = #open @@ -39,45 +37,87 @@ RuleSet: characteristic-definition device 0..* and observation 0..* and drugAdministration 0..* -* characteristic.definitionByTypeAndValue + +* characteristic.definitionByTypeAndValue // allow only a single type and single valueCodeableConcept coding + * type.coding 1..1 MS * value[x] only Quantity or Range or CodeableConcept // 22-11-02 @glichtner: required, otherwise "* valueCodeableConcept.coding 1..1 MS" leads to FHIR validator error -* characteristic[condition].definitionByTypeAndValue - * type = $sct#404684003 "Clinical finding (finding)" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-clinical-findings-sct (required) -* characteristic[allergy].definitionByTypeAndValue - * type = $sct#609328004 "Allergic disposition (finding)" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-allergic-disposition-sct (required) -* characteristic[radiologyFinding].definitionByTypeAndValue - * type = $sct#118247008 "Radiologic finding (finding)" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-radiologic-finding-sct (required) -* characteristic[episodeOfCare].definitionByTypeAndValue - * type = $loinc#78030-4 "Episode of care Type" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-episode-of-care-type (required) -* characteristic[ventilationObservableSCT].definitionByTypeAndValue - * type from $vs-ventilation-observable-sct (required) - //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error -* characteristic[ventilationObservableLOINC].definitionByTypeAndValue - * type from $vs-ventilation-observable-loinc (required) - //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error -* characteristic[procedure].definitionByTypeAndValue - * type = $sct#71388002 "Procedure (procedure)" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-procedures-sct (required) -* characteristic[assessmentScale].definitionByTypeAndValue - * type from vs-assessment-scales (required) - //* value[x] only CodeableConcept or Range or Quantity // 22-07-22 @glichtner: removed due to sushi error -* characteristic[device].definitionByTypeAndValue - * type = $sct#49062001 "Device (physical object)" - //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error - * valueCodeableConcept from $vs-devices (required) -* characteristic[observation].definitionByTypeAndValue - * type from vs-observations (required) - //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error -* characteristic[drugAdministration].definitionByTypeAndValue - * type = $sct#432102000 "Administration of substance (procedure)" - * valueCodeableConcept from vs-drugs (required) - * extension contains CharacteristicDosage named dosage 0..* + +* characteristic[condition] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#404684003 "Clinical finding (finding)" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-clinical-findings-sct (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[allergy] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#609328004 "Allergic disposition (finding)" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-allergic-disposition-sct (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[radiologyFinding] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#118247008 "Radiologic finding (finding)" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-radiologic-finding-sct (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[episodeOfCare] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $loinc#78030-4 "Episode of care Type" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-episode-of-care-type (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[ventilationObservableSCT] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type from $vs-ventilation-observable-sct (required) + //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error + +* characteristic[ventilationObservableLOINC] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type from $vs-ventilation-observable-loinc (required) + //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error + +* characteristic[procedure] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#71388002 "Procedure (procedure)" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-procedures-sct (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[assessmentScale] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type from vs-assessment-scales (required) + //* value[x] only CodeableConcept or Range or Quantity // 22-07-22 @glichtner: removed due to sushi error + +* characteristic[device] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#49062001 "Device (physical object)" + //* value[x] only CodeableConcept // 22-07-22 @glichtner: removed due to sushi error + * valueCodeableConcept from $vs-devices (required) + * valueCodeableConcept.coding 1..1 MS + +* characteristic[observation] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type from vs-observations (required) + //* value[x] only Range or Quantity // 22-07-22 @glichtner: removed due to sushi error + +* characteristic[drugAdministration] + * definitionByCombination 0..0 + * definitionByTypeAndValue 1..1 + * type = $sct#432102000 "Administration of substance (procedure)" + * valueCodeableConcept from vs-drugs (required) + * valueCodeableConcept.coding 1..1 MS + * extension contains CharacteristicDosage named dosage 0..*