Open ngaruko opened 4 years ago
Tested by adding 'CLINIC" form to app-settings and sending a sms in the form of 1!CLINIC!<NameOfClinic
.
Clinic creation SHOULD fail if the submitter (ie the contact associated to phone number used to submit the form) is not a health_center
level (which is expected)
Test passes, report created and actual clinic created otherwise,
https://github.com/medic/cht-core/pull/7230 raised for automation
See cht-core#5614: Add feature to create a place via SMS. This is an example of a form that creates a "clinic" under the submitter's parent. It requires for the submitter to be at "health_center" level:
along with the "registration" config:
This is an example of a form that creates a "clinic" under a specified health_center. Place documents should now get a "place_id" field when they are edited, which has the same format as the "patient_id" for people - it's even added by the same transition. If you want to view this field in the webapp, you're going to have to edit your contact-summary config and add it as a field, otherwise you can check it in the database directly. When specifying which health_center to create the new clinic under, please use it's "place_id".
along with this registration config:
The "add_patient" event has also been changed so it supports the "parent_id" config and should be tested as well.