Skip to content

Commit

Permalink
adding script to autoload patients test data. adding extra test data …
Browse files Browse the repository at this point in the history
…specific to some tests only
  • Loading branch information
ashaban committed Dec 14, 2020
1 parent 1f2f021 commit a501a24
Show file tree
Hide file tree
Showing 11 changed files with 601 additions and 134 deletions.
2 changes: 1 addition & 1 deletion features/addSinglePatient.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Scenario: Add a new single Patient
},
{
"system": "http://health.go.ug/cr/nationalid",
"value": "228374855"
"value": "228374844"
},
{
"system": "http://system1.org",
Expand Down
2 changes: 1 addition & 1 deletion features/breakMatch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Breaking Match
Scenario: Breaking a match
Given Patient IDs
"""
["Patient/6f017270-a089-4b23-a667-3f8508412ca0"]
["Patient/ba3d2c47-f0ec-4f62-8677-c45786e37b90"]
"""
When The POS sends Patient IDS
Then The server responds with status code 200
66 changes: 4 additions & 62 deletions features/getPatient.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,10 @@ Feature: Retrieve Patient


Scenario: Get an existing patient
Given Patient 76e82de7-26d5-4aa8-9e1c-b549a4184b7e exists on the server
Given Patient d55e15fd-d7a6-42b8-89cc-560e3578ef7f exists on the server
"""
{
"resourceType": "Patient",
"id": "76e82de7-26d5-4aa8-9e1c-b549a4184b7e",
"meta": {
"versionId": "2",
"lastUpdated": "2020-10-20T19:29:50.653+03:00",
"source": "#im8dM78mO3fZdeGp",
"tag": [
{
"system": "http://openclientregistry.org/fhir/clientid",
"code": "openmrs",
"display": "OpenMRS"
}
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">zuwena <b>LUSIKE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>rec-2009-org</td></tr><tr><td>Date of birth</td><td><span>28 October 1976</span></td></tr></tbody></table></div>"
},
"identifier": [
{
"system": "http://clientregistry.org/openmrs",
"value": "rec-2009-org"
},
{
"system": "http://clientregistry.org/nationalid",
"value": "CF68167355NUZY"
},
{
"system": "http://clientregistry.org/artnumber",
"value": "KUB-176148"
}
],
"name": [
{
"use": "official",
"family": "lusike",
"given": [
"zuwena"
]
}
],
"telecom": [
{
"system": "phone",
"value": "772 614594"
}
],
"gender": "female",
"birthDate": "1976-10-28",
"link": [
{
"other": {
"reference": "Patient/73d17735-4835-474b-bebb-4f1d23c5e6d5"
},
"type": "refer"
}
]
}
d55e15fd-d7a6-42b8-89cc-560e3578ef7f
"""
When A system requests patient 76e82de7-26d5-4aa8-9e1c-b549a4184b7e
Then Patient 76e82de7-26d5-4aa8-9e1c-b549a4184b7e is returned
When A system requests patient d55e15fd-d7a6-42b8-89cc-560e3578ef7f
Then Patient d55e15fd-d7a6-42b8-89cc-560e3578ef7f is returned

2 changes: 1 addition & 1 deletion features/getPatientPotentialMatches.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Get Patient Potential Matches
Scenario: Get patient match
Given Patient ID
"""
433ebeb6-1d89-4b64-97e6-a985675ca571
04cdafc2-cc7b-435e-bd5b-0ee12a2367b7
"""
When The POS sends patient ID
Then Potential matches are returned
7 changes: 2 additions & 5 deletions features/unBreakMatch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Scenario: UnBreaking a match
Given Patient IDs
"""
[{
"id2": "Patient/6f017270-a089-4b23-a667-3f8508412ca0",
"id1": "Patient/bc58707b-62f1-498a-8fb3-568cd5b69db2"
}, {
"id2": "Patient/6f017270-a089-4b23-a667-3f8508412ca0",
"id1": "Patient/d55e15fd-d7a6-42b8-89cc-560e3578ef7f"
"id2": "Patient/c14361b1-481f-4cdb-87c7-018e0e107a55",
"id1": "Patient/cfa54360-ab37-4ded-8309-4c136ca40e33"
}]
"""
When The POS sends Patient IDS
Expand Down
Loading

0 comments on commit a501a24

Please sign in to comment.