diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 6086c278..c50059f2 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -558,78 +558,90 @@ class _UpdatePrescriptionFormState extends State { height: 12.0, ), Container( - height: screenSize.height * 0.070, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.29, - child: InkWell( - onTap: indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - decoration: - textFieldSelectorDecoration( - model.patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString() - : '', - indication != null - ? indication['name'] - : null, - true), - enabled: true, - readOnly: true, - ), - ), - ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.61, - child: InkWell( - onTap: indicationList != null - ? () { - Helpers.hideKeyboard( - context); - } - : null, - child: TextField( - maxLines: 3, - decoration: - textFieldSelectorDecoration( - model.patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .asciiDesc - .toString() - : '', - indication != null - ? indication['name'] - : null, - true), - enabled: true, - readOnly: true, - ), - ), - ), - ], - ), - ), + height: model.patientAssessmentList + .isNotEmpty + ? screenSize.height * 0.070 + : 0.0, + width: model.patientAssessmentList + .isNotEmpty + ? double.infinity + : 0.0, + child: model.patientAssessmentList + .isNotEmpty + ? Row( + children: [ + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.29, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + model.patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString() + : '', + indication != null + ? indication[ + 'name'] + : null, + true), + enabled: true, + readOnly: true, + ), + ), + ), + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.61, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + maxLines: 3, + decoration: textFieldSelectorDecoration( + model.patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .asciiDesc + .toString() + : '', + indication != null + ? indication[ + 'name'] + : null, + true), + enabled: true, + readOnly: true, + ), + ), + ), + ], + ) + : null), SizedBox( height: 12.0, ), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 1e225ce9..afe8a63e 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -221,49 +221,69 @@ class _ProcedureScreenState extends State { child: Column( children: [ AppText( - DateTime.parse(model - .procedureList[ - 0] - .entityList[ - index] - .orderDate) - .day - .toString(), - color: - Colors.green, - ), + DateTime.parse(model + .procedureList[ + 0] + .entityList[ + index] + .orderDate) + .year + .toString(), + color: model + .procedureList[ + 0] + .entityList[ + index] + .orderType == + 0 + ? Color( + 0xFFB9382C) + : Colors + .green), AppText( - Helpers.getMonth(model - .procedureList[ - 0] - .entityList[ - index] - .orderDate != - null - ? (DateTime.parse(model - .procedureList[ - 0] - .entityList[ - index] - .orderDate) - .month) - : DateTime - .now() - .month) - .toUpperCase(), - color: - Colors.green, - ) + Helpers.getMonth(model.procedureList[0].entityList[index].orderDate != + null + ? (DateTime.parse(model.procedureList[0].entityList[index].orderDate) + .month) + : DateTime.now() + .month) + .toUpperCase(), + color: model + .procedureList[ + 0] + .entityList[ + index] + .orderType == + 0 + ? Color( + 0xFFB9382C) + : Colors + .green), + AppText( + DateTime.parse(model + .procedureList[ + 0] + .entityList[ + index] + .orderDate) + .day + .toString(), + color: model + .procedureList[ + 0] + .entityList[ + index] + .orderType == + 0 + ? Color( + 0xFFB9382C) + : Colors + .green), ], ), ), Expanded( child: Container( - // height: MediaQuery.of( - // context) - // .size - // .height * - // 0.21, width: MediaQuery.of( context) .size @@ -308,17 +328,17 @@ class _ProcedureScreenState extends State { 13.0, ), Expanded( - child: - AppText( - model.procedureList[0].entityList[index].orderType == - 1 - ? 'Routine' - : 'Urgent', - fontSize: - 11.5, - color: Color( - 0xFFB9382C), - ), + child: AppText( + model.procedureList[0].entityList[index].orderType == + 1 + ? 'Routine' + : 'Urgent', + fontSize: + 13.5, + color: model.procedureList[0].entityList[index].orderType == + 0 + ? Color(0xFFB9382C) + : Colors.green), ), ], ),