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

From IHRIS Wiki
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
  |description=Fetches details of a provider by their EPID or other identification type.
  |description=Fetches details of a provider by their EPID or other identification type.
  |applications=Interoperability Layer, Point-Of-Care? Facility Registry?
  |applications=Interoperability Layer, Point-Of-Care? Facility Registry?
  |url=/ws/rest/v2/providerDetails/byid
  |url=/ws/rest/v2/details/provider
  |params=This contains the followng parameters to identify the provider whose details we shall return:
  |params=This contains the followng parameters to identify the provider whose details we shall return:
${id-type} is one of the following:
$epid.  The providers EPID.  Required.
*NID - for a national identification number
*${format}The response format. One of 'json' or 'hl7'.  Defaults to 'json',
*APN - for an application number
|
*PPN - for passport number
|response=*HTTP 200 - OK
*SSN - for social security number
*For HL7 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]
*${id_number} is the value of the associated id
** 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]
*${format}The response format. One of:
*For JSON we return an associative array containing the provider's details as well as URLs related to various actions to perform on the provider:
**HL7
**JSON -- in this case we return an associative array as follows:
{
{
{
   firstname: "Bill",
   firstname: "Bill"
   surname:  "Smith",
   surname:  "Smith"
   cadre: "Nurse",
   cadre: "Nurse"
   email: "bsmith@example.org",
   email: "litlfred@ibibilio.org"
   passport: "12312312",
   passport: "12312312"
   mutuelle: "123123444",
   mutuelle: "123123444"
   csr:  "123123",
   csr:  "123123"
   nid:  "333",
   nid:  "333"
  actions: {
}
    providerDetails: 'http://rhea-pr.ihris.org/webservices/details/provider?epid=211312',
    editProvider: 'http://rhea-pr.ihris.org/webservices/edit/provider?epid=211312',
    addPost: 'http://rhea-pr.ihris.org/webservices/add/post?epid=211312',
    queryPosts: 'http://rhea-pr.ihris.org/webservices/details/post?id=211312',
    viewProvider: 'http://rhea-pr.ihris.org/providerregistry/view?id=person%7C23123'
  }
}
}
|
|response=*HTTP 200 - OK
*The HTTP response body will contain the epid as plain text.
  |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.
  |resources=[[Use Case:PR-WS-1]]
  |resources=[[Use Case:PR-WS-3]]
}}
}}

Latest revision as of 06:47, 31 October 2012

Web Service: PR-WS-3 Get Provider Detail


Fetches details of a provider by their EPID or other identification type.

URL /ws/rest/v2/details/provider
GET Parameters This contains the followng parameters to identify the provider whose details we shall return:

$epid. The providers EPID. Required.

  • ${format}The response format. One of 'json' or 'hl7'. Defaults to 'json',
GET Response
  • HTTP 200 - OK
  • For HL7 See QueryProfessionalRSS.xml
  • For JSON we return an associative array containing the provider's details as well as URLs related to various actions to perform on the provider:

{

 firstname: "Bill",
 surname:  "Smith",
 cadre: "Nurse",
 email: "bsmith@example.org",
 passport: "12312312",
 mutuelle: "123123444",
 csr:  "123123",
 nid:  "333",
 actions: {
   providerDetails: 'http://rhea-pr.ihris.org/webservices/details/provider?epid=211312',
   editProvider: 'http://rhea-pr.ihris.org/webservices/edit/provider?epid=211312',
   addPost: 'http://rhea-pr.ihris.org/webservices/add/post?epid=211312',
   queryPosts: 'http://rhea-pr.ihris.org/webservices/details/post?id=211312',
   viewProvider: 'http://rhea-pr.ihris.org/providerregistry/view?id=person%7C23123'
 }
}
GET Error
  • HTTP 500 - Server Error - If the server encountered an error.
  • HTTP 400 - Bad Request - If the parameters are malformed.

Other Resources: Use Case:PR-WS-3