Merge branch 'prescription_changes' into 'development'

Prescription changes

See merge request Cloud_Solution/doctor_app_flutter!655
merge-requests/656/head
Mohammad Aljammal 5 years ago
commit bba0e48285

@ -2,13 +2,11 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart'; import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/search_drug_request_model.dart';
import 'package:doctor_app_flutter/core/service/base/lookup-service.dart'; import 'package:doctor_app_flutter/core/service/base/lookup-service.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_model.d
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart'; import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart'; import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescriptions_service.dart';

@ -446,85 +446,40 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: Row( child: Row(
children: [ children: [
Container( Container(
// height: MediaQuery.of(context) color: Colors.white,
// .size
// .height *
// 0.02,
width: MediaQuery.of(context) width: MediaQuery.of(context)
.size .size
.width * .width *
0.35, 0.35,
child: AppTextFieldCustom( child: TextField(
isPrscription: true, decoration:
inputFormatters: [ textFieldSelectorDecorationStreangrh(
LengthLimitingTextInputFormatter( strengthController
5), .text,
// WhitelistingTextInputFormatter 'Strength', //strengthController.text,
// .digitsOnly false),
], enabled: true,
hintText: controller:
TranslationBase.of( strengthController,
context) onChanged:
.strength, (String value) {
setState(() {
// fontWeight: FontWeight.w500, strengthChar =
// fontSize: 14.0, value.length;
// borderWidth: 0.2, });
if (strengthChar >= 5) {
controller: DrAppToastMsg
strengthController, .showErrorToast(
// keyboardType: TextInputType TranslationBase.of(
// .numberWithOptions( context)
// decimal: true, .only5DigitsAllowedForStrength,
// ), );
onChanged: (String value) { }
setState(() { },
strengthChar = keyboardType: TextInputType
value.length; .numberWithOptions(
}); decimal: true,
if (strengthChar >= 5) { )),
DrAppToastMsg
.showErrorToast(
TranslationBase.of(
context)
.only5DigitsAllowedForStrength,
);
}
},
// onClick: (_) {
// if (_selectedMedication !=
// null &&
// duration != null &&
// frequency != null &&
// strengthController
// .text !=
// null) {
// model.getBoxQuantity(
// freq: frequency[
// 'parameterCode'],
// duration:
// duration['id'],
// itemCode:
// _selectedMedication
// .itemId,
// strength: double.parse(
// strengthController
// .text));
// box = model.boxQuintity;
//
// return;
// }
// },
// validator: (value) {
// if (value.isEmpty &&
// strengthController.text.length >
// 4)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
), ),
SizedBox( SizedBox(
width: 5.0, width: 5.0,
@ -1394,6 +1349,48 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
); );
} }
InputDecoration textFieldSelectorDecorationStreangrh(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFEFEFEF), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.keyboard_arrow_down_sharp,
color: Color(0xff2E303A),
)
: null,
hintStyle: TextStyle(
fontSize: 13,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
hintText: selectedText == null || selectedText == "" ? hintText : null,
labelText:
selectedText != null && selectedText != "" ? '\n$selectedText' : null,
labelStyle: TextStyle(
fontSize: 15,
color: Color(0xff2E303A),
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
);
}
openDrugToDrug(model) { openDrugToDrug(model) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,

Loading…
Cancel
Save