We are using Bahmni 0.92 version. We can not register a patient above age 115. We are facing problem for age limit in registration page. There is age limit 115. We want to increase the age limit. Can anyone help me out?
On demo, we have the max set as 120. Are you sure you did not do any customization?
Previously , An error had been occurred if we give the patient age above 115. The following error is shown:
In that time we manage that by the following config under openmrs\apps\registration.fieldValidation.js
"birthdate":{
method: function(name, value, attributeDetails) {
return (new Date().getFullYear()-value.getFullYear()) <= 115;
},
errorMessage: "Patient age should be less than or equal 115 years."
}
We want to set max such as 150. Is it possible??
Is there anyone who are using 0.92 version and can able to give patient age above 119 ? Actually if we are trying to give patient age above 115 then following error is given .
Patient#198002' failed to validate with reason: birthdate: Nonsensical date, please check. ['Patient#198002' failed to validate with reason: birthdate: Nonsensical date, please check.]
I am curious to know the context of the requirement. Did you get any patients over the age of 115?
Yes , Recently A patient Came to Hospital and his relatives claimed that patient age is about 121 age years old .
As you know, Bahmni runs on top of OpenMRS backend server. The openmrs-core codebase has a hardcoded max age limit of 120 years. See this line (method: rejectDateIfBefore120YearsAgo()
):
Due to this, I don’t think you will be able to enter date beyond this, since the backend will reject it, even if the UI accepts it. This will need a code change in openmrs-core.
Sidenote: It seems as per Guinness Records, the oldest living person right now is 112 years old. And oldest ever recorded is 122 years. So ideally openmrs should set it to 125 (instead of 120 as it is now).
Is there any reason not to move the target a bit higher? There are people in recent memory who claim to be as old as 130-something. They don’t make world records because they usually don’t have birth certificates or census records to support that. Maybe setting 140 as the cut-off?
@gsluthra Actually, the oldest living person is 117. Emilio Marquez is merely the oldest living man.
Ian Bacher’s suggestion of 140 above seems reasonable, I’m quite okay with that. @atuar123 will this be enough or do you also have claims of >140 years old?
(Ticket: [TRUNK-6012] - OpenMRS Issues)
The oldest verified age of a human is 122 and 164 days. Anyone 118 years old or older has broken into the top ten of all people for all time. Granted, some humans may be living longer these days, but an age typed into a registration screen of “120” is about a billion times more likely to be a mistyped “12” or “20” or “10” than a valid 120, so it might be worth verifying such a value (perhaps one extra click… or perhaps verifying the year of birth… if you happen to be registering one of the oldest people known to mankind).
Anyone over 117 should be added to this wiki page as well.
I agree on Burke’s point. It is likely that if a 3 digit age entry, like (112, or 122, etc) can occur due to a typo – where the keyrate is either fast, or someone pressed the key twice by mistake. I guess, the UI can give a warning in scenarios where dob is 3 digit, saying, >100 years, please confirm?
As far as OpenMRS backend is concerned, I feel 140 is more than reasonable as a validation. Also, “nonsensical date” is a rude error message. I would prefer: “Age is beyond system supported max of 140 years”.
Also: maybe one can override this max age if there is a openmrs property set: “max.age.allowed” – that way people can change this to a different max age if they didn’t agree or wanted a different one. For instance, a system deployed only for children (specific program), might want a backend validation to say don’t allow anyone over 18 to be entered into this system.
Anyone over 117 should be added to this wiki page as well.
I think there are cases where people don’t have any documentary evidence to prove, but still want their age to be recorded as say 120. In those cases, they can’t really be officially recognised by such orgs/wiki pages, but OpenMRS/Bahmni should still allow saving the data in the facility. It could also be a data entry operator who is entering the data, and age will be fixed later by someone during the next time the patient comes to visit the facility (registration counter).