Is there a native way to configure the following two things.
I’ve created a form using Bahmni implementer’s interface. And i’m able to register observations from consultation tab. But as opposed to adding a concept set to All observation template and adding allowAddMore: true from the default config i’m able to register multiple entry of the same from. How do i do the same for forms created using form builder?
After a patient has started a visit and Start Visit Type button changes to Enter visit detail button on registration page and no way to change visit type without closing the current visit. How should i configure being able to change visit?
For Point2:
You want to change the VISIT TYPE without closing the current visit? I believe that isn’t possible, once a visit has been started. You will need to close that visit, and open a new one.
For Point1:
I didn’t fully understand. You want to be able to fill the same form (created using FormBuilder) more than once, during the same encounter?
For this to be possible as Gokul described, there has to be more than one location tagged as ‘visit location’, which is recommended if a hospital has 2 separate buildings operating relatively independently of each other. Also, please elaborate on the use case so we can understand it better.
Hey @gsluthra , For point 1 for any form created using implementer’s interface its not possible to add configuration like allowAddMore: true. Or even make it a default observation form in clinical/extension.json to make it be opened by default in consultation tab
Is there another way to achieve this (Preferably without making code changes to the web)?
You can enable the “Add More” Checkbox for a section, so you can repeat the whole section again. For example see the “Immunization Incident Record” Form that comes out-of-the-box with Bahmni LITE (clinic-config). See in demo here: https://demo-lite.mybahmni.in/
I tried that solution which worked but has a weird relationship with display control. Let’s say i have an immunization form which has display controls of its own. When i add the section once again it wont have its own display control
Example: I have an immunization dropdown which users will select an immunization type (BCG, Polio, etc) and based on that a field gets displayed where users will select number of immunizations. Every immunization type has its own doses. When a user adds that section again has different immunization type the display control form.get('BCG Number of Immunization').setHidden(false) will hide all fields on every section or finds the first field with that concept name and shows it.
Can i have a display control specific to a section?
I guess I have understood the problem that you’re facing with the AddMore section along with ControlEvents.
When you’re working with AddMore, use form.getFromParent instead of form.get.
Please see the sample code snippet for your use case.
function(form) {
if (form.getFromParent('immunization').getValue() === 'BCG') {
form.getFromParent('BCG Number of Immunization').setHidden(false);
} else {
form.getFromParent('BCG Number of Immunization').hideAndClear();
}
}