Skip to content

Commit

Permalink
Reflecting changes made for HpdidLookup API
Browse files Browse the repository at this point in the history
  • Loading branch information
neophyte57 committed Jul 10, 2024
1 parent b78b10f commit dca89f6
Showing 1 changed file with 131 additions and 41 deletions.
172 changes: 131 additions & 41 deletions documentation/GpidLookup-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,74 +50,154 @@ curl -v -X GET --location 'https://dev.pharmanetenrolment.gov.bc.ca/api/v1/provi
```

The name parameters will be compared against BCSC and Preferred names in the PRIME database.
Information will be returned if and only if all four parameters match data in the PRIME database, and the enrollee
has indicated consent to share their information for the given `CareSetting` and API `client_id`.
Information will be returned if and only if all four parameters match data in the PRIME database.

The response will contain the following information for an enrollee that has signed a Terms of Access (TOA) agreement. E.g.
If a BCSC user has not submitted the enrollment yet or never enrolled:
```
{
"result": [
{
"gpid": null,
"status": "User not found in PRIME, refer user to PRIME",
"accessType": null,
"licences": null
}
]
}
```

When provided careSetting value does not match care settings of enrollee:
```
{
"result": [
{
"gpid": null,
"status": "Care Setting not selected, refer user to PRIME",
"accessType": null,
"licences": null
}
]
}
```

PRIME administrators may not want enrollee information to be returned:
```
{
"result": [
{
"gpid": null,
"status": "None",
"accessType": null,
"licences": null
}
]
}
```

If the PRIME enrollment is not finished, the following is returned:
```
{
"result": [
{
"gpid": null,
"status": "Incomplete enrollment, refer user to PRIME",
"accessType": null,
"licences": null
}
]
}
```

In the case of an indefinite absence (absence From date provided, starting today or in the past, but no To date given):
```
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Complete",
"accessType": "Independent User - with OBOs",
"licences": [
{
"practRefId": "91",
"collegeLicenseNumber": "00002",
"pharmaNetId": null,
"redacted": false
}
]
"status": "Indefinite absence, deprovision user",
"accessType": null,
"licences": null
}
]
}
```

If a BCSC user has not submitted the enrollment yet or never enrolled, or for enrollees that are Under Review or that haven't signed a TOA (Requires TOA) nothing is returned:
When the enrollee is *currently* absent (both absent From and To dates provided):
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Enrollee is in defined absence period, deactivate user. Call again the day after <absence end date>",
"accessType": null,
"licences": null
}
]
}

For enrollees that have their renewal period expired and have not renewed:
```
{
"result": []
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "User past renewal, refer user to PRIME",
"accessType": null,
"licences": null
}
]
}
```
In the case the enrollee is past their renewal period and has also reported an indefinite absence, PRIME will return a status of `User past renewal and Indefinite absence, deprovision user.`

In the case of an indefinite absence (absence From date provided but no To date given), the status will be `Indefinite absence` and the vendor should deprovision this user, e.g.
When none of the previously mentioned conditions is the case, the response will contain details to provision each enrollee that has signed a Terms of Access (TOA) agreement, when the given `careSetting` value matches the care setting of the enrollee as known in PRIME. Example response:
```
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Indefinite absence",
"accessType": "",
"status": "Provision user",
"accessType": "Independent User - with OBOs",
"licences": [
{
"practRefId": "91",
"collegeLicenseNumber": "00002",
"pharmaNetId": null,
"redacted": false
}
]
}
]
}
```

For enrollees that have their renewal period expired and have not renewed, they will have a `status` of `Past Renewal`.
When the PRIME enrollment has changed from the information previously returned to the API client for the enrollee, the response will be similar to:
```
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Past Renewal",
"accessType": null,
"licences": null
"status": "Enrollee information updated, update user",
"accessType": "Independent User - with OBOs",
"licences": [
{
"practRefId": "91",
"collegeLicenseNumber": "98765",
"pharmaNetId": null,
"redacted": false
}
]
}
]
}
```

For enrollees that have been `locked` by PRIME administrators (such that they cannot view or edit their enrollment details, even if
previously approved), the API response will be:
However if the relevant information is unchanged from the information previously returned to the API client for the enrollee, the response will be similar to:
```
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": null,
"status": "No change to enrollee information, do nothing",
"accessType": null,
"licences": null
}
Expand All @@ -131,7 +211,7 @@ Lastly, due to privacy issues, in the very rare cases that a PRIME enrollee has
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Complete",
"status": "Contact PRIME Support",
"accessType": "Independent User - with OBOs",
"licences": [
{
Expand Down Expand Up @@ -166,19 +246,29 @@ Lastly, due to privacy issues, in the very rare cases that a PRIME enrollee has
|FHA|Fraser Health Authority|
|PHSA|Provincial Health Services Authority|

|Possible values for `status`|
|----------------------------|
|Complete|
|Indefinite absence|
|Past Renewal|

|Possible values for `accessType`|
|--------------------------------|
|Independent User – with OBOs, Pharmacy|
|Independent User - with OBOs|
|Independent User - without OBOs|
|On-behalf-of User|
|On-behalf-of User – Pharmacy|
|Device Provider Agent – with OBOs|
|On-behalf-of User – Device Provider|

|Possible values for `status` output |
|---------------------------------------------------|
|User not found in PRIME, refer user to PRIME |
|Care Setting not selected, refer user to PRIME |
|None |
|Incomplete enrollment, refer user to PRIME |
|User past renewal, refer user to PRIME |
|Indefinite absence, deprovision user \[higher rank???\] |
|Enrollee is in defined absence period, deactivate user. Call again the day after &lt;absence end date&gt; \[higher rank???\]|
|Provision user |
|Enrollee information updated, update user |
|No change to enrollee information, do nothing |


|Possible values for `accessType` output |
|-----------------------------------------------|
|Independent User – with OBOs, Pharmacy |
|Independent User – with OBOs |
|Independent User – without OBOs |
|On-behalf-of User |
|On-behalf-of User – Pharmacy |
|Device Provider Agent – with OBOs |
|On-behalf-of User – Device Provider |
|On-behalf-of User (can prescribe independently)|

0 comments on commit dca89f6

Please sign in to comment.