Skip to content

Commit 440f2f1

Browse files
committed
Add pds mock data for e2e tests
1 parent 7a87837 commit 440f2f1

File tree

4 files changed

+738
-1
lines changed

4 files changed

+738
-1
lines changed

application/CohortManager/src/Functions/CohortDistributionServices/TransformDataService/transformRules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@
767767
"Expression": "!string.IsNullOrEmpty(participant.PrimaryCareProvider)"
768768
}
769769
],
770-
"Expression": "CanTransformRfr && HasPrimaryCareProvider",
770+
"Expression": "!string.IsNullOrEmpty(participant.ReasonForRemoval) && CanTransformRfr && HasPrimaryCareProvider",
771771
"Actions": {
772772
"OnSuccess": {
773773
"Name": "TransformAction",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,367 @@
1+
{
2+
"resourceType": "Patient",
3+
"id": "9994170503",
4+
"identifier": [
5+
{
6+
"system": "https://fhir.nhs.uk/Id/nhs-number",
7+
"value": "9994170503",
8+
"extension": [
9+
{
10+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSNumberVerificationStatus",
11+
"valueCodeableConcept": {
12+
"coding": [
13+
{
14+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-NHSNumberVerificationStatus",
15+
"version": "1.0.0",
16+
"code": "01",
17+
"display": "Number present and verified"
18+
}
19+
]
20+
}
21+
}
22+
]
23+
}
24+
],
25+
"meta": {
26+
"versionId": "2",
27+
"security": [
28+
{
29+
"system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
30+
"code": "U",
31+
"display": "unrestricted"
32+
}
33+
]
34+
},
35+
"name": [
36+
{
37+
"id": "123",
38+
"use": "usual",
39+
"period": {
40+
"start": "2020-01-01",
41+
"end": "2021-12-31"
42+
},
43+
"given": [
44+
"Jane"
45+
],
46+
"family": "Smith",
47+
"prefix": [
48+
"Mrs"
49+
]
50+
}
51+
],
52+
"gender": "female",
53+
"birthDate": "1980-10-22",
54+
"multipleBirthInteger": 1,
55+
"generalPractitioner": [
56+
{
57+
"id": "254406A3",
58+
"type": "Organization",
59+
"identifier": {
60+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
61+
"value": "",
62+
"period": {
63+
"start": "2020-01-01",
64+
"end": "2021-12-31"
65+
}
66+
}
67+
}
68+
],
69+
"managingOrganization": {
70+
"type": "Organization",
71+
"identifier": {
72+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
73+
"value": "Y12345",
74+
"period": {
75+
"start": "2020-01-01",
76+
"end": "2021-12-31"
77+
}
78+
}
79+
},
80+
"extension": [
81+
{
82+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NominatedPharmacy",
83+
"valueReference": {
84+
"identifier": {
85+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
86+
"value": "Y12345"
87+
}
88+
}
89+
},
90+
{
91+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-PreferredDispenserOrganization",
92+
"valueReference": {
93+
"identifier": {
94+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
95+
"value": "Y23456"
96+
}
97+
}
98+
},
99+
{
100+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicalApplianceSupplier",
101+
"valueReference": {
102+
"identifier": {
103+
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
104+
"value": "Y34567"
105+
}
106+
}
107+
},
108+
{
109+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-NHSCommunication",
110+
"extension": [
111+
{
112+
"url": "language",
113+
"valueCodeableConcept": {
114+
"coding": [
115+
{
116+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-HumanLanguage",
117+
"version": "1.0.0",
118+
"code": "fr",
119+
"display": "French"
120+
}
121+
]
122+
}
123+
},
124+
{
125+
"url": "interpreterRequired",
126+
"valueBoolean": true
127+
}
128+
]
129+
},
130+
{
131+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-ContactPreference",
132+
"extension": [
133+
{
134+
"url": "PreferredWrittenCommunicationFormat",
135+
"valueCodeableConcept": {
136+
"coding": [
137+
{
138+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-PreferredWrittenCommunicationFormat",
139+
"code": "12",
140+
"display": "Braille"
141+
}
142+
]
143+
}
144+
},
145+
{
146+
"url": "PreferredContactMethod",
147+
"valueCodeableConcept": {
148+
"coding": [
149+
{
150+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-PreferredContactMethod",
151+
"code": "1",
152+
"display": "Letter"
153+
}
154+
]
155+
}
156+
},
157+
{
158+
"url": "PreferredContactTimes",
159+
"valueString": "Not after 7pm"
160+
}
161+
]
162+
},
163+
{
164+
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
165+
"valueAddress": {
166+
"city": "Manchester",
167+
"district": "Greater Manchester",
168+
"country": "GBR"
169+
}
170+
},
171+
{
172+
"url": "https://fhir.nhs.uk/StructureDefinition/Extension-PDS-RemovalFromRegistration",
173+
"extension": [
174+
{
175+
"url": "removalFromRegistrationCode",
176+
"valueCodeableConcept": {
177+
"coding": [
178+
{
179+
"system": "https://fhir.nhs.uk/CodeSystem/PDS-RemovalReasonExitCode",
180+
"code": "RDI",
181+
"display": "Practice request immediate removal"
182+
}
183+
]
184+
}
185+
},
186+
{
187+
"url": "effectiveTime",
188+
"valuePeriod": {
189+
"start": "2020-01-01T00:00:00+00:00",
190+
"end": "2021-12-31T00:00:00+00:00"
191+
}
192+
}
193+
]
194+
}
195+
],
196+
"telecom": [
197+
{
198+
"id": "789",
199+
"period": {
200+
"start": "2020-01-01",
201+
"end": "2021-12-31"
202+
},
203+
"system": "phone",
204+
"value": "01632960587",
205+
"use": "home"
206+
},
207+
{
208+
"id": "790",
209+
"period": {
210+
"start": "2019-01-01",
211+
"end": "2022-12-31"
212+
},
213+
"system": "email",
214+
"value": "[email protected]",
215+
"use": "home"
216+
},
217+
{
218+
"id": "OC789",
219+
"period": {
220+
"start": "2020-01-01",
221+
"end": "2021-12-31"
222+
},
223+
"system": "other",
224+
"value": "01632960587",
225+
"use": "home",
226+
"extension": [
227+
{
228+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-OtherContactSystem",
229+
"valueCoding": {
230+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-OtherContactSystem",
231+
"code": "textphone",
232+
"display": "Minicom (Textphone)"
233+
}
234+
}
235+
]
236+
}
237+
],
238+
"contact": [
239+
{
240+
"id": "C123",
241+
"period": {
242+
"start": "2020-01-01",
243+
"end": "2021-12-31"
244+
},
245+
"relationship": [
246+
{
247+
"coding": [
248+
{
249+
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
250+
"code": "C",
251+
"display": "Emergency Contact"
252+
}
253+
]
254+
}
255+
],
256+
"telecom": [
257+
{
258+
"system": "phone",
259+
"value": "01632960587"
260+
}
261+
]
262+
}
263+
],
264+
"address": [
265+
{
266+
"id": "456",
267+
"period": {
268+
"start": "2020-01-01",
269+
"end": "2021-12-31"
270+
},
271+
"use": "home",
272+
"line": [
273+
"1 Trevelyan Square",
274+
"Boar Lane",
275+
"City Centre",
276+
"Leeds",
277+
"West Yorkshire"
278+
],
279+
"postalCode": "LS1 6AE",
280+
"extension": [
281+
{
282+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey",
283+
"extension": [
284+
{
285+
"url": "type",
286+
"valueCoding": {
287+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType",
288+
"code": "PAF"
289+
}
290+
},
291+
{
292+
"url": "value",
293+
"valueString": "12345678"
294+
}
295+
]
296+
},
297+
{
298+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey",
299+
"extension": [
300+
{
301+
"url": "type",
302+
"valueCoding": {
303+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType",
304+
"code": "UPRN"
305+
}
306+
},
307+
{
308+
"url": "value",
309+
"valueString": "123456789012"
310+
}
311+
]
312+
}
313+
]
314+
},
315+
{
316+
"id": "T456",
317+
"period": {
318+
"start": "2020-01-01",
319+
"end": "2021-12-31"
320+
},
321+
"use": "temp",
322+
"text": "Student Accommodation",
323+
"line": [
324+
"1 Trevelyan Square",
325+
"Boar Lane",
326+
"City Centre",
327+
"Leeds",
328+
"West Yorkshire"
329+
],
330+
"postalCode": "LS1 6AE",
331+
"extension": [
332+
{
333+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey",
334+
"extension": [
335+
{
336+
"url": "type",
337+
"valueCoding": {
338+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType",
339+
"code": "PAF"
340+
}
341+
},
342+
{
343+
"url": "value",
344+
"valueString": "12345678"
345+
}
346+
]
347+
},
348+
{
349+
"url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey",
350+
"extension": [
351+
{
352+
"url": "type",
353+
"valueCoding": {
354+
"system": "https://fhir.hl7.org.uk/CodeSystem/UKCore-AddressKeyType",
355+
"code": "UPRN"
356+
}
357+
},
358+
{
359+
"url": "value",
360+
"valueString": "123456789012"
361+
}
362+
]
363+
}
364+
]
365+
}
366+
]
367+
}

0 commit comments

Comments
 (0)