Skip to content

Commit 5ee7dbf

Browse files
Added docs for Health Professional Onbording process
1 parent 21ccdf1 commit 5ee7dbf

File tree

4 files changed

+579
-0
lines changed

4 files changed

+579
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Retrieve Professional Document List API
2+
3+
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.
4+
5+
6+
## Important Notes:
7+
8+
1. The `hpr_id` must be provided in the request body.
9+
10+
2. The API returns a list of documents with their identifiers and base64 encoded data where applicable.
11+
12+
3. Handle the base64 encoded data appropriately for document processing or display.
13+
14+
15+
## Parameters:
16+
17+
- `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`.
18+
19+
20+
## Method
21+
22+
```ruby
23+
fetch_document_list(
24+
hpr_id:
25+
)
26+
```
27+
28+
## Request Body:
29+
```ruby
30+
@client.fetch_document_list
31+
32+
or
33+
34+
@client.fetch_document_list(
35+
hpr_id: '71-1212-1211-1358'
36+
)
37+
```
38+
39+
## Response Body:
40+
```json
41+
{
42+
"documentList": {
43+
"profileDetails": {
44+
"profilePhoto": {
45+
"id": 29969,
46+
"data": "base64 string"
47+
},
48+
"proofOfWorkCertificate": {
49+
"id": 29969,
50+
"data": ""
51+
}
52+
},
53+
"registrationDetails": [
54+
{
55+
"registrationCertificate": {
56+
"id": 20899,
57+
"systemOfMedicide": "modern_medicine",
58+
"data": ""
59+
},
60+
"proofOfNameChangeRegCertificate": {
61+
"id": 20899,
62+
"systemOfMedicide": "modern_medicine",
63+
"data": ""
64+
}
65+
}
66+
],
67+
"qualificationDetails": [
68+
{
69+
"degreeCertificate": {
70+
"id": 9631,
71+
"courseName": "MD - Doctor of Medicine",
72+
"qualificationYear": "2020",
73+
"data": ""
74+
},
75+
"proofOfNameChangeQualCertificate": {
76+
"id": 9631,
77+
"courseName": "MD - Doctor of Medicine",
78+
"qualificationYear": "2020",
79+
"data": ""
80+
}
81+
}
82+
]
83+
},
84+
"Message": "Data fetched successfully"
85+
}
86+
```
87+
88+
Use this API to fetch and process document details for health professionals efficiently.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Upload Documents API
2+
3+
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.
4+
5+
## Important Notes:
6+
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.
7+
2. The `degreeCertificate` and `registrationCertificate` are mandatory.
8+
3. If the health professional's work type is government or both, the `proofOfWorkCertificate` is also required.
9+
10+
## Parameters:
11+
- `document`: (Array, required) - List of documents to be uploaded, each with:
12+
- `document_id`: (Integer, required) - The ID of the document to be uploaded.
13+
- `document_type`: (String, required) - The type of document (e.g., `profilePhoto`, `degreeCertificate`, `registrationCertificate`, `proofOfWorkCertificate`).
14+
- `fileType`: (String, required) - The file type of the document (e.g., `image/jpeg`, `application/pdf`).
15+
- `data`: (String, required) - The base64-encoded data of the document.
16+
17+
18+
## Method
19+
```ruby
20+
upload_documents(
21+
documents:
22+
)
23+
```
24+
25+
26+
## Request Body:
27+
```ruby
28+
@client.upload_document(
29+
documents: [
30+
{
31+
"document_id": 1234,
32+
"document_type": "profilePhoto",
33+
"fileType": "image/jpeg",
34+
"data": "<base64 encode string>"
35+
},
36+
{
37+
"document_id": 5678,
38+
"document_type": "degreeCertificate",
39+
"fileType": "application/pdf",
40+
"data": "<base64 encode string>"
41+
},
42+
{
43+
"document_id": 91011,
44+
"document_type": "registrationCertificate",
45+
"fileType": "application/pdf",
46+
"data": "<base64 encode string>"
47+
},
48+
{
49+
"document_id": 1213,
50+
"document_type": "proofOfWorkCertificate",
51+
"fileType": "application/pdf",
52+
"data": "<base64 encode string>"
53+
}
54+
]
55+
)
56+
```
57+
58+
## Response Body:
59+
```json
60+
{
61+
"profilePhoto": {
62+
"status": "pass",
63+
"msg": "Profile pic has been uploaded."
64+
},
65+
"degreeCertificate": {
66+
"status": "pass",
67+
"msg": "Degree certificate updated"
68+
},
69+
"registrationCertificate": {
70+
"status": "pass",
71+
"msg": "Registration certificate updated"
72+
},
73+
"proofOfWorkCertificate": {
74+
"status": "pass",
75+
"msg": "Work proof certificate updated"
76+
}
77+
}
78+
```
79+
80+
This API helps to ensure all necessary documents for health professionals are uploaded correctly, based on their profession type and other criteria.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Search For Facility API
2+
3+
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.
4+
5+
## Important Notes:
6+
- You can search using either a specific Facility ID or other search criteria.
7+
- If you use a Facility ID, other search parameters are ignored.
8+
- Without a Facility ID, all required parameters must be provided.
9+
- Data must be in the specified format for each field.
10+
- Certain demographic details need LGD Codes (Local Government Directory). Visit [LG Directory](https://lgdirectory.gov.in/) for more details.
11+
- The API performs a fuzzy match on facility names and an exact match on other attributes.
12+
- Results are paginated. By default, the first page with 10 records is returned, unless specified otherwise.
13+
- Use this API to find registered facilities and avoid creating duplicates through other APIs.
14+
15+
## Parameters:
16+
17+
- `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`.
18+
19+
- `state_lgd_code`: (String, required if `facilityId` is not present) - State of the facility. The value should be from LGD.
20+
21+
- `district_lgd_code`: (String, optional) - District of the facility. The value should be from LGD.
22+
23+
- `subdistrict_lgd_code`: (String, optional) - Sub-district of the facility. The value should be from LGD.
24+
25+
- `pincode`: (String, optional) - Pin code of the facility. Must be a valid 6-digit number.
26+
27+
- `facilityName`: (String, required if `facilityId` is not present) - Name of the facility being searched. Can be a full or partial name.
28+
29+
- `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.
30+
31+
- `page`: (Integer, optional) - Page number of results to be retrieved. Default is 1.
32+
33+
- `results_per_page`: (Integer, optional) - Number of facilities to return per page. Default is 10.
34+
35+
36+
### Method
37+
```ruby
38+
search_facility(
39+
ownership_code:,
40+
state_lgd_code:,
41+
district_lgd_code:,
42+
subdistrict_lgd_code: ,
43+
pincode:,
44+
facility_name:,
45+
facility_id:,
46+
page:,
47+
results_per_page:
48+
)
49+
```
50+
51+
52+
## Request Body:
53+
54+
```ruby
55+
@client.search_facility(
56+
ownership_code: 'P',
57+
state_lgd_code: '3',
58+
pincode: '160059',
59+
facility_name: 'Orthopedics Center',
60+
page: 1,
61+
results_per_page: 2
62+
)
63+
```
64+
65+
## Response Body:
66+
```json
67+
{
68+
"facilities": [
69+
{
70+
"facilityId": "IN0310000334",
71+
"facilityName": "Orthopedics Center",
72+
"facilityStatus": "Submitted",
73+
"ownership": "Private",
74+
"ownershipCode": "P",
75+
"systemOfMedicineCode": "M",
76+
"systemOfMedicine": "Modern Medicine(Allopathy)",
77+
"facilityTypeCode": "5",
78+
"facilityType": "Hospital",
79+
"stateName": "PUNJAB",
80+
"stateLGDCode": "3",
81+
"districtName": "S.A.S Nagar",
82+
"districtLGDCode": "608",
83+
"subDistrictName": "SAS Nagar (Mohali)",
84+
"subDistrictLGDCode": "267",
85+
"villageCityTownName": null,
86+
"villageCityTownLGDCode": "39232",
87+
"address": "Bluemed Clinic, ",
88+
"pincode": "160059",
89+
"latitude": "30.704649",
90+
"longitude": "76.717873"
91+
}
92+
],
93+
"message": "Request processed successfully",
94+
"totalFacilities": 1,
95+
"numberOfPages": 1
96+
}
97+
```

0 commit comments

Comments
 (0)