parent
a7387b45ec
commit
ba6cb8ae4b
@ -40,7 +40,7 @@ frappe.ui.form.on('Patient', {
|
||||
},
|
||||
onload: function (frm) {
|
||||
if(!frm.doc.dob){
|
||||
$(frm.fields_dict['age_html'].wrapper).html("Age not specified");
|
||||
$(frm.fields_dict['age_html'].wrapper).html("");
|
||||
}
|
||||
if(frm.doc.dob){
|
||||
$(frm.fields_dict['age_html'].wrapper).html("AGE : " + get_age(frm.doc.dob));
|
||||
@ -49,7 +49,7 @@ frappe.ui.form.on('Patient', {
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Patient", "dob", function(frm) {
|
||||
if(frm.doc.dob){
|
||||
if(frm.doc.dob) {
|
||||
var today = new Date();
|
||||
var birthDate = new Date(frm.doc.dob);
|
||||
if(today < birthDate){
|
||||
@ -61,6 +61,9 @@ frappe.ui.form.on("Patient", "dob", function(frm) {
|
||||
$(frm.fields_dict['age_html'].wrapper).html("AGE : " + age_str);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$(frm.fields_dict['age_html'].wrapper).html("");
|
||||
}
|
||||
});
|
||||
|
||||
var create_medical_record = function (frm) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
frappe.views.calendar["Patient Appointment"] = {
|
||||
field_map: {
|
||||
"start": "appointment_date",
|
||||
"end": "appointment_datetime",
|
||||
"start": "start",
|
||||
"end": "end",
|
||||
"id": "name",
|
||||
"title": "patient",
|
||||
"allDay": "allDay",
|
||||
@ -43,4 +43,4 @@ frappe.views.calendar["Patient Appointment"] = {
|
||||
'label': __('Status')
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user