Skip to content

Commit aa37b58

Browse files
authored
Merge pull request #59 from projkov/7-signup-wizard-fixes
Update signup questionnaire to keep data and fix Patient's AccessPolicy
2 parents 3f86fee + d72b627 commit aa37b58

4 files changed

Lines changed: 74 additions & 1 deletion

File tree

resources/seeds/AccessPolicy/patient.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,17 @@ or:
107107
$one-of:
108108
- '#^/fhir/Questionnaire/.*/\$assemble'
109109
request-method: get
110+
- engine: matcho
111+
matcho:
112+
resource:
113+
questionnaire:
114+
$one-of:
115+
- patient-informed-consent
116+
- authorization-for-release-of-medical-images
117+
- breast-cancer-study-survey
118+
params:
119+
resource/id: string?
120+
resource/type: QuestionnaireResponse
121+
request-method: put
110122
engine: complex
111123
roleName: patient
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
resourceType: Mapping
2+
id: brest-cancer-study-survey-extract
3+
body:
4+
$let:
5+
id: >-
6+
$
7+
fhirpath("QuestionnaireResponse.repeat(item).where(linkId='patient-id').answer.valueString").0
8+
gender: >-
9+
$
10+
fhirpath("QuestionnaireResponse.repeat(item).where(linkId='sex').answer.valueCoding.code").0
11+
birthDate: >-
12+
$
13+
fhirpath("QuestionnaireResponse.repeat(item).where(linkId='dateOfBirth').answer.valueDate").0
14+
$body:
15+
resourceType: Bundle
16+
type: transaction
17+
entry:
18+
- request:
19+
url: $ "Patient/" + id
20+
method: PATCH
21+
resource:
22+
gender:
23+
$if: $ gender = "1"
24+
$then: male
25+
$else: female
26+
birthDate: $ birthDate

resources/seeds/Questionnaire/authorization-for-release-of-medical-images.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ mapping:
1414
- id: patient-edit-extract
1515
resourceType: Mapping
1616
item:
17+
- linkId: mobile
18+
type: string
19+
text: Phone number
20+
readOnly: true
21+
hidden: true
22+
itemControl:
23+
coding:
24+
- code: phoneWidget
25+
initialExpression:
26+
language: text/fhirpath
27+
expression: "%Patient.telecom.where(system='phone').value"
28+
- linkId: email
29+
type: string
30+
text: Email
31+
readOnly: true
32+
hidden: true
33+
initialExpression:
34+
language: text/fhirpath
35+
expression: "%Patient.telecom.where(system='email').value"
1736
- linkId: patient-id
1837
type: string
1938
text: patientId

resources/seeds/Questionnaire/breast-cancer-study-survey.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ resourceType: Questionnaire
33
name: breast-cancer-study-survey
44
title: Breast Cancer Study Survey
55
status: active
6+
launchContext:
7+
- name:
8+
code: Patient
9+
type:
10+
- Patient
11+
mapping:
12+
- id: brest-cancer-study-survey-extract
13+
resourceType: Mapping
614
item:
715
- type: group
816
linkId: wizard
@@ -14,6 +22,14 @@ item:
1422
text: Demographic factors
1523
type: group
1624
item:
25+
- text: PatientID
26+
type: string
27+
linkId: patient-id
28+
hidden: true
29+
required: true
30+
initialExpression:
31+
language: text/fhirpath
32+
expression: "%Patient.id"
1733
- text: "1. Please indicate your sex:"
1834
type: choice
1935
linkId: sex
@@ -3141,4 +3157,4 @@ item:
31413157
meta:
31423158
profile:
31433159
- https://beda.software/beda-emr-questionnaire
3144-
url: https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/set-password
3160+
url: https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/brest-cancer-study-survey

0 commit comments

Comments
 (0)