Skip to content

Commit

Permalink
patient example, split flag profile
Browse files Browse the repository at this point in the history
  • Loading branch information
declankieran committed Mar 5, 2024
1 parent dca9ae7 commit ccea642
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 20 deletions.
1 change: 1 addition & 0 deletions input/fsh/aliases.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Alias: $CareConnect-SDSJobRoleName-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/C
Alias: $ValueSetRAConditionCategory = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCategory
Alias: $ValueSetRAConditionCode = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCode
Alias: $ValueSetRAFlagCategory = https://fhir.nhs.uk/England/ValueSet/RA-FlagCategory
Alias: $ValueSetRAAdjustmentCategory = https://fhir.nhs.uk/England/ValueSet/RA-AdjustmentCategory
Alias: $ValueSetRAFlagCode = https://fhir.nhs.uk/England/ValueSet/RA-FlagCode
Alias: $ExtensionFlagDetail = http://hl7.org/fhir/StructureDefinition/flag-detail
Alias: $ValueSetRAProvenanceRole = https://fhir.nhs.uk/England/ValueSet/RA-ProvenanceRole
12 changes: 0 additions & 12 deletions input/fsh/examples/0003-AddConditionTransactionExample1-bundle.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ Usage: #example
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85"

Instance: PatientExample1
InstanceOf: Patient
Usage: #inline
* identifier.system = "https://fhir.nhs.uk/Id/nhs-number"
* identifier.value = "9912003888"
* active = true
* name.use = #official
* name.family = "Duck"
* name.given = "Donald"
* gender = #male
* birthDate = "1970-01-01"

Instance: ConditionExample1
InstanceOf: Condition
Usage: #inline
Expand Down
11 changes: 11 additions & 0 deletions input/fsh/examples/0014-PatientExample1.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Instance: PatientExample1
InstanceOf: Patient
Usage: #example
* identifier.system = "https://fhir.nhs.uk/Id/nhs-number"
* identifier.value = "9912003888"
* active = true
* name.use = #official
* name.family = "Marks"
* name.given = "Sahil"
* gender = #male
* birthDate = "1970-01-01"
32 changes: 32 additions & 0 deletions input/fsh/profiles/RA-AdjustmentFlag.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Profile: RA-AdjustmentFlag
Parent: Flag
Id: RA-AdjustmentFlag
Title: "Reasonable Adjustments Flag Profile"
Description: "To (optionally) record an individual Adjustment for a Reasonable Adjustment Flag"

* ^name = "ReasonableAdjustmentsFlag"
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/RA-AdjustmentFlag"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright

* extension contains
Extension-AdjustmentNotes named adjustmentNotes 0..1

* extension[adjustmentNotes].value[x] only Annotation
* extension[adjustmentNotes].valueAnnotation 1..

* category ^slicing.discriminator.type = #profile
* category ^slicing.rules = #open
* category ^slicing.discriminator.path = "system"

* category contains masterFlag 1.. MS
* category[masterFlag] from $ValueSetRAFlagCategory (required)

* category contains adjustmentFlag 1.. MS
* category[adjustmentFlag] from $ValueSetRAAdjustmentCategory (required)

* code MS
* code from $ValueSetRAFlagCode (extensible)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Profile: RA-Flag
Profile: RA-MasterFlag
Parent: Flag
Id: RA-Flag
Title: "Reasonable Adjustments Flag Profile"
Description: "To (optionally) record an individual Adjustment for a Reasonable Adjustment Flag"
Id: RA-MasterFlag
Title: "Reasonable Adjustments Master Flag Profile"
Description: "To record whether Reasonable Adjustment Flags exist"

* ^name = "ReasonableAdjustmentsFlag"
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/RA-Flag"
* ^name = "ReasonableAdjustmentsMasterFlag"
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/RA-MasterFlag"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
Expand All @@ -19,7 +19,7 @@ Description: "To (optionally) record an individual Adjustment for a Reasonable A
* extension[adjustmentNotes].value[x] only Annotation
* extension[adjustmentNotes].valueAnnotation 1..

* extension[flagDetail].valueReference only Reference(RA-Flag or RA-Consent or RA-Provenance)
* extension[flagDetail].valueReference only Reference(RA-AdjustmentFlag or RA-Consent or RA-Provenance)

* contained ^slicing.discriminator.type = #profile
* contained ^slicing.rules = #open
Expand Down
2 changes: 1 addition & 1 deletion input/fsh/profiles/RA-Provenance.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Description: "To record details of the practitioner recording or removing an ind

* insert NHSEngland-PublisherContactCopyright

* target only Reference(Condition or RA-Consent or RA-Flag)
* target only Reference(Condition or RA-Consent or RA-AdjustmentFlag or RA-MasterFlag)
* agent.role from $ValueSetRAProvenanceRole (extensible)
* agent.who only Reference(Practitioner)
* agent.onBehalfOf only Reference(Organization)
Expand Down

0 comments on commit ccea642

Please sign in to comment.