Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/structuredefinitions #14

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions input/fsh/codesystem/RA-AdjustmentCategory.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ CodeSystem: RA-AdjustmentCategory
Id: RA-AdjustmentCategory
Title: "Reasonable Adjustments Record Adjustment Category"
Description: "A CodeSystem to identify the category of the Adjustment required"

* ^name = "Reasonable Adjustments Record Adjustment Category"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-AdjustmentCategory"
* ^version = "1.0.0"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^publisher = "NHS England"
* ^contact.name = "NHS England"
* ^contact.telecom.system = #email
* ^contact.telecom.value = "[email protected]"
* ^contact.telecom.use = #work
* ^contact.telecom.rank = 2
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

* insert NHSEngland-PublisherContactCopyright

* ^caseSensitive = true
* ^content = #complete
* #001 "Communication support"
Expand Down
16 changes: 7 additions & 9 deletions input/fsh/codesystem/RA-ConditionCategory.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ CodeSystem: RA-ConditionCategory
Id: RA-ConditionCategory
Title: "Reasonable Adjustments Record Condition Category"
Description: " A CodeSystem to identify the category of a condition.."
* ^url = "https://fhir.hl7.org.uk/England/CodeSystem/RA-ConditionCategory"
* ^version = "1.0.0"

* ^name = "Reasonable Adjustments Record Condition Category"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCategory"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^publisher = "NHS England"
* ^contact.name = "NHS England"
* ^contact.telecom.system = #email
* ^contact.telecom.value = "[email protected]"
* ^contact.telecom.use = #work
* ^contact.telecom.rank = 2
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

* insert NHSEngland-PublisherContactCopyright

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

* ^name = "Reasonable Adjustments Record Condition Code"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCode"
* ^version = "1.0.0"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^publisher = "NHS England"
* ^contact.name = "NHS England"
* ^contact.telecom.system = #email
* ^contact.telecom.value = "[email protected]"
* ^contact.telecom.use = #work
* ^contact.telecom.rank = 2
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

* insert NHSEngland-PublisherContactCopyright

* ^caseSensitive = true
* ^content = #complete
* #1 "Vision (for example blindness or partial sight)"
Expand Down
14 changes: 6 additions & 8 deletions input/fsh/codesystem/RA-ConsentPurpose.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ CodeSystem: RA-ConsentPurpose
Id: RA-ConsentPurpose
Title: "Reasonable Adjustments Record Consent Purpose"
Description: "A CodeSystem to identify the purpose of the consent given"

* ^name = "Reasonable Adjustments Record Consent Purpose"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ConsentPurpose"
* ^version = "1.0.0"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^publisher = "NHS England"
* ^contact.name = "NHS England"
* ^contact.telecom.system = #email
* ^contact.telecom.value = "[email protected]"
* ^contact.telecom.use = #work
* ^contact.telecom.rank = 2
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

* insert NHSEngland-PublisherContactCopyright

* ^caseSensitive = true
* ^content = #complete
* #RACONSENT "Reasonable Adjustments - Consent to record Reasonable Adjustments"
14 changes: 6 additions & 8 deletions input/fsh/codesystem/RA-FlagCategory.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ CodeSystem: RA-FlagCategory
Id: RA-FlagCategory
Title: "Reasonable Adjustments Record Flag Category"
Description: " A CodeSystem to identify the type/category of Flag."

* ^name = "Reasonable Adjustments Record Flag Category"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-FlagCategory"
* ^version = "1.0.0"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"
* ^publisher = "NHS England"
* ^contact.name = "NHS England"
* ^contact.telecom.system = #email
* ^contact.telecom.value = "[email protected]"
* ^contact.telecom.use = #work
* ^contact.telecom.rank = 2
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

* insert NHSEngland-PublisherContactCopyright

* ^caseSensitive = true
* ^content = #complete
* #NRAF "National Reasonable Adjustments Flag"
19 changes: 19 additions & 0 deletions input/fsh/codesystem/RA-ProxyRole
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CodeSystem: RA-ProxyRole
Id: RA-ProxyRole
Title: "Reasonable Adjustments Record Proxy Role"
Description: "A CodeSystem to identify the type/role of the proxy involved"

* ^name = "Reasonable Adjustments Record Proxy Role"
* ^url = "https://fhir.nhs.uk/England/CodeSystem/RA-ProxyRole"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright

* ^caseSensitive = true
* ^content = #complete
* #001 "Patient consent"
* #002 "Best interest decision made on behalf of the patient (Mental Capacity Act 2005)"
* #003 "Lasting power of attorney for health and welfare, or court-appointed deputy, or equivalent"
* #004 "Other legitimate patient representative - parental responsibility"
16 changes: 16 additions & 0 deletions input/fsh/extensions/Extension-AdjustmentNotes.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Extension: Extension-AdjustmentNotes
Id: Extension-AdjustmentNotes
Title: "Extension for Flag Adjustment Notes"
Description: "Captures the additional information for an Adjustment within a Reasonable Adjustment Flag."
Context: Flag

* ^purpose = "Additional information required to correctly or effectively interpret an Adjustment."
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-AdjustmentNotes"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright

* value[x] 1..
* value[x] only Annotation
16 changes: 16 additions & 0 deletions input/fsh/extensions/Extension-ConsentCreateSummary.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Extension: Extension-ConsentCreateSummary
Id: Extension-ConsentCreateSummary
Title: "Extension for Consent Create Summary"
Description: "Captures the additional information for a Best Interest decison when recording consent for a Reasonable Adjustment Flag."
Context: Consent

* ^purpose = "Captures the additional information for a Best Interest decison when recording consent for a Reasonable Adjustment Flag."
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright

* value[x] 1..
* value[x] only Annotation
16 changes: 16 additions & 0 deletions input/fsh/extensions/Extension-RemoveCreateSummary.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Extension: Extension-ConsentRemoveSummary
Id: Extension-ConsentRemoveSummary
Title: "Extension for Consent Remove Summary"
Description: "Captures the additional information for a Best Interest decison when removing consent for a Reasonable Adjustment Flag."
Context: Consent

* ^purpose = "Captures the additional information for a Best Interest decison when removing consent for a Reasonable Adjustment Flag."
* ^url = "https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary"
* ^version = "0.1.0"
* ^status = #draft
* ^date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright

* value[x] 1..
* value[x] only Annotation
26 changes: 26 additions & 0 deletions input/fsh/profiles/RA-Condition.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Alias: $ValueSetRAConditionCategory = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCategory
Alias: $ValueSetRAConditionCode = https://fhir.nhs.uk/England/ValueSet/RA-ConditionCode

Profile: RA-Condition
Parent: Condition
Id: RA-Condition
Title: "Reasonable Adjustments Condition Profile"
Description: "To (optionally) record an individual Condition for a Reasonable Adjustment Flag"

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

* contained ^slicing.discriminator.type = #profile
* contained ^slicing.rules = #open
* contained ^slicing.discriminator.path = "contained"
* contained contains provenance 1..1
* contained[provenance] only RA-Provenance

* insert NHSEngland-PublisherContactCopyright

* category 1.. MS
* category from $ValueSetRAConditionCategory (required)
* code 1.. MS
* code from $ValueSetRAConditionCode (extensible)
39 changes: 39 additions & 0 deletions input/fsh/profiles/RA-Consent.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Profile: RA-Consent
Parent: Consent
Id: RA-Consent
Title: "Reasonable Adjustments Consent Profile"
Description: "To record consent to capture Reasonable Adjustments and Reasons for Reasonable Adjustments data"

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

* insert NHSEngland-PublisherContactCopyright

* extension contains
Extension-ConsentCreateSummary named createSummary 0..1 and
Extension-ConsentRemoveSummary named removeSummary 0..1

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

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

* contained ^slicing.discriminator.type = #profile
* contained ^slicing.rules = #open
* contained ^slicing.discriminator.path = "contained"
* contained contains provenance 1..1
* contained[provenance] only RA-Provenance

* category from $ValueSetRAFlagCategory (extensible)
* policy 1..1
* policy.uri 1..
* policyRule 1..
* policyRule from https://fhir.nhs.uk/England/ValueSet/RA-ProxyRole (extensible)
* performer ..1
* performer only Reference(Organization or Patient or Practitioner)
* provision.purpose 1..1
* provision.purpose from RA-ConsentPurpose (extensible)

36 changes: 36 additions & 0 deletions input/fsh/profiles/RA-Flag.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Alias: $ValueSetRAFlagCategory = https://fhir.nhs.uk/England/ValueSet/RA-FlagCategory
Alias: $ValueSetRAFlagCode = https://fhir.nhs.uk/England/ValueSet/RA-FlagCode
Alias: $ExtensionFlagDetail = http://hl7.org/fhir/StructureDefinition/flag-detail

Profile: RA-Flag
Parent: Flag
Id: RA-Flag
Title: "Reasonable Adjustments Flag Profile"
Description: "To (optionally) record an individual Adjustment for a Reasonable Adjustment Flag"

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

* insert NHSEngland-PublisherContactCopyright

* extension contains
Extension-AdjustmentNotes named adjustmentNotes 0..1 and
$ExtensionFlagDetail named flagDetail 0..*

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

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

* contained ^slicing.discriminator.type = #profile
* contained ^slicing.rules = #open
* contained ^slicing.discriminator.path = "contained"
* contained contains provenance 1..1
* contained[provenance] only RA-Provenance

* category 1.. MS
* category from $ValueSetRAFlagCategory (required)
* code MS
* code from $ValueSetRAFlagCode (extensible)
20 changes: 20 additions & 0 deletions input/fsh/profiles/RA-Provenance.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Alias: $ValueSetRAProvenanceRole = https://fhir.nhs.uk/England/ValueSet/RA-ProvenanceRole

Profile: RA-Provenance
Parent: Provenance
Id: RA-Provenance
Title: "Reasonable Adjustments Provenance Profile"
Description: "To record details of the practitioner recording or removing an individual item (Consent, Adjustment or Impairment) within a Reasonable Adjustment Flag."

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

* insert NHSEngland-PublisherContactCopyright

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

16 changes: 16 additions & 0 deletions input/fsh/rulesets/NHSEngland-PublisherContactCopyright.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
RuleSet: NHSEngland-PublisherContactCopyright
* ^publisher = "NHS England"
* ^contact[0].name = "NHS England"
* ^contact[=].telecom[0].system = #email
* ^contact[=].telecom[=].value = "[email protected]"
* ^contact[=].telecom[=].use = #work
* ^contact[=].telecom[=].rank = 1
* ^copyright = "Copyright © 2023+ NHS England Licensed under the Apache License, Version 2.0 (the \\\"License\\\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\"AS IS\\\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html."

RuleSet: NHSEngland-PublisherContactCopyright-Instance
* publisher = "NHS England"
* contact[0].name = "NHS England"
* contact[=].telecom[0].system = #email
* contact[=].telecom[=].value = "[email protected]"
* contact[=].telecom[=].use = #work
* contact[=].telecom[=].rank = 1
12 changes: 9 additions & 3 deletions input/fsh/searchparameter/FlagCategory.fsh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
Instance: FlagCategory
InstanceOf: SearchParameter
Title: "SearchParameter for Category in Flag"
Usage: #definition
Description: "Search by category in the Flag resource"

* name = "SearchParameter for Category in Flag"
* url = "http://localhost:8080/fhir/SearchParameter/FlagCategory"
* version = "1"
* name = "Search for Flag.category"
* version = "0.1.0"
* status = #active
* description = "Search by category in the Flag resource"
* date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright-Instance

* code = #category
* base = #Flag
* type = #token
Expand Down
12 changes: 9 additions & 3 deletions input/fsh/searchparameter/FlagCode.fsh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
Instance: FlagCode
InstanceOf: SearchParameter
Title: "SearchParameter for Code in Flag"
Usage: #definition
Description: "Search by code in the Flag resource"

* name = "SearchParameter for Code in Flag"
* url = "http://localhost:8080/fhir/SearchParameter/FlagCode"
* version = "1"
* name = "Search for Flag.code"
* version = "0.1.0"
* status = #active
* description = "Search by code in the Flag resource"
* date = "2024-02-14"

* insert NHSEngland-PublisherContactCopyright-Instance

* code = #code
* base = #Flag
* type = #token
Expand Down
Loading
Loading