activeDrawer function
returns a widget indicating the active drawer based on the string provided
Implementation
Widget activeDrawer({required String drawer}) {
switch (drawer) {
case 'problem':
return const AddProblem(
conditionCategory: ConditionCategory.problemListItem,
);
case 'condition':
return const AddProblem(
conditionCategory: ConditionCategory.encounterDiagnosis,
);
case 'allergy':
return AddAllergy();
case 'diagnosis':
return AddDiagnosis();
case 'medication':
return AddMedication();
case 'test':
return const AddTestDrawer();
case 'respiratory':
return const ReviewOfSystemsFormBuilder(
system: ReviewSystems.respiratory);
case 'peripheral':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.peripheral);
case 'gastrointestinal':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.gastro);
case 'urinary':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.urinary);
case 'cardiac':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.cardiac);
case 'neurologic':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.neurologic);
case 'hematologic':
return const ReviewOfSystemsFormBuilder(
system: ReviewSystems.hematologic);
case 'gi':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.gi);
case 'gu':
return const ReviewOfSystemsFormBuilder(
system: ReviewSystems.genitourinary);
case 'heent':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.heent);
case 'heenttwo':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.heentTwo);
case 'ms':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.ms);
case 'skin':
return const ReviewOfSystemsFormBuilder(system: ReviewSystems.skin);
case 'psychiatric':
return const ReviewOfSystemsFormBuilder(
system: ReviewSystems.psychiatric);
// Patient vitals drawers
case 'pulse':
return AddPulseReading();
case 'bloodPressure':
return AddBloodPressure();
case 'respiratoryRate':
return AddRespiratoryRate();
case 'temperature':
return AddTemperature();
case 'heightAndWeight':
return AddBMI();
case 'bloodOxygen':
return AddOxygenSaturation();
}
return const AddProblem(
conditionCategory: ConditionCategory.problemListItem,
);
}