Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDT outcome validation #73

Merged
merged 2 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openmrs/apps/clinical/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@
"Date MDT Held":{
"required":true
},
"MDT Outcome":{
"required":true
},
"defaults": {
"Number of living children": 1,
"Accepted Family Planning methods": [
Expand Down
46 changes: 3 additions & 43 deletions openmrs/apps/clinical/formConditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,47 +323,7 @@ Bahmni.ConceptSet.FormConditions.rules = {

}
},
"ART Regimen - Substitution within 1st Line" : function (formName , formFieldValues, patient){
if(patient.age < 15){
return{
show: ["Child Regimens (First Line)"],
hide:["Substitution Regimen For Adults(First Line)"]
}
}else {
return{
hide: ["Child Regimens (First Line)"],
show: ["Substitution Regimen For Adults(First Line)"]
}
}
},
"ART Regimen(Switch to 2nd Line)" : function (formName , formFieldValues, patient){
if(patient.age < 15){
return{
show: ["Children Second Line Regimens"],
hide:["Substitution Regimen (2nd Line Adults)"]
}
}else {
return{
hide: ["Children Second Line Regimens"],
show:["Substitution Regimen (2nd Line Adults)"]
}
}
},
"AntiRetroviral Treatment" : function (formName , formFieldValues, patient){
if(patient.age < 15){
return{
show: ["Initial ART Regimen For Children"],
hide:["Initial ART Regimen (Adult)"]

}
}else {
return{
hide: ["Initial ART Regimen For Children"],
show:["Initial ART Regimen (Adult)"]

}
}
},

"Is there an immunization not Given?" : function (formName , formFieldValues){
var immunizationgiven = formFieldValues["Is there an immunization not Given?"];
if(immunizationgiven == true){
Expand Down Expand Up @@ -642,11 +602,11 @@ Bahmni.ConceptSet.FormConditions.rules = {
var mdtheld = formFieldValues["MDT Held?"];
if (mdtheld == true) {
return {
show:["Date MDT Held"]
show:["Date MDT Held","MDT Outcome"]
}
} else {
return {
hide:["Date MDT Held"]
hide:["Date MDT Held","MDT Outcome"]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion openmrs/i18n/clinical/locale_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


"OBSERVATIONS_BOARD_LABEL_KEY":"Observations",
"MEDICATIONS_BOARD_LABEL_KEY":"Medications",
"MEDICATIONS_BOARD_LABEL_KEY":"ARV Regimen / Medications",
"ORDERS_BOARD_LABEL_KEY":"Orders",
"BACTERIOLOGY_BOARD_LABEL_KEY":"Bacteriology",
"CONSULTATION_BOARD_LABEL_KEY":"Consultation",
Expand Down