Testing Text link with CHT

Hello members

We looking at setting up the testit-cht connection for the two-texting use-case and i have a question i would like to get some insights in form the community.

  • Is is possible to update the phone of a CHT contact during a textit flow(ie posting to a CHT endpoint) for-example when a contact changed to a number phone number and they would like to update to the new number in CHT?

Hi @cliff

Is is possible to update the phone of a CHT contact during a textit flow

I believe this used to be possible, with the update_clinics transition, but the feature was removed some time ago (in 3.5.0 via Only add `facility_not_found` error if facility is not found. (#5568) · medic/cht-core@4cfc963 · GitHub) .

thanks @diana for the feedback
Was the feature replaced somehow with a new one?

Not as far as I know.

1 Like

As @marc pointed out (thanks @marc), editing a contact is possible through direct CouchDb APIs, and could theoretically be used from a textit flow. Editing a document through CouchDb directly requires reading the document first, editing the desired fields, and saving the doc (through PUT or POST).

Documentation about reading docs directly from CouchDb: https://docs.couchdb.org/en/3.2.2-docs/api/document/common.html#get--db-docid
Documentation about editing docs directly to CouchDb: https://docs.couchdb.org/en/3.2.2-docs/api/document/common.html#put--db-docid

1 Like

thanks @diana and @marc for the pointer,i see this can be done with a PUT operation , my only concern on this is it looks to be only done manually with no way on capturing the payload parameters automatically because they will be changing for each document