-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:beda-software/fhir-emr
- Loading branch information
Showing
100 changed files
with
1,947 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
resources/seeds/Consent/patient-1-basic-practitioner-1-data-sharing-consent.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
patient: | ||
id: patient-1 | ||
display: First Patient | ||
resourceType: Patient | ||
category: | ||
- coding: | ||
- code: data-sharing | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActCode | ||
provision: | ||
type: permit | ||
actor: | ||
- role: | ||
coding: | ||
- code: PROV | ||
system: http://terminology.hl7.org/CodeSystem/v3-RoleClass | ||
reference: | ||
id: practitioner1 | ||
display: Basic-1 Practitioner | ||
resourceType: Practitioner | ||
action: | ||
- coding: | ||
- code: access | ||
system: http://terminology.hl7.org/CodeSystem/consentaction | ||
period: | ||
start: '2023-09-24' | ||
end: '2030-09-21' | ||
purpose: | ||
- code: CAREMGT | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActReason | ||
display: care management | ||
resourceType: Consent | ||
source: | ||
Reference: | ||
id: patient-1-practitioner1-data-sharing-consent | ||
resourceType: QuestionnaireResponse | ||
scope: | ||
coding: | ||
- code: patient-privacy | ||
system: http://terminology.hl7.org/CodeSystem/consentscope | ||
id: patient-1-practitioner1-data-sharing-consent | ||
status: active | ||
performer: | ||
- id: practitioner | ||
display: John Practitioner | ||
resourceType: Practitioner |
45 changes: 45 additions & 0 deletions
45
resources/seeds/Consent/patient-2-basic-practitioner-2-data-sharing-consent.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
patient: | ||
id: patient-2 | ||
display: Second Patient | ||
resourceType: Patient | ||
category: | ||
- coding: | ||
- code: data-sharing | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActCode | ||
provision: | ||
type: permit | ||
actor: | ||
- role: | ||
coding: | ||
- code: PROV | ||
system: http://terminology.hl7.org/CodeSystem/v3-RoleClass | ||
reference: | ||
id: practitioner2 | ||
display: Basic-2 Practitioner | ||
resourceType: Practitioner | ||
action: | ||
- coding: | ||
- code: access | ||
system: http://terminology.hl7.org/CodeSystem/consentaction | ||
period: | ||
start: '2023-09-24' | ||
end: '2030-09-21' | ||
purpose: | ||
- code: CAREMGT | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActReason | ||
display: care management | ||
resourceType: Consent | ||
source: | ||
Reference: | ||
id: patient-2-practitioner2-data-sharing-consent | ||
resourceType: QuestionnaireResponse | ||
scope: | ||
coding: | ||
- code: patient-privacy | ||
system: http://terminology.hl7.org/CodeSystem/consentscope | ||
id: patient-2-practitioner2-data-sharing-consent | ||
status: active | ||
performer: | ||
- id: practitioner | ||
display: John Practitioner | ||
resourceType: Practitioner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
resourceType: HealthcareService | ||
active: true | ||
meta: | ||
profile: | ||
- https://beda.software/beda-emr-healthcare-service | ||
type: | ||
- text: The first appointment | ||
coding: | ||
- code: consultation | ||
system: http://fhir.org/guides/argonaut-scheduling/CodeSystem/visit-type | ||
system: http://beda.software/custom-healthcare-service-list | ||
display: The first appointment | ||
active: true | ||
comment: "A first appointment, often called an initial consultation, is the preliminary meeting between an individual and a professional. This session allows both parties to get acquainted, assess the individual's needs and goals, and set expectations for future interactions. It's a crucial step in building trust and outlining the course of action or treatment. The specifics of the appointment can vary based on the context, from medical assessments to financial planning discussions." | ||
duration: 45 | ||
appointmentRequired: true | ||
duration: 45 | ||
id: consultation | ||
resourceType: HealthcareService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
body: | ||
$let: | ||
qrId: $ fhirpath("QuestionnaireResponse.id") | ||
qrVersion: $ fhirpath("QuestionnaireResponse.meta.versionId") | ||
qrLastUpdated: $ fhirpath("QuestionnaireResponse.meta.lastUpdated") | ||
consentID: $ fhirpath("Provenance.target.where(resourceType='Consent').id").0 | ||
practitioner: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='practitioner').answer.valueReference").0 | ||
dateStart: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='date-start').answer.valueDate").0 | ||
dateEnd: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='date-end').answer.valueDate").0 | ||
patient: | ||
reference: $ "Patient/" + Patient.id | ||
display: $ Patient.name.0.given.0 + ' ' + Patient.name.0.family | ||
author: | ||
reference: $ Author.resourceType + "/" + Author.id | ||
display: | ||
$switch: $ Author.resourceType | ||
Organization: $ Author.name | ||
$default: $ Author.name.0.given.0 + " " + Author.name.0.family | ||
provision: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='provision').answer.valueCoding").0 | ||
$body: | ||
type: transaction | ||
entry: | ||
- request: | ||
$if: $ consentID | ||
$then: | ||
url: $ "/fhir/Consent/" + consentID | ||
method: PUT | ||
$else: | ||
url: /fhir/Consent | ||
method: POST | ||
fullUrl: urn:uuid:cf3923f0-2eaa-4feb-94eb-3a3db62f0705 | ||
resource: | ||
resourceType: Consent | ||
status: | ||
$switch: $ provision.code | ||
permit: active | ||
$default: inactive | ||
patient: $ patient | ||
scope: | ||
coding: | ||
- code: patient-privacy | ||
system: http://terminology.hl7.org/CodeSystem/consentscope | ||
performer: | ||
- $ author | ||
sourceReference: | ||
reference: $ "QuestionnaireResponse/" + qrId | ||
category: | ||
- coding: | ||
- code: data-sharing | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActCode | ||
provision: | ||
period: | ||
start: $ dateStart | ||
end: $ dateEnd | ||
type: $ provision.code | ||
actor: | ||
- role: | ||
coding: | ||
- code: PROV | ||
system: http://terminology.hl7.org/CodeSystem/v3-RoleClass | ||
reference: $ practitioner | ||
action: | ||
- coding: | ||
- code: access | ||
system: http://terminology.hl7.org/CodeSystem/consentaction | ||
purpose: | ||
- code: CAREMGT | ||
system: http://terminology.hl7.org/CodeSystem/v3-ActReason | ||
display: care management | ||
- request: | ||
url: /fhir/Provenance | ||
method: POST | ||
resource: | ||
resourceType: Provenance | ||
target: | ||
- uri: urn:uuid:cf3923f0-2eaa-4feb-94eb-3a3db62f0705 | ||
recorded: $ qrLastUpdated | ||
activity: | ||
$if: $ consentID | ||
$then: | ||
coding: | ||
- code: 'UPDATE' | ||
display: 'revise' | ||
system: 'http://terminology.hl7.org/CodeSystem/v3-DataOperation' | ||
$else: | ||
coding: | ||
- code: 'CREATE' | ||
display: 'create' | ||
system: 'http://terminology.hl7.org/CodeSystem/v3-DataOperation' | ||
agent: | ||
- who: $ author | ||
entity: | ||
- role: source | ||
what: | ||
uri: $ "QuestionnaireResponse/" + qrId + "/_history/" + qrVersion | ||
resourceType: Bundle | ||
id: data-sharing-consent-extract | ||
resourceType: Mapping |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
resources/seeds/Mapping/healthcare-service-change-activity-extract.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
body: | ||
$let: | ||
healthcareServiceId: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='healthcareServiceId').answer.valueString").0 | ||
activity: $ fhirpath("QuestionnaireResponse.repeat(item).where(linkId='activity').answer.valueBoolean").0 | ||
$body: | ||
type: transaction | ||
entry: | ||
- request: | ||
url: $ "/HealthcareService/" + healthcareServiceId | ||
method: PATCH | ||
resource: | ||
active: | ||
$switch: $ activity | ||
true: false | ||
false: true | ||
resourceType: Bundle | ||
id: healthcare-service-change-activity-extract | ||
resourceType: Mapping |
Oops, something went wrong.