Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services

 Conflicts:
	lib/config/localized_values.dart
	lib/util/translations_delegate_base.dart
merge-requests/365/head
Mohammad Aljammal 5 years ago
commit e515265f11

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -764,4 +764,13 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': " :رقم الملف"},
'searchPatient-name': {
'en': 'Search Name, Medical File, Phone Number',
'ar': "اسم البحث ، الملف الطبي ، رقم الهاتف"
},
'reschedule': {'en': 'Reschedule', 'ar': 'إعادة الجدولة'},
'leaves': {'en': 'Leaves', 'ar': 'يغادر'},
}; };

@ -1,18 +1,21 @@
class PrescriptionReqModel { class PrescriptionReqModel {
String vidaAuthTokenID; String vidaAuthTokenID;
dynamic patientMRN; dynamic patientMRN;
dynamic appNo;
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN}); PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN, this.appNo});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) { PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
appNo = json['AppointmentNo'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appNo;
return data; return data;
} }
} }

@ -11,7 +11,7 @@ class MedicineService extends BaseService {
var _pharmaciesList = []; var _pharmaciesList = [];
get pharmacyItemsList => _pharmacyItemsList; get pharmacyItemsList => _pharmacyItemsList;
get pharmaciesList => _pharmaciesList; get pharmaciesList => _pharmaciesList;
String searchText='';
List<GetAssessmentResModel> patientAssessmentList = []; List<GetAssessmentResModel> patientAssessmentList = [];
PharmaciesItemsRequestModel _itemsRequestModel = PharmaciesItemsRequestModel _itemsRequestModel =
@ -20,6 +20,7 @@ class MedicineService extends BaseService {
Future getMedicineItem(String itemName) async { Future getMedicineItem(String itemName) async {
_itemsRequestModel.pHRItemName = itemName; _itemsRequestModel.pHRItemName = itemName;
searchText =itemName;
await baseAppClient.post( await baseAppClient.post(
PHARMACY_ITEMS_URL, PHARMACY_ITEMS_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -82,7 +82,9 @@ class PrescriptionService extends LookupService {
} }
Future getPrescription({int mrn}) async { Future getPrescription({int mrn}) async {
_prescriptionReqModel = PrescriptionReqModel(patientMRN: mrn); _prescriptionReqModel = PrescriptionReqModel(
patientMRN: mrn,
);
hasError = false; hasError = false;
_prescriptionList.clear(); _prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST, await baseAppClient.post(GET_PRESCRIPTION_LIST,

@ -15,7 +15,7 @@ class MedicineViewModel extends BaseViewModel {
PrescriptionService _prescriptionService = locator<PrescriptionService>(); PrescriptionService _prescriptionService = locator<PrescriptionService>();
get pharmacyItemsList => _medicineService.pharmacyItemsList; get pharmacyItemsList => _medicineService.pharmacyItemsList;
get searchText=>_medicineService.searchText;
get pharmaciesList => _medicineService.pharmaciesList; get pharmaciesList => _medicineService.pharmaciesList;
get medicationStrengthList => _prescriptionService.medicationStrengthList; get medicationStrengthList => _prescriptionService.medicationStrengthList;
@ -34,6 +34,7 @@ class MedicineViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList => List<GetAssessmentResModel> get patientAssessmentList =>
_prescriptionService.patientAssessmentList; _prescriptionService.patientAssessmentList;
List<GetMedicationResponseModel> get allMedicationList => List<GetMedicationResponseModel> get allMedicationList =>
_prescriptionService.allMedicationList; _prescriptionService.allMedicationList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList; List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
@ -41,6 +42,7 @@ class MedicineViewModel extends BaseViewModel {
_prescriptionService.itemMedicineListRoute; _prescriptionService.itemMedicineListRoute;
List<dynamic> get itemMedicineListUnit => List<dynamic> get itemMedicineListUnit =>
_prescriptionService.itemMedicineListUnit; _prescriptionService.itemMedicineListUnit;
Future getItem({int itemID}) async { Future getItem({int itemID}) async {
//hasError = false; //hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();

@ -1,5 +1,3 @@
// TODO : it have to be changed. // TODO : it have to be changed.
class PatiantInformtion { class PatiantInformtion {
@ -55,114 +53,129 @@ class PatiantInformtion {
String nursingStationName; String nursingStationName;
String startTime; String startTime;
String visitType; String visitType;
String nationalityFlagURL;
PatiantInformtion({ int patientStatusType;
this.list, PatiantInformtion(
this.projectId, {this.list,
this.clinicId, this.projectId,
this.doctorId, this.clinicId,
this.patientId, this.doctorId,
this.doctorName, this.patientId,
this.doctorNameN, this.doctorName,
this.firstName, this.doctorNameN,
this.middleName, this.firstName,
this.lastName, this.middleName,
this.firstNameN, this.lastName,
this.middleNameN, this.firstNameN,
this.lastNameN, this.middleNameN,
this.gender, this.lastNameN,
this.dateofBirth, this.gender,
this.nationalityId, this.dateofBirth,
this.mobileNumber, this.nationalityId,
this.emailAddress, this.mobileNumber,
this.patientIdentificationNo, this.emailAddress,
this.patientType, this.patientIdentificationNo,
this.admissionNo, this.patientType,
this.admissionDate, this.admissionNo,
this.createdOn, this.admissionDate,
this.roomId, this.createdOn,
this.bedId, this.roomId,
this.nursingStationId, this.bedId,
this.description, this.nursingStationId,
this.clinicDescription, this.description,
this.clinicDescriptionN, this.clinicDescription,
this.nationalityName, this.clinicDescriptionN,
this.nationalityNameN, this.nationalityName,
this.age, this.nationalityNameN,
this.genderDescription, this.age,
this.nursingStationName, this.genderDescription,
this.appointmentDate, this.nursingStationName,
this.startTime, this.appointmentDate,
this.appointmentNo, this.startTime,
this.appointmentType, this.appointmentNo,
this.arrivedOn, this.appointmentType,
this.clinicGroupId, this.arrivedOn,
this.companyName, this.clinicGroupId,
this.dischargeStatus, this.companyName,
this.doctorDetails, this.dischargeStatus,
this.endTime, this.doctorDetails,
this.episodeNo, this.endTime,
this.fallRiskScore, this.episodeNo,
this.genderInt, this.fallRiskScore,
this.isSigned, this.genderInt,
this.medicationOrders, this.isSigned,
this.nationality, this.medicationOrders,
this.patientMRN, this.nationality,
this.visitType, this.patientMRN,
}); this.visitType,
this.nationalityFlagURL,
this.patientStatusType});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion( PatiantInformtion(
projectId: json["ProjectID"] ?? json["projectID"], projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"]?? json["clinicID"], clinicId: json["ClinicID"] ?? json["clinicID"],
doctorId: json["DoctorID"]?? json["doctorID"], doctorId: json["DoctorID"] ?? json["doctorID"],
patientId: json["PatientID"]?? json["patientID"]??json['patientMRN'] ?? json['PatientMRN'], patientId: json["PatientID"] ??
doctorName: json["DoctorName"]?? json["doctorName"], json["patientID"] ??
doctorNameN: json["DoctorNameN"]?? json["doctorNameN"], json['patientMRN'] ??
firstName: json["FirstName"]?? json["firstName"], json['PatientMRN'],
middleName: json["MiddleName"]?? json["middleName"], doctorName: json["DoctorName"] ?? json["doctorName"],
lastName: json["LastName"]?? json["lastName"], doctorNameN: json["DoctorNameN"] ?? json["doctorNameN"],
firstNameN: json["FirstNameN"]?? json["firstNameN"], firstName: json["FirstName"] ?? json["firstName"],
middleNameN: json["MiddleNameN"]?? json["middleNameN"], middleName: json["MiddleName"] ?? json["middleName"],
lastNameN: json["LastNameN"]?? json["lastNameN"], lastName: json["LastName"] ?? json["lastName"],
gender: json["Gender"]?? json["gender"], firstNameN: json["FirstNameN"] ?? json["firstNameN"],
dateofBirth: json["DateofBirth"]?? json["dob"], middleNameN: json["MiddleNameN"] ?? json["middleNameN"],
nationalityId: json["NationalityID"]?? json["nationalityID"], lastNameN: json["LastNameN"] ?? json["lastNameN"],
mobileNumber: json["MobileNumber"]?? json["mobileNumber"], gender: json["Gender"] ?? json["gender"],
emailAddress: json["EmailAddress"]?? json["emailAddress"], dateofBirth: json["DateofBirth"] ?? json["dob"],
patientIdentificationNo: json["PatientIdentificationNo"]?? json["patientIdentificationNo"], nationalityId: json["NationalityID"] ?? json["nationalityID"],
patientType: json["PatientType"]?? json["patientType"], mobileNumber: json["MobileNumber"] ?? json["mobileNumber"],
admissionNo: json["AdmissionNo"]?? json["admissionNo"], emailAddress: json["EmailAddress"] ?? json["emailAddress"],
admissionDate: json["AdmissionDate"]?? json["admissionDate"], patientIdentificationNo: json["PatientIdentificationNo"] ??
createdOn: json["CreatedOn"]?? json["CreatedOn"], json["patientIdentificationNo"],
roomId: json["RoomID"]?? json["roomID"], patientType: json["PatientType"] ?? json["patientType"],
bedId: json["BedID"]?? json["bedID"], admissionNo: json["AdmissionNo"] ?? json["admissionNo"],
nursingStationId: json["NursingStationID"]?? json["nursingStationID"], admissionDate: json["AdmissionDate"] ?? json["admissionDate"],
description: json["Description"]?? json["description"], createdOn: json["CreatedOn"] ?? json["CreatedOn"],
clinicDescription: json["ClinicDescription"]?? json["clinicDescription"], roomId: json["RoomID"] ?? json["roomID"],
clinicDescriptionN: json["ClinicDescriptionN"]?? json["clinicDescriptionN"], bedId: json["BedID"] ?? json["bedID"],
nationalityName: json["NationalityName"]?? json["nationalityName"]??json['NationalityName'], nursingStationId:
nationalityNameN: json["NationalityNameN"]?? json["nationalityNameN"]??json['NationalityNameN'], json["NursingStationID"] ?? json["nursingStationID"],
age: json["Age"]?? json["age"], description: json["Description"] ?? json["description"],
genderDescription: json["GenderDescription"], clinicDescription:
nursingStationName: json["NursingStationName"], json["ClinicDescription"] ?? json["clinicDescription"],
appointmentDate: json["AppointmentDate"]?? '', clinicDescriptionN:
startTime: json["StartTime"], json["ClinicDescriptionN"] ?? json["clinicDescriptionN"],
appointmentNo :json['appointmentNo'] ?? json['AppointmentNo'], nationalityName: json["NationalityName"] ??
appointmentType :json['appointmentType'], json["nationalityName"] ??
arrivedOn :json['arrivedOn'], json['NationalityName'],
clinicGroupId :json['clinicGroupId'], nationalityNameN: json["NationalityNameN"] ??
companyName :json['companyName'], json["nationalityNameN"] ??
dischargeStatus :json['dischargeStatus'], json['NationalityNameN'],
doctorDetails :json['doctorDetails'], age: json["Age"] ?? json["age"],
endTime :json['endTime'], genderDescription: json["GenderDescription"],
episodeNo :json['episodeNo'] ?? json['EpisodeID'], nursingStationName: json["NursingStationName"],
fallRiskScore :json['fallRiskScore'], appointmentDate: json["AppointmentDate"] ?? '',
isSigned :json['isSigned'], startTime: json["startTime"],
medicationOrders :json['medicationOrders'], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
nationality :json['nationality']??json['NationalityNameN'], appointmentType: json['appointmentType'],
patientMRN :json['patientMRN'] ?? json['PatientMRN'], arrivedOn: json['arrivedOn'],
visitType :json['visitType'] ?? json['visitType'], clinicGroupId: json['clinicGroupId'],
); companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'],
endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'],
fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ?? json['PatientMRN'],
visitType: json['visitType'] ?? json['visitType'],
nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType:
json['patientStatusType'] ?? json['patientStatusType']);
} }

@ -753,7 +753,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
SizedBox( SizedBox(
height: 15, height: 15,
), ),
sliderActiveIndex == 0 sliderActiveIndex == 1
? Column( ? Column(
children: [ children: [
Row( Row(
@ -793,7 +793,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
}))) })))
], ],
) )
: sliderActiveIndex == 1 : sliderActiveIndex == 0
? Column( ? Column(
children: [ children: [
Row( Row(
@ -988,7 +988,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Navigator.of(context) Navigator.of(context)
.pushNamed(PATIENTS, arguments: { .pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,
"selectedType": "7" "selectedType": "7",
"arrivalType": "1"
}); });
}, },
), ),
@ -1024,12 +1025,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
builder: (context) => builder: (context) =>
SearchMedicinePatientScreen(), SearchMedicinePatientScreen(),
)); ));
// Navigator.of(context)
// .pushNamed(PATIENTS, arguments: {
// "patientSearchForm": _patientSearchFormValues,
// "selectedType": "7"
// });
}, },
) )
], ],
@ -1037,132 +1032,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// DashboardItem(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Center(
// child: Icon(
// DoctorApp.search_patient_1,
// size: 50,
// color: Colors.black,
// ),
// ),
// Column(
// children: [
// AppText(
// TranslationBase.of(context).searchAbout,
// color: Colors.black,
// textAlign: TextAlign.center,
// ),
// AppText(
// TranslationBase.of(context).patient,
// color: Colors.black,
// textAlign: TextAlign.center,
// )
// ],
// )
// ],
// ),
// hasBorder: true,
// onTap: () {
// Navigator.of(context).pushNamed(PATIENT_SEARCH);
// },
// ),
// DashboardItem(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Icon(
// DoctorApp.medicine_search,
// size: 50,
// color: Colors.black,
// ),
// AppText(
// TranslationBase.of(context).searchMedicine,
// color: Colors.black,
// textAlign: TextAlign.center,
// )
// ],
// ),
// hasBorder: true,
// onTap: () {
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (context) => MedicineSearchScreen(),
// // ),
// // );
// },
// ),
// DashboardItem(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Icon(
// DoctorApp.leaves,
// size: 50,
// ),
// AppText(
// TranslationBase.of(context).rescheduleLeaves,
// color: Colors.black,
// textAlign: TextAlign.center,
// )
// ],
// ),
// hasBorder: true,
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// AddRescheduleLeavScreen(),
// // MyReferredPatient(),
// ),
// );
// },
// ),
// DashboardItem(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Icon(
// DoctorApp.qr_code,
// size: 50,
// color: Colors.black,
// ),
// Column(
// children: [
// AppText(
// projectsProvider.isArabic
// ? TranslationBase.of(context).reader
// : TranslationBase.of(context).qr,
// color: Colors.black,
// textAlign: TextAlign.center,
// ),
// AppText(
// projectsProvider.isArabic
// ? TranslationBase.of(context).qr
// : TranslationBase.of(context).reader,
// color: Colors.black,
// textAlign: TextAlign.center,
// ),
// ],
// )
// ],
// ),
// // imageName: '1.png',
// hasBorder: true,
// onTap: () {
// Navigator.of(context).pushNamed(QR_READER);
// },
// ),
//],
//),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -1173,41 +1042,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
SizedBox( SizedBox(
width: 8, width: 8,
), ),
// DashboardItem(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Icon(
// DoctorApp.mail,
// size: 50,
// color: Colors.black,
// ),
// Column(
// children: [
// AppText(
// TranslationBase.of(context).theDoctor,
// textAlign: TextAlign.center,
// color: Colors.black,
// ),
// AppText(
// TranslationBase.of(context).reply,
// textAlign: TextAlign.center,
// color: Colors.black,
// ),
// ],
// )
// ],
// ),
// hasBorder: true,
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => DoctorReplyScreen(),
// ),
// );
// },
// )
], ],
), ),
SizedBox( SizedBox(
@ -1224,41 +1058,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
); );
} }
// static List<charts.Series<GaugeSegment, String>> _createInpatientData(model) {
// final data = [
// new GaugeSegment(
// model.dashboardItemsList[0].summaryoptions[0].kPIParameter,
// getValue(model.dashboardItemsList[0].summaryoptions[0].value),
// charts.MaterialPalette.blue.shadeDefault),
// new GaugeSegment(
// model.dashboardItemsList[0].summaryoptions[1].kPIParameter,
// getValue(model.dashboardItemsList[0].summaryoptions[1].value),
// charts.MaterialPalette.cyan.shadeDefault),
// new GaugeSegment(
// model.dashboardItemsList[0].summaryoptions[2].kPIParameter,
// getValue(model.dashboardItemsList[0].summaryoptions[2].value),
// charts.MaterialPalette.red.shadeDefault),
// new GaugeSegment(
// model.dashboardItemsList[0].summaryoptions[3].kPIParameter,
// getValue(model.dashboardItemsList[0].summaryoptions[3].value),
// charts.MaterialPalette.deepOrange.shadeDefault.lighter),
// new GaugeSegment(
// model.dashboardItemsList[0].summaryoptions[4].kPIParameter,
// getValue(model.dashboardItemsList[0].summaryoptions[4].value),
// charts.MaterialPalette.green.shadeDefault),
// ];
// return [
// new charts.Series<GaugeSegment, String>(
// id: 'Segments',
// domainFn: (GaugeSegment segment, _) => segment.segment,
// measureFn: (GaugeSegment segment, _) => segment.size,
// data: data,
// colorFn: (GaugeSegment segment, _) => segment.color,
// )
// ];
// }
static List<charts.Series<GaugeSegment, String>> _createReferralData(model) { static List<charts.Series<GaugeSegment, String>> _createReferralData(model) {
final data = [ final data = [
new GaugeSegment( new GaugeSegment(
@ -1290,71 +1089,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
return value == 0 ? 1 : value; return value == 0 ? 1 : value;
} }
// showCupertinoPicker(
// {context, List<ClinicModel> actionList, decKey, onSelectFun}) {
// showModalBottomSheet(
// isDismissible: false,
// isScrollControlled: true,
// context: context,
// builder: (BuildContext builder) {
// return Container(
// // height: 500,
// height: SizeConfig.realScreenHeight * 0.4,
// color: Color(0xfff7f7f7),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// Container(
// color: Color(0xfff7f7f7),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// CupertinoButton(
// child: AppText(TranslationBase.of(context).cancel
// // style: TextStyle(context)
// ),
// onPressed: () {
// Navigator.pop(context);
// },
// ),
// CupertinoButton(
// child: AppText(TranslationBase.of(context).done
// // style: textStyle(context),
// ),
// onPressed: () {
// Navigator.pop(context);
// // onSelectFun(cupertinoPickerIndex);
// },
// )
// ],
// ),
// ),
// Container(
// height: SizeConfig.realScreenHeight * 0.3,
// color: Color(0xfff7f7f7),
// child: Column(
// children: actionList
// .map((e) => Flexible(
// child: Container(
// height: 50,
// child: InkWell(
// onTap: () => changeClinic(
// e.clinicID, context, model),
// child: AppText(
// e.clinicName,
// fontSize:
// SizeConfig.textMultiplier * 1.9,
// )),
// ),
// ))
// .toList(),
// ))
// ],
// ),
// );
// });
// }
changeClinic(clinicId, BuildContext context, model) async { changeClinic(clinicId, BuildContext context, model) async {
// Navigator.pop(context); // Navigator.pop(context);
changeIsLoading(true); changeIsLoading(true);
@ -1528,80 +1262,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
margin: 5, margin: 5,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[0]))), child: getOutPatientStack(model.dashboardItemsList[1]))),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.32, height: MediaQuery.of(context).size.height * 0.32,
margin: 5, margin: 5,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[1]))), child: getOutPatientStack(model.dashboardItemsList[0]))),
// Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// rowCount(
// model.dashboardItemsList[0]
// .summaryoptions[0].kPIParameter,
// model.dashboardItemsList[0]
// .summaryoptions[0].value,
// Colors.blue),
// rowCount(
// model.dashboardItemsList[0]
// .summaryoptions[1].kPIParameter,
// model.dashboardItemsList[0]
// .summaryoptions[1].value,
// Colors.cyan),
// rowCount(
// model.dashboardItemsList[0]
// .summaryoptions[2].kPIParameter,
// model.dashboardItemsList[0]
// .summaryoptions[2].value,
// Colors.red),
// rowCount(
// model.dashboardItemsList[0]
// .summaryoptions[3].kPIParameter,
// model.dashboardItemsList[0]
// .summaryoptions[3].value,
// Colors.orange),
// rowCount(
// model.dashboardItemsList[0]
// .summaryoptions[4].kPIParameter,
// model.dashboardItemsList[0]
// .summaryoptions[4].value,
// Colors.green),
// ],
// ))),
// Expanded(
// flex: 3,
// child: Stack(children: [
// Container(
// child: GaugeChart(_createInpatientData(model))),
// Positioned(
// child: Center(
// child: Column(
// children: [
// AppText(
// TranslationBase.of(context).inPatient,
// fontSize: 11,
// fontWeight: FontWeight.bold,
// ),
// AppText(
// getPatientCount(model.dashboardItemsList[0])
// .toString(),
// fontSize: 18,
// fontWeight: FontWeight.bold,
// )
// ],
// )),
// top: MediaQuery.of(context).size.height * 0.12,
// left: MediaQuery.of(context).size.width * 0.11)
// ])),
// ],
// )
// ),
//])
//),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.24, height: MediaQuery.of(context).size.height * 0.24,
margin: 5, margin: 5,
@ -1653,18 +1320,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
model.dashboardItemsList[2] model.dashboardItemsList[2]
.summaryoptions[2].value, .summaryoptions[2].value,
Colors.red), Colors.red),
// rowCount(
// model.dashboardItemsList[2]
// .summaryoptions[3].kPIParameter,
// model.dashboardItemsList[2]
// .summaryoptions[3].value,
// Colors.orange),
// rowCount(
// model.dashboardItemsList[2]
// .summaryoptions[4].kPIParameter,
// model.dashboardItemsList[2]
// .summaryoptions[4].value,
// Colors.green),
], ],
), ),
) )
@ -1679,12 +1334,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
// AppText(
// TranslationBase.of(context).,
// fontSize: 11,
// fontWeight: FontWeight.bold,
// textOverflow: TextOverflow.ellipsis,
// ),
AppText( AppText(
getPatientCount(model.dashboardItemsList[2]) getPatientCount(model.dashboardItemsList[2])
.toString(), .toString(),
@ -1701,154 +1350,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
], ],
)), )),
])), ])),
// RoundedContainer(
// height: MediaQuery.of(context).size.height * 0.24,
// margin: 5,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Padding(
// padding: EdgeInsets.all(10),
// child: AppText(TranslationBase.of(context).otherStatistic)),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// DashboardItem(
// width: MediaQuery.of(context).size.width * 0.25,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.18
// : MediaQuery.of(context).size.height * 0.36,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 5),
// child: Icon(
// DoctorApp.lab_results,
// size: 40,
// color: Colors.black,
// ),
// ),
// Container(
// // margin: EdgeInsets.only(bottom: 10),
// child: Column(
// children: <Widget>[
// AppText(
// model.dashboardItemsList.length > 0
// ? getPatientCount(
// model.dashboardItemsList[5])
// : "",
// fontSize: SizeConfig.textMultiplier * 6,
// color: Colors.black,
// ),
// AppText(
// TranslationBase.of(context).targetPatient,
// textAlign: TextAlign.center,
// color: Colors.black,
// )
// ],
// ),
// ),
// ],
// ),
// //imageName: '1.png',
// opacity: 0,
// ),
// Container(
// color: Colors.black12,
// height: MediaQuery.of(context).size.height * 0.18,
// width: 1,
// ),
// DashboardItem(
// width: MediaQuery.of(context).size.width * 0.25,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.18
// : MediaQuery.of(context).size.height * 0.36,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 5),
// child: Icon(
// DoctorApp.radiology,
// size: 40,
// color: Colors.black,
// ),
// ),
// Container(
// margin: EdgeInsets.only(bottom: 5),
// child: Column(
// children: <Widget>[
// AppText(
// clinicName.length.toString(),
// fontSize: SizeConfig.textMultiplier * 6,
// color: Colors.black,
// ),
// AppText(
// TranslationBase.of(context).clinic,
// color: Colors.black,
// )
// ],
// ),
// ),
// ],
// ),
// //imageName: '2.png',
// opacity: 0,
// ),
// Container(
// color: Colors.black12,
// height: MediaQuery.of(context).size.height * 0.18,
// width: 1,
// ),
// DashboardItem(
// width: MediaQuery.of(context).size.width * 0.25,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.18
// : MediaQuery.of(context).size.height * 0.36,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 5),
// child: Icon(
// DoctorApp.referral,
// size: 40,
// color: Colors.black,
// ),
// ),
// Container(
// margin: EdgeInsets.only(bottom: 5),
// child: Column(
// children: <Widget>[
// AppText(
// model.dashboardItemsList.length > 0
// ? getPatientCount(
// model.dashboardItemsList[2])
// : "",
// fontSize: SizeConfig.textMultiplier * 6,
// color: Colors.black,
// ),
// AppText(
// TranslationBase.of(context).referral,
// color: Colors.black,
// )
// ],
// ),
// ),
// ],
// ),
// //imageName: '3.png',
// opacity: 0,
// ),
// ],
// )
// ],
// ))
]; ];
} }
} }

@ -31,128 +31,122 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Center( child: Container(
child: Container( color: Colors.white,
color: Colors.white, child: Column(
child: Column( // mainAxisAlignment: model.medicalFileList.length != 0 &&
// mainAxisAlignment: model.medicalFileList.length != 0 && // model.medicalFileList != null
// model.medicalFileList != null // ? MainAxisAlignment.start
// ? MainAxisAlignment.start // : MainAxisAlignment.center,
// : MainAxisAlignment.center, children: [
children: [ PatientPageHeaderWidget(patient),
PatientPageHeaderWidget(patient), Divider(
Divider( height: 1.0,
height: 1.0, thickness: 1.0,
thickness: 1.0, color: Colors.grey,
color: Colors.grey, ),
), (model.medicalFileList != null &&
(model.medicalFileList.length != 0 && model.medicalFileList.length != 0)
model.medicalFileList != null) ? ListView.builder(
? ListView.builder( //physics: ,
//physics: , physics: NeverScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical,
scrollDirection: Axis.vertical, shrinkWrap: true,
shrinkWrap: true, itemCount: model.medicalFileList[0].entityList[0]
itemCount: model.medicalFileList[0].entityList[0] .timelines.length,
.timelines.length, itemBuilder: (BuildContext ctxt, int index) {
itemBuilder: (BuildContext ctxt, int index) { return Padding(
return Padding( padding: EdgeInsets.symmetric(
padding: EdgeInsets.symmetric( horizontal: 12.0, vertical: 8.0),
horizontal: 12.0, vertical: 8.0), child: InkWell(
child: InkWell( child: Container(
child: Container( child: Column(
child: Column( children: [
children: [ Row(
Row( children: [
children: [ AppText(
AppText( TranslationBase.of(context).branch +
TranslationBase.of(context) ": ",
.branch + fontWeight: FontWeight.w700,
": ", ),
fontWeight: FontWeight.w700, AppText(model
), .medicalFileList[0]
AppText(model .entityList[0]
.medicalFileList[0] .timelines[index]
.entityList[0] .projectName),
.timelines[index] ],
.projectName), ),
], Row(
), children: [
Row( AppText(
children: [ TranslationBase.of(context)
AppText( .doctorName
TranslationBase.of(context) .toUpperCase() +
.doctorName ": ",
.toUpperCase() + fontWeight: FontWeight.w700,
": ", ),
fontWeight: FontWeight.w700, Expanded(
), child: AppText(
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
),
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
model model
.medicalFileList[0] .medicalFileList[0]
.entityList[0] .entityList[0]
.timelines[index] .timelines[index]
.clinicName, .doctorName,
fontWeight: FontWeight.w700,
), ),
], ),
), ],
SizedBox(height: 10.0), ),
Divider( Row(
height: 1.0, children: [
thickness: 1.0, AppText(
color: Colors.grey.shade400, TranslationBase.of(context)
) .clinicName +
], ": ",
), fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
),
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
), ),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender:
patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
), ),
); onTap: () {
}) Navigator.push(
: Center( context,
child: Container( MaterialPageRoute(
child: AppText( builder: (context) =>
'THERES NO MEDICAL FILE FOR THIS Patient', MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
)),
);
},
), ),
), );
) })
], : Container(
), child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
)
],
), ),
), ),
), ),

@ -1,10 +1,10 @@
import 'dart:math'; import 'dart:math';
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
@ -12,13 +12,13 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_recognition_result.dart';
@ -117,151 +117,169 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.allMedicationList.length == 0) // if (model.allMedicationList.length == 0)
await model.getMedicationList(); // await model.getMedicationList();
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) {
baseViewModel: model, myController.text =model.searchText;
isShowAppBar: false, return AppScaffold(
appBarTitle: TranslationBase.of(context).searchMedicine, // baseViewModel: model,
body: SingleChildScrollView( isShowAppBar: false,
child: FractionallySizedBox( appBarTitle: TranslationBase.of(context).searchMedicine,
widthFactor: 0.97, body: SingleChildScrollView(
child: SingleChildScrollView( child: FractionallySizedBox(
child: Container( widthFactor: 0.97,
// height: SizeConfig.screenHeight, child: SingleChildScrollView(
child: Column( child: Container(
mainAxisAlignment: MainAxisAlignment.spaceAround, // height: SizeConfig.screenHeight,
children: <Widget>[ child: Column(
SizedBox( mainAxisAlignment: MainAxisAlignment.start,
height: SizeConfig.screenHeight * .16, children: <Widget>[
), SizedBox(
Column(children: [ height: SizeConfig.screenHeight * .16,
FractionallySizedBox( ),
widthFactor: 0.9, FractionallySizedBox(
child: Column( widthFactor: 0.9,
children: <Widget>[ child: Container(
Container( decoration: BoxDecoration(
// height: MediaQuery.of(context).size.height * 0.070, borderRadius:
child: InkWell( BorderRadius.all(Radius.circular(6.0)),
onTap: model.allMedicationList != null border: Border.all(
? () { width: 1.0, color: HexColor("#CCCCCC"))),
setState(() { padding: EdgeInsets.all(10),
_selectedMedication = null; child: AppTextFormField(
}); borderColor: Colors.white,
} hintText: TranslationBase.of(context)
: null, .searchMedicineNameHere,
child: _selectedMedication == null controller: myController,
? AutoCompleteTextField< onSaved: (value) {},
GetMedicationResponseModel>( onFieldSubmitted: (value) {
decoration: textFieldSelectorDecoration( searchMedicine(context, model);
TranslationBase.of(context) },
.searchMedicineNameHere, inputFormatter: ONLY_LETTERS,
_selectedMedication != null
? _selectedMedication.genericName
: null,
true,
icon: EvaIcons.search),
itemSubmitted: (item) => setState(
() => _selectedMedication = item),
key: key,
suggestions: model.allMedicationList,
itemBuilder: (context, suggestion) =>
new Padding(
child: Texts(
suggestion.description +
'/' +
suggestion.genericName),
padding: EdgeInsets.all(10.0)),
itemSorter: (a, b) => 1,
itemFilter: (suggestion, input) =>
suggestion.genericName
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.description
.toLowerCase()
.startsWith(
input.toLowerCase()) ||
suggestion.keywords
.toLowerCase()
.startsWith(input.toLowerCase()),
)
: TextField(
minLines: 2,
maxLines: 2,
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere,
_selectedMedication != null
? _selectedMedication
.description +
(' (${_selectedMedication.genericName} )')
: null,
true,
icon: EvaIcons.search),
enabled: false,
),
), ),
), ),
], ),
), FractionallySizedBox(
) widthFactor: 0.9,
]), child: Container(
SizedBox( child: Wrap(
height: SizeConfig.screenHeight * .5, alignment: WrapAlignment.center,
), children: <Widget>[
Column( // TODO change it secondary button and add loading
children: [ AppButton(
FractionallySizedBox( title: TranslationBase.of(context).search,
widthFactor: 0.97, onPressed: () async{
child: Wrap( await searchMedicine(context, model);
alignment: WrapAlignment.center,
children: <Widget>[ },
// TODO change it secondary button and add loading ),
AppButton( ],
title: TranslationBase.of(context).search,
onPressed: () async {
await searchMedicine(context, model);
},
), ),
], ),
),
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase
.of(context)
.youCanFind +
(myController.text !=''?model.pharmacyItemsList.length
.toString():'0' )+
" " +
TranslationBase
.of(context)
.itemsInSearch,
fontWeight: FontWeight.bold,
),
],
),
),
SizedBox(
height:10,
), ),
) if(myController.text !='')
], Container(
) height: MediaQuery
], .of(context)
), .size
)), .height * 0.5,
child: ListView.builder(
padding: const EdgeInsets.only(top:20),
scrollDirection: Axis.vertical,
// shrinkWrap: true,
itemCount:
model.pharmacyItemsList ==
null
? 0
: model
.pharmacyItemsList.length,
itemBuilder:
(BuildContext context, int index) {
return InkWell(
child: MedicineItemWidget(
label: model
.pharmacyItemsList[index]
["ItemDescription"],
url: model
.pharmacyItemsList[index]
["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID: model
.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
),
);
},
);
},
),
),
],
),
)),
),
), ),
), );}
),
); );
} }
searchMedicine(context, MedicineViewModel model) async { searchMedicine(context, MedicineViewModel model) async {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
if (_selectedMedication.isNullOrEmpty()) { if (myController.text.isNullOrEmpty()) {
helpers.showErrorToast(TranslationBase.of(context).typeMedicineName); helpers.showErrorToast(TranslationBase
.of(context)
.typeMedicineName);
//"Type Medicine Name") //"Type Medicine Name")
return; return;
} else if (_selectedMedication.description.length < 3) { }
helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); if (myController.text.length < 3) {
helpers.showErrorToast(TranslationBase
.of(context)
.moreThan3Letter);
return; return;
} }
// GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Navigator.push(
context, await model.getMedicineItem(myController.text);
MaterialPageRoute( GifLoaderDialogUtils.hideDialog(context);
builder: (context) => PharmaciesListScreen(
itemID: _selectedMedication.itemId,
selectedMedication: _selectedMedication,
),
),
);
// await model.getMedicineItem(_selectedMedication.description);
// GifLoaderDialogUtils.hideDialog(context);
} }
startVoiceSearch() { startVoiceSearch() {

@ -2,7 +2,6 @@ import 'dart:convert';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -23,11 +22,9 @@ class PharmaciesListScreen extends StatefulWidget {
final int itemID; final int itemID;
final String url; final String url;
final GetMedicationResponseModel selectedMedication;
// In the constructor, require a item id. // In the constructor, require a item id.
PharmaciesListScreen( PharmaciesListScreen({Key key, @required this.itemID, this.url})
{Key key, @required this.itemID, this.url, this.selectedMedication})
: super(key: key); : super(key: key);
@override @override
@ -52,39 +49,31 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) => model.getPharmaciesList(widget.itemID),
await model.getPharmaciesList(widget.selectedMedication.itemId); builder: (_, model, w) => AppScaffold(
await model.getMedicineItem(widget.selectedMedication.description); baseViewModel: model,
appBarTitle: TranslationBase.of(context).pharmaciesList,
}, body: Container(
builder: (_, model, w) => height: SizeConfig.screenHeight,
AppScaffold( child: ListView(
baseViewModel: model, shrinkWrap: true,
appBarTitle: TranslationBase scrollDirection: Axis.vertical,
.of(context) physics: const AlwaysScrollableScrollPhysics(),
.pharmaciesList, children: <Widget>[
body: Container( model.pharmaciesList.length > 0
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[
model.pharmaciesList.length > 0 && model.pharmacyItemsList.length > 0
? RoundedContainer( ? RoundedContainer(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(7)), BorderRadius.all(Radius.circular(7)),
child: model.pharmacyItemsList[0] child: widget.url != null
["ImageSRCUrl"]!= null ? Image.network(
? Image.network( widget.url,
model.pharmacyItemsList[0]["ImageSRCUrl"], height:
height: SizeConfig.imageSizeMultiplier *
SizeConfig.imageSizeMultiplier *
21, 21,
width: width:
SizeConfig.imageSizeMultiplier * SizeConfig.imageSizeMultiplier *
@ -241,8 +230,8 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
}), }),
), ),
) )
]), ]),
),),); ),),);
} }
@ -253,7 +242,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
//TODO CHECK THE URL IS NULL OR NOT //TODO CHECK THE URL IS NULL OR NOT
Uint8List dataFromBase64String(String base64String) { Uint8List dataFromBase64String(String base64String) {
if(base64String !=null) if(base64String !=null)
return base64Decode(base64String); return base64Decode(base64String);
} }
String base64String(Uint8List data) { String base64String(Uint8List data) {

@ -50,16 +50,15 @@ class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
child: Center( child: Center(
child: Container( child: Container(
height: 60.0, height: 60.0,
color: Colors.white,
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width, // 0.9, width: MediaQuery.of(context).size.width * 0.92, // 0.9,
// decoration: BoxDecoration( decoration: BoxDecoration(
// border: Border( border: Border(
// bottom: BorderSide( bottom: BorderSide(
// color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
// width: 0.9), //width: 0.7 width: 0.9), //width: 0.7
// ), ),
// color: Colors.white), color: Colors.white),
child: TabBar( child: TabBar(
isScrollable: true, isScrollable: true,
onTap: (index) { onTap: (index) {
@ -68,42 +67,31 @@ class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
}); });
}, },
controller: _tabController, controller: _tabController,
indicatorWeight: 0.01, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
indicatorColor: Colors.grey[800], labelPadding:
// labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
// EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Container(
width: MediaQuery.of(context).size.width * 0.40, width: MediaQuery.of(context).size.width * 0.30,
decoration: BoxDecoration(
color: activeIndex == 0
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchPatient, TranslationBase.of(context).searchPatient,
color: activeIndex == 0 ? Colors.white : Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.40, width: MediaQuery.of(context).size.width * 0.30,
decoration: BoxDecoration(
color: activeIndex == 1
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center( child: Center(
child: AppText( child: AppText(
TranslationBase.of(context).searchMedicine, TranslationBase.of(context).searchMedicine,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: activeIndex == 1 ? Colors.white : Colors.black, color: Colors.black),
),
), ),
), ),
], ],

@ -510,7 +510,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
]) ])
: SizedBox( : SizedBox(
height: SizeConfig.screenHeight * .4, height: SizeConfig.screenHeight * .45,
), ),
], ],
), ),

@ -33,8 +33,12 @@ class PatientsScreen extends StatefulWidget {
final patientSearchForm; final patientSearchForm;
final selectedType; final selectedType;
final isAppbar; final isAppbar;
final arrivalType;
PatientsScreen( PatientsScreen(
{this.patientSearchForm, this.selectedType, this.isAppbar = true}); {this.patientSearchForm,
this.selectedType,
this.isAppbar = true,
this.arrivalType});
@override @override
_PatientsScreenState createState() => _PatientsScreenState(); _PatientsScreenState createState() => _PatientsScreenState();
} }
@ -70,6 +74,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
var selectedFilter = 1; var selectedFilter = 1;
bool _isError = false; bool _isError = false;
String error = ""; String error = "";
String arrivalType;
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
final _controller = TextEditingController(); final _controller = TextEditingController();
@ -85,8 +90,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
for (var i = 0; i < responseModelList2.length; i++) { for (var i = 0; i < responseModelList2.length; i++) {
String firstName = responseModelList[i].firstName.toUpperCase(); String firstName = responseModelList[i].firstName.toUpperCase();
String lastName = responseModelList[i].lastName.toUpperCase(); String lastName = responseModelList[i].lastName.toUpperCase();
String mobile = responseModelList[i].mobileNumber.toUpperCase();
String patientID = responseModelList[i].patientId.toString();
if (firstName.contains(str.toUpperCase()) || if (firstName.contains(str.toUpperCase()) ||
lastName.contains(str.toUpperCase())) { lastName.contains(str.toUpperCase()) ||
mobile.contains(str) ||
patientID.contains(str)) {
filterData.add(responseModelList[i]); filterData.add(responseModelList[i]);
} }
} }
@ -220,7 +230,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType = widget.selectedType != null patientType = widget.selectedType != null
? widget.selectedType ? widget.selectedType
: routeArgs['selectedType']; : routeArgs['selectedType'];
arrivalType = widget.arrivalType != null
? widget.arrivalType
: routeArgs['arrivalType'];
if (routeArgs != null && routeArgs.containsKey("isSearch")) { if (routeArgs != null && routeArgs.containsKey("isSearch")) {
isSearch = routeArgs['isSearch']; isSearch = routeArgs['isSearch'];
} }
@ -355,7 +367,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
Container( Container(
width: SizeConfig.screenWidth * 0.9, width: SizeConfig.screenWidth * 0.9,
height: height:
SizeConfig.screenHeight * 0.07, SizeConfig.screenHeight * 0.08,
child: TextField( child: TextField(
controller: _controller, controller: _controller,
onChanged: (String str) { onChanged: (String str) {
@ -364,21 +376,30 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: buildInputDecoration( decoration: buildInputDecoration(
context, context,
TranslationBase.of(context) TranslationBase.of(context)
.searchPatient), .searchPatientName),
), ),
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
if (int.parse(patientType) == 7) if (int.parse(patientType) == 7)
ClinicList( Container(
clinicId: clinicId, padding: EdgeInsets.all(5),
onClinicChange: (newValue) { decoration: BoxDecoration(
clinicId = newValue; color: Colors.white,
changeClinic( border: Border.all(
newValue, context, model); color: Colors.grey),
}, borderRadius:
), BorderRadius.circular(
10)),
child: ClinicList(
clinicId: clinicId,
onClinicChange: (newValue) {
clinicId = newValue;
changeClinic(
newValue, context, model);
},
)),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: MediaQuery.of(context) top: MediaQuery.of(context)
@ -482,6 +503,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
return PatientCard( return PatientCard(
patientInfo: item, patientInfo: item,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType,
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.pushNamed( .pushNamed(
@ -574,6 +596,11 @@ class _PatientsScreenState extends State<PatientsScreen> {
} }
parsed = lItems; parsed = lItems;
responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList.sort((a, b) {
var adate = a.arrivedOn;
var bdate = b.arrivedOn; //before -> var bdate = b.expiry;
return adate.compareTo(bdate);
});
responseModelList2 = responseModelList; responseModelList2 = responseModelList;
_isError = false; _isError = false;
} else { } else {
@ -599,10 +626,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
InputDecoration buildInputDecoration(BuildContext context, hint) { InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration( return InputDecoration(
suffixIcon: IconButton( suffixIcon: IconButton(
icon: new Image.asset("assets/images/filter-512.png"), icon: Icon(DoctorApp.search_patient),
color: Colors.grey, color: Colors.grey,
onPressed: () {}, onPressed: () {},
iconSize: 20, iconSize: 30,
), ),
filled: true, filled: true,
fillColor: Colors.white, fillColor: Colors.white,

@ -1,37 +1,76 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:url_launcher/url_launcher.dart';
class RadiologyReportScreen extends StatelessWidget { class RadiologyReportScreen extends StatelessWidget {
final String reportData; final String reportData;
final String url;
RadiologyReportScreen({Key key, this.reportData}); RadiologyReportScreen({Key key, this.reportData, this.url});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).radiologyReport, appBarTitle: TranslationBase.of(context).radiologyReport,
body: Container( body: SingleChildScrollView(
padding: EdgeInsets.all(10), child: Column(
margin: EdgeInsets.all(10), children: [
decoration: BoxDecoration( Container(
borderRadius: BorderRadius.all(Radius.circular(10)), padding: EdgeInsets.all(10),
color: Colors.white, margin: EdgeInsets.all(10),
border: Border( decoration: BoxDecoration(
bottom: BorderSide(color: Colors.grey, width: 0.5), borderRadius: BorderRadius.all(Radius.circular(10)),
top: BorderSide(color: Colors.grey, width: 0.5), color: Colors.white,
left: BorderSide(color: Colors.grey, width: 0.5), border: Border(
right: BorderSide(color: Colors.grey, width: 0.5), bottom: BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide(color: Colors.grey, width: 0.5),
right: BorderSide(color: Colors.grey, width: 0.5),
),
),
child: AppText(
reportData,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
SizedBox(height:MediaQuery.of(context).size.height * 0.13 ,)
],
), ),
), ),
child: AppText( bottomSheet: url == null
reportData, ? Container(
fontSize: 2.5 * SizeConfig.textMultiplier, height: MediaQuery.of(context).size.height * 0,
), )
), : Container(
); width: double.infinity,
height: MediaQuery.of(context).size.height * 0.1,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
// TODO change it secondary button and add loading
AppButton(
title: TranslationBase.of(context).openRad,
onPressed: () async {
launch(url);
},
),
],
),
),
),
],
),
));
} }
} }

@ -102,6 +102,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
reportData: model reportData: model
.patientRadiologyList[index] .patientRadiologyList[index]
.reportData, .reportData,
url: model
.patientRadiologyList[index].imageURL,
)), )),
); );
}, },

@ -55,6 +55,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
child: TabBar( child: TabBar(
isScrollable: true, isScrollable: true,
controller: _tabController, controller: _tabController,
indicatorColor: Colors.red[800],
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,

@ -35,7 +35,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
return BaseView<PrescriptionViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescription(mrn: 0), onModelReady: (model) => model.getPrescription(mrn: patient.patientId),
builder: builder:
(BuildContext context, PrescriptionViewModel model, Widget child) => (BuildContext context, PrescriptionViewModel model, Widget child) =>
AppScaffold( AppScaffold(

@ -421,4 +421,8 @@ class Helpers {
static hideKeyboard(BuildContext context) { static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
} }
static String capitalize(str) {
return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
}
} }

@ -70,6 +70,8 @@ class TranslationBase {
String get searchPatient => String get searchPatient =>
localizedValues['searchPatient'][locale.languageCode]; localizedValues['searchPatient'][locale.languageCode];
String get searchPatientName =>
localizedValues['searchPatient-name'][locale.languageCode];
String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode];
@ -1147,6 +1149,11 @@ class TranslationBase {
String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode];
String get fileNumber => localizedValues['fileNumber'][locale.languageCode];
String get reschedule => localizedValues['reschedule'][locale.languageCode];
String get leaves => localizedValues['leaves'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -695,7 +695,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
this.checkActivationCode(authProv, value: value); this.checkActivationCode(authProv, value: value);
}, },
() => { () => {
//Navigator.pop(context), Navigator.pop(context),
print('Faild..'), print('Faild..'),
}, },
).displayDialog(context); ).displayDialog(context);

@ -59,9 +59,58 @@ class _LabResultWidgetState extends State<LabResultWidget> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
), ),
child: Column( child: Column(children: [
children: widget.labResult.map((result) { Container(
child: Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).description,
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
color: HexColor('#515B5D'),
child: Center(
child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
),
height: 60),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
),
height: 60),
),
],
),
),
...widget.labResult.map((result) {
return Container( return Container(
padding: EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border( border: Border(
@ -76,53 +125,6 @@ class _LabResultWidgetState extends State<LabResultWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.description,
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
color: HexColor('#515B5D'),
child: Center(
child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
),
height: 60),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: HexColor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
),
height: 60),
),
],
),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -164,7 +166,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
); );
}).toList(), }).toList(),
), ]),
), ),
) )
], ],

@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -15,200 +16,278 @@ class PatientCard extends StatelessWidget {
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function onTap; final Function onTap;
final String patientType; final String patientType;
const PatientCard({Key key, this.patientInfo, this.onTap, this.patientType}) final String arrivalType;
const PatientCard(
{Key key,
this.patientInfo,
this.onTap,
this.patientType,
this.arrivalType})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: SizeConfig.screenWidth * 0.95, width: SizeConfig.screenWidth * 0.9,
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.all(6),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.white), borderRadius: BorderRadius.circular(15),
margin: EdgeInsets.all(5), color: Colors.white,
child: InkWell( ),
child: Column( child: Stack(children: [
children: [ Container(
SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList" height: MediaQuery.of(context).size.height * .17,
? Container(height: 5, color: Colors.green[800]) width: 5,
: Container(), decoration: BoxDecoration(
SizedBox( borderRadius: BorderRadius.only(
height: 10, topLeft: Radius.circular(10),
), bottomLeft: Radius.circular(10)),
SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList" color: patientInfo.patientStatusType == 43
? Row( ? Colors.green[500]
mainAxisAlignment: MainAxisAlignment.spaceBetween, : Colors.red[800],
children: [ )),
AppText( Container(
TranslationBase.of(context).arrivedP, padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
color: Colors.green[800], child: InkWell(
fontWeight: FontWeight.bold, child: Column(
), children: [
isToday(patientInfo.arrivedOn) == false SizedBox(
? AppText(DateUtils.convertStringToDateFormat( height: 10,
patientInfo.arrivedOn, 'mm-dd-yyyy hh:mm')) ),
: AppText(DateUtils.convertStringToDateFormat( SERVICES_PATIANT2[int.parse(patientType)] ==
patientInfo.arrivedOn, 'hh:mm')) "patientArrivalList"
], ? Padding(
) padding: EdgeInsets.only(left: 12.0),
: SizedBox(), child: Row(
Padding( mainAxisAlignment: MainAxisAlignment.spaceBetween,
padding: EdgeInsets.only(left: 12.0), children: [
child: Row( patientInfo.patientStatusType == 43
mainAxisAlignment: MainAxisAlignment.spaceBetween, ? AppText(
children: [ TranslationBase.of(context).arrivedP,
Row(children: [ color: Colors.green,
AppText( fontWeight: FontWeight.bold,
patientInfo.firstName + " " + patientInfo.lastName, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: 12,
fontWeight: FontWeight.bold, )
backGroundcolor: Colors.white, : AppText(
), TranslationBase.of(context).notArrived,
patientInfo.gender == 1 color: Colors.red[800],
? Icon( fontWeight: FontWeight.bold,
DoctorApp.male_2, fontFamily: 'Poppins',
color: Colors.blue, fontSize: 12,
) ),
: Icon( this.arrivalType == '1'
DoctorApp.female_1, ? AppText(
color: Colors.pink, patientInfo.startTime != null
), ? patientInfo.startTime
]), : '',
AppText( fontFamily: 'Poppins',
patientInfo.nationalityName ?? patientInfo.nationality, fontWeight: FontWeight.w600,
fontWeight: FontWeight.bold, )
) : AppText(
], DateUtils.convertStringToDateFormat(
)), patientInfo.arrivedOn,
Row(children: <Widget>[ 'MM-dd-yyyy HH:mm'),
Column( fontFamily: 'Poppins',
mainAxisAlignment: MainAxisAlignment.start, fontWeight: FontWeight.w600,
children: <Widget>[ )
],
))
: SizedBox(),
Padding( Padding(
padding: EdgeInsets.only(left: 12.0), padding: EdgeInsets.only(left: 12.0),
child: Container( child: Row(
decoration: BoxDecoration( mainAxisAlignment: MainAxisAlignment.spaceBetween,
boxShadow: [ children: [
BoxShadow( Row(children: [
color: Color.fromRGBO(0, 0, 0, 0.08), AppText(
offset: Offset(0.0, 5.0), (Helpers.capitalize(patientInfo.firstName) +
blurRadius: 16.0) " " +
Helpers.capitalize(patientInfo.lastName)),
fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
patientInfo.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
Row(
children: [
AppText(
patientInfo.nationalityName ??
patientInfo.nationality,
fontWeight: FontWeight.bold,
fontSize: 14,
),
patientInfo.nationality != null
? ClipRRect(
borderRadius:
BorderRadius.circular(20.0),
child: Image.network(
patientInfo.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder: (BuildContext context,
Object exception,
StackTrace stackTrace) {
return Text('No Image');
},
))
: SizedBox()
],
)
], ],
borderRadius: BorderRadius.all(Radius.circular(35.0)), )),
color: Color(0xffCCCCCC), Row(children: <Widget>[
), Column(
width: 70, mainAxisAlignment: MainAxisAlignment.start,
height: 70, children: <Widget>[
child: Icon( Padding(
patientInfo.gender == 1 padding: EdgeInsets.only(left: 12.0),
? DoctorApp.male child: Container(
: DoctorApp.female_icon, // decoration: BoxDecoration(
size: 70, // boxShadow: [
color: Colors.white, // // BoxShadow(
), // // color: Color.fromRGBO(0, 0, 0, 0.08),
), // // offset: Offset(0.0, 5.0),
), // // blurRadius: 16.0)
], // // ],
), // // borderRadius: BorderRadius.all(Radius.circular(35.0)),
SizedBox( // // color: Color(0xffCCCCCC),
width: 10, // ),
), width: 60,
Expanded( height: 60,
child: Column( child: Image.asset(
crossAxisAlignment: CrossAxisAlignment.start, patientInfo.gender == 1
children: [ ? 'assets/images/male_avatar.png'
Container( : 'assets/images/female_avatar.png',
child: RichText( fit: BoxFit.cover,
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).fileNo,
style: TextStyle(
fontSize:
2.2 * SizeConfig.textMultiplier)),
new TextSpan(
text: patientInfo.patientId.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
)),
],
),
),
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age + " : ",
), ),
new TextSpan( ),
text:
"${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}",
style: TextStyle(
fontWeight: FontWeight.w700,
)),
],
), ),
), ],
), ),
if (SERVICES_PATIANT2[int.parse(patientType)] == SizedBox(
"List_MyOutPatient") width: 10,
Container( ),
child: Row( Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: [
TranslationBase.of(context).appointmentDate + Container(
" : ", child: RichText(
fontSize: 14, text: new TextSpan(
), style: new TextStyle(
Container( fontSize: 2.0 * SizeConfig.textMultiplier,
height: 15, color: Colors.black),
width: 60, children: <TextSpan>[
decoration: BoxDecoration( new TextSpan(
borderRadius: BorderRadius.circular(25), text: TranslationBase.of(context)
color: HexColor("#20A169"), .fileNumber,
), style: TextStyle(
child: AppText( fontSize: 14,
patientInfo.startTime, fontFamily: 'Poppins')),
color: Colors.white, new TextSpan(
fontSize: 1.5 * SizeConfig.textMultiplier, text: patientInfo.patientId.toString(),
textAlign: TextAlign.center, style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
), ),
SizedBox( ),
width: 3.5, Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).age +
" : ",
style: TextStyle(fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 15)),
],
),
), ),
),
if (SERVICES_PATIANT2[int.parse(patientType)] ==
"List_MyOutPatient")
Container( Container(
child: AppText( child: Row(
convertDateFormat2( mainAxisAlignment: MainAxisAlignment.start,
patientInfo.appointmentDate.toString()), children: <Widget>[
fontSize: 1.5 * SizeConfig.textMultiplier, AppText(
fontWeight: FontWeight.bold, TranslationBase.of(context)
.appointmentDate +
" : ",
fontSize: 14,
),
patientInfo.startTime != null
? Container(
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(25),
color: HexColor("#20A169"),
),
child: AppText(
patientInfo.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
)
: SizedBox(),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(patientInfo
.appointmentDate
.toString()),
fontSize:
1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 0.5,
)
],
),
margin: EdgeInsets.only(
top: 8,
), ),
),
SizedBox(
height: 0.5,
) )
], ]))
), ]),
margin: EdgeInsets.only( ],
top: 8, ),
), onTap: onTap,
) ))
])) ]));
]),
],
),
onTap: onTap,
));
// ]), // ]),
// TableRow(children: [ // TableRow(children: [

@ -36,72 +36,70 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ children: [
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
isDisable: patient.episodeNo != 0 ? true : false, isDisable: patient.episodeNo != 0 ? true : false,
nameLine1: TranslationBase.of(context).createNew, nameLine1: TranslationBase.of(context).createNew,
nameLine2: TranslationBase.of(context).episode, nameLine2: TranslationBase.of(context).episode,
route: CREATE_EPISODE, route: CREATE_EPISODE,
onTap: () async { onTap: () async {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: patient.appointmentNo, appointmentNo: patient.appointmentNo,
patientMRN: patient.patientMRN); patientMRN: patient.patientMRN);
await model.postEpisode(postEpisodeReqModel); await model.postEpisode(postEpisodeReqModel);
patient.episodeNo = model.episodeID; patient.episodeNo = model.episodeID;
Navigator.of(context) Navigator.of(context).pushNamed(CREATE_EPISODE,
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient}); arguments: {'patient': patient});
}, },
isLoading: model.state == ViewState.BusyLocal, isLoading: model.state == ViewState.BusyLocal,
icon: 'create-episod.png'), icon: 'create-episod.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
isDisable: patient.episodeNo == 0 ? true : false, isDisable: patient.episodeNo == 0 ? true : false,
nameLine1: TranslationBase.of(context).update, nameLine1: TranslationBase.of(context).update,
nameLine2: TranslationBase.of(context).episode, nameLine2: TranslationBase.of(context).episode,
route: UPDATE_EPISODE, route: UPDATE_EPISODE,
icon: 'modilfy-episode.png'), icon: 'modilfy-episode.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: RADIOLOGY, route: RADIOLOGY,
nameLine1: TranslationBase.of(context).radiology, nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_INSURANCE_APPROVALS, route: PATIENT_INSURANCE_APPROVALS,
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service, nameLine2: TranslationBase.of(context).service,
icon: 'lab.png'), icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
from: from, from: from,
to: to, to: to,
nameLine1: TranslationBase.of(context).vital, nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs, nameLine2: TranslationBase.of(context).signs,
route: route:
VITAL_SIGN_DETAILS /* PATIENT_VITAL_SIGN VITAL_SIGN_DETAILS /* PATIENT_VITAL_SIGN
*/ */
, ,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
if (selectedPatientType != 7) if (selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: LAB_ORDERS, route: LAB_ORDERS,
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'), icon: 'lab.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -112,26 +110,26 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
if (selectedPatientType != 0 && if (selectedPatientType != 0 &&
selectedPatientType != 5 && selectedPatientType != 5 &&
selectedPatientType != 7) selectedPatientType != 7)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PROGRESS_NOTE, route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_ADMISSION_REQUEST, route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
icon: 'heartbeat.png'), icon: 'heartbeat.png'),
(int.parse(patientType) == 7 || int.parse(patientType) == 6) (int.parse(patientType) == 7 || int.parse(patientType) == 6)
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION_HISTORY, route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
icon: 'lab.png') icon: 'lab.png')
@ -151,29 +149,29 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine2: TranslationBase.of(context).procedures, nameLine2: TranslationBase.of(context).procedures,
icon: 'lab.png'), icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: REFER_PATIENT_TO_DOCTOR, route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral, nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).patient,
icon: 'note.png'), icon: 'note.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ADD_SICKLEAVE, route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick, nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave, nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'), icon: 'sick_leaves_icons.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: PATIENT_UCAF_REQUEST, route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient, nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf, nameLine2: TranslationBase.of(context).ucaf,
icon: 'lab.png'), icon: 'lab.png'),
], ],
), ),
); );

@ -26,7 +26,6 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ children: [
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -66,22 +65,21 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
// nameLine1: TranslationBase.of(context).admission, // nameLine1: TranslationBase.of(context).admission,
// nameLine2: TranslationBase.of(context).request, // nameLine2: TranslationBase.of(context).request,
// icon: 'heartbeat.png'), // icon: 'heartbeat.png'),
// (int.parse(patientType) == 7 || int.parse(patientType) == 6) (int.parse(patientType) == 7 || int.parse(patientType) == 6)
// ? PatientProfileButton( ? PatientProfileButton(
// key: key, key: key,
// patient: patient, patient: patient,
// route: ORDER_PRESCRIPTION, route: ORDER_PRESCRIPTION,
// nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
// nameLine2: TranslationBase.of(context).prescription, nameLine2: TranslationBase.of(context).prescription,
// icon: 'lab.png') icon: 'lab.png')
// : : PatientProfileButton(
PatientProfileButton( key: key,
key: key, patient: patient,
patient: patient, route: ORDER_PRESCRIPTION_HISTORY,
route: ORDER_PRESCRIPTION_HISTORY, nameLine1: TranslationBase.of(context).orders,
nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription,
nameLine2: TranslationBase.of(context).prescription, icon: 'lab.png'),
icon: 'lab.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -142,8 +142,11 @@ class _AppDrawerState extends State<AppDrawer> {
}, },
), ),
InkWell( InkWell(
child: DrawerItem(TranslationBase.of(context).rescheduleLeaves, child: DrawerItem(
DoctorApp.leaves), TranslationBase.of(context).reschedule,
DoctorApp.leaves,
subTitle: TranslationBase.of(context).leaves,
),
onTap: () { onTap: () {
Navigator.pop(context); Navigator.pop(context);

@ -17,13 +17,13 @@ class AppScaffold extends StatelessWidget {
final bool isLoading; final bool isLoading;
final bool isShowAppBar; final bool isShowAppBar;
final BaseViewModel baseViewModel; final BaseViewModel baseViewModel;
final Widget bottomSheet;
AppScaffold( AppScaffold(
{this.appBarTitle = '', {this.appBarTitle = '',
this.body, this.body,
this.isLoading = false, this.isLoading = false,
this.isShowAppBar = true, this.isShowAppBar = true,
this.baseViewModel}); this.baseViewModel, this.bottomSheet});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -59,6 +59,8 @@ class AppScaffold extends StatelessWidget {
], ],
) )
: null, : null,
bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body: projectProvider.isInternetConnection
? baseViewModel != null ? baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(

@ -42,6 +42,7 @@ class _DrawerItemState extends State<DrawerItem> {
AppText( AppText(
widget.title, widget.title,
color: widget.color ?? Colors.black, color: widget.color ?? Colors.black,
textOverflow: TextOverflow.ellipsis,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// margin: 5, // margin: 5,
marginLeft: 5, marginLeft: 5,

@ -608,7 +608,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -900,7 +900,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -1084,5 +1084,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

@ -125,6 +125,15 @@ flutter:
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf - asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf - asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
weight: 700 weight: 700
- family: Poppins
fonts:
- asset: assets/fonts/Poppins/Poppins-Regular.ttf
- asset: assets/fonts/Poppins/Poppins-Medium.ttf
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 700
# - family: Trajan Pro # - family: Trajan Pro
# fonts: # fonts:
# - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro.ttf

Loading…
Cancel
Save