merge-requests/53/head
her_username 5 years ago
commit f098520a80

@ -3,7 +3,7 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]"; const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://hmgwebservices.com/Services/'; const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems"; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
//*********change value to decode json from Dropdown ************ //*********change value to decode json from Dropdown ************
@ -11,3 +11,7 @@ const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
var SERVICES_PATIANT2 = ["List_MyOutPatient", "List_MyInPatient","List_MyDischargePatient" ,"List_MyReferredPatient","List_MyDischargeReferralPatient","List_MyTomorrowPatient","List_MyReferralPatient"]; var SERVICES_PATIANT2 = ["List_MyOutPatient", "List_MyInPatient","List_MyDischargePatient" ,"List_MyReferredPatient","List_MyDischargeReferralPatient","List_MyTomorrowPatient","List_MyReferralPatient"];
var SERVICES_PATIANT_HEADER = ["OutPatient", "InPatient", "Discharge","Referred","Referral Discharge","Tomorrow","Referral"]; var SERVICES_PATIANT_HEADER = ["OutPatient", "InPatient", "Discharge","Referred","Referral Discharge","Tomorrow","Referral"];
//****************** //******************
// Colors ////// by : ibrahim
const PRIMARY_COLOR = 0xff58434F;

@ -25,6 +25,7 @@ class HttpInterceptor extends InterceptorContract {
Future<RequestData> interceptRequest({RequestData data}) async { Future<RequestData> interceptRequest({RequestData data}) async {
print('RequestData ${data.body}'); print('RequestData ${data.body}');
print('RequestData ${data.url}');
try { try {
data.headers["Content-Type"] = "application/json"; data.headers["Content-Type"] = "application/json";
data.headers["Accept"] = "application/json"; data.headers["Accept"] = "application/json";

@ -1,3 +1,11 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:LabOrdersReqModel
*@desc: LabOrdersReqModel class
*/
class LabOrdersReqModel { class LabOrdersReqModel {
int patientID; int patientID;
int patientTypeID; int patientTypeID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:LabOrdersResModel
*@desc: LabOrdersResModel class
*/
class LabOrdersResModel { class LabOrdersResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -50,9 +50,10 @@ class PatiantInformtion {
String age; String age;
String genderDescription; String genderDescription;
String nursingStationName; String nursingStationName;
String appointmentDate;
PatiantInformtion({ PatiantInformtion({
this.list, this.list,
this.projectId, this.projectId,
this.clinicId, this.clinicId,
this.doctorId, this.doctorId,
@ -85,6 +86,8 @@ class PatiantInformtion {
this.age, this.age,
this.genderDescription, this.genderDescription,
this.nursingStationName, this.nursingStationName,
this.appointmentDate,
}); });
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion( factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
@ -120,6 +123,7 @@ class PatiantInformtion {
age: json["Age"], age: json["Age"],
genderDescription: json["GenderDescription"], genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"], nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"],
); );

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:PrescriptionReqModel
*@desc: PrescriptionReqModel class
*/
class PrescriptionReqModel { class PrescriptionReqModel {
int patientID; int patientID;
int setupID; int setupID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:PrescriptionResModel
*@desc: PrescriptionResModel class
*/
class PrescriptionResModel { class PrescriptionResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:RadiologyReqModel
*@desc: RadiologyReqModel class
*/
class RadiologyReqModel { class RadiologyReqModel {
int patientID; int patientID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:RadiologyResModel
*@desc: RadiologyResModel class
*/
class RadiologyResModel { class RadiologyResModel {
String setupID; String setupID;
int projectID; int projectID;

@ -1,3 +1,10 @@
/*
*@author: Elham Rababah
*@Date:6/5/2020
*@param:
*@return:VitalSignResModel
*@desc: VitalSignResModel class
*/
class VitalSignResModel { class VitalSignResModel {
var transNo; var transNo;
var projectID; var projectID;

@ -44,8 +44,8 @@ class PatientsProvider with ChangeNotifier {
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"]; // var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a"); // print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType); int val = int.parse(patientType);
final url = final url =BASE_URL+"DoctorApplication.svc/REST/"+ SERVICES_PATIANT[val];///"https://uat.hmgwebservices.com/Services/Doctors.svc/REST/";
BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val]; //BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
// print("a===========$url=======a"); // print("a===========$url=======a");
try { try {

@ -16,6 +16,7 @@ import './screens/patients/profile/lab_result/lab_orders_screen.dart';
import './screens/patients/profile/patient_profile_screen.dart'; import './screens/patients/profile/patient_profile_screen.dart';
import './screens/patients/profile/prescriptions/prescriptions_screen.dart'; import './screens/patients/profile/prescriptions/prescriptions_screen.dart';
import './screens/patients/profile/radiology/radiology_screen.dart'; import './screens/patients/profile/radiology/radiology_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_screen.dart';
import './screens/profile_screen.dart'; import './screens/profile_screen.dart';
import './screens/settings/settings_screen.dart'; import './screens/settings/settings_screen.dart';
@ -40,10 +41,12 @@ const String PHARMACIES_LIST = 'medicine/pharmacies-list';
const String MESSAGES = 'messages'; const String MESSAGES = 'messages';
const String SERVICES = 'services'; const String SERVICES = 'services';
const String SETTINGS = 'settings'; const String SETTINGS = 'settings';
const String VITAL_SIGN = 'vital-sign'; const String VITAL_SIGN = 'patients/vital-sign';
const String LAB_ORDERS = 'lab_orders'; const String LAB_ORDERS = 'patients/lab_orders';
const String PRESCRIPTIONS = 'Prescription'; const String PRESCRIPTIONS = 'patients/prescription';
const String RADIOLOGY = 'Radiology'; const String RADIOLOGY = 'patients/radiology';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
var routes = { var routes = {
@ -68,5 +71,7 @@ var routes = {
SERVICES: (_) => ServicesScreen(), SERVICES: (_) => ServicesScreen(),
LAB_ORDERS:(_)=>LabOrdersScreen(), LAB_ORDERS:(_)=>LabOrdersScreen(),
PRESCRIPTIONS:(_)=>PrescriptionScreen(), PRESCRIPTIONS:(_)=>PrescriptionScreen(),
RADIOLOGY:(_)=>RadiologyScreen() RADIOLOGY:(_)=>RadiologyScreen(),
VITAL_SIGN_DETAILS:(_)=>VitalSignDetailsScreen(),
}; };

@ -1,15 +1,20 @@
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/models/pharmacies_List_request_model.dart'; import 'package:doctor_app_flutter/models/pharmacies_List_request_model.dart';
import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/medicine_provider.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.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/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: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/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
@ -27,6 +32,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
var _data; var _data;
Helpers helpers = new Helpers(); Helpers helpers = new Helpers();
MedicineProvider _medicineProvider; MedicineProvider _medicineProvider;
//bool _isOutOfStuck = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -94,20 +100,43 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
shrinkWrap: true, shrinkWrap: true,
itemCount: _data == null ? 0 : _data.length, itemCount: _data == null ? 0 : _data.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return Column(
child: MedicineItemWidget( children: <Widget>[
label: _data[index]["LocationDescription"], MedicineItemWidget(
), label: _data[index]["LocationDescription"],
onTap: () { ),
//Navigator.of(context).pushNamed(PHARMACIES_LIST); Container(
Navigator.push( margin: EdgeInsets.only(bottom: 10),
context, child: Row(
MaterialPageRoute( children: <Widget>[
builder: (context) => PharmaciesListScreen( Expanded(flex: 2, child: SizedBox()),
itemID: _data[index]["ItemID"]), Expanded(
flex: 6,
child: AppButton(
title: "Call",
fontSize: 2,
color: Colors.brown[200],
padding: 0,
onPressed: () => launch("tel://"+_data[index]["PhoneNumber"])),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 6,
child: AppButton(
title: "Direction",
fontSize: 2,
color: Color(PRIMARY_COLOR),
padding: 0,
onPressed: () {
MapsLauncher.launchCoordinates(double.parse(_data[index]["Latitude"]), double.parse( _data[index]["Longitude"]), _data[index]["LocationDescription"] );
}),
),
Expanded(flex: 2, child: SizedBox()),
],
), ),
); )
}, ],
); );
}, },
), ),
@ -121,6 +150,7 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
_medicineProvider.getPharmaciesList(widget.itemID).then((result) { _medicineProvider.getPharmaciesList(widget.itemID).then((result) {
this.setState(() { this.setState(() {
_data = _medicineProvider.pharmaciesList; _data = _medicineProvider.pharmaciesList;
//if(_data == null || _data.length == 0)
}); });
}); });
return true; return true;

@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
var _patientSearchFormValues = PatientModel( var _patientSearchFormValues = PatientModel(
ProjectID: 15, ProjectID: 15,
ClinicID: 14, ClinicID: 0,
DoctorID: 243763, DoctorID: 4709,
FirstName: "0", FirstName: "0",
MiddleName: "0", MiddleName: "0",
LastName: "0", LastName: "0",
@ -64,13 +64,13 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables // If all data are correct then save data to out variables
// _formKey.currentState.save(); // _formKey.currentState.save();
// sharedPref.setString(TOKEN,'@dm!n'); sharedPref.setString(TOKEN,'@dm!n');
sharedPref.setString(SLECTED_PATIENT_TYPE,_selectedType); sharedPref.setString(SLECTED_PATIENT_TYPE,_selectedType);
print('_selectedType${_selectedType}'); print('_selectedType${_selectedType}');
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID); int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token; _patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = projectID; _patientSearchFormValues.ProjectID = 15;//projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf"); // print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: { Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues, "patientSearchForm": _patientSearchFormValues,

@ -6,6 +6,7 @@
*@desc: *@desc:
*/ */
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_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';
@ -13,7 +14,9 @@ import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
//************* //*************
@ -33,7 +36,7 @@ class PatientsScreen extends StatefulWidget {
class _PatientsScreenState extends State<PatientsScreen> { class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems; List<dynamic> litems;
// final List parsed; // final List parsed;
List parsed; List parsed;
//********** //**********
List date; List date;
@ -42,10 +45,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List<PatiantInformtion> responseModelList; List<PatiantInformtion> responseModelList;
List<PatiantInformtion> responseModelList2; List<PatiantInformtion> responseModelList2;
// List<String> _locations = ['Today', 'Old Date', 'YESTERDAY'];
List<String> _locations = ['Today', 'Tomorrow', 'Next Week']; List<String> _locations = ['Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0; int _activeLocation = 0;
@ -59,6 +59,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
final _controller = TextEditingController(); final _controller = TextEditingController();
//************** //**************
PatientModel patient; PatientModel patient;
PatientsProvider patientsProv;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
@ -71,148 +72,310 @@ class _PatientsScreenState extends State<PatientsScreen> {
patientType = routeArgs['selectedType']; patientType = routeArgs['selectedType'];
patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
print(patientType); print(patientType);
if (_isInit) { if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) { patientsProv.getPatientList(patient, patientType).then((res) {
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() { setState(() {
int val2 = int.parse(patientType); int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]]; litems = res[SERVICES_PATIANT2[val2]];
parsed = litems; parsed = litems;
responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList = new ModelResponse.fromJson(parsed).list;
responseModelList2=responseModelList; responseModelList2 = responseModelList;
//******************** //********************
_isLoading = false; _isLoading = false;
_hasError = res['ErrorEndUserMessage']; _hasError = res['ErrorEndUserMessage'];
}); });
print(res); print(res);
}).catchError((error) { }).catchError((error) {
// patientsProv.isLoading=false;
// patientsProv.isError=true;
print("====================error================");
print(error); print(error);
}); });
} }
_isInit = false; _isInit = false;
super.didChangeDependencies(); super.didChangeDependencies();
} }
/* /*
*@author: Amjad Amireh *@author: Amjad Amireh
*@Date:2/5/2020 *@Date:2/5/2020
*@param: *@param:
*@return:PatientsScreen Search textbox *@return:PatientsScreen Search textbox filter
*@desc: *@desc:
*/ */
searchData(String str) {
searchData(String str) {
this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false; var strExist = str.length > 0 ? true : false;
if (strExist) { if (strExist) {
List<PatiantInformtion> filterData=[] ; List<PatiantInformtion> filterData = [];
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();
if (firstName.contains(str.toUpperCase())||lastName.contains(str.toUpperCase())) { if (firstName.contains(str.toUpperCase()) ||
print("==========data done==========="); lastName.contains(str.toUpperCase())) {
filterData.add(responseModelList[i]); filterData.add(responseModelList[i]);
} }
} }
setState(() { setState(() {
print("==========data good===========");
this.responseModelList = filterData; this.responseModelList = filterData;
}); });
} else { } else {
setState(() { setState(() {
print("==========no data==========="); this.responseModelList = this.responseModelList2;
});
this.responseModelList =this.responseModelList2; }
}
//***********DateFormat**************
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date with time
*@desc:
*/
convertDate(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDateformat = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0') +
" " +
"-" +
" " +
date.hour.toString().padLeft(2, '0') +
":" +
date.minute.toString().toString().padLeft(2, '0');
return newDateformat.toString();
}
/*
*@author: Amjad Amireh
*@Date:5/5/2020
*@param:
*@return:Convert time from Milesecond to date
*@desc:
*/
convertDateFormat(String str) {
String timeConvert;
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
filterBooking(String str) {
this.responseModelList = this.responseModelList2;
var strExist = str.length > 0 ? true : false;
if (true) {
List<PatiantInformtion> filterDate = [];
for (var i = 0; i < responseModelList2.length; i++) {
String patiantAppointment =
convertDateFormat(responseModelList[i].appointmentDate);
String dateAppointment = checkDate(patiantAppointment);
if (dateAppointment.contains(str)) {
filterDate.add(responseModelList[i]);
}
}
setState(() {
this.responseModelList = filterDate;
});
} else {
setState(() {
this.responseModelList = this.responseModelList2;
}); });
} }
} }
String checkDate(String dateString) {
String date;
DateTime checkedTime = DateTime.parse(dateString);
DateTime currentTime = DateTime.now();
if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) {
return "TODAY";
} else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "TOMORROW";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
return "Old Date";
}
}
return "Old Date";
}
//*************************
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold( return AppScaffold(
appBarTitle: patientTypetitle, appBarTitle: patientTypetitle,
//***********Modify by amjad (create List view to insert all new data webservise in scroll )************* //***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container( body: patientsProv.isLoading
// margin: EdgeInsets.all(20), ? DrAppCircularProgressIndeicator()
child: ListView(scrollDirection: Axis.vertical, children: <Widget>[ : patientsProv.isError
Container( ? Center(
child: litems == null child: Text(
? Column() patientsProv.error,
: style: TextStyle(color: Theme.of(context).errorColor),
Column( ),
children: <Widget>[ )
Padding( : Container(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.03), child: ListView(scrollDirection: Axis.vertical, children: <
child: _locationBar(context), Widget>[
), Container(
SizedBox(height: 10.0), child: litems == null
Container( ? Column(
width: SizeConfig.screenWidth * 0.80, children: <Widget>[
child: TextField( Container(
controller: _controller, child: Center(
child:
onChanged: (String str){ DrAppCircularProgressIndeicator()),
// print(str); ),
this.searchData(str); Container(
child: Text(
}, "Sorry There is No Data",
decoration: style: TextStyle(
buildInputDecoration(context, 'Search patiant'), color: Theme.of(context).errorColor),
), ),
), )
Container( ],
margin: EdgeInsets.fromLTRB(15, 0, 15, 0), )
child: Column( : Column(
children: <Widget>[
children: Padding(
responseModelList.map((PatiantInformtion item) { padding: EdgeInsets.only(
return InkWell( top:
child: CardWithBgWidget( MediaQuery.of(context).size.height *
0.03),
widget: Column( child: SERVICES_PATIANT2[
int.parse(patientType)] ==
crossAxisAlignment: CrossAxisAlignment.start, "List_MyOutPatient"
children: <Widget>[ ? _locationBar(context)
AppText( : Container(),
item.firstName,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(item.lastName,
fontSize:
2.5 * SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
AppText(item.middleName,
fontSize:
2.5 * SizeConfig.textMultiplier),
],
), ),
), SizedBox(height: 10.0),
onTap: () { Container(
Navigator.of(context).pushNamed( width: SizeConfig.screenWidth * 0.80,
PATIENTS_PROFILE, child: TextField(
arguments: {"patient": item}); controller: _controller,
}, onChanged: (String str) {
);
}).toList(), this.searchData(str);
), },
), decoration: buildInputDecoration(
], context, 'Search patiant'),
)) ),
]))); ),
Container(
margin: EdgeInsets.fromLTRB(15, 0, 15, 0),
child: Column(
children: responseModelList
.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
item.firstName +
" " +
item.lastName +
"- " +
item.patientId.toString(),
fontSize: 2.5 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 8,
),
SERVICES_PATIANT2[int.parse(
patientType)] ==
"List_MyOutPatient"
? AppText(
convertDate(item
.appointmentDate
.toString()),
fontSize: 2.5 *
SizeConfig
.textMultiplier)
: AppText(
item.nationalityName,
fontSize: 2.5 *
SizeConfig
.textMultiplier)
],
),
),
onTap: () {
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {"patient": item});
},
);
}).toList(),
),
),
],
))
])));
} }
//***********amjad update**buildInputDecoration ***to search box******** //***********amjad update**buildInputDecoration ***to search box********
@ -243,22 +406,27 @@ class _PatientsScreenState extends State<PatientsScreen> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((l) { children: _locations.map((item) {
bool _isActive = _locations[_activeLocation] == l ? true : false; bool _isActive = _locations[_activeLocation] == item ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[ return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell( InkWell(
child: Text( child: Text(
l, item,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
onTap: () { onTap: () {
print(l);
print(_locations.indexOf(l)); print(_locations.indexOf(item));
filterBooking(item.toString());
setState(() { setState(() {
_activeLocation = _locations.indexOf(l); _activeLocation = _locations.indexOf(item);
}); });
}), }),
_isActive _isActive

@ -108,9 +108,11 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
.patientLabResultOrdersList[index] url: patientsProv
.doctorImageURL), .patientLabResultOrdersList[
index]
.doctorImageURL),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
@ -123,15 +125,18 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
'${patientsProv.patientLabResultOrdersList[index].doctorName}', '${patientsProv.patientLabResultOrdersList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientLabResultOrdersList[index].clinicName}', ' ${patientsProv.patientLabResultOrdersList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -55,8 +55,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
tokenID: token, tokenID: token,
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
languageID: 2, languageID: 2,
setupID: 0 setupID: 0);
);
patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson()); patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson());
} }
@ -99,7 +98,8 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
0), 0),
child: ListView.builder( child: ListView.builder(
itemCount: patientsProv.patientPrescriptionsList.length, itemCount:
patientsProv.patientPrescriptionsList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return InkWell( return InkWell(
child: CardWithBgWidget( child: CardWithBgWidget(
@ -108,9 +108,10 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
.patientPrescriptionsList[index] url: patientsProv
.doctorImageURL), .patientPrescriptionsList[index]
.doctorImageURL),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
@ -123,15 +124,18 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
'${patientsProv.patientPrescriptionsList[index].doctorName}', '${patientsProv.patientPrescriptionsList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', ' ${patientsProv.patientPrescriptionsList[index].clinicDescription}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig
.textMultiplier), .textMultiplier,
color: Theme.of(context)
.primaryColor),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -123,23 +123,27 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
'${patientsProv.patientRadiologyList[index].doctorName}', '${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}', ' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -0,0 +1,70 @@
import 'package:flutter/material.dart';
import '../../../../config/size_config.dart';
import '../../../../models/patient/vital_sign_res_model.dart';
import '../../../../widgets/patients/profile/profile_medical_info_widget.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/rounded_container_widget.dart';
class VitalSignDetailsScreen extends StatelessWidget {
// VitalSignDetailsScreen({Key key, this.vitalSing}) : super(key: key);
VitalSignResModel vitalSing;
String url = "assets/images/";
final double contWidth = SizeConfig.realScreenWidth * 0.70;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
vitalSing = routeArgs['vitalSing'];
return AppScaffold(
appBarTitle: "vital Sing ",
body: RoundedContainer(
height: SizeConfig.realScreenHeight *0.7,
child: CustomScrollView(
primary: false,
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.all(10),
sliver: SliverGrid.count(
childAspectRatio: 0.7,
crossAxisSpacing: 10,
mainAxisSpacing: 0,
crossAxisCount: 3,
children: <Widget>[
CircleAvatarWidget(
des: 'Body Measurements',
url: url + 'heartbeat.png',
), CircleAvatarWidget(
des: 'Temperature',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Pulse',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Respiration',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Blood Pressure',
url: url + 'heartbeat.png',
),
CircleAvatarWidget(
des: 'Oxygenation',
url: url + 'heartbeat.png',
), CircleAvatarWidget(
des: 'Pain Scale',
url: url + 'heartbeat.png',
),
],
),
),
],
),
// height: 500,
));
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -109,9 +110,10 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget(url:patientsProv ProfileImageWidget(
.patientVitalSignList[index] url: patientsProv
.doctorImageURL), .patientVitalSignList[index]
.doctorImageURL),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
@ -124,15 +126,18 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
'${patientsProv.patientVitalSignList[index].doctorName}', '${patientsProv.patientVitalSignList[index].doctorName}',
fontSize: 2.5 * fontSize: 2.5 *
SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientVitalSignList[index].clinicName}', ' ${patientsProv.patientVitalSignList[index].clinicName}',
fontSize: 2.5 * fontSize: 2 *
SizeConfig SizeConfig.textMultiplier,
.textMultiplier), color: Theme.of(context)
.primaryColor,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
@ -145,7 +150,9 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
], ],
), ),
), ),
onTap: () {}, onTap: () {
Navigator.of(context).pushNamed(VITAL_SIGN_DETAILS,arguments: {'vitalSing':patientsProv.patientVitalSignList[index]});
},
); );
}), }),
), ),

@ -1,3 +1,4 @@
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 '../shared/rounded_container_widget.dart'; import '../shared/rounded_container_widget.dart';
@ -35,7 +36,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
width: SizeConfig.widthMultiplier * 2, width: SizeConfig.widthMultiplier * 2,
backgroundColor: Colors.red, backgroundColor: Color(PRIMARY_COLOR),
margin: 0, margin: 0,
topLeft: 6, topLeft: 6,
topRight: 0, topRight: 0,

@ -15,38 +15,7 @@ import './profile_status_info_widget.dart';
*@desc: Patient Profile Widget *@desc: Patient Profile Widget
*/ */
class PatientProfileWidget extends StatelessWidget { class PatientProfileWidget extends StatelessWidget {
// Map patient = {
// "ProjectID": 15,
// "ClinicID": null,
// "DoctorID": 70907,
// "PatientID": 3315674,
// "DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
// "DoctorNameN": null,
// "FirstName": "WALEED",
// "MiddleName": "ALI",
// "LastName": "AL-YAZIDI",
// "FirstNameN": null,
// "MiddleNameN": null,
// "LastNameN": null,
// "Gender": 1,
// "DateofBirth": "/Date(534286800000+0300)/",
// "NationalityID": null,
// "MobileNumber": "0500014559",
// "EmailAddress": "unknown@unknown.com",
// "PatientIdentificationNo": "1063236754",
// "NationalityName": "Saudi",
// "NationalityNameN": null,
// "PatientStatusType": null,
// "PatientType": 1,
// "AppointmentDate": "/Date(1587848400000+0300)/",
// "StartTime": "13:00:00",
// "Age": "34 Yr",
// "ClinicDescription": "INTERNAL MEDICINE CLINIC",
// "GenderDescription": "Male",
// "AdmissionDate": "/Date(1587848400000+0300)/",
// "AdmissionNo": "2020008652"
// };
PatiantInformtion patient; PatiantInformtion patient;

@ -79,7 +79,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
), ),
InkWell( InkWell(
//RADIOLOGY //RADIOLOGY
onTap: () { onTap: () {
navigator(context, RADIOLOGY); navigator(context, RADIOLOGY);
}, },
child: CircleAvatarWidget( child: CircleAvatarWidget(
@ -123,26 +123,34 @@ class CircleAvatarWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Container(
children: <Widget>[ child: Column(
Container( children: <Widget>[
height: height, Container(
width: width, height: height,
decoration: new BoxDecoration( width: width,
// color: Colors.green, // border color // width: 50,
shape: BoxShape.circle, // height: 50,
border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)), decoration: new BoxDecoration(
child: CircleAvatar( // color: Colors.green, // border color
radius: SizeConfig.imageSizeMultiplier * 12, shape: BoxShape.circle,
child: Image.asset(url), border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)),
backgroundColor: Colors.transparent, child: CircleAvatar(
radius: SizeConfig.imageSizeMultiplier * 12,
child: Image.asset(url),
backgroundColor: Colors.transparent,
),
), ),
), SizedBox(
SizedBox( height: 10,
height: 10, ),
), AppText(
AppText(des) des,
], fontSize: 2 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
)
],
),
); );
} }
} }

@ -11,8 +11,10 @@ class AppButton extends StatefulWidget {
final String title; final String title;
final IconData icon; final IconData icon;
final Color color; final Color color;
final double fontSize;
final double padding;
AppButton({@required this.onPressed, this.title, this.icon, this.color}); AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2.5, this.padding = 15});
_AppButtonState createState() => _AppButtonState(); _AppButtonState createState() => _AppButtonState();
@ -29,8 +31,8 @@ class AppButton extends StatefulWidget {
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 10, top: 10,
bottom: 10, bottom: 10,
right: SizeConfig.widthMultiplier * 15, right: SizeConfig.widthMultiplier * widget.padding,
left: SizeConfig.widthMultiplier* 15 left: SizeConfig.widthMultiplier * widget.padding
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -45,7 +47,7 @@ class AppButton extends StatefulWidget {
AppText( AppText(
widget.title, widget.title,
color: Colors.white, color: Colors.white,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * widget.fontSize ,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
], ],

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// OWNER : Ibrahim albitar // OWNER : Ibrahim albitar
// DATE : 12-04-2020 // DATE : 12-04-2020
// DESCRIPTION : Customization for Texts in app // DESCRIPTION : Customization for Texts in app
@ -19,6 +18,7 @@ class AppText extends StatefulWidget {
final double marginBottom; final double marginBottom;
final double marginLeft; final double marginLeft;
final bool visibility; final bool visibility;
final TextAlign textAlign;
AppText(this.data, AppText(this.data,
{this.color = Colors.black, {this.color = Colors.black,
@ -30,7 +30,8 @@ class AppText extends StatefulWidget {
this.marginRight = 0, this.marginRight = 0,
this.marginBottom = 0, this.marginBottom = 0,
this.marginLeft = 0, this.marginLeft = 0,
this.visibility = true}); this.visibility = true,
this.textAlign});
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -39,18 +40,19 @@ class AppText extends StatefulWidget {
class _AppTextState extends State<AppText> { class _AppTextState extends State<AppText> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Visibility( return Visibility(
visible: widget.visibility, visible: widget.visibility,
child: Container( child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only( margin: widget.margin != null
top: widget.marginTop, ? EdgeInsets.all(widget.margin)
right: widget.marginRight, : EdgeInsets.only(
bottom: widget.marginBottom, top: widget.marginTop,
left: widget.marginLeft right: widget.marginRight,
), bottom: widget.marginBottom,
left: widget.marginLeft),
child: Text( child: Text(
widget.data, widget.data,
textAlign: widget.textAlign,
style: TextStyle( style: TextStyle(
color: widget.color, color: widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,

@ -33,6 +33,9 @@ dependencies:
http_interceptor: ^0.2.0 http_interceptor: ^0.2.0
progress_hud_v2: ^2.0.0 progress_hud_v2: ^2.0.0
connectivity: ^0.4.8+2 connectivity: ^0.4.8+2
maps_launcher: ^1.2.0
url_launcher: ^5.4.5
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.

Loading…
Cancel
Save