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

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

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

Loading…
Cancel
Save