|
|
|
|
@ -50,6 +50,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
String? durationError;
|
|
|
|
|
String? unitError;
|
|
|
|
|
String? strengthError;
|
|
|
|
|
String? dateError;
|
|
|
|
|
String? icdCodeError;
|
|
|
|
|
int? selectedType;
|
|
|
|
|
|
|
|
|
|
@ -399,7 +400,7 @@ getIcdCodeData() async{
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => selectDate(context, widget.prescriptionViewModel),
|
|
|
|
|
child: AppTextFieldCustom(
|
|
|
|
|
validationError: strengthError,
|
|
|
|
|
validationError: dateError,
|
|
|
|
|
hintText: TranslationBase.of(context).date,
|
|
|
|
|
isTextFieldHasSuffix: true,
|
|
|
|
|
suffixIcon: IconButton(
|
|
|
|
|
@ -609,6 +610,13 @@ getIcdCodeData() async{
|
|
|
|
|
} else {
|
|
|
|
|
strengthError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (selectedDate == null ) {
|
|
|
|
|
dateError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
dateError = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( icdNameController.text == "" && widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty) {
|
|
|
|
|
icdCodeError = TranslationBase.of(context).fieldRequired;
|
|
|
|
|
} else {
|
|
|
|
|
|