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

From IHRIS Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{WebServicePage|Get Provider Posting Detail
{{WebServicePage|Get Provider Posting Detail
  |number=PR-WS-4
  |number=PR-WS-4
  |description=Fetches details of a provider's postings by their EPID or other identification type.
  |description=Fetches details of a provider's postings by their EPID.
  |applications=Interoperability Layer, Point-Of-Care? Facility Registry?
  |applications=Interoperability Layer, Point-Of-Care, Facility Registry, iHRIS
  |url=/ws/rest/v2/providerPosts/byid
  |url=/ws/rest/v2/providerPosts
  |params=This contains the followng parameters to identify the provider whose details we shall return:
  |params=This contains the following parameters to identify the provider whose details we shall return:
${id-type} is one of the following:
${epid} The provider's EPID
*NID - for a national identification number
*${format}The response format.  One of 'hl7' or 'json'
*APN - for an application number
|response=*HTTP 200 - OK
*PPN - for passport number
*If the format='hl7' .....
*SSN - for social security number
*If the format='json' we return an array of associative arrays.  The associative arrays have keys for the post attribtues.  For example:
*${id_number} is the value of the associated id
*${format}The response format.  One of:
**HL7
**JSON -- in this case we return an array of associative arrays.  The associative arrays have keys for the post attribtues.  For example:
{  
{  
   0 : {
   0 : {
     facility: 'XXX District Hospital',
     facility: 'XXX District Hospital',
     facility_code: '123213',   
     foasid: '123213',   
     post_type:  'PPS',
     type:  'PPS',
     post_category: 'NURSE'
     category: 'NURSE',
    actions: {
        'editPost': http://blahblah/,
          'disablePost': http://blahblah/
    }
   },
   },
   1 : {
   1 : {
     facility: 'YYY District Hospital',
     facility: 'YYY District Hospital',
     facility_code: '12345',   
     code: '12345',   
     post_type:  'PPS',
     type:  'PPS',
     post_category: 'NURSE'
     category: 'NURSE',
    actions: {
        'editPost': http://blahblah/,
          'disablePost': http://blahblah/
    }
   },
   },
}
}
|
|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-4]]
  |resources=[[Use Case:PR-WS-4]]
}}
}}

Revision as of 14:14, 30 October 2012

Web Service: PR-WS-4 Get Provider Posting Detail


Fetches details of a provider's postings by their EPID.

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

${epid} The provider's EPID

  • ${format}The response format. One of 'hl7' or 'json'
GET Response
  • HTTP 200 - OK
  • If the format='hl7' .....
  • If the format='json' we return an array of associative arrays. The associative arrays have keys for the post attribtues. For example:

{

 0 : {
    facility: 'XXX District Hospital',
    foasid: '123213',   
    type:  'PPS',
    category: 'NURSE',
    actions: {
        'editPost': http://blahblah/,
         'disablePost': http://blahblah/
    }
 },
 1 : {
    facility: 'YYY District Hospital',
    code: '12345',   
    type:  'PPS',
    category: 'NURSE', 
    actions: {
        'editPost': http://blahblah/,
         'disablePost': http://blahblah/
    }
 },
}
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-4