-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
265 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"description": "This documentation explains how to use openCR APIs to perform some operations", | ||
"version": "1.0.5", | ||
"title": "Open Client Registry", | ||
"contact": { | ||
"email": "[email protected]" | ||
}, | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
} | ||
}, | ||
"servers": [{ | ||
"url": "http://localhost:8081/scratchpad" | ||
}], | ||
"paths": { | ||
"/fhir/{ResourceType}/{id}": { | ||
"get": { | ||
"tags": [ | ||
"Get Resources" | ||
], | ||
"summary": "Get all records of a specified resource type. If an ID is specified then returned records will be of the specified ID", | ||
"operationId": "getResourceData", | ||
"produces": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"parameters": [{ | ||
"name": "ResourceType", | ||
"in": "path", | ||
"description": "Resource Type to be returned", | ||
"required": true, | ||
"type": "string" | ||
}, { | ||
"name": "id", | ||
"in": "path", | ||
"description": "Resource ID, use $ihe-pix as an ID in order to make a PIXM query", | ||
"required": false | ||
}], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description": "Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
"/Patient": { | ||
"post": { | ||
"tags": [ | ||
"Single Patient" | ||
], | ||
"summary": "Submit patient information into the client registry", | ||
"operationId": "submitPatient", | ||
"consumes": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"produces": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"parameters": [{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "Patient demographics and other details", | ||
"schema": { | ||
"type": "object" | ||
} | ||
}], | ||
"responses": { | ||
"201": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description":"Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
"/": { | ||
"post": { | ||
"tags": [ | ||
"Patients Bundle" | ||
], | ||
"summary": "Submit a bundle of patients into the client registry", | ||
"operationId": "submitPatientsBundle", | ||
"consumes": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"produces": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"parameters": [{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "A bundle of patients demographics and other details", | ||
"schema": { | ||
"type": "object" | ||
} | ||
}], | ||
"responses": { | ||
"201": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description":"Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
"/ocrux/breakMatch": { | ||
"post": { | ||
"tags": [ | ||
"Break Matches" | ||
], | ||
"summary": "Submit an array of patients IDs to break their matches", | ||
"operationId": "breakMatch", | ||
"consumes": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"produces": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"parameters": [{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "An array of patients IDs in the format [Patient/123]", | ||
"schema": { | ||
"type": "array" | ||
} | ||
}], | ||
"responses": { | ||
"201": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description":"Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
"/ocrux/unBreakMatch": { | ||
"post": { | ||
"tags": [ | ||
"Un Break Matches" | ||
], | ||
"summary": "Submit an array of patients IDs to undo the break match operation", | ||
"operationId": "unBreakMatch", | ||
"consumes": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"produces": [ | ||
"application/fhir+json", | ||
"application/json+fhir" | ||
], | ||
"parameters": [{ | ||
"in": "body", | ||
"name": "body", | ||
"description": "An array of patients IDs in the format [Patient/123]", | ||
"schema": { | ||
"type": "array" | ||
} | ||
}], | ||
"responses": { | ||
"201": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description":"Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
"/ocrux/getClients": { | ||
"get": { | ||
"tags": [ | ||
"Get Clients" | ||
], | ||
"summary": "Get every POS that is allowed to push patients into openCR", | ||
"operationId": "getClients", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation" | ||
}, | ||
"400": { | ||
"description": "Bad request" | ||
}, | ||
"500": { | ||
"description": "Internal error" | ||
} | ||
} | ||
} | ||
}, | ||
} | ||
} |
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,33 +1,37 @@ | ||
{ | ||
"resourceType": "Patient", | ||
"id": "efa9af55-ed82-49e1-9c58-7a3b36155ffe", | ||
"meta": { | ||
"versionId": "2", | ||
"lastUpdated": "2020-02-25T17:48:18.028+03:00", | ||
"source": "#5YskPxdp2NQaRit7" | ||
}, | ||
"identifier": [{ | ||
"type": { | ||
"coding": [{ | ||
"system": "http://terminology.hl7.org/CodeSystem/v2-0203", | ||
"code": "PT", | ||
"display": "Patient External Identifier" | ||
}] | ||
"system": "http://clientregistry.org/openmrs", | ||
"value": "12341238" | ||
}, | ||
"system": "http://openmrs.org/openmrs2", | ||
"value": "gtcvdtrdr5" | ||
}], | ||
{ | ||
"system": "http://health.go.ug/cr/nationalid", | ||
"value": "228374844" | ||
}, | ||
{ | ||
"system": "http://system1.org", | ||
"value": "12347", | ||
"period": { | ||
"start": "2001-05-07" | ||
}, | ||
"assigner": { | ||
"display": "test Org" | ||
} | ||
} | ||
], | ||
"active": true, | ||
"name": [{ | ||
"use": "official", | ||
"family": "amalwa", | ||
"family": "Ussery", | ||
"given": [ | ||
"Emmmanuel" | ||
"Gerald", | ||
"Ligon" | ||
] | ||
}], | ||
"telecom": [{ | ||
"system": "phone", | ||
"value": "774 232423" | ||
"value": "678 5616008" | ||
}], | ||
"gender": "male", | ||
"birthDate": "2020-01-02" | ||
"birthDate": "1972-01-08" | ||
} |
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