improve vital sgin and return the correct color to login header

merge-requests/93/head
Elham Rababah 6 years ago
parent dc73f7bfd8
commit 40eb7f8064

@ -2,8 +2,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; 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://hmgwebservices.com/Services/';
//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 = "DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -1,66 +0,0 @@
import 'package:doctor_app_flutter/models/category_models.dart';
import 'package:doctor_app_flutter/routes.dart';
const DUMMY_CATEGORIES = const [
Category(
id: 'c1',
title: 'My Schedule',
image: 'assets/images/user_id_icon.png',
link: MY_SCHEDULE),
Category(
id: 'c2',
title: 'Patient Search',
image: 'assets/images/user_id_icon.png',
link: PATIENT_SEARCH),
Category(
id: 'c3',
title: 'outPatiant',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c4',
title: 'InPatiant',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c5',
title: 'Referral',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c6',
title: 'Referred',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c7',
title: 'Discharged Patient',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c8',
title: 'Referral Discharge',
image: 'assets/images/user_id_icon.png',
link: PATIENTS),
Category(
id: 'c9',
title: 'Search For Medicine',
image: 'assets/images/user_id_icon.png',
link: MEDICINE_SEARCH),
Category(
id: 'c10',
title: 'Doctor Reply',
image: 'assets/images/user_id_icon.png',
link: DOCTOR_REPLY),
Category(
id: 'c11',
title: 'Blood Bank',
image: 'assets/images/user_id_icon.png',
link: BLOOD_BANK),
Category(
id: 'c12',
title: 'QR Reader',
image: 'assets/images/user_id_icon.png',
link: QR_READER),
];

@ -0,0 +1,218 @@
List <Map> ListProject= [
{
"Desciption": "Dubai Hospital",
"DesciptionN": null,
"ID": 2,
"LegalName": "Dr. Sulaiman Al Habib Hospital FZ - LLC ",
"LegalNameN": "مستشفى الدكتور سليمان الحبيب منطقة حرة - ذ.م.م",
"Name": "Dubai Hospital",
"NameN": null,
"PhoneNumber": "+97144297777",
"SetupID": "505005",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "25.231273",
"Longitude": "55.320942",
"MainProjectID": 2,
"ProjectOutSA": true,
"UsingInDoctorApp": true
},
{
"Desciption": "SZR Center",
"DesciptionN": null,
"ID": 3,
"LegalName": "Dr. Sulaiman Al Habib Hospital SZR - LLC ",
"LegalNameN": "مستشفى الدكتور سليمان الحبيب طريق الشيخ زايد",
"Name": "SZR Medical Center",
"NameN": null,
"PhoneNumber": "+97144297777",
"SetupID": "505005",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "25.154501",
"Longitude": "55.226000",
"MainProjectID": 3,
"ProjectOutSA": true,
"UsingInDoctorApp": true
},
{
"Desciption": "Home Health Care (HHC)",
"DesciptionN": null,
"ID": 95,
"LegalName": "",
"LegalNameN": "",
"Name": "Home Health Care (HHC)",
"NameN": null,
"PhoneNumber": "+966114622224",
"SetupID": "91877 ",
"DistanceInKilometers": 0,
"IsActive": false,
"Latitude": "24.704242",
"Longitude": "46.675823",
"MainProjectID": 12,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Olaya Hospital",
"DesciptionN": null,
"ID": 12,
"LegalName": "from Sehat Al Olaya Medical Complex Company",
"LegalNameN": "شركة مجمع صحة العليا الطبي ",
"Name": "Olaya Hospital",
"NameN": null,
"PhoneNumber": "+966114622224",
"SetupID": "91877 ",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "24.704242",
"Longitude": "46.675823",
"MainProjectID": 12,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Ajaji Dental Clinic (AMS)",
"DesciptionN": null,
"ID": 99,
"LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company",
"LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان",
"Name": "Ajaji Dental Clinic (AMS)",
"NameN": null,
"PhoneNumber": "+966115259999",
"SetupID": "010266",
"DistanceInKilometers": 0,
"IsActive": false,
"Latitude": "24.722136",
"Longitude": "46.774303",
"MainProjectID": 15,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Ajaji Dental Clinic (AMS)",
"DesciptionN": null,
"ID": 100,
"LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company",
"LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان",
"Name": "Ajaji Dental Clinic (AMS) Malaz",
"NameN": null,
"PhoneNumber": "+966115259999",
"SetupID": "010266",
"DistanceInKilometers": 0,
"IsActive": false,
"Latitude": "24.722136",
"Longitude": "46.774303",
"MainProjectID": 15,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Arryan Hospital",
"DesciptionN": null,
"ID": 15,
"LegalName": "Al Rayan Hospital for Healthcare Company ",
"LegalNameN": "شركة مستشفى الريان للرعاية الطبية",
"Name": "Arryan Hospital",
"NameN": null,
"PhoneNumber": "+966114909999",
"SetupID": "010266",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "24.722136",
"Longitude": "46.774303",
"MainProjectID": 15,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "MD Lab",
"DesciptionN": null,
"ID": 150,
"LegalName": "",
"LegalNameN": "",
"Name": "MD Lab",
"NameN": null,
"PhoneNumber": "+966114774700",
"SetupID": "010266",
"DistanceInKilometers": 0,
"IsActive": false,
"Latitude": "24.722136",
"Longitude": "46.774303",
"MainProjectID": 15,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Takhassusi Hospital",
"DesciptionN": null,
"ID": 16,
"LegalName": "Western Specialist Hospital for Medical Care",
"LegalNameN": "شركة مستشفى الغرب التخصصي للرعاية الطبية ",
"Name": "Takhassusi Hospital",
"NameN": null,
"PhoneNumber": "+966112833333",
"SetupID": "102000",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "24.719364",
"Longitude": "46.657567",
"MainProjectID": 16,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Suwaidi Hospital",
"DesciptionN": null,
"ID": 17,
"LegalName": "Sehat Al Suwaidi Medical Company",
"LegalNameN": "شركة صحة السويدي الطبية",
"Name": "Suwaidi Hospital",
"NameN": null,
"PhoneNumber": "+966114754444",
"SetupID": "010266",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "24.567525",
"Longitude": " 46.641019",
"MainProjectID": 17,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Al Qassim Hospital\r\n",
"DesciptionN": null,
"ID": 21,
"LegalName": "Buraidah Al Takhassusi Hospital for Healthcare Company",
"LegalNameN": "شركة مستشفى بريدة التخصصي للرعاية الطبية ",
"Name": "Al Qassim Hospital",
"NameN": null,
"PhoneNumber": "+966163166666",
"SetupID": "051431",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "26.360724",
"Longitude": "43.945774",
"MainProjectID": 21,
"ProjectOutSA": false,
"UsingInDoctorApp": true
},
{
"Desciption": "Khobar Hospital",
"DesciptionN": null,
"ID": 60,
"LegalName": "Khobar Hospital",
"LegalNameN": "مستشفى الخبر",
"Name": "Khobar Hospital",
"NameN": null,
"PhoneNumber": "+966138711111",
"SetupID": "034423",
"DistanceInKilometers": 0,
"IsActive": true,
"Latitude": "26.3107804",
"Longitude": "50.2108347",
"MainProjectID": 60,
"ProjectOutSA": false,
"UsingInDoctorApp": true
}
];

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -74,128 +76,154 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
vitalSing = routeArgs['vitalSing']; vitalSing = routeArgs['vitalSing'];
return AppScaffold( return AppScaffold(
appBarTitle: "vital Sing ", appBarTitle: "vital Sing",
isloading: patientsProv.isLoading, body: patientsProv.isLoading
body: Container( ? DrAppCircularProgressIndeicator()
child: Column( : patientsProv.isError
children: <Widget>[ ? DrAppEmbeddedError(error: patientsProv.error)
Row( : patientsProv.patientVitalSignOrderdSubList.length == 0
children: <Widget>[ ? DrAppEmbeddedError(
InkWell( error: 'You don\'t have any vital Sings')
onTap: () { : Container(
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, child: Column(
arguments: { children: <Widget>[
'title': 'Body Measurements', Row(
'key': vitalSignDetails.bodyMeasurements children: <Widget>[
}); InkWell(
}, onTap: () {
child: Expanded( Navigator.of(context).pushNamed(
child: VitalSignItem( BODY_MEASUREMENTS,
des: 'Body Measurements', arguments: {
url: url + 'heartbeat.png', 'title': 'Body Measurements',
lastVal: '137', 'key':
unit: 'Cm', vitalSignDetails.bodyMeasurements
), });
), },
), child: Expanded(
InkWell( child: VitalSignItem(
onTap: () { des: 'Body Measurements',
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, url: url + 'heartbeat.png',
arguments: { lastVal: patientsProv.patientVitalSignOrderdSubList[0].heightCm.toString(),
'title': 'Temperature', unit: 'Cm',
'key': vitalSignDetails.temperature ),
}); ),
}, ),
child: Expanded( InkWell(
child: VitalSignItem( onTap: () {
des: 'Temperature', Navigator.of(context).pushNamed(
url: url + 'heartbeat.png', BODY_MEASUREMENTS,
), arguments: {
), 'title': 'Temperature',
), 'key': vitalSignDetails.temperature,
],
), });
Row( },
children: <Widget>[ child: Expanded(
InkWell( child: VitalSignItem(
onTap: () { des: 'Temperature',
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, url: url + 'heartbeat.png',
arguments: { lastVal: patientsProv.patientVitalSignOrderdSubList[0].temperatureCelcius.toString(),
'title': 'pulse', unit: 'C',
'key': vitalSignDetails.pulse
}); ),
}, ),
child: VitalSignItem( ),
des: 'Pulse', ],
url: url + 'heartbeat.png', ),
), Row(
), children: <Widget>[
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, Navigator.of(context).pushNamed(
arguments: { BODY_MEASUREMENTS,
'title': 'pespiration', arguments: {
'key': vitalSignDetails.pespiration 'title': 'pulse',
}); 'key': vitalSignDetails.pulse
}, });
child: VitalSignItem( },
des: 'Respiration', child: VitalSignItem(
url: url + 'heartbeat.png', des: 'Pulse',
), url: url + 'heartbeat.png',
), lastVal: patientsProv.patientVitalSignOrderdSubList[0].pulseBeatPerMinute.toString(),
], unit: 'M',
), ),
Row( ),
children: <Widget>[ InkWell(
InkWell( onTap: () {
onTap: () { Navigator.of(context).pushNamed(
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, BODY_MEASUREMENTS,
arguments: { arguments: {
'title': 'Blood Pressure', 'title': 'pespiration',
'key': vitalSignDetails.bloodPressure 'key': vitalSignDetails.pespiration
}); });
}, },
child: VitalSignItem( child: VitalSignItem(
des: 'Blood Pressure', des: 'Respiration',
url: url + 'heartbeat.png', url: url + 'heartbeat.png',
),
), lastVal: patientsProv.patientVitalSignOrderdSubList[0].respirationBeatPerMinute.toString(),
InkWell( unit: 'M',
onTap: () { ),
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, ),
arguments: { ],
'title': 'Oxygenation', ),
'key': vitalSignDetails.oxygenation Row(
}); children: <Widget>[
}, InkWell(
child: VitalSignItem( onTap: () {
des: 'Oxygenation', Navigator.of(context).pushNamed(
url: url + 'heartbeat.png', BODY_MEASUREMENTS,
), arguments: {
), 'title': 'Blood Pressure',
], 'key': vitalSignDetails.bloodPressure
), });
Row( },
mainAxisAlignment: MainAxisAlignment.center, child: VitalSignItem(
children: <Widget>[ des: 'Blood Pressure',
InkWell( url: url + 'heartbeat.png',
onTap: () { lastVal: patientsProv.patientVitalSignOrderdSubList[0].bloodPressure.toString(),
Navigator.of(context).pushNamed(BODY_MEASUREMENTS, unit: '',
arguments: { ),
'title': 'Pain Scale', ),
'key': vitalSignDetails.painScale InkWell(
}); onTap: () {
}, Navigator.of(context).pushNamed(
child: VitalSignItem( BODY_MEASUREMENTS,
des: 'Pain Scale', arguments: {
url: url + 'heartbeat.png', 'title': 'Oxygenation',
), 'key': vitalSignDetails.oxygenation
), });
], },
), child: VitalSignItem(
], des: 'Oxygenation',
), url: url + 'heartbeat.png',
)); lastVal: patientsProv.patientVitalSignOrderdSubList[0].fIO2.toString(),
unit: '',
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
Navigator.of(context).pushNamed(
BODY_MEASUREMENTS,
arguments: {
'title': 'Pain Scale',
'key': vitalSignDetails.painScale
});
},
child: VitalSignItem(
des: 'Pain Scale',
url: url + 'heartbeat.png',
),
),
],
),
],
),
));
} }
} }

@ -1,7 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../config/size_config.dart'; import '../../../../config/size_config.dart';
import '../../../../widgets/shared/rounded_container_widget.dart'; import '../../../../widgets/shared/rounded_container_widget.dart';
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:03/6/2020 *@Date:03/6/2020
@ -46,15 +48,13 @@ class VitalSignItem extends StatelessWidget {
des, des,
style: TextStyle( style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor, color: Hexcolor('#B8382C'),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Image.asset( child: Image.asset(
@ -69,9 +69,11 @@ class VitalSignItem extends StatelessWidget {
children: [ children: [
new TextSpan(text: lastVal), new TextSpan(text: lastVal),
new TextSpan( new TextSpan(
text: ' ${unit}', text: ' ${unit}',
style: style: TextStyle(
TextStyle(color: Theme.of(context).primaryColor)), color: Hexcolor('#B8382C'),
),
),
], ],
), ),
)) ))

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import '../../lookups/auth_lookup.dart'; import '../../lookups/auth_lookup.dart';
@ -113,7 +114,7 @@ class AuthHeader extends StatelessWidget {
Text( Text(
text2, text2,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Hexcolor('#B8382C'),
fontSize: textFontSize, fontSize: textFontSize,
fontWeight: FontWeight.w800), fontWeight: FontWeight.w800),
) )
@ -160,7 +161,7 @@ class AuthHeader extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, fontSize: SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
color: Theme.of(context).primaryColor), color: Hexcolor('#B8382C')),
), ),
); );
} }
@ -176,7 +177,7 @@ class AuthHeader extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029,
color: Theme.of(context).primaryColor, color: Hexcolor('#B8382C'),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -35,6 +36,9 @@ class _LoginFormState extends State<LoginForm> {
String uniqueId = "Unknown"; String uniqueId = "Unknown";
var projectsList = []; var projectsList = [];
FocusNode focusPass;
FocusNode focusProject;
var userInfo = UserModel( var userInfo = UserModel(
UserID: '', UserID: '',
Password: '', Password: '',
@ -54,7 +58,7 @@ class _LoginFormState extends State<LoginForm> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final focusPass = FocusNode(); final focusPass = FocusNode();
final focusProject = FocusNode(); final focusProject = FocusNode();
if (projectsList.length == 0) { if (projectsList.length == 0) {
getProjectsList(); getProjectsList();
@ -106,7 +110,7 @@ class _LoginFormState extends State<LoginForm> {
onFieldSubmitted: (_) { onFieldSubmitted: (_) {
FocusScope.of(context).requestFocus(focusProject); FocusScope.of(context).requestFocus(focusProject);
helpers.showCupertinoPicker( helpers.showCupertinoPicker(
context, projectsList, 'Name', onSelectProject); context, projectsList, 'Name', onSelectProject);
}, },
), ),
buildSizedBox(), buildSizedBox(),
@ -147,8 +151,6 @@ class _LoginFormState extends State<LoginForm> {
), ),
RaisedButton( RaisedButton(
onPressed: () { onPressed: () {
// Navigator.of(context).pushNamed(VERIFICATION_METHODS);
login(context, authProv, widget.changeLoadingStata); login(context, authProv, widget.changeLoadingStata);
}, },
textColor: Colors.white, textColor: Colors.white,
@ -314,9 +316,14 @@ class _LoginFormState extends State<LoginForm> {
}); });
} else { } else {
// handel error // handel error
setState(() {
projectsList = ListProject;
});
} }
}).catchError((err) { }).catchError((err) {
setState(() {
projectsList = ListProject;
});
print(err); print(err);
}); });
} }
@ -330,5 +337,6 @@ class _LoginFormState extends State<LoginForm> {
userInfo.ProjectID = projectsList[index]["ID"]; userInfo.ProjectID = projectsList[index]["ID"];
projectIdController.text = projectsList[index]['Name']; projectIdController.text = projectsList[index]['Name'];
}); });
FocusScope.of(context).requestFocus(focusProject);
} }
} }

Loading…
Cancel
Save