gu-tum-gun-aeng / med4all-external-routing-agent

MIT License
0 stars 0 forks source link

[external-routing-agent] Do not call Wisible API if patient is not eligible #11

Open catflyflyfly opened 3 years ago

catflyflyfly commented 3 years ago

From Issue https://github.com/gu-tum-gun-aeng/med4all-external-routing-agent/issues/10, There are 2 conditions which if any of them is true. We should not call Wisible.

Psuedocode by @avafund :

if(!isMedicineRequested){
    response = ui.alert("ผู้ป่วยไม่ต้องการรับยา Favipiravia", ui.ButtonSet.OK);
    range.setValue(false);
    return;
}
if(isMedicineReceived){
    response = ui.alert("ผู้ป่วยได้รับยา Favipiravia เรียบร้อยแล้ว", ui.ButtonSet.OK);
    range.setValue(false);
    return;
}

Task: Implement shouldSendToWisibleAPI in src/processor/wisibleProcessor.ts

catflyflyfly commented 3 years ago

@avafund In this case, do we still have to call Colink API?

avafund commented 3 years ago

Calling Colink is still needed, even if we don't call Wisible. Since we will check if this patient exists in Colink, if not, inserting data into Colink is a must. (We want to help update Colink so that Colink will have as much as patient data as possible.)

catflyflyfly commented 3 years ago

Calling Colink is still needed, even if we don't call Wisible.

This will be supported in https://github.com/gu-tum-gun-aeng/med4all-external-routing-agent/pull/9 krub.

Since we will check if this patient exists in Colink, if not, inserting data into Colink is a must. (We want to help update Colink so that Colink will have as much as patient data as possible.)

Noted. https://github.com/gu-tum-gun-aeng/med4all-external-routing-agent/issues/13