|
|
|
|
@ -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);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|