Skip to content

Commit

Permalink
Merge pull request #998 from CynthiaKamau/vmmc-c
Browse files Browse the repository at this point in the history
added asterisk and fixed assistant clinician validation
  • Loading branch information
PatrickWaweru authored Mar 18, 2022
2 parents dc98ec5 + 8eab14b commit fcef95f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@
getField('theatre_number.error').html('Please specify the theatre number').hide();
}

console.log("assistantClinician", assistantClinician);

// if assistant clinician, assistant clinician cadre is mandatory
if(assistantClinician != "" && assistantClinicianCadre == ""){
getField('assistant_clinician_cadre.error').html('Please specify the assistant clinician cadre').show();
Expand Down Expand Up @@ -443,7 +445,7 @@
<legend>Circumcision Procedure</legend>
<table width="80%" margin="0" class="simple-table">
<tr>
<td> Anaesthesia used: Type:
<td> Anaesthesia used: Type: <span style="color:red;"><strong>*</strong></span>
<obs conceptId="164254AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
answerConceptIds="161914AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,162797AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
answerLabels="Local Anaesthesia,Topical Anaesthesia" id="anaesthesia" style="radio" />
Expand Down Expand Up @@ -607,8 +609,8 @@
<table align="center" width="100%" class="tb1">
<table style="width: 70%;" border="0">
<tr>
<th align="left">Name of Clinician</th>
<th align="left">Cadre</th>
<th align="left">Name of Clinician <span style="color:red;"><strong>*</strong></span></th>
<th align="left">Cadre <span style="color:red;"><strong>*</strong></span></th>
</tr>
<repeat>
<template>
Expand All @@ -620,7 +622,7 @@
<td>
<obs conceptId="163556AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
answerConceptIds="162591AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,162592AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,1577AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
answerLabels="MO,CO,Nurse" id="clinician_cadre" required="true" style="radio" />
answerLabels="MO,CO,Nurse" id="clinician_cadre" style="radio" />
</td>
</tr>
</obsgroup>
Expand All @@ -638,7 +640,7 @@
<obsgroup groupingConceptId="164524AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA">
<tr>
<td>
<obs conceptId="1473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" id="clinician" />
<obs conceptId="1473AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" id="assistant_clinician" />
</td>
<td>
<obs conceptId="5619AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
Expand All @@ -653,7 +655,7 @@
</table>
<table align="center" width="100%" class="tb1">
<tr>
<td>Theatre Register Number:
<td>Theatre Register Number: <span style="color:red;"><strong>*</strong></span>
<obs conceptId="1646AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" id="theatre_number" />
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@
var postProcedureVal = getValue('post-procedure-instructions.value');
var dischargedByVal = getValue('discharged-by.value');
var clinicianCadreVal = getValue('clinician_cadre.value');
var removalDate = getValue('removal-date.value');
var scheduledApp = getValue('next-visit-date.value');

if( removalDate > scheduledApp) {
getField('next-visit-date.error').html('The next appointment date should not be less than the removal date').show();
return false;
} else {
getField('next-visit-date.error').html('The next appointment date should not be less than the removal date').hide();
}

if(systolicVal == "" ) {
getField('systolic.error').html('Please specify the blood pressure').show();
Expand Down

0 comments on commit fcef95f

Please sign in to comment.