-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs for Health Professional Onbording process
- Loading branch information
1 parent
21ccdf1
commit 5ee7dbf
Showing
4 changed files
with
579 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Retrieve Professional Document List API | ||
|
||
This API retrieves a list of documents associated with a specific health professional. The response includes document identifiers and details which can be used in subsequent API calls to upload documents. | ||
|
||
|
||
## Important Notes: | ||
|
||
1. The `hpr_id` must be provided in the request body. | ||
|
||
2. The API returns a list of documents with their identifiers and base64 encoded data where applicable. | ||
|
||
3. Handle the base64 encoded data appropriately for document processing or display. | ||
|
||
|
||
## Parameters: | ||
|
||
- `hpr_id`: (String, required) - If you have followed the steps sequentially from Step 1, the `hpr_id` is already stored in the `@client` instance. so you do not need to pass it again. However, if you're directly using this API or working in another context, you must provide the `hpr_id` manually. It should be in the format `71-1231-4343-1358`. | ||
|
||
|
||
## Method | ||
|
||
```ruby | ||
fetch_document_list( | ||
hpr_id: | ||
) | ||
``` | ||
|
||
## Request Body: | ||
```ruby | ||
@client.fetch_document_list | ||
|
||
or | ||
|
||
@client.fetch_document_list( | ||
hpr_id: '71-1212-1211-1358' | ||
) | ||
``` | ||
|
||
## Response Body: | ||
```json | ||
{ | ||
"documentList": { | ||
"profileDetails": { | ||
"profilePhoto": { | ||
"id": 29969, | ||
"data": "base64 string" | ||
}, | ||
"proofOfWorkCertificate": { | ||
"id": 29969, | ||
"data": "" | ||
} | ||
}, | ||
"registrationDetails": [ | ||
{ | ||
"registrationCertificate": { | ||
"id": 20899, | ||
"systemOfMedicide": "modern_medicine", | ||
"data": "" | ||
}, | ||
"proofOfNameChangeRegCertificate": { | ||
"id": 20899, | ||
"systemOfMedicide": "modern_medicine", | ||
"data": "" | ||
} | ||
} | ||
], | ||
"qualificationDetails": [ | ||
{ | ||
"degreeCertificate": { | ||
"id": 9631, | ||
"courseName": "MD - Doctor of Medicine", | ||
"qualificationYear": "2020", | ||
"data": "" | ||
}, | ||
"proofOfNameChangeQualCertificate": { | ||
"id": 9631, | ||
"courseName": "MD - Doctor of Medicine", | ||
"qualificationYear": "2020", | ||
"data": "" | ||
} | ||
} | ||
] | ||
}, | ||
"Message": "Data fetched successfully" | ||
} | ||
``` | ||
|
||
Use this API to fetch and process document details for health professionals efficiently. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Upload Documents API | ||
|
||
This API allows health professionals to upload various documents such as profile photos, degree certificates, and registration certificates. Based on the professional's work type (government or both), a proof of work certificate may also be required. | ||
|
||
## Important Notes: | ||
1. For this API, you need to add your `hpr_id` and `password` manually in the configuration file `initializers/abdm.rb`. This will automatically generate the `hpr_token`, which will be submitted with the request body. Users only need to provide the other required data parameters. | ||
2. The `degreeCertificate` and `registrationCertificate` are mandatory. | ||
3. If the health professional's work type is government or both, the `proofOfWorkCertificate` is also required. | ||
|
||
## Parameters: | ||
- `document`: (Array, required) - List of documents to be uploaded, each with: | ||
- `document_id`: (Integer, required) - The ID of the document to be uploaded. | ||
- `document_type`: (String, required) - The type of document (e.g., `profilePhoto`, `degreeCertificate`, `registrationCertificate`, `proofOfWorkCertificate`). | ||
- `fileType`: (String, required) - The file type of the document (e.g., `image/jpeg`, `application/pdf`). | ||
- `data`: (String, required) - The base64-encoded data of the document. | ||
|
||
|
||
## Method | ||
```ruby | ||
upload_documents( | ||
documents: | ||
) | ||
``` | ||
|
||
|
||
## Request Body: | ||
```ruby | ||
@client.upload_document( | ||
documents: [ | ||
{ | ||
"document_id": 1234, | ||
"document_type": "profilePhoto", | ||
"fileType": "image/jpeg", | ||
"data": "<base64 encode string>" | ||
}, | ||
{ | ||
"document_id": 5678, | ||
"document_type": "degreeCertificate", | ||
"fileType": "application/pdf", | ||
"data": "<base64 encode string>" | ||
}, | ||
{ | ||
"document_id": 91011, | ||
"document_type": "registrationCertificate", | ||
"fileType": "application/pdf", | ||
"data": "<base64 encode string>" | ||
}, | ||
{ | ||
"document_id": 1213, | ||
"document_type": "proofOfWorkCertificate", | ||
"fileType": "application/pdf", | ||
"data": "<base64 encode string>" | ||
} | ||
] | ||
) | ||
``` | ||
|
||
## Response Body: | ||
```json | ||
{ | ||
"profilePhoto": { | ||
"status": "pass", | ||
"msg": "Profile pic has been uploaded." | ||
}, | ||
"degreeCertificate": { | ||
"status": "pass", | ||
"msg": "Degree certificate updated" | ||
}, | ||
"registrationCertificate": { | ||
"status": "pass", | ||
"msg": "Registration certificate updated" | ||
}, | ||
"proofOfWorkCertificate": { | ||
"status": "pass", | ||
"msg": "Work proof certificate updated" | ||
} | ||
} | ||
``` | ||
|
||
This API helps to ensure all necessary documents for health professionals are uploaded correctly, based on their profession type and other criteria. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Search For Facility API | ||
|
||
This API provides a list of facilities present in the Health Facility Registry (HFR) system based on search criteria. It returns basic details such as Facility ID, Name, and demographic information. | ||
|
||
## Important Notes: | ||
- You can search using either a specific Facility ID or other search criteria. | ||
- If you use a Facility ID, other search parameters are ignored. | ||
- Without a Facility ID, all required parameters must be provided. | ||
- Data must be in the specified format for each field. | ||
- Certain demographic details need LGD Codes (Local Government Directory). Visit [LG Directory](https://lgdirectory.gov.in/) for more details. | ||
- The API performs a fuzzy match on facility names and an exact match on other attributes. | ||
- Results are paginated. By default, the first page with 10 records is returned, unless specified otherwise. | ||
- Use this API to find registered facilities and avoid creating duplicates through other APIs. | ||
|
||
## Parameters: | ||
|
||
- `ownership_code`: (String, required if `facilityId` is not present) - Ownership of the facility to be searched. Accepted codes are specified in the `getmaster-data` API with type=`OWNER`. | ||
|
||
- `state_lgd_code`: (String, required if `facilityId` is not present) - State of the facility. The value should be from LGD. | ||
|
||
- `district_lgd_code`: (String, optional) - District of the facility. The value should be from LGD. | ||
|
||
- `subdistrict_lgd_code`: (String, optional) - Sub-district of the facility. The value should be from LGD. | ||
|
||
- `pincode`: (String, optional) - Pin code of the facility. Must be a valid 6-digit number. | ||
|
||
- `facilityName`: (String, required if `facilityId` is not present) - Name of the facility being searched. Can be a full or partial name. | ||
|
||
- `facility_id`: (String, optional) - 12-character Facility ID allotted to each facility at the time of submission. If present, only details for this facility are returned. | ||
|
||
- `page`: (Integer, optional) - Page number of results to be retrieved. Default is 1. | ||
|
||
- `results_per_page`: (Integer, optional) - Number of facilities to return per page. Default is 10. | ||
|
||
|
||
### Method | ||
```ruby | ||
search_facility( | ||
ownership_code:, | ||
state_lgd_code:, | ||
district_lgd_code:, | ||
subdistrict_lgd_code: , | ||
pincode:, | ||
facility_name:, | ||
facility_id:, | ||
page:, | ||
results_per_page: | ||
) | ||
``` | ||
|
||
|
||
## Request Body: | ||
|
||
```ruby | ||
@client.search_facility( | ||
ownership_code: 'P', | ||
state_lgd_code: '3', | ||
pincode: '160059', | ||
facility_name: 'Orthopedics Center', | ||
page: 1, | ||
results_per_page: 2 | ||
) | ||
``` | ||
|
||
## Response Body: | ||
```json | ||
{ | ||
"facilities": [ | ||
{ | ||
"facilityId": "IN0310000334", | ||
"facilityName": "Orthopedics Center", | ||
"facilityStatus": "Submitted", | ||
"ownership": "Private", | ||
"ownershipCode": "P", | ||
"systemOfMedicineCode": "M", | ||
"systemOfMedicine": "Modern Medicine(Allopathy)", | ||
"facilityTypeCode": "5", | ||
"facilityType": "Hospital", | ||
"stateName": "PUNJAB", | ||
"stateLGDCode": "3", | ||
"districtName": "S.A.S Nagar", | ||
"districtLGDCode": "608", | ||
"subDistrictName": "SAS Nagar (Mohali)", | ||
"subDistrictLGDCode": "267", | ||
"villageCityTownName": null, | ||
"villageCityTownLGDCode": "39232", | ||
"address": "Bluemed Clinic, ", | ||
"pincode": "160059", | ||
"latitude": "30.704649", | ||
"longitude": "76.717873" | ||
} | ||
], | ||
"message": "Request processed successfully", | ||
"totalFacilities": 1, | ||
"numberOfPages": 1 | ||
} | ||
``` |
Oops, something went wrong.