Closed daissatou2 closed 2 years ago
@aleksa-krolls please take a look at this issue. The only other change to be made after this issue is complete is removing the referral_status
mapping from the /api/v1/organizations/clients/upsert/
endpoint. Let me know your thoughts.
@daissatou2 I implemented the changes per Kiry's request, but I am not convinced it working as described... however I don't know if maybe there is an issue with the older test data I'm using and referrals that might have already been accepted/rejected in Oscar. Can you please run a test for the below steps to confirm?
This is pending response from Kiry. Seeing the same 404 Not Found
error.
see slack for latest @aleksa-krolls.
@daissatou2 I'm reviewing your Slack post and the open issues for this repo. Below I've pasted the new payload format you shared. Can you confirm this be sent to the new endpoint /api/v1/organizations/referrals/update_statuses
?
Or should we plan to confirm this with Kiry on the call tomorrow? (I ask because I know he mentioned going back to using the old existing endpoint again...)
{
"data": [
{
"external_id": "9de500c0-e818-4ded-86db-d0efa7d8d606",
"external_id_display": "7d8d606",
"client_global_id": "01G927042YKTRANTSTSTNK9YT9",
"referral_status": "Referred",
"referral_id": "1191"
}
]
@aleksa-krolls this should be sent to the new endpoint: /api/v1/organizations/referrals/update_statuses
@aleksa-krolls use PUT /api/v1/organizations/referrals/update_statuses
instead of POST
@daissatou2 I think my most recent commits have implemented the PUT
request and cleaned up the logic to map decisions for every oscar referral with a Primero decision (accept/reject). Can you pls test to provide feedback?
Feature Request
Background, context, and business value
The f1-j2-casesToOscar job currently sends Oscar decisions, (
oscarDecisions
in the job) and new Oscar referrals (oscarRefs
in the job) to the same endpoint after merging them into onereferrals
array.Update this job to use a separate endpoint for
oscarDecisions
. No changes should be made to how we are sending data foroscarRefs
to Oscar.The specific request, in as few words as possible
For each item in the
oscarDecisions
array, the job should do the following: Send data to this new endpoint:/api/v1/organizations/referrals/update_statuses
With the mappings below:
external_id
:c.case_id
,external_id_display
:c.case_id_display
,client_global_id
:c.oscar_number
,referral_status
: (referral status mapping should not change. See line here.)referral_id
:s.oscar_referral_id_a4ac8a5
Sample payload:
state.json
f1-j1-getPrimeroCasesV2.js
f1-j2-casesToOscar.js
expression.js
f1-j1-getPrimeroCasesV2.js f1-j2-casesToOscar.js