We would like to not display all the default sections in the visit page, but it looks like this defaultSections parameter has to be always be present and set to true? Otherwise the page crashes with this error:
angular.min.9324788c.js:2 TypeError: Cannot read property 'sections' of undefined at https://192.168.33.21/bahmni/clinical/clinical.min.128620e4.js:15:30627 at https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:2:25727 at r.$eval (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:3:1034) at r.$digest (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:2:31638) at r.$apply (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:3:1325) at g (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:2:9738) at R (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:2:11873) at XMLHttpRequest.v.onload (https://192.168.33.21/bahmni/components/angular/angular.min.9324788c.js:2:12418) undefined
You can’t override the default visit dashboard but you can add a set of sections to the default page as documented in the wiki.
If you want to see a set of sections (not all by default), then you can create a new visit dashboard with required sections configured. Is this what you are looking for?
Thank you for your help. Sorry for not being clear with our requirements. We would like to remove Admission Details, Treatments, Radiology and Patient Files sections from the Visit dashboard. How should we do this? How should we go about creating a new visit dashboard that does not automatically load all the default sections? Thanks.
Thanks @sravanthi17. Has making this fully configurable been considered? I can definitely see scenarios where one might want to have more control over this view - either in excluding certain sections (eg. if radiology or inpatient care is not available at a facility, or has not been implemented yet), or in re-ordering the sections (eg. adding new sections to the top or middle, rather than the bottom of the view).
I’m interested to know if there are particular technical or functional reasons not to do this, or if it just would need prioritization.
There is a configuration “displayOrder” to control the order of sections displayed on the page. However, it doesn’t work with predefined sections.
Once the defect on defaultSections is fixed, reordering the sections should work as you suggested.
> There should be at least one tab / dashboard that has “defaultSections”: true
What this means is that in “visit.json” file under “clinical” folder, duplicate the “general” attribute and rename it to something different like: “general1:” and give it an appropriate KEY_NAME as you wish to see on screen. Then in this first section, you can set defaultSections to false and put only the sections you want.
Here is a sample config file and screenshot that I tired on V0.92: