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

From IHRIS Wiki
(Created page with "{{WebServicePage|Add/Edit a posting |number=PR-WS-2 |description=Fetches a HC Professional Enterprise ID for the professional specified by the professional ID parameter. |appl...")
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{WebServicePage|Add/Edit a posting
{{WebServicePage|Edit a Provider
  |number=PR-WS-2
  |number=PR-WS-6
  |description=Fetches a HC Professional Enterprise ID for the professional specified by the professional ID parameter.
  |description=Edit Provider Details
  |applications=Interoperability Layer, Point-Of-Care?
  |applications=Interoperability Layer, Point-Of-Care, iHRIS
  |url=/ws/rest/v1/professional/epid/query
  |url=/ws/rest/v2/edit/provider
  |params=The following query parameters are allowed:
  |params=The following webservice should accept the following parameters:
*${size} The requested number of EIDs to return
*${epid} The EPID of the provider. Required.  
*${start} The starting offset for listing EIDs
*${surname} The surname of the provider. Optional.
*${given_name} The professional’s given name.
*${nationality} The nationality of the provider coded according to ISO-3166-1 alpha-3Optional.
*${family_name} The professional’s family name.
*${nid} The national id. Optional.
*${dob} The date of birth of the professional. This date can be partial, both the day and month may be left off if required. This should be specified in the following format:  dd/MM/yyyy. Examples: 04/06/1986 or 06/1986 or 1986
*${passport} The passport number. Optional.
*{format}The response format.  One of:
*${mutuelle} The mutuelle number. Optional.
**HL7
*${csr} The CSR number. Optional.
**JSON
*${respformatDescribes response format. Optional. Default is 'http', can also be 'json.'
${ws.size} the requested number of EIDs to return
  |example=?provder=m&reg_body=2
${ws.start} the starting offset for listing IDS
*${gender} The gender of the professional. ‘m’ or ‘f’ are valid arguments.
*${addr_province} The province where the professional lives. See [Rwanda_Administrative_Structure_ISO_codes.ods] for codes to use with this parameter.
*${addr_district} The district where the professional lives. See Rwanda_Administrative_Structure_ISO_codes.ods for codes to use with this parameter.
*${addr_sector} The sector where the professional lives. See Rwanda_Administrative_Structure_ISO_codes.ods for codes to use with this parameter.
*${addr_village} The village where the professional lives. See Rwanda_Administrative_Structure_ISO_codes.ods for codes to use with this parameter.
*{addr_cell} The cell where the professional lives. See Rwanda_Administrative_Structure_ISO_codes.ods for codes to use with this parameter.
*{birth_country} The country that the professional was born in. The value of this parameter should be one of the standard list of ISO country codes.
*{tel_number} The professional’s telephone number (cell phone or land line).
*{edu_level} The education level of the professional. Valid values are
**0 = Pre-primary education
**1 = Primary education or first stage of basic education
**2 = Lower secondary or second stage of basic education
**3 = (Upper) secondary education
**4 = Post-secondary non-tertiary education
**5 = First stage of tertiary education
**6 = Second stage of tertiary education
${reg_body} The Registration Body of the professional. Valid values are
**1 = Physicians
**2 = Nurses
**3 = Not applicable
${reg_status} The Registration Status of the professional. Valid values are:
**1 = Active / full registration
**2 = Limited registration
**3 = Student registration
**4 = Suspended registration
**5 = Terminated registration
**6 = Nullified
**7 = Pending
**8 = Inactive registration
${occ_group} The Occupation Group of the professional. See RwandaHCFacilitiesHCProfessionalRegistriesv1.7July18_pilot_final.docx - Annex 2 for the codes to use with this parameter.
${occ_code} The Occupation Code of the professional.See RwandaHCFacilitiesHCProfessionalRegistriesv1.7July18_pilot_final.docx - Annex 2 for the codes to use with this parameter.
${hours_per_week} Number of hours per week worked by the professional.
${hours_per_week_gt} The parameter with the ‘_gt’ suffix is used for queries for hour per week greater than the given value.
${hours_per_week_lt} The parameter with the ‘_lt’ suffix is used for queries for hour per week less than the given value.
  |example=?gender=m&reg_body=2
  |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:
*If ${repsformat} is 'http' the HTTP response body will contain the epid as plain text.
*${format}=JSON. Example:
*If ${respformat} is 'json' it will contain a JSON object with the single field 'epid.'
further web-service actions to perform on the provider
  Example:
{
{
     "epids": {211312,131241241,12398213,12312,123}
     epid: 211312,
    "total_size" : 300,
    actions: {
    "start": 10
      providerDetails: 'http://rhea-pr.ihris.org/webservices/detials/provider/byid?id_num=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/query/posts?epid=211312',
      viewProvider: 'http://rhea-pr.ihris.org/providerregistry/view?id=person%7C23123'
    }
}
}
*${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 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.
  |notes=Need to good way for limiting response length.  See '''A collection: the list of bugs''' in the [https://help.launchpad.net/API/Hacking Launchpad API]
  |notes=  
|resources=[[Use Case:PR-WS-2]]
|resources=[[Use Case:PR-WS-6]]
}}
}}

Latest revision as of 07:50, 31 October 2012

Web Service: PR-WS-6 Edit a Provider


Edit Provider Details

URL /ws/rest/v2/edit/provider
GET Parameters The following webservice should accept the following parameters:
  • ${epid} The EPID of the provider. Required.
  • ${surname} The surname of the provider. Optional.
  • ${nationality} The nationality of the provider coded according to ISO-3166-1 alpha-3. Optional.
  • ${nid} The national id. Optional.
  • ${passport} The passport number. Optional.
  • ${mutuelle} The mutuelle number. Optional.
  • ${csr} The CSR number. Optional.
  • ${respformat} Describes response format. Optional. Default is 'http', can also be 'json.'
GET Response HTTP 200 - OK
  • If ${repsformat} is 'http' the HTTP response body will contain the epid as plain text.
  • If ${respformat} is 'json' it will contain a JSON object with the single field 'epid.'

further web-service actions to perform on the provider

 Example:

{

    epid: 211312,
    actions: {
     providerDetails: 'http://rhea-pr.ihris.org/webservices/detials/provider/byid?id_num=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/query/posts?epid=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.
GET Example /ws/rest/v2/edit/provider/?provder=m&reg_body=2

Other Resources: Use Case:PR-WS-6