# Conflicts:
#	pubspec.yaml
merge-requests/125/head
Salman Afzal 6 years ago
commit 50e9dc0980

@ -6,9 +6,12 @@ const ONLY_DATE = "[0-9/]";
const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region"; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL =
const PATIENT_INSURANCE_APPROVALS_URL = "DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_ORDERS_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_INSURANCE_APPROVALS_URL =
"DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL =
"DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const GET_PROJECTS = 'Lists.svc/REST/GetProjectForDoctorAPP'; const GET_PROJECTS = 'Lists.svc/REST/GetProjectForDoctorAPP';
const GET_PATIENT_VITAL_SIGN = 'Doctors.svc/REST/Doctor_GetPatientVitalSign'; const GET_PATIENT_VITAL_SIGN = 'Doctors.svc/REST/Doctor_GetPatientVitalSign';

@ -25,7 +25,8 @@ import '../util/helpers.dart';
Helpers helpers = Helpers(); Helpers helpers = Helpers();
class PatientsProvider with ChangeNotifier { class PatientsProvider with ChangeNotifier
{
bool isLoading = false; bool isLoading = false;
bool isError = false; bool isError = false;
String error = ''; String error = '';

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/models/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/request_add_referred_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/request_add_referred_doctor_remarks.dart';
import 'package:doctor_app_flutter/models/request_my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/request_my_referral_patient_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -11,6 +12,8 @@ class MyReferralPatientProvider with ChangeNotifier {
bool isLoading = true; bool isLoading = true;
bool isError = false; bool isError = false;
String error = ''; String error = '';
Helpers helpers = Helpers();
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();

@ -1,11 +1,10 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
//import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/my_referred_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
//import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
//import 'package:doctor_app_flutter/models/request_add_referred_doctor_remarks.dart';
import 'package:doctor_app_flutter/models/request_my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/request_my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/verify_referral_doctor_remarks.dart'; import 'package:doctor_app_flutter/models/verify_referral_doctor_remarks.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import '../util/helpers.dart';
class MyReferredPatientProvider with ChangeNotifier { class MyReferredPatientProvider with ChangeNotifier {
@ -14,9 +13,8 @@ class MyReferredPatientProvider with ChangeNotifier {
bool isLoading = true; bool isLoading = true;
bool isError = false; bool isError = false;
String error = ''; String error = '';
Helpers helpers = Helpers();
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
// RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
VerifyReferralDoctorRemarks _verifyreferraldoctorremarks = VerifyReferralDoctorRemarks(); VerifyReferralDoctorRemarks _verifyreferraldoctorremarks = VerifyReferralDoctorRemarks();
MyReferredPatientProvider() { MyReferredPatientProvider() {
getMyReferralPatient(); getMyReferralPatient();
@ -49,16 +47,13 @@ class MyReferredPatientProvider with ChangeNotifier {
} }
} }
// Future replay(
// String referredDoctorRemarks, MyReferredPatientModel model) async { Future verify(
Future replay(
MyReferredPatientModel model) async { MyReferredPatientModel model) async {
try { try {
_verifyreferraldoctorremarks.patientID=model.projectId; _verifyreferraldoctorremarks.patientID=model.projectId;
_verifyreferraldoctorremarks.admissionNo =model.admissionNo; _verifyreferraldoctorremarks.admissionNo =model.admissionNo;
_verifyreferraldoctorremarks.lineItemNo = model.lineItemNo; _verifyreferraldoctorremarks.lineItemNo = model.lineItemNo;
_verifyreferraldoctorremarks.referredDoctorRemarks=model.referredDoctorRemarks; _verifyreferraldoctorremarks.referredDoctorRemarks=model.referredDoctorRemarks;
_verifyreferraldoctorremarks.referringDoctor=model.referringDoctor; _verifyreferraldoctorremarks.referringDoctor=model.referringDoctor;
_verifyreferraldoctorremarks.firstName=model.firstName; _verifyreferraldoctorremarks.firstName=model.firstName;
@ -67,18 +62,9 @@ class MyReferredPatientProvider with ChangeNotifier {
_verifyreferraldoctorremarks.patientMobileNumber=model.mobileNumber; _verifyreferraldoctorremarks.patientMobileNumber=model.mobileNumber;
_verifyreferraldoctorremarks.patientIdentificationID=model.patientIdentificationNo; _verifyreferraldoctorremarks.patientIdentificationID=model.patientIdentificationNo;
await BaseAppClient.post( await BaseAppClient.post(
'DoctorApplication.svc/REST/GtMyReferredPatient', 'DoctorApplication.svc/REST/GtMyReferredPatient',
body: _verifyreferraldoctorremarks.toJson(),//_requestAddReferredDoctorRemarks.toJson(), body: _verifyreferraldoctorremarks.toJson(),
onSuccess: (dynamic body, int statusCode) { onSuccess: (dynamic body, int statusCode) {
listMyReferredPatientModel[ listMyReferredPatientModel[
@ -86,11 +72,11 @@ class MyReferredPatientProvider with ChangeNotifier {
notifyListeners(); notifyListeners();
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
throw (error); throw(error);
}, },
); );
} catch (error) { } catch (error) {
throw error; throw(error);
} }
} }
} }

@ -1,11 +1,4 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart';
import './screens/patients/profile/vital_sign/body_measurements_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart'; import './screens/auth/login_screen.dart';
@ -21,11 +14,15 @@ import './screens/medicine/pharmacies_list_screen.dart';
import './screens/patients/patient_search_screen.dart'; import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_referred_screen.dart'; import './screens/patients/patients_referred_screen.dart';
import './screens/patients/patients_screen.dart'; import './screens/patients/patients_screen.dart';
import './screens/patients/profile/insurance_approvals_screen.dart';
import './screens/patients/profile/lab_result/lab_orders_screen.dart'; import './screens/patients/profile/lab_result/lab_orders_screen.dart';
import './screens/patients/profile/patient_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/progress_note_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_details_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_item_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';
@ -91,5 +88,5 @@ var routes = {
PATIENT_ORDERS: (_) => PatientsOrdersScreen(), PATIENT_ORDERS: (_) => PatientsOrdersScreen(),
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
BODY_MEASUREMENTS: (_) => BodyMeasurementsScreen() BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen()
}; };

@ -65,7 +65,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
flex: 2, flex: 2,
child: RoundedContainer( child: RoundedContainer(
child: CircularPercentIndicator( child: CircularPercentIndicator(
radius: 115.0, radius: 100.0,
animation: true, animation: true,
animationDuration: 1200, animationDuration: 1200,
lineWidth: 7.0, lineWidth: 7.0,
@ -221,7 +221,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 2, flex: 2,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 2, flex: 2,
@ -235,7 +234,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
valueFontColor: Colors.black, valueFontColor: Colors.black,
titleFontColor: Colors.black, titleFontColor: Colors.black,
iconColor: Colors.black, iconColor: Colors.black,
titleFontSize: 16, titleFontSize: SizeConfig.textMultiplier * 2,
), ),
onTap: () { onTap: () {
Navigator.of(context).pushNamed(PATIENT_SEARCH); Navigator.of(context).pushNamed(PATIENT_SEARCH);
@ -265,7 +264,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
valueFontColor: Colors.black, valueFontColor: Colors.black,
titleFontColor: Colors.black, titleFontColor: Colors.black,
iconColor: Colors.black, iconColor: Colors.black,
titleFontSize: 16, titleFontSize: SizeConfig.textMultiplier * 2,
), ),
), ),
), ),
@ -289,7 +288,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
valueFontColor: Colors.black, valueFontColor: Colors.black,
titleFontColor: Colors.black, titleFontColor: Colors.black,
iconColor: Colors.black, iconColor: Colors.black,
titleFontSize: 16, titleFontSize: SizeConfig.textMultiplier * 2,
), ),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -327,7 +326,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
valueFontColor: Colors.black, valueFontColor: Colors.black,
titleFontColor: Colors.black, titleFontColor: Colors.black,
iconColor: Colors.black, iconColor: Colors.black,
titleFontSize: 16, titleFontSize: SizeConfig.textMultiplier * 2,
), ),
), ),
), ),
@ -362,7 +361,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
valueFontColor: Colors.black, valueFontColor: Colors.black,
titleFontColor: Colors.black, titleFontColor: Colors.black,
iconColor: Colors.black, iconColor: Colors.black,
titleFontSize: 16, titleFontSize: SizeConfig.textMultiplier * 2,
), ),
), ),
), ),

@ -19,7 +19,7 @@ class MyReferralPatient extends StatelessWidget {
return AppScaffold( return AppScaffold(
showBottomBar: false, showBottomBar: false,
showAppDrawer: false, showAppDrawer: false,
appBarTitle: TranslationBase.of(context).mySchedule, appBarTitle: 'My Referral Patient',
body: referralPatientProvider.isLoading body: referralPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referralPatientProvider.isError : referralPatientProvider.isError

@ -20,7 +20,7 @@ class MyReferredPatient extends StatelessWidget {
return AppScaffold( return AppScaffold(
showBottomBar: false, showBottomBar: false,
showAppDrawer: false, showAppDrawer: false,
appBarTitle: TranslationBase.of(context).mySchedule, appBarTitle: 'My Referred Patient',
body: referredPatientProvider.isLoading body: referredPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referredPatientProvider.isError : referredPatientProvider.isError

@ -113,6 +113,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "SEARCH FOR PATIENT", appBarTitle: "SEARCH FOR PATIENT",
showBottomBar: false,
showAppDrawer: false,
body: ListView( body: ListView(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(

@ -296,6 +296,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context); PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold( return AppScaffold(
showBottomBar: false,
showAppDrawer: false,
appBarTitle: patientTypetitle, appBarTitle: patientTypetitle,
body: _isLoading body: _isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart'; import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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';
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';

@ -10,6 +10,8 @@ class PatientProfileScreen extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
// child: child, // child: child,
showBottomBar: false,
showAppDrawer: false,
appBarTitle: 'Patient Profile', appBarTitle: 'Patient Profile',
body: PatientProfileWidget(), body: PatientProfileWidget(),
); );

@ -1,16 +1,16 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.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 '../../../../config/shared_pref_kay.dart';
import '../../../../config/size_config.dart'; import '../../../../config/size_config.dart';
import '../../../../lookups/patient_lookup.dart';
import '../../../../models/patient/patiant_info_model.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../models/patient/vital_sign_res_model.dart'; import '../../../../models/patient/vital_sign_res_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../routes.dart';
import '../../../../screens/patients/profile/vital_sign/vital_sign_item.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -199,78 +199,3 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
} }
} }
class VitalSignItem extends StatelessWidget {
const VitalSignItem(
{Key key,
@required this.url,
@required this.des,
this.lastVal = 'N/A',
this.unit = '',
this.height,
this.width})
: super(key: key);
final String url;
final String des;
final String lastVal;
final String unit;
final double height;
final double width;
@override
Widget build(BuildContext context) {
return RoundedContainer(
margin: 0.025 * SizeConfig.realScreenWidth,
height: 0.14 * SizeConfig.realScreenHeight,
width: 0.45 * SizeConfig.realScreenWidth,
child: Container(
padding: EdgeInsets.all(5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 2,
child: Text(
des,
style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
),
),
Expanded(
flex: 1,
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Image.asset(
url,
height: SizeConfig.heightMultiplier * 7,
),
),
Expanded(
child: RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
new TextSpan(text: lastVal),
new TextSpan(
text: ' ${unit}',
style:
TextStyle(color: Theme.of(context).primaryColor)),
],
),
))
],
),
)
],
),
),
);
}
}

@ -0,0 +1,86 @@
import 'package:flutter/material.dart';
import '../../../../config/size_config.dart';
import '../../../../widgets/shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: VitalSignItem
*/
class VitalSignItem extends StatelessWidget {
const VitalSignItem(
{Key key,
@required this.url,
@required this.des,
this.lastVal = 'N/A',
this.unit = '',
this.height,
this.width})
: super(key: key);
final String url;
final String des;
final String lastVal;
final String unit;
final double height;
final double width;
@override
Widget build(BuildContext context) {
return RoundedContainer(
margin: 0.025 * SizeConfig.realScreenWidth,
height: 0.14 * SizeConfig.realScreenHeight,
width: 0.45 * SizeConfig.realScreenWidth,
child: Container(
padding: EdgeInsets.all(5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 2,
child: Text(
des,
style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
),
),
Expanded(
flex: 1,
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Image.asset(
url,
height: SizeConfig.heightMultiplier * 7,
),
),
Expanded(
child: RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
new TextSpan(text: lastVal),
new TextSpan(
text: ' ${unit}',
style:
TextStyle(color: Theme.of(context).primaryColor)),
],
),
))
],
),
)
],
),
),
);
}
}

@ -1,15 +1,22 @@
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_ding_chart_and_detials.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.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';
class BodyMeasurementsScreen extends StatelessWidget { import '../../../../lookups/patient_lookup.dart';
BodyMeasurementsScreen(); import '../../../../models/patient/vital_sign_res_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: VitalSignItemDetailsScreen
*/
class VitalSignItemDetailsScreen extends StatelessWidget {
VitalSignItemDetailsScreen();
// ; // ;
PatientsProvider patientsProv; PatientsProvider patientsProv;
List<VitalSignResModel> vitalList = []; List<VitalSignResModel> vitalList = [];
@ -146,7 +153,6 @@ class BodyMeasurementsScreen extends StatelessWidget {
default: default:
} }
// generateData();
return AppScaffold( return AppScaffold(
appBarTitle: pageTitle, appBarTitle: pageTitle,
body: ListView( body: ListView(
@ -164,17 +170,4 @@ class BodyMeasurementsScreen extends StatelessWidget {
} }
} }
class LinearSales {
final int year;
final int sales;
LinearSales(this.year, this.sales);
}
/// Sample time series data type.
class TimeSeriesSales {
final DateTime time;
final int sales;
TimeSeriesSales(this.time, this.sales);
}

@ -1,7 +1,16 @@
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/patients/vital_sign_details_wideget.dart'; import 'package:doctor_app_flutter/widgets/patients/vital_sign_details_wideget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: VitalSingChartAndDetials
*/
class VitalSingChartAndDetials extends StatelessWidget { class VitalSingChartAndDetials extends StatelessWidget {
VitalSingChartAndDetials({ VitalSingChartAndDetials({
Key key, Key key,
@ -12,7 +21,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
@required this.title2, @required this.title2,
}) : super(key: key); }) : super(key: key);
final List<VitalSignResModel> vitalList ; final List<VitalSignResModel> vitalList;
final String name; final String name;
final String viewKey; final String viewKey;
final String title1; final String title1;
@ -22,17 +31,19 @@ class VitalSingChartAndDetials extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
children: <Widget>[ children: <Widget>[
AppTimeSeriesChart( AppExpandableNotifier(
headerWid: AppTimeSeriesChart(
vitalList: vitalList, vitalList: vitalList,
chartName: name, chartName: name,
viewKey: viewKey, viewKey: viewKey,
), ),
VitalSignDetailsWidget( bodyWid: VitalSignDetailsWidget(
vitalList: vitalList.reversed.toList(), vitalList: vitalList.reversed.toList(),
title1: '${title1}', title1: '${title1}',
title2: '${title2}', title2: '${title2}',
viewKey: '${viewKey}', viewKey: '${viewKey}',
), ),
),
], ],
); );
} }

@ -8,7 +8,7 @@ import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
); );
} }
void showSuccesToast(msg) { static void showSuccesToast(msg) {
FlutterFlexibleToast.showToast( FlutterFlexibleToast.showToast(
message: msg, message: msg,
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,
@ -20,7 +20,7 @@ import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
} }
void showErrorToast(msg) { static void showErrorToast(msg) {
FlutterFlexibleToast.showToast( FlutterFlexibleToast.showToast(
message: msg, message: msg,
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,

@ -7,7 +7,6 @@ import '../util/dr_app_toast_msg.dart';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
DrAppToastMsg toastMsg = DrAppToastMsg();
/* /*
*@author: Elham Rababah *@author: Elham Rababah
@ -126,7 +125,7 @@ class Helpers {
localMsg = msg.toString(); localMsg = msg.toString();
} }
toastMsg.showErrorToast(localMsg); DrAppToastMsg.showErrorToast(localMsg);
} }
/* /*

@ -14,7 +14,6 @@ import '../../util/dr_app_toast_msg.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
DrAppToastMsg toastMsg = DrAppToastMsg();
class KnownUserLogin extends StatefulWidget { class KnownUserLogin extends StatefulWidget {
@override @override
@ -80,14 +79,14 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
2; //res['SELECTDeviceIMEIbyIMEI_List'][0]['LogInType']; 2; //res['SELECTDeviceIMEIbyIMEI_List'][0]['LogInType'];
}).catchError((err) { }).catchError((err) {
print('${err}'); print('${err}');
toastMsg.showErrorToast(err); DrAppToastMsg.showErrorToast(err);
}); });
switch (snapshot.connectionState) { switch (snapshot.connectionState) {
case ConnectionState.waiting: case ConnectionState.waiting:
return DrAppCircularProgressIndeicator(); return DrAppCircularProgressIndeicator();
default: default:
if (snapshot.hasError) { if (snapshot.hasError) {
toastMsg.showErrorToast('Error: ${snapshot.error}'); DrAppToastMsg.showErrorToast('Error: ${snapshot.error}');
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
} else { } else {
return Column( return Column(
@ -323,6 +322,6 @@ class _KnownUserLoginState extends State<KnownUserLogin> {
} }
showErorrMsg(localMsg) { showErorrMsg(localMsg) {
toastMsg.showErrorToast(localMsg); DrAppToastMsg.showErrorToast(localMsg);
} }
} }

@ -15,7 +15,6 @@ import '../../util/helpers.dart';
import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
DrAppToastMsg toastMsg = DrAppToastMsg();
Helpers helpers = Helpers(); Helpers helpers = Helpers();
class VerifyAccount extends StatefulWidget { class VerifyAccount extends StatefulWidget {
@ -63,7 +62,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
return DrAppCircularProgressIndeicator(); return DrAppCircularProgressIndeicator();
default: default:
if (snapshot.hasError) { if (snapshot.hasError) {
toastMsg.showErrorToast('Error: ${snapshot.error}'); DrAppToastMsg.showErrorToast('Error: ${snapshot.error}');
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
} else { } else {
return Form( return Form(

@ -1,5 +1,6 @@
import 'dart:ffi'; import 'dart:ffi';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import '../shared/rounded_container_widget.dart'; import '../shared/rounded_container_widget.dart';
@ -45,15 +46,16 @@ class _DashboardItemTextsState extends State<DashboardItemIconText> {
Align( Align(
alignment: FractionalOffset.topLeft, alignment: FractionalOffset.topLeft,
child: Container( child: Container(
margin: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: SvgPicture.asset( child: SvgPicture.asset(
widget.icon, widget.icon,
color: widget.iconColor, color: widget.iconColor,
width: SizeConfig.widthMultiplier * 7,
))), ))),
Align( Align(
alignment: FractionalOffset.bottomRight, alignment: FractionalOffset.bottomRight,
child: Container( child: Container(
margin: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/providers/referral_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referral_patient_provider.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
@ -42,7 +43,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'${widget.myReferralPatientModel.firstName} ${widget.myReferralPatientModel.lastName}', '${widget.myReferralPatientModel.firstName} ${widget.myReferralPatientModel.lastName}',
@ -67,13 +68,17 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column( SizedBox(height: 5,),
crossAxisAlignment: CrossAxisAlignment.start, Divider(color: Color(0xFF000000),height: 0.5,),
children: <Widget>[ Table(
Divider(color: Colors.grey), border: TableBorder.symmetric(inside: BorderSide(width: 0.5),),
Row( children: [
children: <Widget>[ TableRow(
children: [
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -91,15 +96,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
) )
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -119,13 +122,15 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
], )
]
), ),
TableRow(
Divider(color: Colors.grey), children: [
Row(
children: <Widget>[
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -145,13 +150,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -172,12 +175,15 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
], )
]
), ),
Divider(color: Colors.grey), TableRow(
Row( children: [
children: <Widget>[
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -197,13 +203,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -225,24 +229,32 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
)
], ],
), ),
Divider(color: Colors.grey),
AppText( ],
'Clinic Details and Remarks',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
), ),
Divider(color: Color(0xFF000000),height: 0.5,),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Clinic Details and Remarks',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,),
Texts( Texts(
'73 years old female known case of HTN and dm on regular medication one day prior the patient had rt sided weakness suddenly and reduced level of conscoiusness no vomting no headache no bluriing of vision no other relevant symptoms.\r\nPMH:No history of similar condition no history of surgey or blood transfusions\r\nCT brain was done apparently effaced left insular cortex', '${widget.myReferralPatientModel.referringDoctorRemarks}',
style: "bodyText1", style: "bodyText1",
readMore: true, readMore: true,
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLength: 100), maxLength: 100)
],
),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
@ -261,6 +273,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
maxLines: 2, maxLines: 2,
minLines: 2, minLines: 2,
hintText: 'Answer the patient', hintText: 'Answer the patient',
fontWeight: FontWeight.normal,
initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '',
readOnly: _isLoading, readOnly: _isLoading,
validator: (value) { validator: (value) {
@ -272,35 +285,10 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
), ),
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
if (error != null && error.isNotEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context)
.errorColor
.withOpacity(0.06),
),
padding: EdgeInsets.symmetric(
vertical: 8.0, horizontal: 12.0),
child: Row(
children: <Widget>[
Expanded(
child: Texts(error ?? "",
style: "bodyText1",
color: Theme.of(context)
.errorColor)),
],
),
),
SizedBox(height: 10.0),
],
),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 10,right: 10),
child: Button( child: Button(
onTap: () async { onTap: () async {
final form = _formKey.currentState; final form = _formKey.currentState;
@ -313,11 +301,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
}); });
DrAppToastMsg.showSuccesToast('Reply Successfully');
} catch (e) { } catch (e) {
setState(() { setState(() {
error = e.toString();
_isLoading = false; _isLoading = false;
}); });
DrAppToastMsg.showErrorToast(e);
} }
} }
}, },
@ -326,8 +316,6 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
), ),
) )
], ],
)
],
), ),
) )
], ],

@ -1,9 +1,8 @@
import 'package:doctor_app_flutter/models/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referral_patient_model.dart';
import 'package:doctor_app_flutter/models/my_referred_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referred_patient_model.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/referred_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referred_patient_provider.dart';
@ -18,35 +17,24 @@ import 'package:flutter/cupertino.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class MyReferredPatientWidget extends StatefulWidget { class MyReferredPatientWidget extends StatefulWidget {
final MyReferredPatientModel myReferredPatientModel;
final MyReferredPatientModel myReferredPatientModel;
MyReferredPatientWidget({Key key, this.myReferredPatientModel}); MyReferredPatientWidget({Key key, this.myReferredPatientModel});
@override @override
_MyReferredPatientWidgetState createState() => _MyReferredPatientWidgetState(); _MyReferredPatientWidgetState createState() =>
_MyReferredPatientWidgetState();
} }
class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> { class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
bool _showDetails = false; bool _showDetails = false;
bool _isLoading = false; bool _isLoading = false;
final _formKey = GlobalKey<FormState>();
String error;
TextEditingController answerController; TextEditingController answerController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
} }
@override @override
@ -58,7 +46,6 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
children: <Widget>[ children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}', '${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
@ -86,17 +73,27 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Divider(color: Colors.grey), SizedBox(
height: 5,
// VerticalDivider(color: Colors.black, ),
// thickness: 2, width: 20, Divider(
// indent: 200, color: Color(0xFF000000),
// endIndent: 200,), height: 0.5,
Row( ),
children: <Widget>[ Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [
TableRow(children: [
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'File No', 'File No',
@ -112,17 +109,19 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
) )
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * .1,//0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Referral Doctor', 'Referral Doctor',
@ -136,69 +135,73 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
maxLength: 80, maxLength: 80,
readMore: true, readMore: true,
), ),
], ],
), ),
), ),
],
), ),
]),
Divider(color: Colors.grey), TableRow(
Row( children: [
children: <Widget>[
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Referring Clinic', 'Referring Clinic',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
'${widget.myReferredPatientModel.referralClinicDescription}', '${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
) )
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Frequency', 'Frequency',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
widget.myReferredPatientModel widget.myReferredPatientModel
.frequencyDescription, .frequencyDescription,
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
) )
], ],
), ),
), ),
)
], ],
), ),
Divider(color: Colors.grey), TableRow(children: [
Row(
children: <Widget>[
Expanded( Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -218,13 +221,15 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
Container(
height: SizeConfig.realScreenWidth * 0.1,
width: 0.8,
color: Colors.grey,
margin: EdgeInsets.only(left: 15, right: 15),
), ),
Expanded( Expanded(
child: Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -246,20 +251,26 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
)
])
], ],
), ),
Divider(color: Colors.grey), Divider(
color: Color(0xFF000000),
height: 0.5,
),
SizedBox(
height: 5,
),
AppText( AppText(
'Clinic Details and Remarks', 'Clinic Details and Remarks',
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.start, textAlign: TextAlign.start,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
'${widget.myReferredPatientModel.referringDoctorRemarks}', '${widget.myReferredPatientModel.referringDoctorRemarks}',
style: "bodyText1", style: "bodyText1",
@ -278,7 +289,6 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts(
'${widget.myReferredPatientModel.referredDoctorRemarks}', '${widget.myReferredPatientModel.referredDoctorRemarks}',
style: "bodyText1", style: "bodyText1",
@ -288,54 +298,26 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
SizedBox( SizedBox(
height: 5, height: 5,
), ),
SizedBox(height: 10.0),
if (error != null && error.isNotEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Theme.of(context)
.errorColor
.withOpacity(0.06),
),
padding: EdgeInsets.symmetric(
vertical: 8.0, horizontal: 12.0),
child: Row(
children: <Widget>[
Expanded(
child: Texts(error ?? "",
style: "bodyText1",
color: Theme.of(context)
.errorColor)),
],
),
),
SizedBox(height: 10.0),
],
),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Container( Container(
width: double.infinity, width: double.infinity,
child: Button( child: Button(
onTap: () async { onTap: () async {
final form = _formKey.currentState;
try { try {
await Provider.of<MyReferredPatientProvider>(context, listen: false).replay(widget.myReferredPatientModel); setState(() {
_isLoading = true;
});
await Provider.of<MyReferredPatientProvider>(context, listen: false).verify(widget.myReferredPatientModel);
setState(() { setState(() {
_isLoading = false; _isLoading = false;
}); });
DrAppToastMsg.showSuccesToast('Verify Successfully');
} catch (e) { } catch (e) {
setState(() { setState(() {
error = e.toString();
_isLoading = false; _isLoading = false;
}); });
DrAppToastMsg.showErrorToast(e);
} }
}, },
title: 'Verify', title: 'Verify',
loading: _isLoading, loading: _isLoading,

@ -289,21 +289,18 @@ class PatientProfileButton extends StatelessWidget {
child: Column(children: <Widget>[ child: Column(children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: Row( child: Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: <Widget>[ alignment: Alignment.topLeft,
Container(
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: new AppText( child: new AppText(
this.name, this.name,
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
textAlign: TextAlign.left, textAlign: TextAlign.left,
fontSize: 16, fontSize: SizeConfig.textMultiplier * 2,
),
)
],
), ),
)),
), ),
Expanded( Expanded(
flex: 1, flex: 1,

@ -11,7 +11,8 @@ class VitalSignDetailsWidget extends StatefulWidget {
final String title2; final String title2;
final String viewKey; final String viewKey;
VitalSignDetailsWidget({Key key, this.vitalList, this.title1, this.title2,this.viewKey}); VitalSignDetailsWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey});
@override @override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
@ -25,7 +26,9 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topLeft: Radius.circular(10.0),
topRight: Radius.circular(10.0)
), ),
border: Border.all(color: Colors.grey, width: 1),
), ),
margin: EdgeInsets.all(20), margin: EdgeInsets.all(20),
child: Container( child: Container(
@ -33,8 +36,21 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Table(
children: <Widget>[ border: TableBorder.symmetric(
inside: BorderSide(width: 2.0,color: Colors.grey[300]),
),
children: fullData(),
),
],
),
),
);
}
List<TableRow> fullData(){
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Expanded( Expanded(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -64,16 +80,10 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
child: Texts(widget.title2, color: Colors.white), child: Texts(widget.title2, color: Colors.white),
), ),
height: 60), height: 60),
), )
], ]));
), widget.vitalList.forEach((vital) {
Column( tableRow.add(TableRow(children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.vitalList.map((vital) {
return Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
height: 50, height: 50,
@ -86,9 +96,6 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
), ),
), ),
), ),
SizedBox(
width: 2,
),
Expanded( Expanded(
child: Container( child: Container(
height: 50, height: 50,
@ -101,18 +108,9 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
), ),
), ),
), ),
], ]));
), });
SizedBox( return tableRow;
height: 2,
),
],
);
}).toList(),
),
],
),
),
);
} }
} }

@ -226,7 +226,7 @@ class _TextsState extends State<Texts> {
}, },
child: Text(hidden ? "Read More" : "Read less", child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: Hexcolor('#515b5d'), color: Hexcolor('#FF0000'),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "WorkSans" fontFamily: "WorkSans"
) )

@ -0,0 +1,53 @@
import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart';
class AppExpandableNotifier extends StatelessWidget {
final Widget headerWid;
final Widget bodyWid;
AppExpandableNotifier({this.headerWid, this.bodyWid});
@override
Widget build(BuildContext context) {
return ExpandableNotifier(
child: Padding(
padding: const EdgeInsets.all(10),
child: Card(
clipBehavior: Clip.antiAlias,
child: Column(
children: <Widget>[
SizedBox(
child: headerWid,
),
ScrollOnExpand(
scrollOnExpand: true,
scrollOnCollapse: false,
child: ExpandablePanel(
theme: const ExpandableThemeData(
headerAlignment: ExpandablePanelHeaderAlignment.center,
tapBodyToCollapse: true,
),
header: Padding(
padding: EdgeInsets.all(10),
child: Text(
"See Graph Details",
)),
collapsed: Text(''),
expanded: bodyWid,
builder: (_, collapsed, expanded) {
return Padding(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
child: Expandable(
collapsed: collapsed,
expanded: expanded,
theme: const ExpandableThemeData(crossFadePoint: 0),
),
);
},
),
),
],
),
),
));
}
}

@ -33,8 +33,7 @@ class AppText extends StatefulWidget {
this.marginLeft = 0, this.marginLeft = 0,
this.visibility = true, this.visibility = true,
this.textAlign, this.textAlign,
this.backGroundcolor=Colors.white this.backGroundcolor = Colors.white});
});
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -56,11 +55,13 @@ class _AppTextState extends State<AppText> {
child: Text( child: Text(
widget.data, widget.data,
textAlign: widget.textAlign, textAlign: widget.textAlign,
overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: widget.color, color: widget.color,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
fontFamily: widget.fontFamily, fontFamily: widget.fontFamily,
// backgroundColor:widget.backGroundcolor // backgroundColor:widget.backGroundcolor
), ),
), ),

@ -21,6 +21,7 @@ class CardWithBgWidgetNew extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
//margin: EdgeInsets.symmetric(vertical: 10.0),
margin: EdgeInsets.symmetric(vertical: 10.0), margin: EdgeInsets.symmetric(vertical: 10.0),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -33,10 +34,15 @@ class CardWithBgWidgetNew extends StatelessWidget {
color: Hexcolor('#FFFFFF'), color: Hexcolor('#FFFFFF'),
child: Stack( child: Stack(
children: [ children: [
Container( Center(
padding: EdgeInsets.all(10.0), child: Container(
margin: EdgeInsets.only(left: 10), padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10
child: widget) // margin: EdgeInsets.only(left: 10),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: widget,
)),
)
], ],
), ),
), ),

@ -1,6 +1,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: AppLineChart
*/
class AppLineChart extends StatelessWidget { class AppLineChart extends StatelessWidget {
const AppLineChart({ const AppLineChart({
Key key, Key key,

@ -1,10 +1,17 @@
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/body_measurements_screen.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../config/size_config.dart';
import '../../../models/patient/vital_sign_res_model.dart';
import '../../../widgets/shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: AppTimeSeriesChart
*/
class AppTimeSeriesChart extends StatelessWidget { class AppTimeSeriesChart extends StatelessWidget {
AppTimeSeriesChart( AppTimeSeriesChart(
{Key key, {Key key,
@ -66,6 +73,13 @@ class AppTimeSeriesChart extends StatelessWidget {
); );
} }
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: generateData
*/
generateData() { generateData() {
final List<TimeSeriesSales> data = []; final List<TimeSeriesSales> data = [];
if (vitalList.length > 0) { if (vitalList.length > 0) {
@ -91,3 +105,17 @@ class AppTimeSeriesChart extends StatelessWidget {
]; ];
} }
} }
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: TimeSeriesSales
*/
class TimeSeriesSales {
final DateTime time;
final int sales;
TimeSeriesSales(this.time, this.sales);
}

@ -239,6 +239,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.0"
expandable:
dependency: "direct main"
description:
name: expandable
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.4"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:

@ -37,6 +37,7 @@ dependencies:
url_launcher: ^5.4.5 url_launcher: ^5.4.5
charts_flutter: ^0.9.0 charts_flutter: ^0.9.0
eva_icons_flutter: ^2.0.0 eva_icons_flutter: ^2.0.0
expandable: ^4.1.4
# Qr code Scanner # Qr code Scanner
barcode_scan: ^3.0.1 barcode_scan: ^3.0.1

Loading…
Cancel
Save