JS error when creating new patient (physicians only)


(Cyril) #1

I’m trying to debug this error which comes up only when I login as a physician and try to save a patient. I noticed its a JS error when comes up as its trying to refer to some demographics which are disabled.

I have some fields in demographics which I disabled, these two are county and state, when I login as admin no issues but when I login as a physician, the JS error throws saying these,

Uncaught TypeError: Cannot read property 'style' of null
    at new.php:2819

and when I click on the error it goes to (bolded line),

document.getElementById("addtolistid_state").style.display = "none";

this is all happening on the latest version and on the add/search patient page. Any issue on whats causing this? I have a feeling its the cache, but cleared everything.


(Stephen Waite) #2

hi @cyril, can’t reproduce on the demo farm so it probably is something local like the cache