Merge branch 'mohammad' into 'master'

Mohammad

See merge request Cloud_Solution/doctor_app_flutter!32
merge-requests/33/merge
Mohammad Aljammal 5 years ago
commit 6fd46b3cf8

@ -0,0 +1,60 @@
class RequestDoctorReply {
int projectID;
int doctorID;
int transactionNo;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
RequestDoctorReply(
{this.projectID = 15,
this.doctorID = 70907,
this.transactionNo = 0,
this.languageID = 2,
this.stamp = '2020-04-27T12:17:17.721Z',
this.iPAdress = '11.11.11.11',
this.versionID = 1.2,
this.channel = 9,
this.tokenID = '@dm!n',
this.sessionID = '2Z7FX4Lokp',
this.isLoginForDoctorApp = true,
this.patientOutSA = false});
RequestDoctorReply.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
doctorID = json['DoctorID'];
transactionNo = json['TransactionNo'];
languageID = json['LanguageID'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['DoctorID'] = this.doctorID;
data['TransactionNo'] = this.transactionNo;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
return data;
}
}

@ -6,7 +6,7 @@ class ListDoctorWorkingHoursTable {
ListDoctorWorkingHoursTable({this.date, this.dayName, this.workingHours});
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = json['Date'];
date = json['Date'] ;
dayName = json['DayName'];
workingHours = json['WorkingHours'];
}

@ -0,0 +1,108 @@
class ListGtMyPatientsQuestions {
String setupID;
int projectID;
int transactionNo;
int patientType;
int patientID;
int doctorID;
int requestType;
String requestDate;
String requestTime;
String remarks;
int status;
int createdBy;
String createdOn;
int editedBy;
String editedOn;
String patientName;
String patientNameN;
int gender;
String dateofBirth;
String mobileNumber;
String emailAddress;
String age;
String genderDescription;
bool isVidaCall;
ListGtMyPatientsQuestions(
{this.setupID,
this.projectID,
this.transactionNo,
this.patientType,
this.patientID,
this.doctorID,
this.requestType,
this.requestDate,
this.requestTime,
this.remarks,
this.status,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.patientName,
this.patientNameN,
this.gender,
this.dateofBirth,
this.mobileNumber,
this.emailAddress,
this.age,
this.genderDescription,
this.isVidaCall});
ListGtMyPatientsQuestions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
transactionNo = json['TransactionNo'];
patientType = json['PatientType'];
patientID = json['PatientID'];
doctorID = json['DoctorID'];
requestType = json['RequestType'];
requestDate = json['RequestDate'];
requestTime = json['RequestTime'];
remarks = json['Remarks'];
status = json['Status'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
patientName = json['PatientName'];
patientNameN = json['PatientNameN'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
mobileNumber = json['MobileNumber'];
emailAddress = json['EmailAddress'];
age = json['Age'];
genderDescription = json['GenderDescription'];
isVidaCall = json['IsVidaCall'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['TransactionNo'] = this.transactionNo;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['DoctorID'] = this.doctorID;
data['RequestType'] = this.requestType;
data['RequestDate'] = this.requestDate;
data['RequestTime'] = this.requestTime;
data['Remarks'] = this.remarks;
data['Status'] = this.status;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['PatientName'] = this.patientName;
data['PatientNameN'] = this.patientNameN;
data['Gender'] = this.gender;
data['DateofBirth'] = this.dateofBirth;
data['MobileNumber'] = this.mobileNumber;
data['EmailAddress'] = this.emailAddress;
data['Age'] = this.age;
data['GenderDescription'] = this.genderDescription;
data['IsVidaCall'] = this.isVidaCall;
return data;
}
}

@ -0,0 +1,61 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/RequestDoctorReply.dart';
import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart';
import '../interceptor/http_interceptor.dart';
class DoctorReplyProvider with ChangeNotifier {
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
List<ListGtMyPatientsQuestions> listDoctorWorkingHoursTable = [];
bool isLoading = true;
bool isError = false;
String error = '';
RequestDoctorReply _requestSchedule = RequestDoctorReply();
DoctorReplyProvider() {
getDoctorSchedule();
}
getDoctorSchedule() async {
const url = BASE_URL + 'DoctorApplication.svc/REST/GtMyPatientsQuestions';
try {
if (await Helpers.checkConnection()) {
final response = await client.post(url,
body: json.encode(_requestSchedule.toJson()));
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isLoading = false;
isError = true;
error = 'Error While Fetching data';
} else {
var parsed = json.decode(response.body.toString());
if (parsed['MessageStatus'] == 1) {
parsed['List_GtMyPatientsQuestions'].forEach((v) {
listDoctorWorkingHoursTable.add( ListGtMyPatientsQuestions.fromJson(v));
});
isError = false;
isLoading = false;
} else {
isError = true;
error = parsed['ErrorMessage'] ?? parsed['ErrorEndUserMessage'];
}
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
notifyListeners();
} catch (error) {
throw error;
}
}
}

@ -35,10 +35,10 @@ class ScheduleProvider with ChangeNotifier {
1);
ScheduleProvider() {
geDoctorSchedule();
getDoctorSchedule();
}
geDoctorSchedule() async {
getDoctorSchedule() async {
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
try {
if (await Helpers.checkConnection()) {

@ -1,3 +1,4 @@
import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart';
import './screens/auth/login_screen.dart';
@ -5,7 +6,7 @@ import './screens/auth/verification_methods_screen.dart';
import './screens/auth/verify_account_screen.dart';
import './screens/blood_bank_screen.dart';
import './screens/dashboard_screen.dart';
import './screens/doctor_reply_screen.dart';
import 'screens/doctor/doctor_reply_screen.dart';
import './screens/medicine/medicine_search_screen.dart';
import './screens/my_schedule_screen.dart';
import './screens/patients/patient_profile_screen.dart';

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:provider/provider.dart';
import '../routes.dart';
import '../widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -9,6 +11,7 @@ import '../presentation/doctor_app_icons.dart';
import '../widgets/dashboard/dashboard_item_icons_texts.dart';
import '../widgets/dashboard/dashboard_item_texts_widget.dart';
import '../widgets/shared/rounded_container_widget.dart';
import 'doctor/doctor_reply_screen.dart';
class DashboardScreen extends StatefulWidget {
DashboardScreen({Key key, this.title}) : super(key: key);
@ -23,217 +26,245 @@ class _DashboardScreenState extends State<DashboardScreen> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle:'Home',
appBarTitle: 'Home',
body: Container(
child: Column(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Today's Statistics",
fontWeight: FontWeight.bold,
child: Column(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Today's Statistics",
fontWeight: FontWeight.bold,
),
alignment: Alignment.centerLeft,
),
),
Expanded(
flex: 3,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: RoundedContainer(
child: CircularPercentIndicator(
radius: 90.0,
animation: true,
animationDuration: 1200,
lineWidth: 7.0,
percent: .75,
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
AppText("38",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 4),
AppText("Out-Patients",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.grey[800]),
],
),
circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Colors.blueGrey[100],
progressColor: Colors.red,
),
alignment: Alignment.centerLeft,
)),
Expanded(
flex: 3,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: RoundedContainer(child:CircularPercentIndicator(
radius: 90.0,
animation: true,
animationDuration: 1200,
lineWidth: 7.0,
percent: .75,
center: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
AppText(
"38",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 4
),
AppText(
"Out-Patients",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 1.5,
color: Colors.grey[800]
),
],
),
circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Colors.blueGrey[100],
progressColor: Colors.red,
))),
Expanded(
flex: 2,
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: DashboardItemTexts(
"Arrived",
"23",
)),
Expanded(
child: DashboardItemTexts(
"Not Arrived",
"23",
)),
],
)),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: DashboardItemTexts(
"ER",
"23",
)),
Expanded(
child: DashboardItemTexts(
"Walk-in",
"23",
)),
],
)),
],
))
])),
Expanded(
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"08",
"Lab Result",
backgroundColor: Colors.red,
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"10",
"Radiology",
backgroundColor: Colors.red,
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"05",
"Referral",
backgroundColor: Colors.red,
)),
],
)),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
flex: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: DashboardItemTexts(
"Arrived",
"23",
)),
Expanded(
child: DashboardItemTexts(
"Not Arrived",
"23",
),
),
],
),
),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: DashboardItemTexts(
"ER",
"23",
"In-Patient",
showBorder: true,
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
Expanded(
child: DashboardItemTexts(
"Walk-in",
"23",
"Operations",
showBorder: true,
)),
],
)),
],
)),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Patient Services",
fontWeight: FontWeight.bold,
),
)
],
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"08",
"Lab Result",
backgroundColor: Colors.red,
),
),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"10",
"Radiology",
backgroundColor: Colors.red,
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"05",
"Referral",
backgroundColor: Colors.red,
)),
],
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"23",
"In-Patient",
showBorder: true,
),
),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"23",
"Operations",
showBorder: true,
)),
],
),
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Patient Services",
fontWeight: FontWeight.bold,
),
alignment: Alignment.centerLeft,
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: InkWell(
child: DashboardItemIconText(
DoctorApp.home_icon,
"",
"Search Patient",
showBorder: false,
backgroundColor: Colors.green[200],
),
alignment: Alignment.centerLeft,
)),
Expanded(
onTap: () {
Navigator.of(context).pushNamed(PATIENT_SEARCH);
},
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: InkWell( child: DashboardItemIconText(
DoctorApp.home_icon,
"",
"Search Patient",
showBorder: false,
backgroundColor: Colors.green[200],
),
onTap: () {
Navigator.of(context).pushNamed(PATIENT_SEARCH);
},
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"",
"Out Patient",
showBorder: false,
backgroundColor: Colors.deepPurple[300],
)),
],
)),
Expanded(
child: InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider(
create: (_) => DoctorReplyProvider(),
child: DoctorReplyScreen(),
),
),
);
},
child: DashboardItemIconText(
DoctorApp.home_icon,
"",
"Doctor Reply",
showBorder: false,
backgroundColor: Colors.deepPurple[300],
),
),
),
],
),
),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"",
"In Patient",
showBorder: false,
backgroundColor: Colors.blueGrey[900],
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"",
"Discharge Patient",
showBorder: false,
backgroundColor: Colors.brown[400],
)),
],
)),
],
)));
child: new DashboardItemIconText(
DoctorApp.home_icon,
"",
"In Patient",
showBorder: false,
backgroundColor: Colors.blueGrey[900],
),
),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"",
"Discharge Patient",
showBorder: false,
backgroundColor: Colors.brown[400],
),
),
],
),
),
],
),
),
);
}
}

@ -0,0 +1,125 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/providers/doctor_reply_provider.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/*
*@author: Mohammad Aljammal
*@Date:28/4/2020
*@param:
*@return:
*@desc: Doctor Reply Screen display data from GtMyPatientsQuestions service
*/
class DoctorReplyScreen extends StatelessWidget {
DoctorReplyProvider _doctorReplyProvider;
@override
Widget build(BuildContext context) {
_doctorReplyProvider = Provider.of(context);
return AppScaffold(
appBarTitle: 'Doctor Reply',
showAppDrawer: false,
body:_doctorReplyProvider.isLoading? DrAppCircularProgressIndeicator():
_doctorReplyProvider.isError? Center(
child: Text(
_doctorReplyProvider.error,
style: TextStyle(color: Theme.of(context).errorColor),
),
):
Container(
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
child: ListView(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: _doctorReplyProvider.listDoctorWorkingHoursTable.map((reply) {
return CardWithBgWidget(
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
reply.patientName,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
reply.remarks,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
SizedBox(
height: 5,
),
Row(
children: [
AppText(
'Time',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(
margin: EdgeInsets.only(left: 10),
child: AppText(
reply.requestTime,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
AppText(
'File No',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(
margin: EdgeInsets.only(left: 10),
child: AppText(
'${reply.patientID}',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
AppText(
'Mobile No',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
Container(
margin: EdgeInsets.only(left: 10),
child: AppText(
reply.mobileNumber,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
],
),
],
),
),
);
}).toList(),
)
],
),
),
);
}
}

@ -1,9 +0,0 @@
import 'package:flutter/material.dart';
class DoctorReplyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('DoctorReply'),),
);
}
}

@ -1,4 +1,6 @@
import 'package:doctor_app_flutter/providers/schedule_provider.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:provider/provider.dart';
@ -14,23 +16,23 @@ class MyScheduleScreen extends StatelessWidget {
scheduleProvider = Provider.of(context);
return AppScaffold(
// pageOnly: false,
showBottomBar: false,
showAppDrawer: false,
appBarTitle: 'My Schedule',
body: scheduleProvider.isLoading
? Center(
child: CircularProgressIndicator(),
)
? DrAppCircularProgressIndeicator()
: scheduleProvider.isError
? Center(
child: Text(
child: AppText(
scheduleProvider.error,
style: TextStyle(color: Theme.of(context).errorColor),
color: Theme.of(context).errorColor,
),
)
: scheduleProvider.listDoctorWorkingHoursTable.length == 0
? Center(
child: Text(
child: AppText(
'You don\'t have any Schedule',
style: TextStyle(color: Theme.of(context).errorColor),
color: Theme.of(context).errorColor,
),
)
: Container(
@ -46,8 +48,9 @@ class MyScheduleScreen extends StatelessWidget {
SizedBox(
height: 20,
),
Text('My Schedule',
style: textStyle(2.5, FontWeight.w700)),
AppText('My Schedule',
fontSize:
2.5 * SizeConfig.textMultiplier),
scheduleListByDate(),
// scheduleListByDate('Wednesday, 8 April '),
],
@ -71,10 +74,38 @@ class MyScheduleScreen extends StatelessWidget {
child: Column(
children: scheduleProvider.listDoctorWorkingHoursTable.map((item) {
return CardWithBgWidget(
line1Text: item.dayName,
line2Text: item.workingHours,
heightPercentage: 0.18,
widthPercentage: 0.80,
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(item.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
!item.workingHours.contains('and')
? AppText(item.workingHours,
fontSize: 2.5 * SizeConfig.textMultiplier)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
item.workingHours.substring(
0, item.workingHours.indexOf('a')),
fontSize: 2.5 * SizeConfig.textMultiplier),
AppText(
item.workingHours.substring(
item.workingHours.indexOf('d') + 2,
),
fontSize: 2.5 * SizeConfig.textMultiplier),
],
),
SizedBox(
width: 8,
)
],
),
),
);
}).toList(),
),

@ -1,16 +1,17 @@
/*
/*
*@author: Amjad Amireh Merge to Elham rababah
*@Date:27/4/2020
*@param:
*@Date:27/4/2020
*@param:
*@return:PatientsScreen
*@desc:
*@desc:
*/
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/patients/TopTenUsersModelResponse.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -35,7 +36,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
bool _isInit = true;
@ -46,13 +47,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
final _controller = TextEditingController();
//**************
PatientModel patient;
@override
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
//PatientModel patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
//PatiantInformtion patiantInfo = routeArgs['patientSearchForm'];
print(patient.TokenID+"EEEEEE");
@ -119,19 +120,29 @@ class _PatientsScreenState extends State<PatientsScreen> {
Column(children: responseModelList.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
line1Text:item.nationalityName,//item['FirstName'],//patient.getFirstName(),//item['FirstName'],
line2Text:item.lastName, //responseModelList['LastName'],//item['LastName'],//'12/04/2020 - 02:00 PM',
// line3Text: item.middleName,
heightPercentage: 0.15,
widthPercentage: 0.80),
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(item.nationalityName, 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),
],
),
),
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {"patient": responseModelList});
},
);
}).toList())
],
),
),
],

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient_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/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -48,7 +50,9 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
"ProjectID": patient['ProjectID'],
"PatientTypeID": patient['PatientType'],
"InOutPatientType": 1,
"TransNo":patient['AdmissionNo'] !=null ? int.parse(patient['AdmissionNo']) : 0,
"TransNo": patient['AdmissionNo'] != null
? int.parse(patient['AdmissionNo'])
: 0,
"LanguageID": 2,
"stamp": "2020-04-26T09:32:18.317Z",
"IPAdress": "11.11.11.11",
@ -88,10 +92,24 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
children: litems.map((item) {
return InkWell(
child: CardWithBgWidget(
line1Text: 'Fahad AlSlehm - 324599',
line2Text: '12/04/2020 - 02:00 PM',
heightPercentage: 0.15,
widthPercentage: 0.80),
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Fahad AlSlehm - 324599',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText('12/04/2020 - 02:00 PM',
fontSize: 2.5 * SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
],
),
),
onTap: () {
Navigator.of(context).pushNamed(VITAL_SIGN);
},

@ -30,7 +30,7 @@ class _AppDrawerState extends State<AppDrawer> {
Container(
height: SizeConfig.heightMultiplier * 30,
child: InkWell(
child: DrawerHeader(
child: DrawerHeader(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
@ -53,26 +53,37 @@ class _AppDrawerState extends State<AppDrawer> {
],
),
),
onTap: () {
Navigator.of(context).pushNamed(PROFILE);
}, ),
onTap: () {
Navigator.of(context).pushNamed(PROFILE);
},
),
),
InkWell(
child: DrawerItem("My Schedule", Icons.table_chart),
onTap: () {
Navigator.push(context,MaterialPageRoute(
builder: (context) => ChangeNotifierProvider.value(value: ScheduleProvider(),child: MyScheduleScreen(),),
),);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider(
create: (_) => ScheduleProvider(),
child: MyScheduleScreen(),
),
),
);
},
),
InkWell(child: DrawerItem("Settings", Icons.settings), onTap: (){
InkWell(
child: DrawerItem("Settings", Icons.settings),
onTap: () {
Navigator.of(context).pushNamed(SETTINGS);
},),
InkWell(child: DrawerItem("QR Reader", Icons.search),onTap:(){
},
),
InkWell(
child: DrawerItem("QR Reader", Icons.search),
onTap: () {
Navigator.of(context).pushNamed(QR_READER);
} ,),
},
),
])),
),
width: SizeConfig.realScreenWidth * 0.55,

@ -24,7 +24,7 @@ class AppScaffold extends StatelessWidget {
this.appBarTitle,
this.showAppBar,
this.showBottomBar,
this.showAppDrawer,
this.showAppDrawer = true,
this.body,
this.showbg,
this.showCurve,
@ -45,15 +45,10 @@ class AppScaffold extends StatelessWidget {
color: Colors.black, fontWeight: FontWeight.bold)),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) {
return new GestureDetector(
onTap: () {
Scaffold.of(context).openDrawer();
},
child: IconButton(
icon: Icon(Icons.menu),
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
),
return IconButton(
icon: showAppDrawer ? Icon(Icons.menu) : Icon(Icons.arrow_back_ios) ,
color: Colors.black,
onPressed: () => showAppDrawer? Scaffold.of(context).openDrawer() : Navigator.pop(context),
);
}),
centerTitle: true,

@ -6,80 +6,47 @@ import 'package:hexcolor/hexcolor.dart';
/*
*@author: Mohammad Aljammal
*@Date:27/4/2020
*@param: line1Text, line2Text, heightPercentage, widthPercentage
*@param: Widget
*@return:
*@desc: Card Dr Schedule
*@desc: Card With Bg Widget
*/
class CardWithBgWidget extends StatelessWidget {
String line1Text;
String line2Text;
double heightPercentage;
double widthPercentage;
CardWithBgWidget(
{this.line1Text = '',
this.line2Text = '',
this.heightPercentage,
this.widthPercentage});
final Widget widget;
CardWithBgWidget({@required this.widget});
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
RoundedContainer(
child:Container(
height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * widthPercentage,
),
raduis: 10,
backgroundColor: Hexcolor('#58434F'),
showBorder: true,
borderColor: Hexcolor('#707070'),
borderWidth: 0.5,
return Container(
margin: EdgeInsets.symmetric(vertical: 10.0),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
Positioned(
left: 10,
child: RoundedContainer(
child:Container(
padding: const EdgeInsets.all(15.0),
height: SizeConfig.screenHeight * heightPercentage,
width: SizeConfig.screenWidth * widthPercentage,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(line1Text, style: textStyle(2.5)) ,
SizedBox(
height: 8,
),
!line2Text.contains('and')?
Text(line2Text, style: textStyle(2.5)) :
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(line2Text.substring(0,line2Text.indexOf('a')), style: textStyle(2.5)) ,
Text(line2Text.substring(line2Text.indexOf('d')+2,), style: textStyle(2.5)) ,
],
),
],
),
border: Border.all(color: Hexcolor('#707070'), width: 2.0),
),
child: Material(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
child: Stack(
children: [
Positioned(
child: Container(
width: 10,
color: Hexcolor('#58434F'),
),
elevation: 0,
showBorder: true,
borderColor: Hexcolor('#707070'),
customCornerRaduis: true,
bottomLeft: 0,
topLeft: 0,
bottomRight: 10,
topRight: 10,
borderWidth: 0.5),
bottom: 0,
top: 0,
left: 0,
),
Container(
padding: EdgeInsets.all(15.0),
margin: EdgeInsets.only(left: 10),
child: widget)
],
),
],
),
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
}
}

Loading…
Cancel
Save