Web Service:PR-WS-2: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 14: Line 14:
**${category} The category (or cadre) of the provider.   
**${category} The category (or cadre) of the provider.   
**${type} The type of the provider 'PPS' for paid-public sector or 'CHW' for community health worker.  
**${type} The type of the provider 'PPS' for paid-public sector or 'CHW' for community health worker.  
*{format}The response format.  One of:
*{format}The response format.  One of 'hl7' or 'json'.
**HL7
**JSON
  |example=?foasid=123&size=5&start=10
  |example=?foasid=123&size=5&start=10
  |response=HTTP 200 - OK
  |response=HTTP 200 - OK
The HTTP response body will contain a list of matching EIDSs as specified by the ${format} parameter:
The HTTP response body will contain a list of matching EIDSs as specified by the ${format} parameter:
*${format}=JSON.  Example:
*If ${format}=json.  Example:
{
{
     "epids": {211312,131241241,12398213,12312,123}
     "epids": {211312,131241241,12398213,12312,123}
Line 26: Line 24:
     "start": 10
     "start": 10
}
}
*${format}=HL7. one per professional that matches the criteria, that contains the details of that professional. These messages will be contained within a RSS feed XML message. HL7v2 message specification and mapping:
*${format}=hl7. one per professional that matches the criteria, that contains the details of that professional. These messages will be contained within a RSS feed XML message. HL7v2 message specification and mapping:
* The RSS XML will contain a list of HL7 message in each item element.  See [http://www.google.com/url?q=http%3A%2F%2Fjira.jembi.org%2Fwiki%2Fdownload%2Fattachments%2F8912902%2FQueryProfessionalRSS.xml&sa=D&sntz=1&usg=AFQjCNEYi8ytZRJPvq8fWsoqQ1VqAToIAg QueryProfessionalRSS.xml]
** The RSS XML will contain a list of HL7 message in each item element.  See [http://www.google.com/url?q=http%3A%2F%2Fjira.jembi.org%2Fwiki%2Fdownload%2Fattachments%2F8912902%2FQueryProfessionalRSS.xml&sa=D&sntz=1&usg=AFQjCNEYi8ytZRJPvq8fWsoqQ1VqAToIAg QueryProfessionalRSS.xml]
* The HL7 v2.5 PMU_B01 messages for each professional will be specified as in  [https://docs.google.com/spreadsheet/ccc?key=0Ah8KVMJr8h4pdFlQMjNyMDh0dzhUSlJkWVgyd3lUZGc Register-or-Query-Professional]
** The HL7 v2.5 PMU_B01 messages for each professional will be specified as in  [https://docs.google.com/spreadsheet/ccc?key=0Ah8KVMJr8h4pdFlQMjNyMDh0dzhUSlJkWVgyd3lUZGc Register-or-Query-Professional]
  |error=*HTTP 500 - Server Error - If the server encountered an error.
  |error=*HTTP 500 - Server Error - If the server encountered an error.
*HTTP 400 - Bad Request - If the parameters are malformed.
*HTTP 400 - Bad Request - If the parameters are malformed.

Revision as of 13:08, 30 October 2012

Web Service: PR-WS-2 Query For Providers


Fetches a HC Professional Enterprise ID for the professional specified by the professional ID parameter.

URL /ws/rest/v1/professional/epid/query
GET Parameters The following query parameters are allowed:
  • ${size} The maximum number number of EPIDs to return
  • ${start} The starting offset for listing EPIDs.
  • The following search possible parameters will be "and"ed together
    • ${firstname} The provider's given name.
    • ${surname} The professional’s family name.
    • ${fosaid} The FOSAID for the facility a provider is posted to.
    • ${location} The code for the organizational unit under which the provider is posted.
    • ${category} The category (or cadre) of the provider.
    • ${type} The type of the provider 'PPS' for paid-public sector or 'CHW' for community health worker.
  • {format}The response format. One of 'hl7' or 'json'.
GET Response HTTP 200 - OK

The HTTP response body will contain a list of matching EIDSs as specified by the ${format} parameter:

  • If ${format}=json. Example:

{

    "epids": {211312,131241241,12398213,12312,123}
    "total_size" : 300,
    "start": 10

}

  • ${format}=hl7. one per professional that matches the criteria, that contains the details of that professional. These messages will be contained within a RSS feed XML message. HL7v2 message specification and mapping:
GET Error
  • HTTP 500 - Server Error - If the server encountered an error.
  • HTTP 400 - Bad Request - If the parameters are malformed.
GET Example /ws/rest/v1/professional/epid/query/?foasid=123&size=5&start=10
Notes Need to good way for limiting response length. See A collection: the list of bugs in the Launchpad API

Other Resources: Use Case:PR-WS-2