NINS_CODE/bahmni_config/openmrs/apps/clinical/formConditions.js

2810 lines
142 KiB
JavaScript
Raw Normal View History

2024-12-12 22:37:39 +06:00
var validateDateRange = function (date, conditions) {
var startLimit = new Date(1800, 0, 1);
var endLimit = new Date(2100, 11, 31);
var d = Date.parse(date);
if (d < startLimit || d > endLimit) {
conditions.error = "Enter a valid date";
}
return conditions;
}
Bahmni.ConceptSet.FormConditions.rules = {
'Procedure End Date': function (formName, formFieldValues) {
var conditions = {};
var start = formFieldValues['Procedure Start Date'];
var end = formFieldValues['Procedure End Date'];
if (end && start) {
if (start > end) {
conditions.error = "Start date should be before end date";
return conditions;
}
}
if (end) {
if (!start)
conditions.error = "Please enter start date.";
return conditions;
}
validateDateRange(end, conditions);
return conditions;
},
'Procedure Start Date': function (formName, formFieldValues) {
var conditions = {};
var start = formFieldValues['Procedure Start Date'];
var end = formFieldValues['Procedure End Date'];
if (end && start) {
if (start > end) {
conditions.error = "Start date should be before end date";
return conditions;
}
}
if (!start) {
if (end) {
conditions.error = "Start date should be before end date";
return conditions;
}
}
validateDateRange(start, conditions);
return conditions;
},
'Follow up date': function (formName, formFieldValues) {
var conditions = {};
var followUpDate = formFieldValues['Follow up date'];
conditions = validateDateRange(followUpDate, conditions);
var today = new Date();
var d = Date.parse(followUpDate);
if (d <= today) {
conditions.error = "Followup date must be a future date";
}
return conditions;
},
};
function strokeGeneral(form) {
if (form.get('Stroke Intervention, Episode').getValue() === 'Stroke Intervention Episode, Single') {
form.get('Stroke Intervention, Date of onset single').setHidden(false);
} else {
form.get('Stroke Intervention, Date of onset single').setHidden(true);
}
if (form.get('Stroke Intervention, Episode').getValue() === 'Stroke Intervention Episode, Recurrent') {
form.get('Stroke Intervention, Date of onset recurrent').setHidden(false);
} else {
form.get('Stroke Intervention, Date of onset recurrent').setHidden(true);
}
if (form.get('Stroke Intervention, Pulse Type').getValue() === 'Stroke Intervention Pulse Type, Absent') {
form.get('Stroke Intervention, Absent Pulse').setHidden(false);
} else {
form.get('Stroke Intervention, Absent Pulse').setHidden(true);
}
if (form.get('Stroke Intervention, Arterial Bruit').getValue() === 'Stroke Intervention Arterial Bruit, Present') {
form.get('Stroke Intervention Arterial Bruit ,Carotid').setHidden(false);
form.get('Stroke Intervention Arterial Bruit ,Femoral').setHidden(false);
} else {
form.get('Stroke Intervention Arterial Bruit ,Carotid').setHidden(true);
form.get('Stroke Intervention Arterial Bruit ,Femoral').setHidden(true);
}
//bmi start
var height = form.get('Stroke Intervention, Height').getValue();
var weight = form.get('Stroke Intervention, Weight').getValue();
if (height && weight) {
form.get('Stroke Intervention, BMI').setHidden(false);
var bmi = +((weight / ((height * 0.0254) * (height * 0.0254))).toFixed(2));
form.get('Stroke Intervention, BMI').setValue(bmi);
} else {
form.get('Stroke Intervention, BMI').setHidden(true);
form.get('Stroke Intervention, BMI').setValue(undefined);
}
//bmi end
if (form.get('Stroke Intervention NeuroExam, Speech').getValue() === 'Stroke Intervention NeuroExam Speech, Aphasia') {
form.get('Stroke Intervention NeuroExam, Aphasia Type').setHidden(false);
} else {
form.get('Stroke Intervention NeuroExam, Aphasia Type').setHidden(true);
}
if (form.get('Stroke Intervention NeuroExam, Speech').getValue() === 'Stroke Intervention NeuroExam Speech, Dysarthria') {
form.get('Stroke Intervention NeuroExam, Dysarthria Type').setHidden(false);
} else {
form.get('Stroke Intervention NeuroExam, Dysarthria Type').setHidden(true);
}
if (form.get('Stroke Intervention Cranial Nerves, Palsy').getValue() === 'Yes') {
form.get('Stroke Intervention Cranial Nerves, Side').setHidden(false);
} else {
form.get('Stroke Intervention Cranial Nerves, Side').setHidden(true);
}
if (form.get('Stroke Intervention Cranial Nerves, Side').getValue()) {
form.get('Stroke Intervention Cranial Nerves, Number').setHidden(false);
} else {
form.get('Stroke Intervention Cranial Nerves, Number').setHidden(true);
}
if (form.get('Stroke Intervention, Fundoscopy').getValue() === 'Stroke Intervention Fundoscopy, Optic atrophy option') {
form.get('Stroke Intervention Fundoscopy, optic atrophy').setHidden(false);
} else {
form.get('Stroke Intervention Fundoscopy, optic atrophy').setHidden(true);
}
if (form.get('Stroke Intervention, Fundoscopy').getValue() === 'Stroke Intervention Fundoscopy, CRAO option') {
form.get('Stroke Intervention Fundoscopy, crao').setHidden(false);
} else {
form.get('Stroke Intervention Fundoscopy, crao').setHidden(true);
}
if (form.get('Stroke Intervention, Fundoscopy').getValue() === 'Stroke Intervention Fundoscopy, CRVO option') {
form.get('Stroke Intervention Fundoscopy, crvo').setHidden(false);
} else {
form.get('Stroke Intervention Fundoscopy, crvo').setHidden(true);
}
if (form.get('Stroke Intervention Sensory Examination, Intact').getValue() === 'No') {
form.get('Stroke Intervention Sensory Examination, Hemisensory impairment').setHidden(false);
} else {
form.get('Stroke Intervention Sensory Examination, Hemisensory impairment').setHidden(true);
}
if (form.get('Stroke Intervention, CerebellarSign').getValue() === 'Yes') {
form.get('Stroke Intervention Cerebellar, Side').setHidden(false);
} else {
form.get('Stroke Intervention Cerebellar, Side').setHidden(true);
}
//NIHSS score starts
var nihssTotalscore = 0;
var nihssConciousness = [];
nihssConciousness['Stroke Intervention NIHSS Score Level of Consciousness, 0'] = 0;
nihssConciousness['Stroke Intervention NIHSS Score Level of Consciousness, 1'] = 1;
nihssConciousness['Stroke Intervention NIHSS Score Level of Consciousness, 2'] = 2;
nihssConciousness['Stroke Intervention NIHSS Score Level of Consciousness, 3'] = 3;
nihssConciousness['Stroke Intervention NIHSS Score Level of Consciousness, 4'] = 3;
var nihssLocQuestion = [];
nihssLocQuestion['Stroke Intervention NIHSS Score LOC Questions, Answers both'] = 0;
nihssLocQuestion['Stroke Intervention NIHSS Score LOC Questions, Answers one'] = 1;
nihssLocQuestion['Stroke Intervention NIHSS Score LOC Questions, Answers neither'] = 2;
var nihssLocCommands = [];
nihssLocCommands['Stroke Intervention NIHSS Score LOC Commands, Answers 0'] = 0;
nihssLocCommands['Stroke Intervention NIHSS Score LOC Commands, Answers 1'] = 1;
nihssLocCommands['Stroke Intervention NIHSS Score LOC Commands, Answers 2'] = 2;
var nihssBestGaze = [];
nihssBestGaze['Stroke Intervention NIHSS Score Best Gaze, 0'] = 0;
nihssBestGaze['Stroke Intervention NIHSS Score Best Gaze, 1'] = 1;
nihssBestGaze['Stroke Intervention NIHSS Score Best Gaze, 2'] = 2;
var nihssVisual = [];
nihssVisual['Stroke Intervention NIHSS Score Visual, 0 : No visual loss'] = 0;
nihssVisual['Stroke Intervention NIHSS Score Visual, 1: Partial hemianopia'] = 1;
nihssVisual['Stroke Intervention NIHSS Score Visual, 1: Complete quadrantanopia'] = 1;
nihssVisual['Stroke Intervention NIHSS Score Visual, 2 : Complete hemianopia'] = 2;
nihssVisual['Stroke Intervention NIHSS Score Visual, 3 : Bilateral hemianopia'] = 3;
var nihssFacialPalsy = [];
nihssFacialPalsy['Stroke Intervention NIHSS Score Facial Palsy, 0'] = 0;
nihssFacialPalsy['Stroke Intervention NIHSS Score Facial Palsy, 1'] = 1;
nihssFacialPalsy['Stroke Intervention NIHSS Score Facial Palsy, 2'] = 2;
nihssFacialPalsy['Stroke Intervention NIHSS Score Facial Palsy, 3'] = 3;
var nihssMLeftArm = [];
nihssMLeftArm['Stroke Intervention NIHSS Score Motor Left Arm, 0'] = 0;
nihssMLeftArm['Stroke Intervention NIHSS Score Motor Left Arm, 1'] = 1;
nihssMLeftArm['Stroke Intervention NIHSS Score Motor Left Arm, 2'] = 2;
nihssMLeftArm['Stroke Intervention NIHSS Score Motor Left Arm, 3'] = 3;
var nihssMRightArm = [];
nihssMRightArm['Stroke Intervention NIHSS Score Motor RightArm, 0'] = 0;
nihssMRightArm['Stroke Intervention NIHSS Score Motor RightArm, 1'] = 1;
nihssMRightArm['Stroke Intervention NIHSS Score Motor RightArm, 2'] = 2;
nihssMRightArm['Stroke Intervention NIHSS Score Motor RightArm, 3'] = 3;
var nihssMLeftLeg = [];
nihssMLeftLeg['Stroke Intervention NIHSS Score Motor Left Leg, 0'] = 0;
nihssMLeftLeg['Stroke Intervention NIHSS Score Motor Left Leg, 1'] = 1;
nihssMLeftLeg['Stroke Intervention NIHSS Score Motor Left Leg, 2'] = 2;
var nihssMRightLeg = [];
nihssMRightLeg['Stroke Intervention NIHSS Score Motor Right Leg, 0'] = 0;
nihssMRightLeg['Stroke Intervention NIHSS Score Motor Right Leg, 1'] = 1;
nihssMRightLeg['Stroke Intervention NIHSS Score Motor Right Leg, 2'] = 2;
var nihssLmbAtaxia = [];
nihssLmbAtaxia['Stroke Intervention NIHSS Score Limb Ataxia, Absent'] = 0;
nihssLmbAtaxia['Stroke Intervention NIHSS Score Limb Ataxia, one limb'] = 1;
nihssLmbAtaxia['Stroke Intervention NIHSS Score Limb Ataxia, two limbs'] = 2;
nihssLmbAtaxia['Stroke Intervention NIHSS Score Limb Ataxia, Amputation'] = 0;
var nihssSensory = [];
nihssSensory['Stroke Intervention NIHSS Score Sensory, 0'] = 0;
nihssSensory['Stroke Intervention NIHSS Score Sensory, 1'] = 1;
nihssSensory['Stroke Intervention NIHSS Score Sensory, 2'] = 2;
var nihssBestLang = [];
nihssBestLang['Stroke Intervention NIHSS Score Best Language, 0'] = 0;
nihssBestLang['Stroke Intervention NIHSS Score Best Language, 1'] = 1;
nihssBestLang['Stroke Intervention NIHSS Score Best Language, 2'] = 2;
nihssBestLang['Stroke Intervention NIHSS Score Best Language, 3'] = 3;
var nihssDysarthria = [];
nihssDysarthria['Stroke Intervention NIHSS Score Dysarthria, 0'] = 0;
nihssDysarthria['Stroke Intervention NIHSS Score Dysarthria, 1'] = 1;
nihssDysarthria['Stroke Intervention NIHSS Score Dysarthria, 2'] = 2;
nihssDysarthria['Stroke Intervention NIHSS Score Dysarthria, UN'] = 0;
var nihssExtinction = [];
nihssExtinction['Stroke Intervention NIHSS Score Extinction & Inattention, No abnormality'] = 0;
nihssExtinction['Stroke Intervention NIHSS Score Extinction & Inattention, Visual'] = 1;
nihssExtinction['Stroke Intervention NIHSS Score Extinction & Inattention, Profound'] = 2;
nihssExtinction['Stroke Intervention NIHSS Score Extinction & Inattention, Extinction'] = 2;
if (form.get('Stroke Intervention NIHSS Score, Level of Consciousness').getValue()) {
nihssTotalscore += nihssConciousness[form.get('Stroke Intervention NIHSS Score, Level of Consciousness').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, LOC Questions').getValue()) {
nihssTotalscore += nihssLocQuestion[form.get('Stroke Intervention NIHSS Score, LOC Questions').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, LOC Commands').getValue()) {
nihssTotalscore += nihssLocCommands[form.get('Stroke Intervention NIHSS Score, LOC Commands').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Best Gaze').getValue()) {
nihssTotalscore += nihssBestGaze[form.get('Stroke Intervention NIHSS Score, Best Gaze').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Visual').getValue()) {
nihssTotalscore += nihssVisual[form.get('Stroke Intervention NIHSS Score, Visual').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Facial Palsy').getValue()) {
nihssTotalscore += nihssFacialPalsy[form.get('Stroke Intervention NIHSS Score, Facial Palsy').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Motor Left Arm').getValue()) {
nihssTotalscore += nihssMLeftArm[form.get('Stroke Intervention NIHSS Score, Motor Left Arm').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Motor Right Arm').getValue()) {
nihssTotalscore += nihssMRightArm[form.get('Stroke Intervention NIHSS Score, Motor Right Arm').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Motor Left Leg').getValue()) {
nihssTotalscore += nihssMLeftLeg[form.get('Stroke Intervention NIHSS Score, Motor Left Leg').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Motor Right Leg').getValue()) {
nihssTotalscore += nihssMRightLeg[form.get('Stroke Intervention NIHSS Score, Motor Right Leg').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Limb Ataxia').getValue()) {
nihssTotalscore += nihssLmbAtaxia[form.get('Stroke Intervention NIHSS Score, Limb Ataxia').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Sensory').getValue()) {
nihssTotalscore += nihssSensory[form.get('Stroke Intervention NIHSS Score, Sensory').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Best Language').getValue()) {
nihssTotalscore += nihssBestLang[form.get('Stroke Intervention NIHSS Score, Best Language').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Dysarthria').getValue()) {
nihssTotalscore += nihssDysarthria[form.get('Stroke Intervention NIHSS Score, Dysarthria').getValue()];
}
if (form.get('Stroke Intervention NIHSS Score, Extinction & Inattention').getValue()) {
nihssTotalscore += nihssExtinction[form.get('Stroke Intervention NIHSS Score, Extinction & Inattention').getValue()];
}
form.get('Stroke Intervention NIHSS Score, Total Score').setValue(nihssTotalscore);
//NIHSS score ends
};
function strokeInvestigation(form) {
if (form.get('Stroke Intervention Investigations, Chest X Ray').getValue() === 'Stroke Intervention Chest X Ray, Abnormal') {
form.get('Stroke Intervention Investigations, Abnormal Chest X Ray').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal Chest X Ray').setHidden(true);
}
if (form.get('Stroke Intervention Investigations, ECG').getValue() === 'Stroke Intervention ECG, Abnormal') {
form.get('Stroke Intervention Investigations, Abnormal ECG').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal ECG').setHidden(true);
}
if (form.get('Stroke Intervention Investigations, Abnormal ECG').getValue() === 'Stroke Intervention Abnormal ECG, AF') {
form.get('Stroke Intervention Investigations, Abnormal ECG AF').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal ECG AF').setHidden(true);
}
if (form.get('Stroke Intervention Investigations, Abnormal ECG').getValue() === 'Stroke Intervention Abnormal ECG, MI') {
form.get('Stroke Intervention Investigations, Abnormal ECG MI').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal ECG MI').setHidden(true);
}
if (form.get('Stroke Intervention Investigations, Echocardiography').getValue() === 'Stroke Intervention Echocardiography, Abnormal') {
form.get('Stroke Intervention Investigations, Abnormal Echocardiography').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal Echocardiography').setHidden(true);
}
var abnormalEchocardiography = form.get('Stroke Intervention Investigations, Abnormal Echocardiography').currentRecord.value.value;
var lengthEchocardiography = abnormalEchocardiography == undefined ? 0 : abnormalEchocardiography.length;
var isCRHDHide = true;
for (var i = 0; i < lengthEchocardiography; i++) {
var abnormalEchocardiographyName = abnormalEchocardiography[i].displayString == undefined ? abnormalEchocardiography[i].name : abnormalEchocardiography[i].displayString;
if (abnormalEchocardiographyName === "Stroke Intervention Abnormal Echocardiography, CRHD") {
isCRHDHide = false;
break;
} else {
isCRHDHide = true;
}
}
if (isCRHDHide) {
form.get("Stroke Intervention Investigations AEC, CRHD").setHidden(true);
} else {
form.get("Stroke Intervention Investigations AEC, CRHD").setHidden(false);
}
if (form.get('Stroke Intervention Investigations, USG of W/A').getValue() === 'Stroke Intervention USG of W/A, Abnormal') {
form.get('Stroke Intervention Investigations, Abnormal USG of W/A').setHidden(false);
} else {
form.get('Stroke Intervention Investigations, Abnormal USG of W/A').setHidden(true);
}
};
function strokeImaging(form) {
if (form.get('Stroke Intervention MRI of Brain, Result').getValue() === 'Stroke Intervention MRI of Brain Result, Infarct') {
form.get('Stroke Intervention MRI of Brain, Infarct').setHidden(false);
} else {
form.get('Stroke Intervention MRI of Brain, Infarct').setHidden(true);
}
if (form.get('Stroke Intervention MRI of Brain, Result').getValue() === 'Stroke Intervention MRI of Brain Result, Hemorrhage') {
form.get('Stroke Intervention MRI of Brain, Hemorrhage').setHidden(false);
} else {
form.get('Stroke Intervention MRI of Brain, Hemorrhage').setHidden(true);
}
if (form.get('Stroke Intervention MRI of Brain, Result').getValue() === 'Stroke Intervention MRI of Brain Result, SAH') {
form.get('Stroke Intervention MRI of Brain, SAH').setHidden(false);
} else {
form.get('Stroke Intervention MRI of Brain, SAH').setHidden(true);
}
//lob
var locationOfBlood = form.get('Stroke Intervention MRI of Brain SAH, Location of Blood').currentRecord.value.value;
var locationOfBloodLength = locationOfBlood == undefined ? 0 : locationOfBlood.length;
var locationOfBloodSiteList = [];
for (var i = 0; i < locationOfBloodLength; i++) {
var locationOfBloodName = locationOfBlood[i].displayString == undefined ? locationOfBlood[i].name : locationOfBlood[i].displayString;
locationOfBloodSiteList.push(locationOfBloodName);
}
form.get('Stroke Intervention MRI of Brain SAH LOB, SF').setHidden(true);
form.get('Stroke Intervention MRI of Brain SAH LOB, IF').setHidden(true);
form.get('Stroke Intervention MRI of Brain SAH LOB, PF').setHidden(true);
form.get('Stroke Intervention MRI of Brain SAH LOB, VF').setHidden(true);
for (var i = 0; i < locationOfBloodSiteList.length; i++) {
if (locationOfBloodSiteList[i] == 'Stroke Intervention MRI of Brain SAH LOB, Sylvian Fissure') {
form.get('Stroke Intervention MRI of Brain SAH LOB, SF').setHidden(false);
}
if (locationOfBloodSiteList[i] == 'Stroke Intervention MRI of Brain SAH LOB, Interhemispheric Fissure') {
form.get('Stroke Intervention MRI of Brain SAH LOB, IF').setHidden(false);
}
if (locationOfBloodSiteList[i] == 'Stroke Intervention MRI of Brain SAH LOB, Perimesencephalic Cystern') {
form.get('Stroke Intervention MRI of Brain SAH LOB, PF').setHidden(false);
}
if (locationOfBloodSiteList[i] == 'Stroke Intervention MRI of Brain SAH LOB, Ventricular') {
form.get('Stroke Intervention MRI of Brain SAH LOB, VF').setHidden(false);
}
}
//ich score starts
var ichTotalScore = 0;
var ichGcsScore = [];
ichGcsScore['Stroke Intervention MRI of Brain Hemorrhage ICH GCS Score, 2 Points'] = 2;
ichGcsScore['Stroke Intervention MRI of Brain Hemorrhage ICH GCS Score, 1 Points'] = 1;
ichGcsScore['Stroke Intervention MRI of Brain Hemorrhage ICH GCS Score, 0 Points'] = 0;
var ichVolume = [];
ichVolume['Stroke Intervention MRI of Brain Hemorrhage ICH Volume, 1 points'] = 1;
ichVolume['Stroke Intervention MRI of Brain Hemorrhage ICH Volume, 0 points'] = 0;
var ivhScore = 0;
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, IVH').getValue() === 'Yes') {
ivhScore = 1;
} else {
ivhScore = 0;
}
var originOfIchScore = 0;
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, Infratentorial origin of ICH').getValue() === 'Yes') {
originOfIchScore = 1;
} else {
originOfIchScore = 0;
}
var ichAgeScore = [];
ichAgeScore['Stroke Intervention MRI of Brain Hemorrhage ICH Age, Older'] = 1;
ichAgeScore['Stroke Intervention MRI of Brain Hemorrhage ICH Age, Younger'] = 0;
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, GCS Score').getValue()) {
ichTotalScore += ichGcsScore[form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, GCS Score').getValue()];
}
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, ICH Volume').getValue()) {
ichTotalScore += ichVolume[form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, ICH Volume').getValue()];
}
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, IVH').getValue()) {
ichTotalScore += ivhScore;
}
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, Infratentorial origin of ICH').getValue()) {
ichTotalScore += originOfIchScore;
}
if (form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, Age').getValue()) {
ichTotalScore += ichAgeScore[form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, Age').getValue()];
}
form.get('Stroke Intervention MRI of Brain Hemorrhage ICH, Total score').setValue(ichTotalScore);
//ICH score ends
if (form.get('Stroke Intervention DSNV, Duplex Study of neck Vessels').getValue() === 'Stroke Intervention DSNV, Abnormal') {
form.get('Stroke Intervention, DSNV').setHidden(false);
} else {
form.get('Stroke Intervention, DSNV').setHidden(true);
}
if (form.get('Stroke Intervention CTA/MRA of Cerebral Vessels, CTA/MRA/DSA').getValue() === 'Stroke Intervention CTA/MRA of Cerebral Vessels Result, Abnormal') {
form.get('Stroke Intervention, CTA/ MRA/DSA Finding').setHidden(false);
} else {
form.get('Stroke Intervention, CTA/ MRA/DSA Finding').setHidden(true);
}
var ctaAneurysm = form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, Site').currentRecord.value.value;
var ctaAneurysmLength = ctaAneurysm == undefined ? 0 : ctaAneurysm.length;
var ctaAneurysmSiteList = [];
for (var i = 0; i < ctaAneurysmLength; i++) {
var ctaAneurysmName = ctaAneurysm[i].displayString == undefined ? ctaAneurysm[i].name : ctaAneurysm[i].displayString;
ctaAneurysmSiteList.push(ctaAneurysmName);
}
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, A COM A Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, Vertebrobasilar Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, ICA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, DACA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, MCA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, P Com A Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, PCA Side').setHidden(true);
for (var i = 0; i < ctaAneurysmSiteList.length; i++) {
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, A Com A') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, A COM A Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, Vertebrobasilar') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, Vertebrobasilar Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, ICA') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, ICA Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, DACA') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, DACA Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, MCA') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, MCA Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, P Com A') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, P Com A Side').setHidden(false);
}
if (ctaAneurysmSiteList[i] == 'Stroke Intervention CTA/ MRA/DSA Finding Aneurysm Site, PCA') {
form.get('Stroke Intervention CTA/ MRA/DSA Finding Aneurysm, PCA Side').setHidden(false);
}
}
//perforator
var arteryPresprator = form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery, Perforator').currentRecord.value.value;
var arteryPrespratorLength = arteryPresprator == undefined ? 0 : arteryPresprator.length;
var arteryPrespratorList = [];
for (var i = 0; i < arteryPrespratorLength; i++) {
var arteryPrespratorName = arteryPresprator[i].displayString == undefined ? arteryPresprator[i].name : arteryPresprator[i].displayString;
arteryPrespratorList.push(arteryPrespratorName);
}
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, aca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, mca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, pca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP, ECA Side').setHidden(true);
for (var i = 0; i < arteryPrespratorList.length; i++) {
if (arteryPrespratorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, ACA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, aca').setHidden(false);
}
if (arteryPrespratorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, MCA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, mca').setHidden(false);
}
if (arteryPrespratorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, PCA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, pca').setHidden(false);
}
if (arteryPrespratorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, ECA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP, ECA Side').setHidden(false);
}
}
//aca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, aca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator ACA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP ACA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP ACA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, aca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator ACA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP ACA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP ACA, Perforator Side').setHidden(true);
}
//mca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, mca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator MCA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP MCA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP MCA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, mca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator MCA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP MCA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP MCA, Perforator Side').setHidden(true);
}
//pca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, pca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator PCA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP PCA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP PCA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator, pca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVM Feeding Artery Perforator PCA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP PCA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVM FAP PCA, Perforator Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Brain, Dural') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain Dural Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain Dural Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Brain, Pial') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain Pial Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain Pial Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Brain, CCF') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain CCF Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Brain CCF Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Spinal, Dural') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal Dural Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal Dural Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Spinal, Pial') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal Pial Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF, Spinal Pial Side').setHidden(true);
}
//perforator AVF
var arteryPerforator = form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery, Perforator').currentRecord.value.value;
var arteryPerforatorLength = arteryPerforator == undefined ? 0 : arteryPerforator.length;
var arteryPerforatorList = [];
for (var i = 0; i < arteryPerforatorLength; i++) {
var arteryPerforatorName = arteryPerforator[i].displayString == undefined ? arteryPerforator[i].name : arteryPerforator[i].displayString;
arteryPerforatorList.push(arteryPerforatorName);
}
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, aca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, mca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, pca').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP, ECA Side').setHidden(true);
for (var i = 0; i < arteryPerforatorList.length; i++) {
if (arteryPerforatorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, ACA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, aca').setHidden(false);
}
if (arteryPerforatorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, MCA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, mca').setHidden(false);
}
if (arteryPerforatorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, PCA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, pca').setHidden(false);
}
if (arteryPerforatorList[i] == 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, ECA option') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP, ECA Side').setHidden(false);
}
}
//aca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, aca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator ACA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP ACA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP ACA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, aca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator ACA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP ACA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP ACA, Perforator Side').setHidden(true);
}
//mca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, mca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator MCA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP MCA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP MCA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, mca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator MCA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP MCA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP MCA, Perforator Side').setHidden(true);
}
//pca
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, pca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator PCA, Cortical') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP PCA, Cortical Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP PCA, Cortical Side').setHidden(true);
}
if (form.get('Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator, pca').getValue() === 'Stroke Intervention CTA/ MRA/DSA AVF Feeding Artery Perforator PCA, Perforator') {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP PCA, Perforator Side').setHidden(false);
} else {
form.get('Stroke Intervention CTA/ MRA/DSA AVF FAP PCA, Perforator Side').setHidden(true);
}
//stenosis
var arteryStenosis = form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, Artery').currentRecord.value.value;
var arteryStenosisLength = arteryStenosis == undefined ? 0 : arteryStenosis.length;
var arteryStenosisList = [];
for (var i = 0; i < arteryStenosisLength; i++) {
var arteryStenosisName = arteryStenosis[i].displayString == undefined ? arteryStenosis[i].name : arteryStenosis[i].displayString;
arteryStenosisList.push(arteryStenosisName);
}
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, ICA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, MCA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, ACA Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, Subclavian Side').setHidden(true);
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, V-B Side').setHidden(true);
for (var i = 0; i < arteryStenosisList.length; i++) {
if (arteryStenosisList[i] == 'Stroke Intervention CTA/ MRA/DSA Stenosis Artery, ICA') {
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, ICA Side').setHidden(false);
}
if (arteryStenosisList[i] == 'Stroke Intervention CTA/ MRA/DSA Stenosis Artery, MCA') {
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, MCA Side').setHidden(false);
}
if (arteryStenosisList[i] == 'Stroke Intervention CTA/ MRA/DSA Stenosis Artery, ACA') {
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, ACA Side').setHidden(false);
}
if (arteryStenosisList[i] == 'Stroke Intervention CTA/ MRA/DSA Stenosis Artery, Subclavian') {
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, Subclavian Side').setHidden(false);
}
if (arteryStenosisList[i] == 'Stroke Intervention CTA/ MRA/DSA Stenosis Artery, V-B') {
form.get('Stroke Intervention CTA/ MRA/DSA Stenosis, V-B Side').setHidden(false);
}
}
if (form.get('Stroke Intervention MRV Brain, Venous Thrombosis').getValue() === 'Yes') {
form.get('Stroke Intervention MRV Brain Venous Thrombosis, VT').setHidden(false);
} else {
form.get('Stroke Intervention MRV Brain Venous Thrombosis, VT').setHidden(true);
}
var mvt = form.get('Stroke Intervention MRV Brain Venous Thrombosis, VT').currentRecord.value.value;
var lengthVT = mvt == undefined ? 0 : mvt.length;
var isVTHide = true;
for (var i = 0; i < lengthVT; i++) {
var vtName = mvt[i].displayString == undefined ? mvt[i].name : mvt[i].displayString;
if (vtName === "Stroke Intervention MRV Brain Venous Thrombosis, TS") {
isVTHide = false;
break;
} else {
isVTHide = true;
}
}
if (isVTHide) {
form.get("Stroke Intervention MRV Brain VT, TS Side").setHidden(true);
} else {
form.get("Stroke Intervention MRV Brain VT, TS Side").setHidden(false);
}
};
function diseaseTemplate(form) {
if (form.get('Disease Type').getValue() === 'Disease Common') {
form.get('Advice of New').setHidden(false);
form.get('Common CS Present Option').setHidden(true);
form.get('Chief Complaint of Common').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
// form.get('Duration of Common').setHidden(true);
form.get("Advice Duration").setHidden(true);
form.get("Advice of Common").setHidden(true);
form.get("Common NE Aphasia Option").setHidden(true);
form.get("Common NE Dysarthria Option").setHidden(true);
form.get("Common NE Papilledema Option").setHidden(true);
form.get("Common NE F Optic Atrophy Option").setHidden(true);
form.get("Common Motor Bulk Option").setHidden(true);
form.get("Common Motor Tone Option").setHidden(true);
form.get("Common Motor Power Option").setHidden(true);
form.get("Common Motor Reflex or DTR Option").setHidden(true);
form.get("Common Motor Planter Option").setHidden(true);
form.get("Common Motor Co Ordination Option").setHidden(true);
form.get("Common Motor Gait Option").setHidden(true);
form.get('Common Motor Impaired Option').setHidden(true);
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
form.get('Common DC Option').setHidden(true);
form.get('Common DC Impaired Option').setHidden(true);
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
let cFundusOE = form.get('Common NE Fundus').currentRecord.value.value;
let lengthCFundusOE = cFundusOE == undefined ? 0 : cFundusOE.length;
for (let i = 0; i < lengthCFundusOE; i++) {
let vtName = cFundusOE[i].displayString == undefined ? cFundusOE[i].name : cFundusOE[i].displayString;
if (vtName === "Common NE Aphasia") {
form.get("Common NE Aphasia Option").setHidden(false);
} else {
form.get("Common NE Aphasia Option").setHidden(true);
}
if (vtName === "Common NE F Optic Atrophy") {
form.get("Common NE F Optic Atrophy Option").setHidden(false);
} else {
form.get("Common NE F Optic Atrophy Option").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthecComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthecComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
// common advice
let sRComplaint = form.get('Common Advice').currentRecord.value.value;
let lengthSRComplaint = sRComplaint == undefined ? 0 : sRComplaint.length;
for (let i = 0; i < lengthSRComplaint; i++) {
let vtName = sRComplaint[i].displayString == undefined ? sRComplaint[i].name : sRComplaint[i].displayString;
if (vtName === "Common Advice One") {
form.get("Advice Duration").setHidden(false);
} else {
form.get("Advice Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Advice of Common").setHidden(false);
} else {
form.get("Advice of Common").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
} else {
form.get('Chief Complaint of Common').setHidden(true);
form.get('Common On Examination').setHidden(true);
form.get('NINS Co-morbid Conditions').setHidden(true);
// form.get('Duration of Common').setHidden(false);
form.get('Advice of New').setHidden(true);
}
if (form.get('Disease Type').getValue() === 'Disease Epilepsy') {
form.get('Chief Complaint of Epilepsy').setHidden(false);
form.get("Epilepcy Others Chief Complaint Data").setHidden(true);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Epilepsy Duration RCTIL").setHidden(true);
form.get("Epilepsy Duration LC").setHidden(true);
form.get("Epilepsy Duration TB").setHidden(true);
form.get("Epilepsy Duration IMI").setHidden(true);
form.get("Epilepsy Duration salivation").setHidden(true);
form.get("Advice of Epilepsy").setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE Aphasia Option").setHidden(true);
form.get("Common NE Dysarthria Option").setHidden(true);
form.get("Common NE Papilledema Option").setHidden(true);
form.get("Common NE F Optic Atrophy Option").setHidden(true);
form.get("Common Motor Bulk Option").setHidden(true);
form.get("Common Motor Tone Option").setHidden(true);
form.get("Common Motor Power Option").setHidden(true);
form.get("Common Motor Reflex or DTR Option").setHidden(true);
form.get("Common Motor Planter Option").setHidden(true);
form.get("Common Motor Co Ordination Option").setHidden(true);
form.get("Common Motor Gait Option").setHidden(true);
form.get('Common Motor Impaired Option').setHidden(true);
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
form.get('Common DC Option').setHidden(true);
form.get('Common DC Impaired Option').setHidden(true);
let ecComplaint = form.get('Epilepsy Chief Complaint').currentRecord.value.value;
let lengthecComplaint = ecComplaint == undefined ? 0 : ecComplaint.length;
for (let i = 0; i < lengthecComplaint; i++) {
let vtName = ecComplaint[i].displayString == undefined ? ecComplaint[i].name : ecComplaint[i].displayString;
if (vtName === "Recurrence of convulsions that involve limbs") {
form.get("Epilepsy Duration RCTIL").setHidden(false);
} else {
form.get("Epilepsy Duration RCTIL").setHidden(true);
}
if (vtName === "Loss of consciousness") {
form.get("Epilepsy Duration LC").setHidden(false);
} else {
form.get("Epilepsy Duration LC").setHidden(true);
}
if (vtName === "Tongue Bite") {
form.get("Epilepsy Duration TB").setHidden(false);
} else {
form.get("Epilepsy Duration TB").setHidden(true);
}
if (vtName === "Salivation") {
form.get("Epilepsy Duration salivation").setHidden(false);
} else {
form.get("Epilepsy Duration salivation").setHidden(true);
}
if (vtName === "Involuntarily micturition involved") {
form.get("Epilepsy Duration IMI").setHidden(false);
} else {
form.get("Epilepsy Duration IMI").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
// Epilepsy Advice
let eAdvice = form.get('Disease Template Advice').currentRecord.value.value;
let lengtheAdvice = eAdvice == undefined ? 0 : eAdvice.length;
for (let i = 0; i < lengtheAdvice; i++) {
let vtName = eAdvice[i].displayString == undefined ? eAdvice[i].name : eAdvice[i].displayString;
if (vtName === "Advice of Epilepsy") {
form.get("Epilepsy Advice").setHidden(false);
} else {
form.get("Epilepsy Advice").setHidden(true);
}
}
// Epilepsy Note
form.get("Epilepsy Note").setHidden(true);
let adviceNote = form.get('Epilepsy Advice').currentRecord.value.value;
let lengthAdviceNote = adviceNote == undefined ? 0 : adviceNote.length;
for (let i = 0; i < lengthAdviceNote; i++) {
let vtName = adviceNote[i].displayString == undefined ? adviceNote[i].name : adviceNote[i].displayString;
if (vtName === "Disease Others") {
form.get("Epilepsy Note").setHidden(false);
} else {
form.get("Epilepsy Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else {
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of Epilepsy').setHidden(true);
form.get('Advice of Epilepsy').setHidden(true);
}
// Disease Stroke
if (form.get('Disease Type').getValue() === 'Disease Stroke') {
form.get('Chief Complaint of Stroke').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of Stroke').setHidden(false);
form.get("SD Slurring of speech").setHidden(true);
form.get("SD Headache").setHidden(true);
form.get("SD Vertigo").setHidden(true);
form.get("SD Vomiting").setHidden(true);
form.get("SD Unsteadiness").setHidden(true);
form.get("SD Visual Disturbance").setHidden(true);
form.get("SD Recurrent convulsion").setHidden(true);
form.get("SD Right sided weakness").setHidden(true);
form.get("SD Left sided weakness").setHidden(true);
form.get("Stoke Others Chief Complaint Data").setHidden(true);
form.get("Stroke Note").setHidden(true);
form.get("Common NE Papilledema Option").setHidden(true);
form.get("Common NE F Optic Atrophy Option").setHidden(true);
form.get("Common Motor Bulk Option").setHidden(true);
form.get("Common Motor Tone Option").setHidden(true);
form.get("Common Motor Power Option").setHidden(true);
form.get("Common Motor Reflex or DTR Option").setHidden(true);
form.get("Common Motor Planter Option").setHidden(true);
form.get("Common Motor Co Ordination Option").setHidden(true);
form.get("Common Motor Gait Option").setHidden(true);
form.get('Common Motor Impaired Option').setHidden(true);
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
form.get('Common DC Option').setHidden(true);
form.get('Common DC Impaired Option').setHidden(true);
let strokeComplaint = form.get('Stroke Chief Complaint').currentRecord.value.value;
let lengthstrokeComplaint = strokeComplaint == undefined ? 0 : strokeComplaint.length;
for (let i = 0; i < lengthstrokeComplaint; i++) {
let stName = strokeComplaint[i].displayString == undefined ? strokeComplaint[i].name : strokeComplaint[i].displayString;
if (stName === "Stroke Slurring of speech") {
form.get("SD Slurring of speech").setHidden(false);
} else {
form.get("SD Slurring of speech").setHidden(true);
}
if (stName === "Stroke Headache") {
form.get("SD Headache").setHidden(false);
} else {
form.get("SD Headache").setHidden(true);
}
if (stName === "Stroke Vertigo") {
form.get("SD Vertigo").setHidden(false);
} else {
form.get("SD Vertigo").setHidden(true);
}
if (stName === "Stroke Vomiting") {
form.get("SD Vomiting").setHidden(false);
} else {
form.get("SD Vomiting").setHidden(true);
}
if (stName === "Stroke Unsteadiness") {
form.get("SD Unsteadiness").setHidden(false);
} else {
form.get("SD Unsteadiness").setHidden(true);
}
if (stName === "Stroke Visual Disturbance") {
form.get("SD Visual Disturbance").setHidden(false);
} else {
form.get("SD Visual Disturbance").setHidden(true);
}
if (stName === "Stroke Recurrent convulsion") {
form.get("SD Recurrent convulsion").setHidden(false);
} else {
form.get("SD Recurrent convulsion").setHidden(true);
}
if (stName === "Stroke Right sided weakness") {
form.get("SD Right sided weakness").setHidden(false);
} else {
form.get("SD Right sided weakness").setHidden(true);
}
if (stName === "Stroke Left sided weakness") {
form.get("SD Left sided weakness").setHidden(false);
} else {
form.get("SD Left sided weakness").setHidden(true);
}
if (stName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
// Stroke Advice
let eAdvice = form.get('Disease Template Advice').currentRecord.value.value;
let lengtheAdvice = eAdvice == undefined ? 0 : eAdvice.length;
for (let i = 0; i < lengtheAdvice; i++) {
let vtName = eAdvice[i].displayString == undefined ? eAdvice[i].name : eAdvice[i].displayString;
if (vtName === "Advice of Stroke") {
form.get("Stroke Advice").setHidden(false);
} else {
form.get("Stroke Advice").setHidden(true);
}
}
// Stroke Note
form.get("Stroke Note").setHidden(true);
let adviceNote = form.get('Stroke Advice').currentRecord.value.value;
let lengthAdviceNote = adviceNote == undefined ? 0 : adviceNote.length;
for (let i = 0; i < lengthAdviceNote; i++) {
let vtName = adviceNote[i].displayString == undefined ? adviceNote[i].name : adviceNote[i].displayString;
if (vtName === "Disease Others") {
form.get("Stroke Note").setHidden(false);
} else {
form.get("Stroke Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else {
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of Stroke').setHidden(true);
form.get('Advice of Stroke').setHidden(true);
}
// Disease IST
if (form.get('Disease Type').getValue() === 'Disease IST') {
form.get('Chief Complaint of IST').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("IST Sudden weakness side").setHidden(true);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of IST').setHidden(false);
form.get("IST SWSB Duration").setHidden(true);
form.get("IST SS Duration").setHidden(true);
form.get("IST Others Chief Complaint Data").setHidden(true);
form.get("ISt Note").setHidden(true);
let ISTComplaint = form.get('IST Chief Complaint').currentRecord.value.value;
let lengthISTComplaint = ISTComplaint == undefined ? 0 : ISTComplaint.length;
for (let i = 0; i < lengthISTComplaint; i++) {
let stName = ISTComplaint[i].displayString == undefined ? ISTComplaint[i].name : ISTComplaint[i].displayString;
if (stName === "IST Sudden weakness of the body") {
form.get("IST SWSB Duration").setHidden(false);
form.get("IST Sudden weakness side").setHidden(false);
} else {
form.get("IST SWSB Duration").setHidden(true)
form.get("IST Sudden weakness side").setHidden(true)
}
if (stName === "IST Slurring of speech") {
form.get("IST SS Duration").setHidden(false);
} else {
form.get("IST SS Duration").setHidden(true);
}
if (stName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
// IST Duration
form.get("IST Duration").setHidden(true);
let iSTDuration = form.get('IST Advice').currentRecord.value.value;
let lengthiSTDuration = iSTDuration == undefined ? 0 : iSTDuration.length;
for (let i = 0; i < lengthiSTDuration; i++) {
let vtName = iSTDuration[i].displayString == undefined ? iSTDuration[i].name : iSTDuration[i].displayString;
if (vtName === "IST Advice One") {
form.get("IST Duration").setHidden(false);
} else {
form.get("IST Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("ISt Note").setHidden(false);
} else {
form.get("ISt Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of IST').setHidden(true);
form.get('Advice of IST').setHidden(true);
}
// Disease Migraine
if (form.get('Disease Type').getValue() === 'Disease Migraine') {
form.get('Chief Complaint of Migraine').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of Migrain').setHidden(false);
form.get("Migraine EUM SH Duration").setHidden(true);
form.get("Migraine NVD Duration").setHidden(true);
form.get("Migraine PP Duration").setHidden(true);
form.get("Migraine Others Chief Complaint Data").setHidden(true);
let migraineComplaint = form.get('Migraine Chief Complaint').currentRecord.value.value;
let lengthemigraineComplaint = migraineComplaint == undefined ? 0 : migraineComplaint.length;
for (let i = 0; i < lengthemigraineComplaint; i++) {
let vtName = migraineComplaint[i].displayString == undefined ? migraineComplaint[i].name : migraineComplaint[i].displayString;
if (vtName === "EUM to severe headache") {
form.get("Migraine EUM SH Duration").setHidden(false);
} else {
form.get("Migraine EUM SH Duration").setHidden(true);
}
if (vtName === "Nausea vertigo dizziness") {
form.get("Migraine NVD Duration").setHidden(false);
} else {
form.get("Migraine NVD Duration").setHidden(true);
}
if (vtName === "Photophobia and Phonophobia") {
form.get("Migraine PP Duration").setHidden(false);
} else {
form.get("Migraine PP Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
// Disease Migraine Advice
let eAdvice = form.get('Disease Template Advice').currentRecord.value.value;
let lengtheAdvice = eAdvice == undefined ? 0 : eAdvice.length;
for (let i = 0; i < lengtheAdvice; i++) {
let vtName = eAdvice[i].displayString == undefined ? eAdvice[i].name : eAdvice[i].displayString;
if (vtName === "Advice of Migrain") {
form.get("TTH Advice").setHidden(false);
} else {
form.get("TTH Advice").setHidden(true);
}
}
// Disease Migraine Note
form.get("Migraine Note").setHidden(true);
let adviceNote = form.get('Migraine Avice').currentRecord.value.value;
let lengthAdviceNote = adviceNote == undefined ? 0 : adviceNote.length;
for (let i = 0; i < lengthAdviceNote; i++) {
let vtName = adviceNote[i].displayString == undefined ? adviceNote[i].name : adviceNote[i].displayString;
if (vtName === "Disease Others") {
form.get("Migraine Note").setHidden(false);
} else {
form.get("Migraine Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of Migraine').setHidden(true);
form.get('Advice of Migrain').setHidden(true);
}
// Disease TTH
if (form.get('Disease Type').getValue() === 'Disease TTH') {
form.get('Chief Complaint of TTH').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of TTH').setHidden(false);
form.get("TTH PGHMMI Duration").setHidden(true);
form.get("TTH NVD Duration").setHidden(true);
form.get("TTH Others Chief Complaint Data").setHidden(true);
form.get("TTH Note").setHidden(true);
let tTHComplaint = form.get('TTH Chief Complaint').currentRecord.value.value;
let lengthTTHComplaint = tTHComplaint == undefined ? 0 : tTHComplaint.length;
for (let i = 0; i < lengthTTHComplaint; i++) {
let vtName = tTHComplaint[i].displayString == undefined ? tTHComplaint[i].name : tTHComplaint[i].displayString;
if (vtName === "PGHMMI") {
form.get("TTH PGHMMI Duration").setHidden(false);
} else {
form.get("TTH PGHMMI Duration").setHidden(true);
}
if (vtName === "Nausea vertigo dizziness") {
form.get("TTH NVD Duration").setHidden(false);
} else {
form.get("TTH NVD Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
// TTH Advice
let tTHAdvice = form.get('TTH Advice').currentRecord.value.value;
let lengthTTHAdvice = tTHAdvice == undefined ? 0 : tTHAdvice.length;
for (let i = 0; i < lengthTTHAdvice; i++) {
let vtName = tTHAdvice[i].displayString == undefined ? tTHAdvice[i].name : tTHAdvice[i].displayString;
if (vtName === "Disease Others") {
form.get("TTH Note").setHidden(false);
} else {
form.get("TTH Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of TTH').setHidden(true);
form.get('Advice of TTH').setHidden(true);
}
// Disease SAH
if (form.get('Disease Type').getValue() === 'Disease SAH') {
form.get('Chief Complaint of SAH').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of SAH').setHidden(false);
form.get("SAH SSHV Duration").setHidden(true);
form.get("SAH CLC Duration").setHidden(true);
form.get("SAH Others Chief Complaint Data").setHidden(true);
form.get("SAH Note").setHidden(true);
let sAHComplaint = form.get('SAH Chief Complaint').currentRecord.value.value;
let lengthSAHComplaint = sAHComplaint == undefined ? 0 : sAHComplaint.length;
for (let i = 0; i < lengthSAHComplaint; i++) {
let vtName = sAHComplaint[i].displayString == undefined ? sAHComplaint[i].name : sAHComplaint[i].displayString;
if (vtName === "Sudden severe headache with vomiting") {
form.get("SAH SSHV Duration").setHidden(false);
} else {
form.get("SAH SSHV Duration").setHidden(true);
}
if (vtName === "Convulsion with loss of consciousness") {
form.get("SAH CLC Duration").setHidden(false);
} else {
form.get("SAH CLC Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
let sAHAdvice = form.get('SAH Advice').currentRecord.value.value;
let lengthdsAHAdvice = sAHAdvice == undefined ? 0 : sAHAdvice.length;
for (let i = 0; i < lengthdsAHAdvice; i++) {
let vtName = sAHAdvice[i].displayString == undefined ? sAHAdvice[i].name : sAHAdvice[i].displayString;
if (vtName === "Disease Others") {
form.get("SAH Note").setHidden(false);
} else {
form.get("SAH Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of SAH').setHidden(true);
form.get('Advice of SAH').setHidden(true);
}
// Disease Dementia
if (form.get('Disease Type').getValue() === 'Disease Dementia') {
form.get('Chief Complaint of Dementia').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('MMSE Score').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of Dementia').setHidden(false);
form.get("Dementia Forgetfulness Duration").setHidden(true);
form.get("Dementia CPMI Duration").setHidden(true);
form.get("Dementia IWDN Duration").setHidden(true);
form.get("Dementia Others Chief Complaint Data").setHidden(true);
form.get("Dementia Note").setHidden(true);
let dementiaComplaint = form.get('Dementia Chief Complaint').currentRecord.value.value;
let lengthdementiaComplaint = dementiaComplaint == undefined ? 0 : dementiaComplaint.length;
for (let i = 0; i < lengthdementiaComplaint; i++) {
let vtName = dementiaComplaint[i].displayString == undefined ? dementiaComplaint[i].name : dementiaComplaint[i].displayString;
if (vtName === "Forgetfulness") {
form.get("Dementia Forgetfulness Duration").setHidden(false);
} else {
form.get("Dementia Forgetfulness Duration").setHidden(true);
}
if (vtName === "Change in Personality and mood irritability") {
form.get("Dementia CPMI Duration").setHidden(false);
} else {
form.get("Dementia CPMI Duration").setHidden(true);
}
if (vtName === "Insomnia Wandering during night") {
form.get("Dementia IWDN Duration").setHidden(false);
} else {
form.get("Dementia IWDN Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
let dementiaAdvice = form.get('Dementia advice').currentRecord.value.value;
let lengthdementiaAdvice = dementiaAdvice == undefined ? 0 : dementiaAdvice.length;
for (let i = 0; i < lengthdementiaAdvice; i++) {
let vtName = dementiaAdvice[i].displayString == undefined ? dementiaAdvice[i].name : dementiaAdvice[i].displayString;
if (vtName === "Disease Others") {
form.get("Dementia Note").setHidden(false);
} else {
form.get("Dementia Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of Dementia').setHidden(true);
form.get('Advice of Dementia').setHidden(true);
form.get('MMSE Score').setHidden(true);
}
// Disease Spondylosis and Radiculopathy
if (form.get('Disease Type').getValue() === 'Disease Spondylosis and Radiculopathy') {
form.get('Chief Complaint of SR').setHidden(false);
form.get('Common On Examination').setHidden(false);
form.get('NINS Co-morbid Conditions').setHidden(false);
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
form.get('Advice of SR').setHidden(false);
form.get("SR CC LBP RLL Duration").setHidden(true);
form.get("SR CC NPRUL Duration").setHidden(true);
form.get("SR CC PBKJ Duration").setHidden(true);
form.get("SR Others Chief Complaint Data").setHidden(true);
form.get("SR Note").setHidden(true);
form.get("SR Duration").setHidden(true);
let sRComplaint = form.get('SR Chief complaint').currentRecord.value.value;
let lengthSRComplaint = sRComplaint == undefined ? 0 : sRComplaint.length;
for (let i = 0; i < lengthSRComplaint; i++) {
let vtName = sRComplaint[i].displayString == undefined ? sRComplaint[i].name : sRComplaint[i].displayString;
if (vtName === "SR CC LBP RLL") {
form.get("SR CC LBP RLL Duration").setHidden(false);
} else {
form.get("SR CC LBP RLL Duration").setHidden(true);
}
if (vtName === "SR CC NPRUL") {
form.get("SR CC NPRUL Duration").setHidden(false);
} else {
form.get("SR CC NPRUL Duration").setHidden(true);
}
if (vtName === "SR CC PBKJ") {
form.get("SR CC PBKJ Duration").setHidden(false);
} else {
form.get("SR CC PBKJ Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("Chief Complaint of Common").setHidden(false);
} else {
form.get("Chief Complaint of Common").setHidden(true);
}
}
// motor
if (form.get('Common Motor').getValue() === 'Common Motor Bulk') {
form.get('Common Motor Bulk Option').setHidden(false);
} else {
form.get('Common Motor Bulk Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Tone') {
form.get('Common Motor Tone Option').setHidden(false);
} else {
form.get('Common Motor Tone Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Power') {
form.get('Common Motor Power Option').setHidden(false);
} else {
form.get('Common Motor Power Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Reflex or DTR') {
form.get('Common Motor Reflex or DTR Option').setHidden(false);
} else {
form.get('Common Motor Reflex or DTR Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Planter') {
form.get('Common Motor Planter Option').setHidden(false);
} else {
form.get('Common Motor Planter Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Co Ordination Option').setHidden(false);
} else {
form.get('Common Motor Co Ordination Option').setHidden(true);
}
if (form.get('Common Motor Co Ordination Option').getValue() === 'Common Motor Co Ordination Impaired' && form.get('Common Motor').getValue() === 'Common Motor Co Ordination') {
form.get('Common Motor Impaired Option').setHidden(false);
} else {
form.get('Common Motor Impaired Option').setHidden(true);
}
if (form.get('Common Motor').getValue() === 'Common Motor Gait') {
form.get('Common Motor Gait Option').setHidden(false);
} else {
form.get('Common Motor Gait Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Papilledema') {
form.get('Common NE Papilledema Option').setHidden(false);
} else {
form.get('Common NE Papilledema Option').setHidden(true);
}
if (form.get('Common NE Fundus').getValue() === 'Common NE F Optic Atrophy') {
form.get('Common NE F Optic Atrophy Option').setHidden(false);
} else {
form.get('Common NE F Optic Atrophy Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(false);
} else {
form.get('Common Sensory Pain and Touch and Temp Option').setHidden(true);
}
if (form.get('Common Sensory Pain and Touch and Temp Option').getValue() === 'Common Sensory Sensory Level' && form.get('Common Sensory').getValue() === 'Common Sensory Pain and Touch and Temp') {
form.get('Common SL Option').setHidden(false);
} else {
form.get('Common SL Option').setHidden(true);
}
if (form.get('Common Sensory').getValue() === 'Common Sensory Dorsal Column') {
form.get('Common DC Option').setHidden(false);
} else {
form.get('Common DC Option').setHidden(true);
}
if (form.get('Common DC Option').getValue() === 'Common DC Impaired') {
form.get('Common DC Impaired Option').setHidden(false);
} else {
form.get('Common DC Impaired Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Aphasia') {
form.get('Common NE Aphasia Option').setHidden(false);
} else {
form.get('Common NE Aphasia Option').setHidden(true);
}
if (form.get('Common NE Speech').getValue() === 'Common NE Dysarthria') {
form.get('Common NE Dysarthria Option').setHidden(false);
} else {
form.get('Common NE Dysarthria Option').setHidden(true);
}
let sRHAdvice = form.get('SR Advice').currentRecord.value.value;
let lengthSRAdvice = sRHAdvice == undefined ? 0 : sRHAdvice.length;
for (let i = 0; i < lengthSRAdvice; i++) {
let vtName = sRHAdvice[i].displayString == undefined ? sRHAdvice[i].name : sRHAdvice[i].displayString;
if (vtName === "SR Advice One") {
form.get("SR Duration").setHidden(false);
} else {
form.get("SR Duration").setHidden(true);
}
if (vtName === "Disease Others") {
form.get("SR Note").setHidden(false);
} else {
form.get("SR Note").setHidden(true);
}
}
let cNECranialNerve = form.get('Common NE Cranial Nerve').currentRecord.value.value;
let lengthcComplaint = cNECranialNerve == undefined ? 0 : cNECranialNerve.length;
for (let i = 0; i < lengthcComplaint; i++) {
let vtName = cNECranialNerve[i].displayString == undefined ? cNECranialNerve[i].name : cNECranialNerve[i].displayString;
if (vtName === "Common NE UMNL Right") {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Right") {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Right Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE UMNL Left") {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN UMNL Left Sided of Nerve Palsy").setHidden(true);
}
if (vtName === "Common NE LMNL Left") {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(false);
} else {
form.get("Common NE CN LMNL Left Sided of Nerve Palsy").setHidden(true);
}
}
if (form.get('GCS').getValue() > 15) {
form.get('GCS').setValue(15);
}
if (form.get('Common Cerebellar Sign').getValue() === 'Common CS Present') {
form.get('Common CS Present Option').setHidden(false);
}
else{
form.get('Common CS Present Option').setHidden(true);
}
} else {
form.get('Chief Complaint of SR').setHidden(true);
form.get('Advice of SR').setHidden(true);
}
// form.get('Muscle Power').setHidden(true);
// if (form.get('Disease Type').getValue()) {
// if (form.get('Fundus').getValue() === 'Normal') {
// form.get('Fundus Abnormal Option').setHidden(true);
// } else {
// form.get('Fundus Abnormal Option').setHidden(false);
// }
// if (form.get('OE Reflex').getValue()) {
// form.get('OE Reflex Side').setHidden(false);
// } else {
// form.get('OE Reflex Side').setHidden(true);
// }
// if (form.get('Power').getValue()) {
// form.get('Power Side').setHidden(false);
// } else {
// form.get('Power Side').setHidden(true);
// }
// if (form.get('Planter').getValue()) {
// form.get('Planter Side').setHidden(false);
// } else {
// form.get('Planter Side').setHidden(true);
// }
// if (form.get('Gait').getValue() === 'Abnormal') {
// form.get('Gait Abnormal').setHidden(false);
// } else {
// form.get('Gait Abnormal').setHidden(true);
// }
// if (form.get('Parkinsonian Features').getValue() === 'Present') {
// form.get('Parkinsonian Features Option').setHidden(false);
// // form.get('Parkinsonian Features Option').setValue('Resting tremor/Rigidity/Bradykinesia/Postural Instability');
// } else {
// form.get('Parkinsonian Features Option').setHidden(true);
// }
// if (form.get('Disease Type').getValue() === 'Disease Epilepsy') {
// form.get('Fundus').setValue('Normal');
// form.get('OE Speech').setValue('OE Speech Normal');
// form.get('Power Side').setValue('Bilateral');
// form.get('Planter').setHidden(false);
// form.get('Planter').setValue('Flexor');
// form.get('Planter Side').setHidden(false);
// form.get('Planter Side').setValue('Bilateral');
// }
// //IST
// if (form.get('Disease Type').getValue() === 'Disease IST') {
// form.get('OE Fundus').setHidden(true);
// form.get('OE Speech').setValue('OE Speech Aphasia');
// form.get('Power Side').setValue('Bilateral');
// form.get('Planter').setHidden(false);
// form.get('Planter').setValue('Extensor');
// form.get('Planter Side').setHidden(false);
// form.get('Planter Side').setValue('Bilateral');
// form.get('NINS Chief Complaint').setValue('' +
// 'Sudden weakness of right/left/both side of the body - 2 days.;\n' +
// 'Slurring of speech - 2 days.');
// // form.get('Advice').setValue('' +
// // 'পূর্ণ বিশ্রাম নিবেন ১৫ দিন।;\n' +
// // 'প্রেসার ও ডায়বেটিস নিয়ন্ত্রণ রাখতে হবে।;\n' +
// // 'তেল, চর্বি জাতীয় খাবার পরিহার করবেন এবং শাক-সবজি জাতীয় খাবার গ্রহণ করবেন।;\n' +
// // 'খাবারের সাথে অতিরিক্ত লবন খাবে না, প্রয়োজন মতো পানি পান করবেন।;\n' +
// // 'রোগীকে নির্দেশমত নিয়মিত ব্যায়াম করাবেন।;\n' +
// // 'ধূমপান করবেন না।');
// // form.get('NINS Follow Up').setValue('পরবর্তী চিকিৎসার জন্য ২ মাস পর সাক্ষাত করবেন;\n' +
// // 'কক্ষ নং: ১০৫-এ/বি;\n' +
// // 'সময়: সকাল ৯টা হতে দুপুর ১২টার মধ্যে;\n' +
// // 'স্ট্রোক ক্লিনিক - শনিবার / সোমবার / বুধবার');
// }
// //TTH & Migraine
// if (form.get('Disease Type').getValue() === 'Disease TTH' || form.get('Disease Type').getValue() === 'Disease Migraine') {
// form.get('OE Speech').setHidden(true);
// form.get('Fundus').setValue('Normal');
// form.get('Power Side').setValue('Bilateral');
// form.get('Planter').setHidden(false);
// form.get('Planter').setValue('Flexor');
// form.get('Planter Side').setHidden(false);
// form.get('Planter Side').setValue('Bilateral');
// } else {
// form.get('OE Speech').setHidden(false);
// }
// if (form.get('Disease Type').getValue() === 'Disease Migraine') {
// form.get('NINS Chief Complaint').setValue('' +
// 'Episodic, unilateral moderate to severe headache - 2 months.;\n' +
// 'Nausea, vertigo, dizziness - 2 months.;\n' +
// 'Photophobia and Phonophobia - 2 months.');
// }
// if (form.get('Disease Type').getValue() === 'Disease TTH') {
// form.get('NINS Chief Complaint').setValue('' +
// 'Persistent global headache of mild to moderate intensity - 2 months.;\n' +
// 'Nausea, vertigo, dizziness - 2 months.');
// }
// //Spondylosis and Radiculopathy
// if (form.get('Disease Type').getValue() === 'Disease Spondylosis and Radiculopathy') {
// form.get('NINS Reflex').setHidden(false);
// form.get('OE SLR').setHidden(false);
// form.get('OE Speech').setHidden(true);
// form.get('OE Fundus').setHidden(true);
// form.get('OE SLR').setValue("Positive at 30 degree on right side");
// form.get('OE Reflex').setValue('Normal');
// form.get('OE Reflex Side').setValue('Bilateral');
// form.get('OE Reflex Side').setValue('Bilateral');
// form.get('Power Side').setValue('Bilateral');
// form.get('Planter').setHidden(false);
// form.get('Planter').setValue('Flexor');
// form.get('Planter Side').setHidden(false);
// form.get('Planter Side').setValue('Bilateral');
// form.get('NINS Chief Complaint').setValue('' +
// 'Low back pain that radiates to lower limb - 1 month.;\n' +
// 'Neck pain that radiates to upper limb 1 month.;\n' +
// 'Pain in both knee joint - 1 month.');
// } else {
// form.get('NINS Reflex').setHidden(true);
// form.get('OE SLR').setHidden(true);
// }
// //Stroke
// if (form.get('Disease Type').getValue() === 'Disease Stroke') {
// form.get('NINS Chief Complaint').setValue('' +
// 'Left/Right sided weakness - (Days/Months/Years).;\n' +
// 'Slurring of speech.;\n' +
// 'Headache.;\n' +
// 'Vertigo.;\n' +
// 'Vomiting.;\n' +
// 'Unsteadiness.;\n' +
// 'Visual Disturbance.;\n' +
// 'Recurrent convulsion.');
// form.get('NINS Precordium').setHidden(false);
// form.get('Other Cranial Nerves').setHidden(false);
// form.get('Neck Rigidity').setHidden(false);
// form.get('MRS').setHidden(false);
// form.get('Personal History').setHidden(false);
// form.get('NINS Co-morbid Conditions').setHidden(false);
// } else {
// form.get('NINS Precordium').setHidden(true);
// form.get('Other Cranial Nerves').setHidden(true);
// form.get('Neck Rigidity').setHidden(true);
// form.get('MRS').setHidden(true);
// form.get('Personal History').setHidden(true);
// // form.get('NINS Co-morbid Conditions').setHidden(true);
// }
// }
};
//Anesthesia Form
function asenthesiaIPD(form){
if (form.get('Allergy').getValue() === 'Anestesia Yes') {
form.get('Allergy Note').setHidden(false);
}else{
form.get('Allergy Note').setHidden(true);
}
if (form.get('Anesthesia Chest pain').getValue() === 'Anestesia Yes') {
form.get('Chest pain Note').setHidden(false);
}else{
form.get('Chest pain Note').setHidden(true);
}
if (form.get('Anesthesia Asthma').getValue() === 'Anestesia Yes') {
form.get('Asthma Note').setHidden(false);
}else{
form.get('Asthma Note').setHidden(true);
}
if (form.get('Co Existing Disease').getValue() === 'Co Existing Disease Others') {
form.get('Co Existing Note').setHidden(false);
}else{
form.get('Co Existing Note').setHidden(true);
}
let anesthesiacoExistingDisease = form.get('Co Existing Disease').currentRecord.value.value;
let lengthanesthesiacoExistingDisease = anesthesiacoExistingDisease == undefined ? 0 : anesthesiacoExistingDisease.length;
for (let i = 0; i < lengthanesthesiacoExistingDisease; i++) {
let vtName = anesthesiacoExistingDisease[i].displayString == undefined ? anesthesiacoExistingDisease[i].name : anesthesiacoExistingDisease[i].displayString;
if (vtName === "Co Existing Disease Others") {
form.get("Co Existing Note").setHidden(false);
} else {
form.get("Co Existing Note").setHidden(true);
}
}
if (form.get('Aneasthesia GCS').getValue() > 15) {
form.get('Aneasthesia GCS').setValue(15);
}
// form.get('Maintenance drugs').setValue(''+
// 'a) Hyperosmotic Anti Agent.\n' +
// 'b) Antihypertensive Agent.\n' +
// 'c) Steroid');
if (form.get('Anesthesia type').getValue() === 'GENERAL ANAESTHESIA') {
form.get('In case of GA').setHidden(false);
}else{
form.get('In case of GA').setHidden(true);
}
if (form.get('Anesthesia type').getValue() === 'Anesthesia type Regional') {
form.get('Regional Option').setHidden(false);
}else{
form.get('Regional Option').setHidden(true);
}
if (form.get('Made of Ventilation').getValue() === 'Made of Ventilation Ventilator') {
form.get('Ventilator Option').setHidden(false);
}else{
form.get('Ventilator Option').setHidden(true);
}
if (form.get('Ventilator Option').getValue() === 'Ventilator Controlled' && form.get('Made of Ventilation').getValue() === 'Made of Ventilation Ventilator') {
form.get('Controlled Option').setHidden(false);
}else{
form.get('Controlled Option').setHidden(true);
}
if (form.get('Maintenance of Airway').getValue() === 'Maintenance of Airway Supraglottic Devices') {
form.get('Supraglottic Devices Option').setHidden(false);
}else{
form.get('Supraglottic Devices Option').setHidden(true);
}
if (form.get('Maintenance of Airway').getValue() === 'Maintenance of Airway ETT') {
form.get('ETT Option').setHidden(false);
}else{
form.get('ETT Option').setHidden(true);
}
if (form.get('Monitoringe').getValue() === 'Monitoring Others') {
form.get('Monitoring Note').setHidden(false);
}else{
form.get('Monitoring Note').setHidden(true);
}
let anesthesiaMonitoring = form.get('Monitoring').currentRecord.value.value;
let lengthanesthesiaMonitoring = anesthesiaMonitoring == undefined ? 0 : anesthesiaMonitoring.length;
for (let i = 0; i < lengthanesthesiaMonitoring; i++) {
let vtName = anesthesiaMonitoring[i].displayString == undefined ? anesthesiaMonitoring[i].name : anesthesiaMonitoring[i].displayString;
if (vtName === "Monitoring Others") {
form.get("Monitoring Note").setHidden(false);
} else {
form.get("Monitoring Note").setHidden(true);
}
}
};
function bloodTranfusion(form){
if (form.get('If any Reaction Then').getValue() === 'Other Reaction') {
form.get('If any Reaction Note').setHidden(false);
}else{
form.get('If any Reaction Note').setHidden(true);
}
let btOdernote = form.get('If any Reaction Then').currentRecord.value.value;
let lengthbtOdernote = btOdernote == undefined ? 0 : btOdernote.length;
for (let i = 0; i < lengthbtOdernote ; i++) {
let vtName = btOdernote[i].displayString == undefined ?btOdernote[i].name :btOdernote[i].displayString;
if (vtName === "Other Reaction") {
form.get("If any Reaction Note").setHidden(false);
} else {
form.get("TIf any Reaction Note").setHidden(true);
}
}
};
function bloodRequisition(form){
if (form.get('Need of Blood Component').getValue() === 'Other Component') {
form.get('Need of Note').setHidden(false);
}else{
form.get('Need of Note').setHidden(true);
}
let bloodComponent = form.get('Need of Blood Component').currentRecord.value.value;
let lengthbloodComponent = bloodComponent == undefined ? 0 : bloodComponent.length;
for (let i = 0; i < lengthbloodComponent; i++) {
let vtName = bloodComponent[i].displayString == undefined ? bloodComponent[i].name : bloodComponent[i].displayString;
if (vtName === "Other Component") {
form.get("Need of Note").setHidden(false);
} else {
form.get("Need of Note").setHidden(true);
}
}
if (form.get('Blood Receives Type').getValue() === 'Blood Receives Other') {
form.get('Type of Blood Requsition Note').setHidden(false);
}else{
form.get('Type of Blood Requsition Note').setHidden(true);
}
let bloodReceivesType = form.get('Blood Receives Type').currentRecord.value.value;
let lengthbloodReceivesType = bloodReceivesType == undefined ? 0 : bloodReceivesType.length;
for (let i = 0; i < lengthbloodReceivesType; i++) {
let vtName = bloodReceivesType[i].displayString == undefined ? bloodReceivesType[i].name : bloodReceivesType[i].displayString;
if (vtName === "Blood Receives Other") {
form.get("Type of Blood Requsition Note").setHidden(false);
} else {
form.get("Type of Blood Requsition Note").setHidden(true);
}
}
};
function operationNote(form){
if (form.get('Operation Indication').getValue() === 'Indication Others') {
form.get('Indication Note').setHidden(false);
}else{
form.get('Indication Note').setHidden(true);
}
let operationIndication = form.get('Operation Indication').currentRecord.value.value;
let lengthoperationIndication = operationIndication == undefined ? 0 : operationIndication.length;
for (let i = 0; i < lengthoperationIndication; i++) {
let vtName = operationIndication[i].displayString == undefined ? operationIndication[i].name : operationIndication[i].displayString;
if (vtName === "Indication Others") {
form.get("Indication Note").setHidden(false);
} else {
form.get("Indication Note").setHidden(true);
}
}
if (form.get('Anesthesia of Operation').getValue() === 'OT Anesthesia Others') {
form.get('OT Anesthesia Note').setHidden(false);
}else{
form.get('OT Anesthesia Note').setHidden(true);
}
};
// function reflowChart(form){
// if (form.get('Before Diet').getValue() === 'Before Breakfast') {
// form.get('Before BBF Reflow').setHidden(false);
// form.get('Before BBF Dose of Insulin').setHidden(false);
// }else{
// form.get('Before BBF Reflow').setHidden(true);
// form.get('Before BBF Dose of Insulin').setHidden(true);
// }
// if (form.get('Before Diet').getValue() === 'Before Lunch') {
// form.get('Before BL Reflow').setHidden(false);
// form.get('Before BL Dose of Insulin').setHidden(false);
// }else{
// form.get('Before BL Reflow').setHidden(true);
// form.get('Before BL Dose of Insulin').setHidden(true);
// }
// if (form.get('Before Diet').getValue() === 'Before Dinner') {
// form.get('Before BD Reflow').setHidden(false);
// form.get('Before BD Dose of Insulin').setHidden(false);
// }else{
// form.get('Before BD Reflow').setHidden(true);
// form.get('Before BD Dose of Insulin').setHidden(true);
// }
// if (form.get('After Diet').getValue() === 'After Breakfast') {
// form.get('After ABF Reflow').setHidden(false);
// form.get('After ABF Dose of Insulin').setHidden(false);
// }else{
// form.get('After ABF Reflow').setHidden(true);
// form.get('After ABF Dose of Insulin').setHidden(true);
// }
// if (form.get('After Diet').getValue() === 'After Lunch') {
// form.get('After AL Reflow').setHidden(false);
// form.get('After AL Dose of Insulin').setHidden(false);
// }else{
// form.get('After AL Reflow').setHidden(true);
// form.get('After AL Dose of Insulin').setHidden(true);
// }
// if (form.get('After Diet').getValue() === 'After Dinner') {
// form.get('After AD Reflow').setHidden(false);
// form.get('After AD Dose of Insulin').setHidden(false);
// }else{
// form.get('After AD Reflow').setHidden(true);
// form.get('After AD Dose of Insulin').setHidden(true);
// }
// };
function assignRoomFocus() {
setTimeout(function () {
$('.Select-multi-value-wrapper .Select-input input').focus();
}, 1000);
}