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

From IHRIS Wiki
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{WebServicePage|Get Provider Posting Detail
{{WebServicePage|Query For Postings
  |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/query/posts
  |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.  The values of epid, foasid and orgunit are "and"ed together:
${id-type} is one of the following:
*${epid} The provider's EPID. Optional.
*NID - for a national identification number
*${fosaid} The facility code.  Optional.
*APN - for an application number
*${orgunit} The code for the organizational unit for the posting.  Optional
*PPN - for passport number
*${type} The type of the provider, one of PPS or CHW. Optional.
*SSN - for social security number
*${category} The category/cadre of the provider.  Optional.
*${id_number} is the value of the associated id
*${format}The response format.  One of 'hl7' or 'json'
*${format}The response format.  One of:
*${size} The maximum number number of IDs to return.  Defaults to 50.
**HL7
*${start} The starting offset for listing IDs.  Defaults to 10.
**JSON -- in this case we return an array of associative arrays.  The associative arrays have keys for the post attribtues.  For example:
|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 attributes.  For example:
{  
{  
   0 : {
   total_size : 2,
    facility: 'XXX District Hospital',
  start: 0,
    facility_code: '123213',  
  posts: {
    post_type: 'PPS',
    98798798 : {
    post_category: 'NURSE'
      editPost: http://rhea-pr.ihris.org/webservices/edit/post?id=98798798',
  },
      postDetails: http://rhea-pr.ihris.org/webservices/details/post?id=98798798'
  1 : {
    },
    facility: 'YYY District Hospital',
    9878799 : {
    facility_code: '12345', 
      editPost: http://rhea-pr.ihris.org/webservices/edit/post?id=98798799',
    post_type: 'PPS',
      postDetails: http://rhea-pr.ihris.org/webservices/details/post?id=98798799'
    post_category: 'NURSE'
    }
  },
  }
}
}
|
|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]]
}}
}}

Latest revision as of 06:47, 31 October 2012

Web Service: PR-WS-4 Query For Postings


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

URL /ws/rest/v2/query/posts
GET Parameters This contains the following parameters to identify the provider whose details we shall return. The values of epid, foasid and orgunit are "and"ed together:
  • ${epid} The provider's EPID. Optional.
  • ${fosaid} The facility code. Optional.
  • ${orgunit} The code for the organizational unit for the posting. Optional
  • ${type} The type of the provider, one of PPS or CHW. Optional.
  • ${category} The category/cadre of the provider. Optional.
  • ${format}The response format. One of 'hl7' or 'json'
  • ${size} The maximum number number of IDs to return. Defaults to 50.
  • ${start} The starting offset for listing IDs. Defaults to 10.
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 attributes. For example:

{

 total_size : 2,
 start: 0,
 posts: {
   98798798 : {
      editPost: http://rhea-pr.ihris.org/webservices/edit/post?id=98798798',
      postDetails: http://rhea-pr.ihris.org/webservices/details/post?id=98798798'
   },
   9878799 : {
      editPost: http://rhea-pr.ihris.org/webservices/edit/post?id=98798799',
      postDetails: http://rhea-pr.ihris.org/webservices/details/post?id=98798799'
   }
  }
}
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