From 9c8bd0956116092da4febc5229aea29bdf935a46 Mon Sep 17 00:00:00 2001 From: tmsMedcom Date: Tue, 21 Nov 2023 13:00:41 +0100 Subject: [PATCH] Technical FHIRPath correction value. and Observation. #104 --- input/fsh/CVRIdentifier.fsh | 4 ++-- input/fsh/DkCoreCprIdentifier.fsh | 2 +- input/fsh/DkCoreObservation.fsh | 2 +- input/fsh/GLNIdentifier.fsh | 4 ++-- input/fsh/KombitOrgIdentifier.fsh | 2 +- input/fsh/Lpr3Identifier.fsh | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/input/fsh/CVRIdentifier.fsh b/input/fsh/CVRIdentifier.fsh index 547036e5a..3eaf5e1bf 100644 --- a/input/fsh/CVRIdentifier.fsh +++ b/input/fsh/CVRIdentifier.fsh @@ -12,9 +12,9 @@ Description: "Identifier holding a danish [CVR](https://datacvr.virk.dk/data/) n Invariant: CVR-length Description: "CVR must be exactly 8 numeric characters long" Severity: #error -Expression: "value.matches('^[0-9]{8}$')" +Expression: "matches('^[0-9]{8}$')" Invariant: CVR-modulus-11 Description: "CVR must pass the modulus 11 check" Severity: #error -Expression: "((\n (value.substring(0,1).toInteger()*2)+\n (value.substring(1,1).toInteger()*7)+\n (value.substring(2,1).toInteger()*6)+\n (value.substring(3,1).toInteger()*5)+\n (value.substring(4,1).toInteger()*4)+\n (value.substring(5,1).toInteger()*3)+\n (value.substring(6,1).toInteger()*2)+\n (value.substring(7,1).toInteger()*1)) mod(11)=0)" \ No newline at end of file +Expression: "((\n (substring(0,1).toInteger()*2)+\n (substring(1,1).toInteger()*7)+\n (substring(2,1).toInteger()*6)+\n (substring(3,1).toInteger()*5)+\n (substring(4,1).toInteger()*4)+\n (substring(5,1).toInteger()*3)+\n (substring(6,1).toInteger()*2)+\n (substring(7,1).toInteger()*1)) mod(11)=0)" \ No newline at end of file diff --git a/input/fsh/DkCoreCprIdentifier.fsh b/input/fsh/DkCoreCprIdentifier.fsh index 54e15651a..7cde1471b 100644 --- a/input/fsh/DkCoreCprIdentifier.fsh +++ b/input/fsh/DkCoreCprIdentifier.fsh @@ -14,5 +14,5 @@ Description: "This structure holds the danish [CPR](https://cpr.dk/) identifier" Invariant: cpr Description: "Requirement of danish civil registration numbers. See https://cpr.dk/cpr-systemet/opbygning-af-cpr-nummeret/#:~:text=5%20%2D%206%20position%20angiver%20personens,i%20personnummeret%20angiver%20personens%20k%C3%B8n." Severity: #error -Expression: "value.matches('^((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})$')" +Expression: "matches('^((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})$')" * requirements = "Requirement of danish civil registration numbers" diff --git a/input/fsh/DkCoreObservation.fsh b/input/fsh/DkCoreObservation.fsh index b7dad79b4..de4bd8690 100644 --- a/input/fsh/DkCoreObservation.fsh +++ b/input/fsh/DkCoreObservation.fsh @@ -102,7 +102,7 @@ Description: "HL7 Denmark core profile for observations" Invariant: dk-core-observation-mandatory-units Description: "If value is specified then unit and/or code must be specified" Severity: #error -Expression: "Observation.value.ofType(Quantity).value.exists() implies Observation.value.ofType(Quantity).unit.exists() or Observation.value.ofType(Quantity).code.exists()" +Expression: "value.ofType(Quantity).value.exists() implies value.ofType(Quantity).unit.exists() or value.ofType(Quantity).code.exists()" diff --git a/input/fsh/GLNIdentifier.fsh b/input/fsh/GLNIdentifier.fsh index fcaf86303..14f24899e 100644 --- a/input/fsh/GLNIdentifier.fsh +++ b/input/fsh/GLNIdentifier.fsh @@ -12,9 +12,9 @@ Description: "Identifier holding a 13 digit GLN" Invariant: gln-length Description: "GLN must be exactly 13 characters long" Severity: #error -Expression: "value.matches('^[0-9]{13}$')" +Expression: "matches('^[0-9]{13}$')" Invariant: gln-modulus-10 Description: "GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually" Severity: #error -Expression: "((\n(10-((value.substring(0,1).toInteger()*1)+\n(value.substring(1,1).toInteger()*3)+\n(value.substring(2,1).toInteger()*1)+\n(value.substring(3,1).toInteger()*3)+\n(value.substring(4,1).toInteger()*1)\n+(value.substring(5,1).toInteger()*3)\n+(value.substring(6,1).toInteger()*1)\n+(value.substring(7,1).toInteger()*3)\n+(value.substring(8,1).toInteger()*1)\n+(value.substring(9,1).toInteger()*3)\n+(value.substring(10,1).toInteger()*1)\n+(value.substring(11,1).toInteger()*3))mod(10))mod(10))=value.substring(12,1).toInteger())" \ No newline at end of file +Expression: "((\n(10-((substring(0,1).toInteger()*1)+\n(substring(1,1).toInteger()*3)+\n(substring(2,1).toInteger()*1)+\n(substring(3,1).toInteger()*3)+\n(substring(4,1).toInteger()*1)\n+(substring(5,1).toInteger()*3)\n+(substring(6,1).toInteger()*1)\n+(substring(7,1).toInteger()*3)\n+(substring(8,1).toInteger()*1)\n+(substring(9,1).toInteger()*3)\n+(substring(10,1).toInteger()*1)\n+(substring(11,1).toInteger()*3))mod(10))mod(10))=substring(12,1).toInteger())" \ No newline at end of file diff --git a/input/fsh/KombitOrgIdentifier.fsh b/input/fsh/KombitOrgIdentifier.fsh index 75fed7ac0..7e895f371 100644 --- a/input/fsh/KombitOrgIdentifier.fsh +++ b/input/fsh/KombitOrgIdentifier.fsh @@ -12,4 +12,4 @@ Description: "Identifier holding the organization code issued by KOMBIT" Invariant: uuid Description: "General UUID expression" Severity: #error -Expression: "value.matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')" \ No newline at end of file +Expression: "matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')" \ No newline at end of file diff --git a/input/fsh/Lpr3Identifier.fsh b/input/fsh/Lpr3Identifier.fsh index 0f2c3e44e..cb63f6f3c 100644 --- a/input/fsh/Lpr3Identifier.fsh +++ b/input/fsh/Lpr3Identifier.fsh @@ -11,7 +11,7 @@ Description: "Identifier holding a LPR3 identifier for an organization" Invariant: uuidv5 Description: "LPR3 episode of care identifiers must conform to a UUIDv5" Severity: #error -Expression: "value.matches('urn:uuid:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}')" +Expression: "matches('urn:uuid:[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}')" * requirements = "LPR3 episode of care identifiers must conform to a UUIDv5" * source = "https://scandihealth.github.io/lpr3-docs/" */ \ No newline at end of file