merge-requests/711/head
mosazaid 5 years ago
parent bc48d915c6
commit 3107950f5c

@ -31,9 +31,9 @@ extension procedureType on ProcedureType {
case ProcedureType.PROCEDURE:
return TranslationBase.of(context).addProcedures;
case ProcedureType.LAB_RESULT:
return TranslationBase.of(context).addRadiologyOrder;
case ProcedureType.RADIOLOGY:
return TranslationBase.of(context).addLabOrder;
case ProcedureType.RADIOLOGY:
return TranslationBase.of(context).addRadiologyOrder;
default:
return "";
}
@ -44,9 +44,9 @@ extension procedureType on ProcedureType {
case ProcedureType.PROCEDURE:
return TranslationBase.of(context).addProcedures;
case ProcedureType.LAB_RESULT:
return TranslationBase.of(context).addRadiologyOrder;
case ProcedureType.RADIOLOGY:
return TranslationBase.of(context).addLabOrder;
case ProcedureType.RADIOLOGY:
return TranslationBase.of(context).addRadiologyOrder;
default:
return "";
}

@ -81,80 +81,79 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
children: [
if (procedureType == ProcedureType.PROCEDURE)
Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.pleaseEnterProcedure,
fontWeight: FontWeight.w700,
fontSize: 20,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.pleaseEnterProcedure,
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
SizedBox(
height:
MediaQuery.of(context).size.height * 0.02,
),
Row(
children: [
Container(
width: MediaQuery.of(context).size.width *
0.79,
child: AppTextFieldCustom(
hintText: TranslationBase.of(context)
.searchProcedureHere,
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
hasBorder: true,
controller: procedureName,
// onClick: () {
// if (procedureName.text.isNotEmpty &&
// procedureName.text.length >= 3)
// model.getProcedureCategory(
// patientId: patient.patientId,
// categoryName:
// procedureName.text);
// else
// DrAppToastMsg.showErrorToast(
// TranslationBase.of(context)
// .atLeastThreeCharacters,
// );
// },
),
],
),
SizedBox(
height:
MediaQuery.of(context).size.height * 0.02,
),
Row(
children: [
Container(
width: MediaQuery.of(context).size.width *
0.79,
child: AppTextFieldCustom(
hintText: TranslationBase.of(context)
.searchProcedureHere,
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
hasBorder: true,
controller: procedureName,
// onClick: () {
// if (procedureName.text.isNotEmpty &&
// procedureName.text.length >= 3)
// model.getProcedureCategory(
// patientId: patient.patientId,
// categoryName:
// procedureName.text);
// else
// DrAppToastMsg.showErrorToast(
// TranslationBase.of(context)
// .atLeastThreeCharacters,
// );
// },
),
SizedBox(
width: MediaQuery.of(context).size.width *
0.02,
),
Expanded(
child: InkWell(
onTap: () {
if (procedureName.text.isNotEmpty &&
procedureName.text.length >= 3)
model.getProcedureCategory(
patientId: patient.patientId,
categoryName: procedureName.text);
else
DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.atLeastThreeCharacters,
);
},
child: Icon(
Icons.search,
size: 25.0,
),
),
SizedBox(
width: MediaQuery.of(context).size.width *
0.02,
),
Expanded(
child: InkWell(
onTap: () {
if (procedureName.text.isNotEmpty &&
procedureName.text.length >= 3)
model.getProcedureCategory(
patientId: patient.patientId,
categoryName:
procedureName.text);
else
DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.atLeastThreeCharacters,
);
},
child: Icon(
Icons.search,
size: 25.0,
),
),
),
],
),
],
),
),
],
),
],
),
if (procedureName.text.isNotEmpty &&
model.categoriesList.length != 0)
NetworkBaseView(
@ -205,12 +204,12 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
return;
}
Navigator.pop(context);
await model.preparePostProcedure(
await this.model.preparePostProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
remarks: remarksController.text);
Navigator.pop(context);
},
),
],

Loading…
Cancel
Save