diff --git a/input/fsh/examples.fsh b/input/fsh/examples.fsh index a5c53ec35..8a6941f46 100644 --- a/input/fsh/examples.fsh +++ b/input/fsh/examples.fsh @@ -14,7 +14,7 @@ Description: "Is used to document demographics and other administrative informat * name[=].given[+] = "Maria" * name[+].use = #nickname -* name[=].given[+] = "Smitty" +* name[=].text = "Smitty" * birthDate = "1990-12-12" * birthDate.extension[birthTime].valueDateTime = "1983-05-22T16:40:17+02:00" @@ -40,7 +40,7 @@ Description: "The husband or wife, considered in relation to the patient." * name[=].family = "Jones" * name[=].given[+] = "Mike" * telecom[+][phone].system = #phone -* telecom[=][phone].value = "083-123-1234" +* telecom[=][phone].value = "+26095705784" * relationship = $PARENT_RELATIONSHIP_CODES#SPS Instance: PatientEducationalLevelObservationExample diff --git a/input/fsh/smartcare.fsh b/input/fsh/smartcare.fsh index a91d6bc76..a2736a76b 100644 --- a/input/fsh/smartcare.fsh +++ b/input/fsh/smartcare.fsh @@ -10,12 +10,17 @@ Severity: #error Invariant: PatientName-Smartcare-1 Description: "If name.use is NOT nickname then name.family SHALL be present." -Expression: "use.exists() and use != 'nickname' implies family.exists()" +Expression: "use.exists() and use != 'nickname' implies family.exists() and given.exists()" +Severity: #error + +Invariant: PatientName-Smartcare-2 +Description: "If name.use is nickname then name.text SHALL be present." +Expression: "use.exists() and use = 'nickname' implies text.exists()" Severity: #error Invariant: PHONE-1 -Description: "Only special characters (dash) and numbers are allowed. For example: 083-123-1234" -Expression: "$this.matches('[0-9]{1,3}-[0-9]{1,3}-[0-9]{4}')" +Description: "Only special characters (+) and numbers are allowed. For example: 0831231234, +27831231234" +Expression: "$this.matches('^[+]?{1}[0-9]{10,12}$')" Severity: #error Profile: ImmunizationPatient @@ -46,12 +51,17 @@ Description: "Is used to document demographics and other administrative informat * identifier[NRC].system = "http://openhie.org/fhir/zambia-immunizations/identifier/patient-nrc" * name 1..* - * obeys PatientName-Smartcare-1 -* name.given 1..* + * obeys PatientName-Smartcare-1 and PatientName-Smartcare-2 +* name.given 0..* MS +* name.given ^definition = + "reason(s) why this should be supported." * name.family 0..1 MS * name.family ^definition = "reason(s) why this should be supported." * name.use 1..1 +* name.text 0..1 MS +* name.text ^definition = + "Used to capture the patient's nickname." /** name ^slicing.discriminator.type = #value * name ^slicing.discriminator.path = "use" * name ^slicing.rules = #open