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

 Conflicts:
	lib/screens/patients/patients_screen.dart
merge-requests/354/head
Elham Rababah 5 years ago
commit e7d1a6c805

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -292,4 +292,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.0.rc.1 COCOAPODS: 1.10.1

@ -212,6 +212,9 @@ const GET_PROCEDURE_VALIDATION =
const GET_BOX_QUANTITY = const GET_BOX_QUANTITY =
'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity';
///GET ECG
const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults";
var selectedPatientType = 1; var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************ //*********change value to decode json from Dropdown ************

@ -57,7 +57,7 @@ const Map<String, Map<String, String>> localizedValues = {
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'}, 'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},
'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'}, 'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'},
'lastName': {'en': 'Last Name', 'ar': 'اسم العائلة'}, 'lastName': {'en': 'Last Name', 'ar': 'اسم العائلة'},
'phoneNumber': {'en': 'Phone Number ', 'ar': 'رقم الجوال'}, 'phoneNumber': {'en': "Patient's Phone Number ", 'ar': 'رقم الجوال'},
'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'}, 'patientID': {'en': 'Patient ID', 'ar': 'رقم المريض'},
'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'}, 'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'},
'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'}, 'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'},
@ -746,4 +746,6 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Search patient or Medicines", 'en': "Search patient or Medicines",
'ar': "مریض یا دوائیں تلاش کریں" 'ar': "مریض یا دوائیں تلاش کریں"
}, },
'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
}; };

@ -0,0 +1,64 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class PatientMuseResultsModel {
int rowID;
String setupID;
int projectID;
String orderNo;
int lineItemNo;
int patientType;
int patientID;
String procedureID;
dynamic reportData;
String imageURL;
String createdBy;
String createdOn;
DateTime createdOnDateTime;
PatientMuseResultsModel(
{this.rowID,
this.setupID,
this.projectID,
this.orderNo,
this.lineItemNo,
this.patientType,
this.patientID,
this.procedureID,
this.reportData,
this.imageURL,
this.createdBy,
this.createdOn});
PatientMuseResultsModel.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
orderNo = json['OrderNo'];
lineItemNo = json['LineItemNo'];
patientType = json['PatientType'];
patientID = json['PatientID'];
procedureID = json['ProcedureID'];
reportData = json['ReportData'];
imageURL = json['ImageURL'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
createdOnDateTime = DateUtils.getDateTimeFromServerFormat(json['CreatedOn']);
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['OrderNo'] = this.orderNo;
data['LineItemNo'] = this.lineItemNo;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['ProcedureID'] = this.procedureID;
data['ReportData'] = this.reportData;
data['ImageURL'] = this.imageURL;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
return data;
}
}

@ -0,0 +1,28 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PatientMuseService extends BaseService {
List<PatientMuseResultsModel> patientMuseResultsModelList = List();
getECGPatient({int patientType, int patientOutSA,int patientID}) async {
Map<String,dynamic> body = Map();
body['PatientType'] = patientType;
body['PatientOutSA'] = patientOutSA;
body['PatientID'] = patientID;
await baseAppClient.post(
GET_ECG,
onSuccess: (dynamic response, int statusCode) {
patientMuseResultsModelList.clear();
response['HIS_GetPatientMuseResultsList'].forEach((v) {
patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: body,
);
}
}

@ -0,0 +1,26 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/PatientMuseResultsModel.dart';
import 'package:doctor_app_flutter/core/service/PatientMuseService.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import '../../locator.dart';
class PatientMuseViewModel extends BaseViewModel {
PatientMuseService _patientMuseService = locator<PatientMuseService>();
List<PatientMuseResultsModel> get patientMuseResultsModelList => _patientMuseService.patientMuseResultsModelList;
getECGPatient({int patientType, int patientOutSA, int patientID}) async {
setState(ViewState.Busy);
await _patientMuseService.getECGPatient(
patientID: patientID,
patientOutSA: patientOutSA,
patientType: patientType);
if (_patientMuseService.hasError) {
error = _patientMuseService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -468,6 +468,18 @@
"arrival-patients" "arrival-patients"
] ]
}, },
{
"uid": "23c2239369a69f752e790de95123b9e9",
"css": "male-2",
"code": 59417,
"src": "mfglabs"
},
{
"uid": "10b2be8b48bebc1974d6f94bac9de71d",
"css": "female-1",
"code": 59419,
"src": "mfglabs"
},
{ {
"uid": "740f78c2b53c8cc100a8b0d283bbd34f", "uid": "740f78c2b53c8cc100a8b0d283bbd34f",
"css": "home_icon-1", "css": "home_icon-1",

@ -12,6 +12,10 @@
/// - asset: fonts/DoctorApp.ttf /// - asset: fonts/DoctorApp.ttf
/// ///
/// ///
/// * MFG Labs, Copyright (C) 2012 by Daniel Bruce
/// Author: MFG Labs
/// License: SIL (http://scripts.sil.org/OFL)
/// Homepage: http://www.mfglabs.com/
/// ///
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@ -67,8 +71,12 @@ class DoctorApp {
IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral = static const IconData referral =
IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male_2 =
IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_patient = static const IconData search_patient =
IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData female_1 =
IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mail = static const IconData mail =
IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medicine_search = static const IconData medicine_search =

@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'core/service/PatientMuseService.dart';
import 'core/service/SOAP_service.dart'; import 'core/service/SOAP_service.dart';
import 'core/service/patient-admission-request-service.dart'; import 'core/service/patient-admission-request-service.dart';
import 'core/service/doctor_reply_service.dart'; import 'core/service/doctor_reply_service.dart';
@ -25,6 +26,7 @@ import 'core/service/patient-doctor-referral-service.dart';
import 'core/service/referral_patient_service.dart'; import 'core/service/referral_patient_service.dart';
import 'core/service/referred_patient_service.dart'; import 'core/service/referred_patient_service.dart';
import 'core/service/schedule_service.dart'; import 'core/service/schedule_service.dart';
import 'core/viewModel/PatientMuseViewModel.dart';
import 'core/viewModel/SOAP_view_model.dart'; import 'core/viewModel/SOAP_view_model.dart';
import 'core/viewModel/doctor_replay_view_model.dart'; import 'core/viewModel/doctor_replay_view_model.dart';
import 'core/viewModel/medicine_view_model.dart'; import 'core/viewModel/medicine_view_model.dart';
@ -58,6 +60,7 @@ void setupLocator() {
locator.registerLazySingleton(() => AdmissionRequestService()); locator.registerLazySingleton(() => AdmissionRequestService());
locator.registerLazySingleton(() => UcafService()); locator.registerLazySingleton(() => UcafService());
locator.registerLazySingleton(() => AuthService()); locator.registerLazySingleton(() => AuthService());
locator.registerLazySingleton(() => PatientMuseService());
/// View Model /// View Model
locator.registerFactory(() => DoctorReplayViewModel()); locator.registerFactory(() => DoctorReplayViewModel());
@ -77,4 +80,5 @@ void setupLocator() {
locator.registerFactory(() => AdmissionRequestViewModel()); locator.registerFactory(() => AdmissionRequestViewModel());
locator.registerFactory(() => UcafViewModel()); locator.registerFactory(() => UcafViewModel());
locator.registerFactory(() => MedicalFileViewModel()); locator.registerFactory(() => MedicalFileViewModel());
locator.registerFactory(() => PatientMuseViewModel());
} }

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart'; import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
@ -12,6 +13,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_pat
import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; import 'package:doctor_app_flutter/screens/live_care/video_call.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart';
@ -95,6 +97,7 @@ const String PATIENT_ADMISSION_REQUEST_2 = 'patients/admission-request-second';
const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third'; const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third';
const String PATIENT_UCAF_REQUEST = 'patients/ucaf'; const String PATIENT_UCAF_REQUEST = 'patients/ucaf';
const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail'; const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail';
const String PATIENT_ECG = 'patients/ecg';
const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -106,6 +109,7 @@ const String ORDER_PROCEDURE = 'procedure/procedure';
// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox'; // const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox';
const String PATIENT_SICKLEAVE = 'patients/patient_sickleave'; const String PATIENT_SICKLEAVE = 'patients/patient_sickleave';
const String ADD_SICKLEAVE = 'add-sickleave'; const String ADD_SICKLEAVE = 'add-sickleave';
const String SHOW_SICKLEAVE = 'show-sickleave';
const String RADIOLOGY = 'radiology'; const String RADIOLOGY = 'radiology';
//todo: change the routing way. //todo: change the routing way.
var routes = { var routes = {
@ -159,6 +163,7 @@ var routes = {
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox(), // LIVECARE_END_DIALOG: (_) => EndCallDialogBox(),
PATIENT_SICKLEAVE: (_) => SickLeaveScreen(), PATIENT_SICKLEAVE: (_) => SickLeaveScreen(),
ADD_SICKLEAVE: (_) => AddSickLeavScreen(), ADD_SICKLEAVE: (_) => AddSickLeavScreen(),
SHOW_SICKLEAVE: (_) => ShowSickLeaveScreen(),
ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(), ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(),
ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(), ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(),
ORDER_PROCEDURE: (_) => ProcedureScreen(), ORDER_PROCEDURE: (_) => ProcedureScreen(),
@ -167,4 +172,5 @@ var routes = {
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(), PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(), PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
PATIENT_ECG: (_) => ECGPage(),
}; };

File diff suppressed because it is too large Load Diff

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

@ -128,129 +128,111 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.97, widthFactor: 0.97,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container(
// height: SizeConfig.screenHeight,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 50, height: SizeConfig.screenHeight * .16,
), ),
Column( Column(children: [
children: <Widget>[ FractionallySizedBox(
Container( widthFactor: 0.9,
child: Icon( child: Column(
DoctorApp.medicine_search, children: <Widget>[
size: 100, Container(
color: Colors.black, // height: MediaQuery.of(context).size.height * 0.070,
), child: InkWell(
margin: EdgeInsets.only(top: 50), onTap: model.allMedicationList != null
), ? () {
Padding( setState(() {
padding: const EdgeInsets.only(top: 12.0), _selectedMedication = null;
child: AppText( });
TranslationBase.of(context).type.toUpperCase(), }
fontWeight: FontWeight.bold, : null,
fontSize: SizeConfig.heightMultiplier * 2.5, child: _selectedMedication == null
), ? AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere,
_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,
),
),
),
],
), ),
Padding( )
padding: const EdgeInsets.only(top: 5.0), ]),
child: AppText(
TranslationBase.of(context)
.searchMedicineImageCaption,
fontSize: SizeConfig.heightMultiplier * 2,
),
)
],
),
SizedBox( SizedBox(
height: 15, height: SizeConfig.screenHeight * .5,
), ),
FractionallySizedBox( Column(
widthFactor: 0.9, children: [
child: Column( FractionallySizedBox(
children: <Widget>[ widthFactor: 0.97,
Container( child: Wrap(
height: MediaQuery.of(context).size.height * 0.070, alignment: WrapAlignment.center,
child: InkWell( children: <Widget>[
onTap: model.allMedicationList != null // TODO change it secondary button and add loading
? () { AppButton(
setState(() { title: TranslationBase.of(context).search,
_selectedMedication = null; onPressed: () async {
}); await searchMedicine(context, model);
} },
: null, ),
child: _selectedMedication == null ],
? AutoCompleteTextField<
GetMedicationResponseModel>(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.searchMedicineNameHere,
_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(8.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,
),
),
),
SizedBox(
height: 15,
),
Container(
child: Wrap(
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);
},
),
],
),
), ),
], )
), ],
), )
], ],
), ),
), )),
), ),
), ),
), ),

@ -24,7 +24,7 @@ class SearchMedicinePatientScreen extends StatefulWidget {
class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen> class _SearchMedicinePatientScreen extends State<SearchMedicinePatientScreen>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
var activeIndex = 0;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -50,42 +50,63 @@ 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.92, // 0.9, width: MediaQuery.of(context).size.width, // 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: Center( child: TabBar(
child: TabBar( isScrollable: true,
isScrollable: true, onTap: (index) {
controller: _tabController, setState(() {
indicatorWeight: 5.0, activeIndex = index;
indicatorSize: TabBarIndicatorSize.tab, });
labelColor: Theme.of(context).primaryColor, },
labelPadding: controller: _tabController,
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), indicatorWeight: 0.01,
unselectedLabelColor: Colors.grey[800], indicatorSize: TabBarIndicatorSize.label,
tabs: [ labelColor: Theme.of(context).primaryColor,
Container( indicatorColor: Colors.grey[800],
width: MediaQuery.of(context).size.width * 0.30, // labelPadding:
child: Center( // EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
child: AppText( unselectedLabelColor: Colors.grey[800],
TranslationBase.of(context).searchPatient), tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.40,
decoration: BoxDecoration(
color: activeIndex == 0
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center(
child: AppText(
TranslationBase.of(context).searchPatient,
color: activeIndex == 0 ? Colors.white : Colors.black,
fontWeight: FontWeight.bold,
), ),
), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.30, Container(
child: Center( width: MediaQuery.of(context).size.width * 0.40,
child: AppText( decoration: BoxDecoration(
TranslationBase.of(context).searchMedicine), color: activeIndex == 1
? Colors.red[700]
: Colors.grey[200],
borderRadius: BorderRadius.circular(5)),
child: Center(
child: AppText(
TranslationBase.of(context).searchMedicine,
fontWeight: FontWeight.bold,
color: activeIndex == 1 ? Colors.white : Colors.black,
), ),
), ),
], ),
), ],
), ),
), ),
), ),

@ -0,0 +1,49 @@
import 'package:doctor_app_flutter/core/viewModel/PatientMuseViewModel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class ECGPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
return BaseView<PatientMuseViewModel>(
onModelReady: (model) => model.getECGPatient(
patientType: patient.patientType,
patientOutSA: 0,
patientID: patient.patientId),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: 'ECG',
body: ListView.builder(
itemCount: model.patientMuseResultsModelList.length,
itemBuilder: (context, index) => InkWell(
onTap: () async {
await launch(
model.patientMuseResultsModelList[index].imageURL);
},
child: Container(
width: double.infinity,
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey,width: 2)
),
child: Center(
child: Texts(
"${model.patientMuseResultsModelList[index].createdOnDateTime}"),
),
),
)),
),
);
}
}

@ -43,7 +43,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _autoValidate = false; bool _autoValidate = false;
bool onlyArrived = true; bool onlyArrived = true;
bool isView = false;
bool isFormSubmitted = false; bool isFormSubmitted = false;
FocusNode _nodeText1 = FocusNode(); FocusNode _nodeText1 = FocusNode();
@ -121,324 +121,293 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
FocusScope.of(context).requestFocus(new FocusNode()); FocusScope.of(context).requestFocus(new FocusNode());
}, },
child: AppScaffold( child: AppScaffold(
appBarTitle: TranslationBase.of(context).searchPatient, appBarTitle: TranslationBase.of(context).searchPatient,
isShowAppBar: false, isShowAppBar: false,
body: ListView( body: ListView(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Column( Column(
children: <Widget>[ children: <Widget>[
Container( // Container(
child: Icon( // child: Icon(
DoctorApp.search_patient_1, // DoctorApp.search_patient_1,
size: 100, // size: 100,
color: Colors.black, // color: Colors.black,
), // ),
margin: EdgeInsets.only(top: 10), // margin: EdgeInsets.only(top: 10),
), // ),
Padding( // Padding(
padding: const EdgeInsets.only(top: 12.0), // padding: const EdgeInsets.only(top: 12.0),
child: AppText( // child: AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchPatientImageCaptionTitle // .searchPatientImageCaptionTitle
.toUpperCase(), // .toUpperCase(),
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
fontSize: SizeConfig.heightMultiplier * 2.5, // fontSize: SizeConfig.heightMultiplier * 2.5,
), // ),
), // ),
Padding( // Padding(
padding: const EdgeInsets.only(top: 5.0), // padding: const EdgeInsets.only(top: 5.0),
child: AppText( // child: AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchPatientImageCaptionBody, // .searchPatientImageCaptionBody,
fontSize: SizeConfig.heightMultiplier * 2, // fontSize: SizeConfig.heightMultiplier * 2,
// ),
// )
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
), ),
) if (_selectedType != '7')
],
),
Container(
padding: EdgeInsets.all(15),
width: SizeConfig.screenWidth * 1,
child: Form(
key: _formKey,
autovalidate: _autoValidate,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Container(
height: 40.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
),
),
width: double.infinity,
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 0.9,
bottom: SizeConfig.widthMultiplier * 0.9,
right: SizeConfig.widthMultiplier * 3,
left: SizeConfig.widthMultiplier * 3),
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
!projectsProvider.isArabic
? AppText(
item['text'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
},
onChanged: (String newValue) => {
setState(() {
_selectedType = newValue;
selectedPatientType =
int.parse(_selectedType);
})
},
items: PATIENT_TYPE.map((item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText = item['text_ar'];
return DropdownMenuItem(
child: Text(
itemText,
textAlign: TextAlign.end,
),
value: item['val'],
);
}).toList(),
)),
),
],
),
),
),
SizedBox(
height: 10,
),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText:
TranslationBase.of(context).firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setFirstName = "0"
: _patientSearchFormValues
.setFirstName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setFirstName =
"0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setMiddleName = "0"
: _patientSearchFormValues
.setMiddleName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setMiddleName =
"0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues.setLastName =
"0"
: _patientSearchFormValues.setLastName =
value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setLastName =
"0";
}
},
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
if (_selectedType != '7')
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).phoneNumber,
borderColor: Colors.white,
textInputType: TextInputType.number,
textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField(
labelText:
TranslationBase.of(context).patientID,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText2,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientID = 0
: _patientSearchFormValues
.setPatientID = int.parse(value);
if (value != null &&
value.trim().toString().isEmpty) {
_patientSearchFormValues.setPatientID = 0;
}
}),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.only(top: 5),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText:
TranslationBase.of(context).patientFile, TranslationBase.of(context).phoneNumber,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
focusNode: _nodeText3, textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
onSaved: (value) {}, focusNode: _nodeText1,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setPatientMobileNumber = "0"
: _patientSearchFormValues
.setPatientMobileNumber = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setPatientMobileNumber = "0";
}
},
), ),
), ),
(!(_selectedType == '2' || _selectedType == '4')) SizedBox(
? DynamicElements( height: 10,
_patientSearchFormValues, isFormSubmitted) ),
: SizedBox( Row(
height: 0, mainAxisAlignment: MainAxisAlignment.end,
children: [
InkWell(
child: this.isView == false
? AppText(
'Search With Other Critearia',
color: Colors.red,
fontWeight: FontWeight.bold,
)
: AppText('Hide Other Criteria',
color: Colors.red,
fontWeight: FontWeight.bold),
onTap: () {
setState(() {
this.isView = !this.isView;
});
},
)
],
),
isView == true
? Column(children: [
SizedBox(
height: 10,
),
Container(
height: 65.0,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
style: BorderStyle.solid,
color: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
),
),
width: double.infinity,
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 0.9,
bottom:
SizeConfig.widthMultiplier * 0.9,
right: SizeConfig.widthMultiplier * 3,
left: SizeConfig.widthMultiplier * 3),
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: _selectedType,
iconSize: 25,
elevation: 16,
selectedItemBuilder:
(BuildContext context) {
return PATIENT_TYPE.map((item) {
return Row(
mainAxisSize:
MainAxisSize.max,
children: <Widget>[
!projectsProvider.isArabic
? AppText(
item['text'],
fontSize: SizeConfig
.textMultiplier *
2.1,
)
: AppText(
item['text_ar'],
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
},
onChanged: (String newValue) => {
setState(() {
_selectedType = newValue;
selectedPatientType =
int.parse(_selectedType);
})
},
items: PATIENT_TYPE.map((item) {
!projectsProvider.isArabic
? itemText = item['text']
: itemText =
item['text_ar'];
return DropdownMenuItem(
child: Text(
itemText,
textAlign: TextAlign.end,
),
value: item['val'],
);
}).toList(),
)),
),
],
),
),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.firstName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setFirstName = "0"
: _patientSearchFormValues
.setFirstName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setFirstName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.middleName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setMiddleName = "0"
: _patientSearchFormValues
.setMiddleName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setMiddleName = "0";
}
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10),
child: AppTextFormField(
labelText: TranslationBase.of(context)
.lastName,
borderColor: Colors.white,
onSaved: (value) {
value == null || value == ''
? _patientSearchFormValues
.setLastName = "0"
: _patientSearchFormValues
.setLastName = value;
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues
.setLastName = "0";
}
},
inputFormatter: ONLY_LETTERS),
),
SizedBox(
height: 10,
), ),
SizedBox(
height: 10,
),
SizedBox(
height: 10,
),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -446,52 +415,132 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"))),
height: 25, padding: EdgeInsets.all(10),
width: 25, child: AppTextFormField(
child: Checkbox( labelText: TranslationBase.of(context)
value: onlyArrived, .patientID,
checkColor: HexColor("#2A930A"), borderColor: Colors.white,
activeColor: Colors.white, textInputType: TextInputType.number,
onChanged: (bool newValue) { inputFormatter: ONLY_NUMBERS,
setState(() { focusNode: _nodeText2,
onlyArrived = newValue; onSaved: (value) {
}); value == null || value == ''
? _patientSearchFormValues
.setPatientID = 0
: _patientSearchFormValues
.setPatientID =
int.parse(value);
if (value != null &&
value.trim().toString().isEmpty) {
_patientSearchFormValues
.setPatientID = 0;
}
}), }),
), ),
SizedBox( SizedBox(
width: 12, height: 10,
), ),
AppText( Container(
TranslationBase.of(context) decoration: BoxDecoration(
.onlyArrivedPatient, borderRadius: BorderRadius.all(
fontSize: SizeConfig.textMultiplier * 2), Radius.circular(6.0)),
])), border: Border.all(
SizedBox( width: 1.0,
height: 10, color: HexColor("#CCCCCC"))),
), padding: EdgeInsets.all(10),
], child: AppTextFormField(
), labelText: TranslationBase.of(context)
.patientFile,
borderColor: Colors.white,
textInputType: TextInputType.number,
focusNode: _nodeText3,
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {},
),
),
(!(_selectedType == '2' ||
_selectedType == '4'))
? DynamicElements(
_patientSearchFormValues,
isFormSubmitted)
: SizedBox(
height: 0,
),
SizedBox(
height: 10,
),
SizedBox(
height: 10,
),
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
height: 25,
width: 25,
child: Checkbox(
value: onlyArrived,
checkColor: HexColor("#2A930A"),
activeColor: Colors.white,
onChanged: (bool newValue) {
setState(() {
onlyArrived = newValue;
});
}),
),
SizedBox(
width: 12,
),
AppText(
TranslationBase.of(context)
.onlyArrivedPatient,
fontSize:
SizeConfig.textMultiplier * 2),
])),
SizedBox(
height: 10,
),
])
: SizedBox(
height: SizeConfig.screenHeight * .4,
),
],
), ),
)
],
),
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
_validateInputs();
},
), ),
], ),
), ],
), ),
], ),
)), Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
_validateInputs();
},
),
],
),
),
],
),
],
),
),
); );
} }
} }

@ -1,19 +1,19 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_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/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.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/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.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/util/date-utils.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/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart';
import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_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:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
@ -63,7 +63,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
bool isSearch = false; bool isSearch = false;
String patientTypeTitle; String patientTypeTitle;
var _isLoading = true; var _isLoading = true;
var selectedFilter = 1;
bool _isError = false; bool _isError = false;
String error = ""; String error = "";
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
@ -72,7 +72,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
PatientModel patient; PatientModel patient;
searchData(String str) { searchData(String str) {
this.responseModelList = this.responseModelList2; this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
@ -202,24 +201,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
authProvider = Provider.of(context); authProvider = Provider.of(context);
_locations = [ _locations = [
TranslationBase TranslationBase.of(context).all,
.of(context) TranslationBase.of(context).today,
.all, TranslationBase.of(context).tomorrow,
TranslationBase TranslationBase.of(context).nextWeek,
.of(context)
.today,
TranslationBase
.of(context)
.tomorrow,
TranslationBase
.of(context)
.nextWeek,
]; ];
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
final routeArgs = ModalRoute final routeArgs = ModalRoute.of(context).settings.arguments as Map;
.of(context)
.settings
.arguments as Map;
patient = widget.patientSearchForm != null patient = widget.patientSearchForm != null
? widget.patientSearchForm ? widget.patientSearchForm
@ -254,10 +242,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
model model
.getPatientList( .getPatientList(
val2 == 7 val2 == 7
? getPatientArrivalListRequestModel.toJson() ? getPatientArrivalListRequestModel.toJson()
: patient, : patient,
patientType) patientType)
.then((res) { .then((res) {
setState(() { setState(() {
if (res != null && res['MessageStatus'] == 1) { if (res != null && res['MessageStatus'] == 1) {
@ -311,126 +299,187 @@ class _PatientsScreenState extends State<PatientsScreen> {
body: _isLoading body: _isLoading
? Container() ? Container()
: _isError : _isError
? DrAppEmbeddedError(error: error) ? DrAppEmbeddedError(error: error)
: lItems == null || lItems.length == 0 : lItems == null || lItems.length == 0
? Column( ? DrAppEmbeddedError(
children: [ error:
if(int.parse(patientType)==7) TranslationBase.of(context).youDontHaveAnyPatient)
ClinicList(clinicId: clinicId,onClinicChange: (newValue) { : Container(
clinicId = newValue; color: Colors.grey[200],
changeClinic(newValue, context, model); child: ListView(
},), scrollDirection: Axis.vertical,
Divider( children: <Widget>[
thickness: 0.8, Container(
color: Color(0xffCCCCCC), child: lItems == null
), ? Column(
DrAppEmbeddedError( crossAxisAlignment:
error: CrossAxisAlignment.start,
TranslationBase.of(context).youDontHaveAnyPatient), children: <Widget>[
], Container(
) child: Center(
: Container( child: Padding(
child: ListView( padding: const EdgeInsets.fromLTRB(
scrollDirection: Axis.vertical, 0, 0, 0, 0), //250
children: <Widget>[ child:
Container( DrAppCircularProgressIndeicator(),
child: lItems == null )),
? Column( ),
crossAxisAlignment: ],
CrossAxisAlignment.start, )
children: <Widget>[ : Column(
Container( children: <Widget>[
child: Center( SizedBox(height: 18.5),
child: Padding( Container(
padding: const EdgeInsets.fromLTRB( width: SizeConfig.screenWidth * 0.9,
0, 0, 0, 0), //250 height:
child: SizeConfig.screenHeight * 0.07,
DrAppCircularProgressIndeicator(), child: TextField(
)), controller: _controller,
), onChanged: (String str) {
], this.searchData(str);
) },
: Column( decoration: buildInputDecoration(
children: <Widget>[ context,
Padding( TranslationBase.of(context)
padding: EdgeInsets.only( .searchPatient),
top:0), ),
child: SERVICES_PATIANT2[ ),
int.parse(patientType)] == SizedBox(
"List_MyOutPatient" height: 10.0,
? _locationBar(context) ),
: Container(), Padding(
), padding: EdgeInsets.only(
SizedBox(height: 18.5), top: MediaQuery.of(context)
Container( .size
width: SizeConfig.screenWidth * 0.9, .height *
height: 0.03),
SizeConfig.screenHeight * 0.05, child: SERVICES_PATIANT2[
child: TextField( int.parse(patientType)] ==
controller: _controller, "List_MyOutPatient"
onChanged: (String str) { ? _locationBar(context)
this.searchData(str); : Container(),
}, ),
decoration: buildInputDecoration( // Row(
context, // mainAxisAlignment:
TranslationBase // MainAxisAlignment.spaceEvenly,
.of(context) // children: [
.searchPatient), // AppButton(
), // title: TranslationBase.of(context)
), // .all,
SizedBox( // onPressed: () {
height: 10.0, // setState(() {
), // selectedFilter = 1;
if(int.parse(patientType)==7) // filterPatients();
ClinicList(clinicId: clinicId,onClinicChange: (newValue) { // });
clinicId = newValue; // },
changeClinic(newValue, context, model); // color: selectedFilter == 1
},), // ? Colors.red[800]
Divider( // : Colors.grey[300],
thickness: 0.8, // fontColor: selectedFilter == 1
color: Color(0xffCCCCCC), // ? Colors.white
), // : Colors.black,
Container( // ),
decoration: BoxDecoration( // AppButton(
color: Color(0Xffffffff), // title: TranslationBase.of(context)
borderRadius: // .today,
BorderRadius.circular(20)), // onPressed: () {
margin: // setState(() {
EdgeInsets.fromLTRB(0, 0, 0, 0), // selectedFilter = 2;
child: (responseModelList.length > 0) // filterPatients();
? Column( // });
// mainAxisAlignment: MainAxisAlignment.center, // },
children: responseModelList // color: selectedFilter == 2
.map((PatiantInformtion // ? Colors.red[800]
item) { // : Colors.grey[300],
return PatientCard(patientInfo: item, // fontColor: selectedFilter == 2
patientType: patientType, // ? Colors.white
onTap: () { // : Colors.black,
Navigator.of(context) // ),
.pushNamed( // AppButton(
PATIENTS_PROFILE, // title: TranslationBase.of(context)
arguments: { // .tomorrow,
"patient": item, // onPressed: () {
"patientType":patientType, // setState(() {
"from" : patient.getFrom, // selectedFilter = 3;
"to" : patient.getTo,"isSearch" : isSearch, // filterPatients();
}); // });
},); // },
}).toList(), // color: selectedFilter == 3
) // ? Colors.red[800]
: Center( // : Colors.grey[300],
child: DrAppEmbeddedError( // fontColor: selectedFilter == 3
error: TranslationBase.of( // ? Colors.white
context) // : Colors.black,
.youDontHaveAnyPatient), // ),
// AppButton(
// title: TranslationBase.of(context)
// .nextWeek,
// onPressed: () {
// setState(() {
// selectedFilter = 4;
// // filterPatients();
// });
// },
// color: selectedFilter == 4
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 4
// ? Colors.white
// : Colors.black,
// ),
// ],
// ),
SizedBox(
height: 10.0,
),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container(
// decoration: BoxDecoration(
// color: Color(0Xffffffff),
// borderRadius:
// BorderRadius.circular(20)),
child: (responseModelList.length > 0)
? Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: responseModelList
.map((PatiantInformtion
item) {
return PatientCard(
patientInfo: item,
patientType: patientType,
onTap: () {
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item,
"patientType":
patientType,
"from": patient
.getFrom,
"to":
patient.getTo,
});
},
);
}).toList(),
)
: Center(
child: DrAppEmbeddedError(
error: TranslationBase.of(
context)
.youDontHaveAnyPatient),
),
),
],
),
)
],
),
), ),
),
],
),
)
],
),
),
), ),
); );
} }
@ -519,7 +568,12 @@ class _PatientsScreenState extends State<PatientsScreen> {
InputDecoration buildInputDecoration(BuildContext context, hint) { InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration( return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.grey), suffixIcon: IconButton(
icon: new Image.asset("assets/images/filter-512.png"),
color: Colors.grey,
onPressed: () {},
iconSize: 20,
),
filled: true, filled: true,
fillColor: Colors.white, fillColor: Colors.white,
hintText: hint, hintText: hint,
@ -541,9 +595,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0Xffffffff), color: Color(0Xffffffff),
borderRadius: BorderRadius.circular(12.5), borderRadius: BorderRadius.circular(12.5),
border: Border.all( // border: Border.all(
width: 0.5, // width: 0.5,
), // ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,

@ -26,7 +26,7 @@ import 'package:provider/provider.dart';
class PatientProfileScreen extends StatelessWidget { class PatientProfileScreen extends StatelessWidget {
PatiantInformtion patient; PatiantInformtion patient;
bool isFromSearch = false; bool isFromSearch = false;
//TODO change it
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;

@ -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: patient.patientMRN), onModelReady: (model) => model.getPrescription(mrn: 0),
builder: builder:
(BuildContext context, PrescriptionViewModel model, Widget child) => (BuildContext context, PrescriptionViewModel model, Widget child) =>
AppScaffold( AppScaffold(
@ -45,6 +45,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
PatientPageHeaderWidget(patient), PatientPageHeaderWidget(patient),
@ -135,6 +136,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
height: 50.0, height: 50.0,
width: 450.0, width: 450.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white,
border: Border.all( border: Border.all(
color: Colors.grey), color: Colors.grey),
borderRadius: borderRadius:
@ -174,12 +176,13 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
}, },
), ),
SizedBox( SizedBox(
height: 15.0, height: 10.0,
), ),
...List.generate( ...List.generate(
model.prescriptionList[0] model.prescriptionList[0]
.rowcount, .rowcount,
(index) => Container( (index) => Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
SizedBox( SizedBox(
@ -197,6 +200,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
// CrossAxisAlignment.start, // CrossAxisAlignment.start,
children: [ children: [
Container( Container(
color: Colors.white,
height: MediaQuery.of( height: MediaQuery.of(
context) context)
.size .size
@ -260,6 +264,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
), ),
), ),
Container( Container(
color: Colors.white,
// height: MediaQuery.of( // height: MediaQuery.of(
// context) // context)
// .size // .size
@ -324,6 +329,8 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
Row( Row(
children: [ children: [
Container( Container(
color: Colors
.white,
child: child:
Expanded( Expanded(
child: child:
@ -533,6 +540,8 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
Expanded( Expanded(
child: child:
Container( Container(
color: Colors
.white,
// height: MediaQuery.of(context).size.height * // height: MediaQuery.of(context).size.height *
// 0.038, // 0.038,
child: child:
@ -567,6 +576,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
), ),
), ),
Container( Container(
color: Colors.white,
height: MediaQuery.of( height: MediaQuery.of(
context) context)
.size .size

@ -47,6 +47,7 @@ class _NewPrescriptionHistoryScreenState
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
PatientPageHeaderWidget(patient), PatientPageHeaderWidget(patient),
@ -83,6 +84,7 @@ class _NewPrescriptionHistoryScreenState
model.prescriptionList[0] model.prescriptionList[0]
.rowcount, .rowcount,
(index) => Container( (index) => Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
SizedBox( SizedBox(

@ -34,7 +34,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
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<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure(mrn: patient.patientMRN), onModelReady: (model) => model.getProcedure(mrn: 0),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: true, isShowAppBar: true,
@ -43,6 +43,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
PatientPageHeaderWidget(patient), PatientPageHeaderWidget(patient),
@ -130,6 +131,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
height: 50.0, height: 50.0,
width: 450.0, width: 450.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white,
border: Border.all( border: Border.all(
color: Colors.grey), color: Colors.grey),
borderRadius: borderRadius:
@ -189,11 +191,12 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
// ), // ),
// ), // ),
SizedBox( SizedBox(
height: 35.0, height: 10.0,
), ),
...List.generate( ...List.generate(
model.procedureList[0].rowcount, model.procedureList[0].rowcount,
(index) => Container( (index) => Container(
color: Colors.white,
child: Column( child: Column(
children: [ children: [
SizedBox( SizedBox(

@ -0,0 +1,133 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.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/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-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/card_with_bgNew_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class ShowSickLeaveScreen extends StatelessWidget {
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView<SickLeaveViewModel>(
onModelReady: (model) => model.getSickLeave(patient.patientMRN ?? patient.patientId),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).sickleave,
body: SingleChildScrollView(
child: Column(
children: [
PatientPageHeaderWidget(patient),
Column(
children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) {
return CardWithBgWidgetNew(
widget: Column(
children: [
Container(
padding: EdgeInsets.only(left: 10, right: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
child: Wrap(
// mainAxisAlignment:
// MainAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.all(3),
child: AppText(
item.status == 1
? TranslationBase.of(context)
.hold
: item.status == 2
? TranslationBase.of(
context)
.active
: TranslationBase.of(
context)
.all,
fontWeight: FontWeight.bold,
color: Colors.white,
),
color: item.status == 1
? Colors.yellow[800]
: item.status == 2
? Colors.green
: Colors.black,
),
Row(
children: [
AppText(
TranslationBase.of(context)
.leaveStartDate +
' ',
fontWeight: FontWeight.bold,
),
Flexible(
child: Text(
item.startDate,
overflow: TextOverflow.ellipsis,
))
],
),
AppText(
item.noOfDays.toString() +
' ' +
TranslationBase.of(context)
.daysSickleave,
fontWeight: FontWeight.bold,
),
Row(children: [
AppText(
item.remarks ?? "",
)
]),
],
),
SizedBox(
width: 20,
),
],
),
),
],
)),
SizedBox(
height: 20,
),
Divider(
height: 1,
),
],
));
}).toList(),
)
],
),
),
),
);
}
}

@ -1133,6 +1133,9 @@ class TranslationBase {
localizedValues['arrivalpatient'][locale.languageCode]; localizedValues['arrivalpatient'][locale.languageCode];
String get searchmedicinepatient => String get searchmedicinepatient =>
localizedValues['searchmedicinepatient'][locale.languageCode]; localizedValues['searchmedicinepatient'][locale.languageCode];
String get appointmentDate =>
localizedValues['appointmentDate'][locale.languageCode];
String get arrivedP => localizedValues['arrived_p'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -4,6 +4,7 @@ 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/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/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';
@ -13,203 +14,264 @@ 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}) : super(key: key); const PatientCard({Key key, this.patientInfo, this.onTap, this.patientType})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.all(10), width: SizeConfig.screenWidth * 0.95,
decoration: myBoxDecoration(), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(bottom: 12), decoration: BoxDecoration(
child: InkWell( borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Row( margin: EdgeInsets.all(5),
children: <Widget>[ child: InkWell(
Column( child: Column(
mainAxisAlignment: children: [
MainAxisAlignment SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList"
.start, ? Container(height: 5, color: Colors.green[800])
children: < : Container(),
Widget>[ SizedBox(
Padding( height: 10,
padding: EdgeInsets ),
.only( SERVICES_PATIANT2[int.parse(patientType)] == "patientArrivalList"
left: ? Row(
12.0), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: children: [
Container( AppText(
decoration: TranslationBase.of(context).arrivedP,
BoxDecoration( color: Colors.green[800],
boxShadow: [ fontWeight: FontWeight.bold,
BoxShadow( ),
color: Color.fromRGBO( AppText(patientInfo.arrivedOn)
0,
0,
0,
0.08),
offset: Offset(0.0,
5.0),
blurRadius:
16.0)
], ],
borderRadius: )
BorderRadius.all( : SizedBox(),
Radius.circular(35.0)), Padding(
color: Color( padding: EdgeInsets.only(left: 12.0),
0xffCCCCCC), child: Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
width: 70,
height: 70,
child: Icon(
patientInfo.genderDescription ==
"Male"
? DoctorApp
.male
: DoctorApp
.female_icon,
size: 70,
color: Colors
.white,
),
),
),
],
),
SizedBox(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [
AppText(
patientInfo.firstName +
" " +
patientInfo.lastName,
fontSize:
2.0 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
),
SizedBox(height: 12,),
Table(
border: TableBorder.symmetric(
// inside: BorderSide(width: 2.0, color: Colors.white),
),
// defaultVerticalAlignment:TableCellVerticalAlignment.middle ,
children: [ children: [
TableRow(children: [ Row(children: [
Container( AppText(
child: RichText( patientInfo.firstName + " " + patientInfo.lastName,
text: new TextSpan( fontSize: SizeConfig.textMultiplier * 2.5,
style: new TextStyle( fontWeight: FontWeight.bold,
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), backGroundcolor: Colors.white,
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).fileNo,
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)),
new TextSpan(text: patientInfo.patientId.toString()),
],),),
), ),
Container( patientInfo.gender == 1
child: RichText( ? Icon(
text: new TextSpan( DoctorApp.male_2,
style: new TextStyle( color: Colors.blue,
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), )
children: <TextSpan>[ : Icon(
new TextSpan( DoctorApp.female_1,
text: TranslationBase.of(context).age+ " : ", color: Colors.pink,
style: TextStyle(fontWeight: FontWeight.w700, )), ),
new TextSpan(text: "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}"),
],),),
),
]
),
TableRow(children: [
SizedBox(height: 5,),
SizedBox(height: 5,)
]), ]),
TableRow(children: [ AppText(
Container( patientInfo.nationalityName ?? patientInfo.nationality,
child: RichText( fontWeight: FontWeight.bold,
text: new TextSpan( )
style: new TextStyle( ],
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), )),
children: <TextSpan>[ Row(children: <Widget>[
new TextSpan( Column(
text: TranslationBase.of(context).nationality + " : ", mainAxisAlignment: MainAxisAlignment.start,
style: TextStyle(fontWeight: FontWeight.w700, fontSize: 2.2 * SizeConfig.textMultiplier)), children: <Widget>[
new TextSpan(text: (patientInfo.nationalityName ?? patientInfo.nationality)), Padding(
],),), padding: EdgeInsets.only(left: 12.0),
child: Container(
decoration: BoxDecoration(
boxShadow: [
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)),
color: Color(0xffCCCCCC),
), ),
width: 70,
height: 70,
Container( child: Icon(
child: RichText( patientInfo.gender == 1
text: new TextSpan( ? DoctorApp.male
style: new TextStyle( : DoctorApp.female_icon,
fontSize: 2.0 * SizeConfig.textMultiplier, color: Colors.black), size: 70,
children: <TextSpan>[ color: Colors.white,
new TextSpan(
text: TranslationBase.of(context).gender + " : ",
style: TextStyle(fontWeight: FontWeight.w700, )),
new TextSpan(text: patientInfo.gender.toString() == '1' ? 'Male' : 'Female'),
],),),
), ),
]
), ),
),
], ],
), ),
if(SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") SizedBox(
Container( width: 10,
),
child: Row( Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
Container( children: [
height: 15, Container(
width: 60, child: RichText(
decoration: BoxDecoration( text: new TextSpan(
borderRadius: BorderRadius.circular(25), style: new TextStyle(
color: HexColor("#20A169"), fontSize: 2.0 * SizeConfig.textMultiplier,
), color: Colors.black),
child: AppText( children: <TextSpan>[
patientInfo.startTime, new TextSpan(
color: Colors.white, text: TranslationBase.of(context).fileNo,
fontSize: 1.5 * SizeConfig.textMultiplier, style: TextStyle(
textAlign: TextAlign.center, fontSize:
fontWeight: FontWeight.bold, 2.2 * SizeConfig.textMultiplier)),
), new TextSpan(
), text: patientInfo.patientId.toString(),
SizedBox( style: TextStyle(
width: 3.5, fontWeight: FontWeight.w700,
)),
],
), ),
Container( ),
child: AppText( ),
convertDateFormat2(patientInfo.appointmentDate.toString()), Container(
fontSize: 1.5 * SizeConfig.textMultiplier, child: RichText(
fontWeight: FontWeight.bold, 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,
)),
],
), ),
SizedBox( ),
height: 0.5,
)
],
), ),
margin: EdgeInsets.only(top: 8,), if (SERVICES_PATIANT2[int.parse(patientType)] ==
) "List_MyOutPatient")
], Container(
), child: Row(
), mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).appointmentDate +
" : ",
fontSize: 14,
),
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(
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,
),
)
]))
]),
],
),
onTap: onTap,
));
// Divider(color: Colors.grey) // ]),
], // TableRow(children: [
), // SizedBox(
onTap: onTap, // height: 5,
), // ),
); // SizedBox(
// height: 5,
// )
// ]),
// TableRow(children: [
// 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)
// .nationality +
// " : ",
// style: TextStyle(
// fontWeight: FontWeight.w700,
// fontSize: 2.2 *
// SizeConfig.textMultiplier)),
// // ,
// ],
// ),
// ),
// ),
// 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).gender +
// " : ",
// style: TextStyle(
// fontWeight: FontWeight.w700,
// )),
// new TextSpan(
// text:
// patientInfo.gender.toString() == '1'
// ? 'Male'
// : 'Female'),
// ],
// ),
// ),
// ),
// ]),
// ],
//),
// ),
// Divider(color: Colors.grey)
//],
//),
//],
//),
// onTap: onTap,
// ),
//);
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
@ -233,12 +295,12 @@ class PatientCard extends StatelessWidget {
myBoxDecoration() { myBoxDecoration() {
return BoxDecoration( return BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( top: BorderSide(
color: Color(0xffCCCCCC), color: Colors.green,
width: 0.5, width: 5,
),
), ),
), borderRadius: BorderRadius.circular(10));
);
} }
} }

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class DynamicElements extends StatefulWidget { class DynamicElements extends StatefulWidget {
@ -32,20 +33,15 @@ class _DynamicElementsState extends State<DynamicElements> {
var selectedDate = DateFormat.yMd().format(pickedDate); var selectedDate = DateFormat.yMd().format(pickedDate);
if (id == '_selectedFromDate') { if (id == '_selectedFromDate') {
// _fromDateController.text = selectedDate; // _fromDateController.text = selectedDate;
selectedDate = pickedDate.year.toString() + selectedDate = pickedDate.year.toString() +
"-" + "-" +
pickedDate.month.toString().padLeft(2, '0') + pickedDate.month.toString().padLeft(2, '0') +
"-" + "-" +
pickedDate.day.toString().padLeft(2, '0'); pickedDate.day.toString().padLeft(2, '0');
_fromDateController.text = selectedDate; _fromDateController.text = selectedDate;
} else { } else {
selectedDate = pickedDate.year.toString() + selectedDate = pickedDate.year.toString() +
"-" + "-" +
pickedDate.month.toString().padLeft(2, '0') + pickedDate.month.toString().padLeft(2, '0') +
@ -53,7 +49,7 @@ class _DynamicElementsState extends State<DynamicElements> {
pickedDate.day.toString().padLeft(2, '0'); pickedDate.day.toString().padLeft(2, '0');
_toDateController.text = selectedDate; _toDateController.text = selectedDate;
// _toDateController.text = selectedDate; // _toDateController.text = selectedDate;
} }
}); });
}); });
@ -61,11 +57,12 @@ class _DynamicElementsState extends State<DynamicElements> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery final screenSize = MediaQuery.of(context).size;
.of(context) InputDecoration textFieldSelectorDecoration(
.size; {String hintText,
InputDecoration textFieldSelectorDecoration({String hintText, String selectedText,
String selectedText, bool isDropDown,IconData icon}) { bool isDropDown,
IconData icon}) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -85,9 +82,9 @@ class _DynamicElementsState extends State<DynamicElements> {
fontSize: 14, fontSize: 14,
color: Colors.grey.shade600, color: Colors.grey.shade600,
), ),
) );
;
} }
return LayoutBuilder( return LayoutBuilder(
builder: (ctx, constraints) { builder: (ctx, constraints) {
return Column( return Column(
@ -99,52 +96,63 @@ class _DynamicElementsState extends State<DynamicElements> {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( Container(
onTap: ()=> _presentDatePicker('_selectedFromDate'), decoration: BoxDecoration(
hintText: TranslationBase.of(context).fromDate, borderRadius: BorderRadius.all(Radius.circular(6.0)),
controller: _fromDateController, border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))),
inputFormatter: ONLY_DATE, padding: EdgeInsets.all(10),
onSaved: (value) { child: AppTextFormField(
if (_fromDateController.text.toString().trim().isEmpty) { borderColor: Colors.white,
widget._patientSearchFormValues.From = "0"; onTap: () => _presentDatePicker('_selectedFromDate'),
} else { hintText: TranslationBase.of(context).fromDate,
widget._patientSearchFormValues.From = _fromDateController.text.replaceAll("/", "-"); controller: _fromDateController,
} inputFormatter: ONLY_DATE,
}, onSaved: (value) {
readOnly: true, if (_fromDateController.text.toString().trim().isEmpty) {
widget._patientSearchFormValues.From = "0";
), } else {
widget._patientSearchFormValues.From =
_fromDateController.text.replaceAll("/", "-");
}
},
readOnly: true,
)),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
if(widget._patientSearchFormValues.From == "0" && widget.isFormSubmitted) if (widget._patientSearchFormValues.From == "0" &&
CustomValidationError(),SizedBox( widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10, height: 10,
), ),
AppTextFormField( Container(
readOnly: true, decoration: BoxDecoration(
hintText: TranslationBase border: Border.all(width: 1.0, color: HexColor("#CCCCCC")),
.of(context) borderRadius: BorderRadius.all(Radius.circular(6.0))),
.toDate, padding: EdgeInsets.all(10),
controller: _toDateController, child: AppTextFormField(
onTap: () { readOnly: true,
_presentDatePicker('_selectedToDate'); borderColor: Colors.white,
}, hintText: TranslationBase.of(context).toDate,
inputFormatter: ONLY_DATE, controller: _toDateController,
onSaved: (value) { onTap: () {
if (_toDateController.text _presentDatePicker('_selectedToDate');
.toString() },
.trim() inputFormatter: ONLY_DATE,
.isEmpty) { onSaved: (value) {
widget._patientSearchFormValues.To = "0"; if (_toDateController.text.toString().trim().isEmpty) {
} else { widget._patientSearchFormValues.To = "0";
widget._patientSearchFormValues.To = } else {
_toDateController.text.replaceAll("/", "-"); widget._patientSearchFormValues.To =
} _toDateController.text.replaceAll("/", "-");
}, }
), },
if(widget._patientSearchFormValues.To == "0" && widget.isFormSubmitted) )),
CustomValidationError(),SizedBox( if (widget._patientSearchFormValues.To == "0" &&
widget.isFormSubmitted)
CustomValidationError(),
SizedBox(
height: 10, height: 10,
), ),
], ],

@ -17,7 +17,6 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart'; import '../../shared/app_texts_widget.dart';
class ProfileMedicalInfoWidget extends StatelessWidget { class ProfileMedicalInfoWidget extends StatelessWidget {
String from; String from;
String to; String to;
PatiantInformtion patient; PatiantInformtion patient;
@ -132,7 +131,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
? PatientProfileButton( ? PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
route: ORDER_PRESCRIPTION, 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')

@ -87,6 +87,20 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).previewHealth, nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport, nameLine2: TranslationBase.of(context).summaryReport,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: SHOW_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png'),
], ],
), ),
); );

@ -573,7 +573,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.4" version: "1.3.0-nullsafety.3"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -844,7 +844,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.2" version: "1.10.0-nullsafety.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -986,5 +986,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <=2.11.0-213.1.beta" dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save