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/add condition #1

Merged
merged 16 commits into from
Jan 30, 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
26 changes: 25 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
Expand All @@ -34,9 +34,33 @@ jobs:
- name: Install Jekyll
run: sudo gem install jekyll jekyll-plantuml

- name: Run FHIR server (TODO - load package from vars and validate - maybe just let the publisher handle that...)
run: docker run -d -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest

- name: Convert FSH to JSON and set up resources folder in input
run: sushi .; mkdir -p input/resources

- name: Sleep to give server time to start
run: sleep 90

- name: Load add-condition-transaction-example-1
run: curl -X POST -H "Content-type:application/fhir+json;fhirVersion=4.0" -d @fsh-generated/resources/Bundle-add-condition-transaction-example-1.json http://localhost:8080/fhir;

- name: Query add-condition-transaction-example-1
run: sleep 10; curl $(cat input/queries/get-flags-associated-with-patient.md) | jq '.id = "QUERY-OUTPUT--add-condition-transaction-example-1"' > input/resources/QUERY-OUTPUT--add-condition-transaction-example-1.json

- name: Load add-condition-transaction-example-2
run: curl -X POST -H "Content-type:application/fhir+json;fhirVersion=4.0" -d @fsh-generated/resources/Bundle-add-condition-transaction-example-2.json http://localhost:8080/fhir; \

- name: Query add-condition-transaction-example-2
run: sleep 10; curl $(cat input/queries/get-flags-associated-with-patient.md) | jq '.id = "QUERY-OUTPUT--add-condition-transaction-example-2"' > input/resources/QUERY-OUTPUT--add-condition-transaction-example-2.json

- name: Build IG
run: ./_genonce.sh

- name: Download and unpack font-awesome
run: wget https://fontawesome.com/v4/assets/font-awesome-4.7.0.zip; unzip font-awesome-4.7.0.zip -d output

- name: Publish IG Artefact
uses: actions/upload-artifact@v3
with:
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ _site/
# Ignore folders generated by Bundler
.bundle/
vendor/
input-cache
node_modules
output
temp
template
font-awesome*
fsh-generated
input/resources/QUERY-OUTPUT*
1 change: 1 addition & 0 deletions ig-template/package/includes/_append.fragment-header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<link rel="stylesheet" href="../font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./font-awesome-4.7.0/css/font-awesome.min.css">

<!-- Left logo - typically the publisher's logo - project or affiliate -->
<div id="project-nav">
Expand Down
97 changes: 97 additions & 0 deletions input/fsh/examples/add-condition-transaction-example-1.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Alias: $consentscope = http://terminology.hl7.org/CodeSystem/consentscope
Alias: $RARecord-FlagCategory-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1
Alias: $sct = https://snomed.info/sct
Alias: $condition-clinical = http://terminology.hl7.org/CodeSystem/condition-clinical
Alias: $CareConnect-ConditionCategory-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1
Alias: $RARecord-ConditionCode-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1
Alias: $DataOperation = http://terminology.hl7.org/CodeSystem/v3-DataOperation
Alias: $CareConnect-SDSJobRoleName-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1
Alias: $RARecord-AdjustmentCategory-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1

Instance: add-condition-transaction-example-1
InstanceOf: Bundle
Usage: #example
* type = #transaction
* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[=].resource = patient-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Patient?identifier=9912003888"
* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e"
* entry[=].resource = consent-example-1
* 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 = condition-example-1
* 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 = master-flag-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[=].resource = condition-flag-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85"

Instance: patient-example-1
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: consent-example-1
InstanceOf: Consent
Usage: #inline
* status = #active
* scope = $consentscope#patient-privacy
* category = $RARecord-FlagCategory-1#NRAF "National Reasonable Adjustments Flag"
* provision.purpose = $sct#370856009 "Limiting access to confidential patient information"
* patient = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)
* policy.authority = "https://www.gov.uk/"
* policy.uri = "https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf"

Instance: master-flag-example-1
InstanceOf: Flag
Usage: #inline
* status = #active
* code = $RARecord-FlagCategory-1#NRAF "National Reasonable Adjustments Flag"
* category = $RARecord-FlagCategory-1#NRAF "National Reasonable Adjustments Flag"
* subject = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)
* contained.resourceType = "Provenance"
* contained.id = "4c75ce1f-1ad7-4391-b5f6-104754c7e904"
* contained.target.reference = "#"
* contained.recorded = "2024-01-01T11:00:00+00:00"
* contained.activity = $DataOperation#CREATE "create"
* contained.agent.role = $CareConnect-SDSJobRoleName-1#R0260 "General Medical Practitioner"
* contained.agent.who.reference = "https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9"
* contained.agent.onBehalfOf.reference = "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"

Instance: condition-example-1
InstanceOf: Condition
Usage: #inline
* clinicalStatus = $condition-clinical#active
* category = $CareConnect-ConditionCategory-1#issue "Issue"
* code = $RARecord-ConditionCode-1#5 "Learning or understanding or concentrating"
* subject = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)

Instance: condition-flag-example-1
InstanceOf: Flag
Usage: #inline
* status = #active
* code = $RARecord-AdjustmentCategory-1#001 "Communication support"
* category = $RARecord-FlagCategory-1#NRAF "National Reasonable Adjustments Flag"
* subject = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)
* contained.resourceType = "Provenance"
* contained.id = "ddb4df1c-d15a-4d02-9346-c034732c5a37"
* contained.target.reference = "#"
* contained.recorded = "2024-01-01T11:00:00+00:00"
* contained.activity = $DataOperation#CREATE "create"
* contained.agent.role = $CareConnect-SDSJobRoleName-1#R0260 "General Medical Practitioner"
* contained.agent.who.reference = "https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9"
* contained.agent.onBehalfOf.reference = "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"
66 changes: 66 additions & 0 deletions input/fsh/examples/add-condition-transaction-example-2.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Alias: $consentscope = http://terminology.hl7.org/CodeSystem/consentscope
Alias: $RARecord-FlagCategory-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1
Alias: $sct = https://snomed.info/sct
Alias: $condition-clinical = http://terminology.hl7.org/CodeSystem/condition-clinical
Alias: $CareConnect-ConditionCategory-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1
Alias: $RARecord-ConditionCode-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1
Alias: $DataOperation = http://terminology.hl7.org/CodeSystem/v3-DataOperation
Alias: $CareConnect-SDSJobRoleName-1 = https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1
Alias: $RARecord-AdjustmentCategory-1 = https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1

Instance: add-condition-transaction-example-2
InstanceOf: Bundle
Usage: #example
* type = #transaction
* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[=].resource = patient-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Patient?identifier=9912003888"
* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e"
* entry[=].resource = consent-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[=].resource = master-flag-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19"
* entry[+].fullUrl = "urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2"
* entry[=].resource = condition-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77"
* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[=].resource = condition-flag-example-1
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
* entry[+].fullUrl = "urn:uuid:b19124e9-f742-49b4-9247-5c2d58ac1ef4"
* entry[=].resource = condition-example-2
* entry[=].request.method = #PUT
* entry[=].request.url = "Condition/b19124e9-f742-49b4-9247-5c2d58ac1ef4"
* entry[+].fullUrl = "urn:uuid:212c1018-f52a-4db7-9bc2-59a88622eb4f"
* entry[=].resource = condition-flag-example-2
* entry[=].request.method = #PUT
* entry[=].request.url = "Flag/212c1018-f52a-4db7-9bc2-59a88622eb4f"

Instance: condition-example-2
InstanceOf: Condition
Usage: #inline
* clinicalStatus = $condition-clinical#active
* category = $CareConnect-ConditionCategory-1#issue "Issue"
* code = $sct#73618009 "Autistic spectrum disorder with isolated skills"
* subject = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)

Instance: condition-flag-example-2
InstanceOf: Flag
Usage: #inline
* status = #active
* code = $RARecord-AdjustmentCategory-1#001 "Communication support"
* category = $RARecord-FlagCategory-1#NRAF "National Reasonable Adjustments Flag"
* subject = Reference(urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77)
* contained.resourceType = "Provenance"
* contained.id = "55ac7111-dbd1-42f2-906c-a167b04d47ce"
* contained.target.reference = "#"
* contained.recorded = "2024-01-01T11:00:00+00:00"
* contained.activity = $DataOperation#CREATE "create"
* contained.agent.role = $CareConnect-SDSJobRoleName-1#R0260 "General Medical Practitioner"
* contained.agent.who.reference = "https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9"
* contained.agent.onBehalfOf.reference = "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"
38 changes: 0 additions & 38 deletions input/fsh/extensions/Extension-England-DateTime.fsh

This file was deleted.

26 changes: 0 additions & 26 deletions input/fsh/extensions/Extension-England-FlagRemovalReason.fsh

This file was deleted.

47 changes: 0 additions & 47 deletions input/fsh/extensions/Extension-England-OrganisationRole.fsh

This file was deleted.

Loading
Loading