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

update client and referrals route for tiberbu #136

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Conversation

freddieptf
Copy link
Collaborator

@freddieptf freddieptf commented Jul 17, 2024

The scope of this service has been reduced to client look-ups in the CR and referral service requests. The SHR bits remain mostly unchanged with the only change being the API URLs.

Changes:

  • We no longer try and create a client on the registry if it does not exist. Registration is expected to be done on sha.go.ke
  • Both the FHIR server and CR are under one domain

The previous UPI will be maintained on contacts that already have it. A new field client_registry will be added to contacts and will contain the CR client ID from tiberbu.

The format will be

"client_registry": {
  "id": "CR1234335",
  "status": "OK",
}

or

"client_registry": {
 "error": "no matches" | "multiple matches"
}

In the case of an error it will be shown on the contact's profile
Screenshot 2024-07-18 at 13-58-53 CHIS Kenya

Migration of existing SHR records and Contacts with UPIs
Still in discussion, MoH team intend to migrate existing SHR records to the new FHIR server and maybe reuse the existing UPIs as IDs in the new CR. @karimkkanji can provide more on the plan here when it's ready

@karimkkanji
Copy link
Collaborator

@freddieptf
Thanks for the detailed outline of the intention.

I am also including the following workflow diagram which is subject to changes and feedback.

New eCHIS integration and Migration Path - New Integration Flow

I also suggest that we run this service once a week and as the number of clients who need a new UPI decreases, we can increase this period to be biweekly and possibly weekly.

We may also not need to show the Client Registry Details as it will be on a best-effort basis as it does not affect any service being offered and we will continually proceed to even build a dashboard to identify Clients who have UPIs and Those Who don't have the new UPI. We can also diversify to add reasons for failure as you have described above so that we can determine what steps to take moving forward.

Copy link
Collaborator

@karimkkanji karimkkanji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we create a new endpoint or CRON Task with the endpoint that does the updates rather than purging out the current implementation. Let's try to retain the current implementation and let the current implementation run as we fully migrate.

Main reason is SHA is to take into effect by 1st October, 2024 and there is a court order that deems it as unconstitutional. Until the SHA is fully implemented and registrations close, let's continually use the current implementation.

config.js Outdated
@@ -45,8 +45,10 @@ const getCHTValuesFromEnv =(instance)=>{
});
};

const CLIENT_REGISTRY = {
url: process.env.CLIENT_REGISTRY_URL,
const TIBERBU_SERVICE = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freddieptf, could we maintain the current endpoint and just create a new one. Let's not retire the OLD CR until we have fully migrated a majority of the clients

Copy link
Collaborator Author

@freddieptf freddieptf Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let me add the previous implementation back. We can have the new implementation under a /v2/endpoint scheme

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


return Promise.reject(error);
};
const { TIBERBU_SERVICE } = require("../../config");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants