Skip to content

Commit

Permalink
Feature/retrieve record updates and examples (#20)
Browse files Browse the repository at this point in the history
* generalised flag profiles

* generalised flag profiles

* generalised flag profiles

* generalised flag profiles

* generalise condition, fix refs and names

* profiles generalised, apply profiles to examples

* examples validating against profiles

* cpis and fgm examples, all validating

* addtional example pages added

* fix cpis consent category example

* fix flag code for cpis and fgm

* added careconnect deps, tidy diagrams, include contact via yml

* licence section removed, redundant if using ip-statements

* slight mod to intro

* update retrieve record page to follow new format

* updates as per Vicky's comments

* updates as per Vicky's comments

---------

Co-authored-by: Declan Kieran <[email protected]>
  • Loading branch information
declankieran and declankieran authored Mar 12, 2024
1 parent 5d5fc4f commit 66e6834
Show file tree
Hide file tree
Showing 86 changed files with 1,314 additions and 2,057 deletions.
13 changes: 8 additions & 5 deletions input/fsh/aliases.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ Alias: $ParticipationFunction = http://terminology.hl7.org/CodeSystem/v3-Partici
Alias: $ParticipationType = http://terminology.hl7.org/CodeSystem/v3-ParticipationType
Alias: $extra-security-role-type = http://terminology.hl7.org/CodeSystem/extra-security-role-type
Alias: $CareConnect-SDSJobRoleName-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1
Alias: $ValueSetRAConditionCategory = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCategory
Alias: $ValueSetRAConditionCode = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCode
Alias: $ValueSetPatientFlagCategory = https://fhir.nhs.uk/England/ValueSet/PatientFlagCategory
Alias: $ValueSetRAAdjustmentCategory = https://fhir.nhs.uk/England/ValueSet/RA-AdjustmentCategory
Alias: $ValueSetRAFlagCode = https://fhir.nhs.uk/England/ValueSet/RA-FlagCode
Alias: $ValueSetProgrammeFlagCategory = https://fhir.nhs.uk/England/ValueSet/ProgrammeFlagCategory
Alias: $ExtensionFlagDetail = http://hl7.org/fhir/StructureDefinition/flag-detail
Alias: $ValueSetRAProvenanceRole = https://fhir.nhs.uk/England/ValueSet/RA-ProvenanceRole
Alias: $ValueSetFlagProvenanceRole = https://fhir.nhs.uk/England/ValueSet/FlagProvenanceRole
Alias: $ValueSetRAFlagCode = https://fhir.nhs.uk/England/ValueSet/RA-FlagCode
Alias: $ValueSetCPISFlagCode = https://fhir.nhs.uk/England/ValueSet/CPIS-FlagCode
Alias: $ValueSetFGMFlagCode = https://fhir.nhs.uk/England/ValueSet/FGM-FlagCode
Alias: $ValueSetProgrammeFlagCode = https://fhir.nhs.uk/England/ValueSet/ProgrammeFlagCode
Alias: $ValueSetFlagConditionCategory = https://fhir.nhs.uk/England/ValueSet/FlagConditionCategory
Alias: $ValueSetFlagConditionCode = https://fhir.nhs.uk/England/ValueSet/FlagConditionCode
17 changes: 17 additions & 0 deletions input/fsh/codesystem/CPIS-ConditionCategory.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: CPIS-ConditionCategory
Id: CPIS-ConditionCategory
Title: "CPIS Condition Category"
Description: "A CodeSystem to identify the category of a condition within CPIS."

* ^name = "CPISConditionCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/CPIS-ConditionCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #cpis-example-condition-category "CPIS example condition category"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/CPIS-ConditionCode.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: CPIS-ConditionCode
Id: CPIS-ConditionCode
Title: "CPIS Condition Code"
Description: "A CodeSystem to identify the SNOMED-CT concept representing an Impairment recorded as part of CPIS"

* ^name = "CPISConditionCode"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/CPIS-ConditionCode"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #1 "CPIS example condition code"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/CPIS-ConsentPurpose.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: CPIS-ConsentPurpose
Id: CPIS-ConsentPurpose
Title: "CPIS Consent Purpose"
Description: "A CodeSystem to identify the purpose of the consent given within CPIS"

* ^name = "CPISConsentPurpose"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/CPIS-ConsentPurpose"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #CPISCONSENT "CPIS - Consent to record CPIS flags"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/CPIS-FlagCategory.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: CPIS-FlagCategory
Id: CPIS-FlagCategory
Title: "CPIS Flag Category"
Description: "A CodeSystem containing CPIS flag categories"

* ^name = "CPISFlagCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/CPIS-FlagCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #001 "Example CPIS category"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/FGM-ConditionCategory.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: FGM-ConditionCategory
Id: FGM-ConditionCategory
Title: "FGM Condition Category"
Description: "A CodeSystem to identify the category of a condition within FGM."

* ^name = "FGMConditionCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/FGM-ConditionCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #fgm-example-condition-category "FGM example condition category"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/FGM-ConditionCode.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: FGM-ConditionCode
Id: FGM-ConditionCode
Title: "FGM Condition Code"
Description: "A CodeSystem to identify the SNOMED-CT concept representing an Impairment recorded as part of FGM"

* ^name = "FGMConditionCode"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/FGM-ConditionCode"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #1 "FGM example condition code"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/FGM-ConsentPurpose.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: FGM-ConsentPurpose
Id: FGM-ConsentPurpose
Title: "FGM Consent Purpose"
Description: "A CodeSystem to identify the purpose of the consent given within FGM"

* ^name = "FGMConsentPurpose"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/FGM-ConsentPurpose"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #FGMCONSENT "FGM - Consent to record FGM flags"
17 changes: 17 additions & 0 deletions input/fsh/codesystem/FGM-FlagCategory.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CodeSystem: FGM-FlagCategory
Id: FGM-FlagCategory
Title: "FGM Flag Category"
Description: "A CodeSystem containing FGM flag categories"

* ^name = "FGMFlagCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/FGM-FlagCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
* #001 "Example FGM category"
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
CodeSystem: RA-ProxyRole
Id: RA-ProxyRole
Title: "Reasonable Adjustments Record Proxy Role"
CodeSystem: FlagProxyRole
Id: FlagProxyRole
Title: "NHSE Flag Proxy Role"
Description: "A CodeSystem to identify the type/role of the proxy involved"

* ^name = "ReasonableAdjustmentsProxyRole"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ProxyRole"
* ^name = "FlagProxyRole"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/FlagProxyRole"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
4 changes: 2 additions & 2 deletions input/fsh/codesystem/PatientFlagCategory.fsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CodeSystem: PatientFlagCategory
Id: PatientFlagCategory
Title: "Patient Flag Category"
Title: "NHSE Patient Flag Category"
Description: "A CodeSystem to identify the type/category of Flag."

* ^name = "PatientFlagCategory"
Expand All @@ -10,7 +10,7 @@ Description: "A CodeSystem to identify the type/category of Flag."
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
6 changes: 3 additions & 3 deletions input/fsh/codesystem/RA-ConditionCategory.fsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CodeSystem: RA-ConditionCategory
Id: RA-ConditionCategory
Title: "Reasonable Adjustments Record Condition Category"
Description: "A CodeSystem to identify the category of a condition.."
Title: "RA Condition Category"
Description: "A CodeSystem to identify the category of a condition within Reasonable Adjustments."

* ^name = "ReasonableAdjustmentsConditionCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCategory"
Expand All @@ -10,7 +10,7 @@ Description: "A CodeSystem to identify the category of a condition.."
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
4 changes: 2 additions & 2 deletions input/fsh/codesystem/RA-ConditionCode.fsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CodeSystem: RA-ConditionCode
Id: RA-ConditionCode
Title: "Reasonable Adjustments Record Condition Code"
Title: "RA Record Condition Code"
Description: "A CodeSystem to identify the SNOMED-CT concept representing an Impairment recorded as part of a Reasonable Adjustment"

* ^name = "ReasonableAdjustmentsConditionCode"
Expand All @@ -10,7 +10,7 @@ Description: "A CodeSystem to identify the SNOMED-CT concept representing an Imp
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
6 changes: 3 additions & 3 deletions input/fsh/codesystem/RA-ConsentPurpose.fsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CodeSystem: RA-ConsentPurpose
Id: RA-ConsentPurpose
Title: "Reasonable Adjustments Record Consent Purpose"
Description: "A CodeSystem to identify the purpose of the consent given"
Title: "RA Record Consent Purpose"
Description: "A CodeSystem to identify the purpose of the consent given within Reasonable Adjustments"

* ^name = "ReasonableAdjustmentsConsentPurpose"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ConsentPurpose"
Expand All @@ -10,7 +10,7 @@ Description: "A CodeSystem to identify the purpose of the consent given"
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
CodeSystem: RA-AdjustmentCategory
Id: RA-AdjustmentCategory
Title: "Reasonable Adjustments Record Adjustment Category"
Description: "A CodeSystem to identify the category of the Adjustment required"
CodeSystem: RA-FlagCategory
Id: RA-FlagCategory
Title: "RA Adjustment Category"
Description: "A CodeSystem to identify the category of the adjustments required"

* ^name = "ReasonableAdjustmentsCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-AdjustmentCategory"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-FlagCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^experimental = false

* insert NHSEngland-PublisherContactCopyright
* insert NHSEngland-Copyright

* ^caseSensitive = true
* ^content = #complete
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
Instance: AddConditionTransactionExample1
Instance: AddRARecordTransactionExample1
InstanceOf: Bundle
Title: "RA Example of adding a record with a Transaction"
Usage: #example
* type = #transaction
* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[=].resource = PatientExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Patient?identifier=9912003888"
* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e"
* entry[=].resource = ConsentExample1
* entry[=].resource = RAConsentExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2"
* entry[=].resource = ConditionExample1
* entry[=].resource = RAConditionExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[=].resource = MasterFlagExample1
* entry[=].resource = RAPatientFlagExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[=].resource = AdjustmentFlagExample1
* entry[=].resource = RAFlagExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
Instance: AddConditionTransactionExample2
Instance: AddRARecordTransactionExample2
InstanceOf: Bundle
Title: "RA Example of idempotent update of a record with a Transaction"
Usage: #example
* type = #transaction
* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[=].resource = PatientExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Patient?identifier=9912003888"
* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e"
* entry[=].resource = ConsentExample1
* entry[=].resource = RAConsentExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2"
* entry[=].resource = ConditionExample1
* entry[=].resource = RAConditionExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[=].resource = MasterFlagExample1
* entry[=].resource = RAPatientFlagExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[=].resource = AdjustmentFlagExample1
* entry[=].resource = RAFlagExample1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[+].fullUrl = "urn:uuid:b19124e9-f742-49b4-9247-5c2d58ac1ef4"
* entry[=].resource = ConditionExample2
* entry[=].resource = RAConditionExample2
* entry[=].request.method = #PUT
* entry[=].request.url = "Condition/b19124e9-f742-49b4-9247-5c2d58ac1ef4"
* entry[+].fullUrl = "urn:uuid:212c1018-f52a-4db7-9bc2-59a88622eb4f"
* entry[=].resource = AdjustmentFlagExample2
* entry[=].resource = RAFlagExample2
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/212c1018-f52a-4db7-9bc2-59a88622eb4f"
5 changes: 3 additions & 2 deletions input/fsh/examples/0012-RemoveRARecordExample.fsh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Instance: RemoveRARecordExample
InstanceOf: Bundle
Title: "RA Example of deleting an RA record with a Transaction"
Usage: #example
* type = #transaction
* entry[0].request.method = #DELETE
* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[+].request.method = #DELETE
* entry[=].request.url = "Consent/ConsentExample1"
* entry[=].request.url = "Consent/RAConsentExample1"
* entry[+].request.method = #DELETE
* entry[=].request.url = "Condition/ConditionExample1"
* entry[=].request.url = "Condition/RAConditionExample1"
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
Instance: ConsentExample1
Instance: RAConsentExample1
InstanceOf: Consent
Title: "RA example of Consent resource."
Usage: #example
* meta.profile = "https://fhir.nhs.uk/England/StructureDefinition/FlagConsent"

* extension[0].url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary"
* extension[=].valueAnnotation.text = "Example of consent create summary extension text"
* extension[+].url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary"
* extension[=].valueAnnotation.text = "Example of consent remove summary extension text"

* status = #active
* scope = $consentscope#patient-privacy
* category = PatientFlagCategory#NRAF "National Reasonable Adjustments Flag"
* provision.purpose = $sct#370856009 "Limiting access to confidential patient information"
* provision.purpose = RA-ConsentPurpose#RACONSENT "Reasonable Adjustments - Consent to record Reasonable Adjustments"
* patient = Reference(Patient/PatientExample1)
* policy.authority = "https://www.gov.uk/"
* policy.uri = "https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf"
* policyRule = RA-ProxyRole#001
* policyRule = FlagProxyRole#001

* contained.resourceType = "Provenance"
* contained.id = "4c75ce1f-1ad7-4391-b5f6-104754c7e904"
* contained.target.reference = "#"
Expand Down
Loading

0 comments on commit 66e6834

Please sign in to comment.