Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRIME-2727/PRIME-2730 Update Vendor API documentation #2449

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 133 additions & 41 deletions documentation/GpidLookup-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,74 +50,156 @@ 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": []
"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
}
]
}
```

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.
For enrollees that have their renewal period expired and have not renewed:
```
{
"result": [
{
"gpid": "H86$J0C3Z$6DYHDFUZ@N",
"status": "Indefinite absence",
"accessType": "",
"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.`

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": "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 +213,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 +248,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 |
|Enrollee is in defined absence period, deactivate user. Call again the day after &lt;absence end date&gt;|
|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)|

Loading
Loading