Merge branch 'elham' into 'master'

vital sign screen

See merge request Cloud_Solution/doctor_app_flutter!33
merge-requests/34/merge
Elham 5 years ago
commit 97eec3ccbd

@ -0,0 +1,77 @@
/*
*@author: Elham Rababah
*@Date:27/4/2020
*@param:
*@return:
*@desc: VitalSignReqModel
*/
class VitalSignReqModel {
int patientID;
int projectID;
int patientTypeID;
int inOutpatientType;
int transNo;
int languageID;
String stamp ;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
VitalSignReqModel(
{this.patientID,
this.projectID,
this.inOutpatientType,
this.transNo,
this.languageID,
this.tokenID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11',
this.versionID=1.2,
this.channel=9,
this.sessionID='E2bsEeYEJo',
this.isLoginForDoctorApp=true,
this.patientTypeID,
this.patientOutSA=false});
VitalSignReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
patientID = json['PatientID'];
languageID = json['LanguageID'];
inOutpatientType = json['InOutpatientType'];
transNo = json['TransNo'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['InOutpatientType'] = this.inOutpatientType;
data['TransNo'] = this.transNo;
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;
data['PatientTypeID'] = this.patientTypeID;
return data;
}
}

@ -0,0 +1,257 @@
class VitalSignResModel {
int transNo;
Null projectID;
int weightKg;
int heightCm;
var temperatureCelcius;
int pulseBeatPerMinute;
int respirationBeatPerMinute;
int bloodPressureLower;
int bloodPressureHigher;
int sAO2;
int fIO2;
Null painScore;
var bodyMassIndex;
int headCircumCm;
int leanBodyWeightLbs;
int idealBodyWeightLbs;
int temperatureCelciusMethod;
int pulseRhythm;
int respirationPattern;
Null bloodPressureCuffLocation;
Null bloodPressureCuffSize;
Null bloodPressurePatientPosition;
String painLocation;
String painDuration;
String painCharacter;
String painFrequency;
bool isPainManagementDone;
int status;
bool isVitalsRequired;
int patientID;
String createdOn;
int doctorID;
int clinicID;
Null triageCategory;
Null gCScore;
Null lineItemNo;
Null vitalSignDate;
Null actualTimeTaken;
Null sugarLevel;
Null fBS;
Null rBS;
Null observationType;
Null heartRate;
Null muscleTone;
Null reflexIrritability;
Null bodyColor;
Null isFirstAssessment;
Null dateofBirth;
Null timeOfBirth;
String bloodPressure;
String bloodPressureCuffLocationDesc;
String bloodPressureCuffSizeDesc;
String bloodPressurePatientPositionDesc;
String clinicName;
String doctorImageURL;
String doctorName;
String painScoreDesc;
String pulseRhythmDesc;
String respirationPatternDesc;
String temperatureCelciusMethodDesc;
Null time;
VitalSignResModel(
{this.transNo,
this.projectID,
this.weightKg,
this.heightCm,
this.temperatureCelcius,
this.pulseBeatPerMinute,
this.respirationBeatPerMinute,
this.bloodPressureLower,
this.bloodPressureHigher,
this.sAO2,
this.fIO2,
this.painScore,
this.bodyMassIndex,
this.headCircumCm,
this.leanBodyWeightLbs,
this.idealBodyWeightLbs,
this.temperatureCelciusMethod,
this.pulseRhythm,
this.respirationPattern,
this.bloodPressureCuffLocation,
this.bloodPressureCuffSize,
this.bloodPressurePatientPosition,
this.painLocation,
this.painDuration,
this.painCharacter,
this.painFrequency,
this.isPainManagementDone,
this.status,
this.isVitalsRequired,
this.patientID,
this.createdOn,
this.doctorID,
this.clinicID,
this.triageCategory,
this.gCScore,
this.lineItemNo,
this.vitalSignDate,
this.actualTimeTaken,
this.sugarLevel,
this.fBS,
this.rBS,
this.observationType,
this.heartRate,
this.muscleTone,
this.reflexIrritability,
this.bodyColor,
this.isFirstAssessment,
this.dateofBirth,
this.timeOfBirth,
this.bloodPressure,
this.bloodPressureCuffLocationDesc,
this.bloodPressureCuffSizeDesc,
this.bloodPressurePatientPositionDesc,
this.clinicName,
this.doctorImageURL,
this.doctorName,
this.painScoreDesc,
this.pulseRhythmDesc,
this.respirationPatternDesc,
this.temperatureCelciusMethodDesc,
this.time});
VitalSignResModel.fromJson(Map<String, dynamic> json) {
transNo = json['TransNo'];
projectID = json['ProjectID'];
weightKg = json['WeightKg'];
heightCm = json['HeightCm'];
temperatureCelcius = json['TemperatureCelcius'];
pulseBeatPerMinute = json['PulseBeatPerMinute'];
respirationBeatPerMinute = json['RespirationBeatPerMinute'];
bloodPressureLower = json['BloodPressureLower'];
bloodPressureHigher = json['BloodPressureHigher'];
sAO2 = json['SAO2'];
fIO2 = json['FIO2'];
painScore = json['PainScore'];
bodyMassIndex = json['BodyMassIndex'];
headCircumCm = json['HeadCircumCm'];
leanBodyWeightLbs = json['LeanBodyWeightLbs'];
idealBodyWeightLbs = json['IdealBodyWeightLbs'];
temperatureCelciusMethod = json['TemperatureCelciusMethod'];
pulseRhythm = json['PulseRhythm'];
respirationPattern = json['RespirationPattern'];
bloodPressureCuffLocation = json['BloodPressureCuffLocation'];
bloodPressureCuffSize = json['BloodPressureCuffSize'];
bloodPressurePatientPosition = json['BloodPressurePatientPosition'];
painLocation = json['PainLocation'];
painDuration = json['PainDuration'];
painCharacter = json['PainCharacter'];
painFrequency = json['PainFrequency'];
isPainManagementDone = json['IsPainManagementDone'];
status = json['Status'];
isVitalsRequired = json['IsVitalsRequired'];
patientID = json['PatientID'];
createdOn = json['CreatedOn'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
triageCategory = json['TriageCategory'];
gCScore = json['GCScore'];
lineItemNo = json['LineItemNo'];
vitalSignDate = json['VitalSignDate'];
actualTimeTaken = json['ActualTimeTaken'];
sugarLevel = json['SugarLevel'];
fBS = json['FBS'];
rBS = json['RBS'];
observationType = json['ObservationType'];
heartRate = json['HeartRate'];
muscleTone = json['MuscleTone'];
reflexIrritability = json['ReflexIrritability'];
bodyColor = json['BodyColor'];
isFirstAssessment = json['IsFirstAssessment'];
dateofBirth = json['DateofBirth'];
timeOfBirth = json['TimeOfBirth'];
bloodPressure = json['BloodPressure'];
bloodPressureCuffLocationDesc = json['BloodPressureCuffLocationDesc'];
bloodPressureCuffSizeDesc = json['BloodPressureCuffSizeDesc'];
bloodPressurePatientPositionDesc = json['BloodPressurePatientPositionDesc'];
clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
painScoreDesc = json['PainScoreDesc'];
pulseRhythmDesc = json['PulseRhythmDesc'];
respirationPatternDesc = json['RespirationPatternDesc'];
temperatureCelciusMethodDesc = json['TemperatureCelciusMethodDesc'];
time = json['Time'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['TransNo'] = this.transNo;
data['ProjectID'] = this.projectID;
data['WeightKg'] = this.weightKg;
data['HeightCm'] = this.heightCm;
data['TemperatureCelcius'] = this.temperatureCelcius;
data['PulseBeatPerMinute'] = this.pulseBeatPerMinute;
data['RespirationBeatPerMinute'] = this.respirationBeatPerMinute;
data['BloodPressureLower'] = this.bloodPressureLower;
data['BloodPressureHigher'] = this.bloodPressureHigher;
data['SAO2'] = this.sAO2;
data['FIO2'] = this.fIO2;
data['PainScore'] = this.painScore;
data['BodyMassIndex'] = this.bodyMassIndex;
data['HeadCircumCm'] = this.headCircumCm;
data['LeanBodyWeightLbs'] = this.leanBodyWeightLbs;
data['IdealBodyWeightLbs'] = this.idealBodyWeightLbs;
data['TemperatureCelciusMethod'] = this.temperatureCelciusMethod;
data['PulseRhythm'] = this.pulseRhythm;
data['RespirationPattern'] = this.respirationPattern;
data['BloodPressureCuffLocation'] = this.bloodPressureCuffLocation;
data['BloodPressureCuffSize'] = this.bloodPressureCuffSize;
data['BloodPressurePatientPosition'] = this.bloodPressurePatientPosition;
data['PainLocation'] = this.painLocation;
data['PainDuration'] = this.painDuration;
data['PainCharacter'] = this.painCharacter;
data['PainFrequency'] = this.painFrequency;
data['IsPainManagementDone'] = this.isPainManagementDone;
data['Status'] = this.status;
data['IsVitalsRequired'] = this.isVitalsRequired;
data['PatientID'] = this.patientID;
data['CreatedOn'] = this.createdOn;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['TriageCategory'] = this.triageCategory;
data['GCScore'] = this.gCScore;
data['LineItemNo'] = this.lineItemNo;
data['VitalSignDate'] = this.vitalSignDate;
data['ActualTimeTaken'] = this.actualTimeTaken;
data['SugarLevel'] = this.sugarLevel;
data['FBS'] = this.fBS;
data['RBS'] = this.rBS;
data['ObservationType'] = this.observationType;
data['HeartRate'] = this.heartRate;
data['MuscleTone'] = this.muscleTone;
data['ReflexIrritability'] = this.reflexIrritability;
data['BodyColor'] = this.bodyColor;
data['IsFirstAssessment'] = this.isFirstAssessment;
data['DateofBirth'] = this.dateofBirth;
data['TimeOfBirth'] = this.timeOfBirth;
data['BloodPressure'] = this.bloodPressure;
data['BloodPressureCuffLocationDesc'] = this.bloodPressureCuffLocationDesc;
data['BloodPressureCuffSizeDesc'] = this.bloodPressureCuffSizeDesc;
data['BloodPressurePatientPositionDesc'] =
this.bloodPressurePatientPositionDesc;
data['ClinicName'] = this.clinicName;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['PainScoreDesc'] = this.painScoreDesc;
data['PulseRhythmDesc'] = this.pulseRhythmDesc;
data['RespirationPatternDesc'] = this.respirationPatternDesc;
data['TemperatureCelciusMethodDesc'] = this.temperatureCelciusMethodDesc;
data['Time'] = this.time;
return data;
}
}

@ -1,18 +1,29 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart';
import '../config/config.dart';
import '../interceptor/http_interceptor.dart';
import '../models/patient_model.dart';
import '../models/patient/patient_model.dart';
import '../models/patient/vital_sign_res_model.dart';
import '../screens/patients/patiant_info_model.dart';
import '../util/helpers.dart';
const GET_PATIENT_VITAL_SIGN = 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN =
BASE_URL + 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
class PatientsProvider with ChangeNotifier {
bool isLoading = true;
bool isError = false;
String error = '';
List<VitalSignResModel> patientVitalSignList = [];
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
PatiantInformtion _selectedPatient;
Future<Map> getPatientList(PatientModel patient, patientType) async {
/* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
@ -63,13 +74,49 @@ class PatientsProvider with ChangeNotifier {
*@return:Future
*@desc: getPatientVitalSign
*/
Future<Map> getPatientVitalSign(patient) async {
getPatientVitalSign(patient) async {
try {
final response =
await client.post(GET_PATIENT_VITAL_SIGN, body: json.encode(patient));
return Future.value(json.decode(response.body));
if (await Helpers.checkConnection()) {
final response = await client.post(GET_PATIENT_VITAL_SIGN,
body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isError = true;
error = 'Error While Fetching data';
} else {
var res = json.decode(response.body);
print('$res');
if (res['MessageStatus'] == 1) {
patientVitalSignList=[];
res['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignList
.add(new VitalSignResModel.fromJson(v));
});
// patientVitalSignList = res['List_DoctorPatientVitalSign'];
} else {
isError = true;
error = res['ErrorMessage'] ?? res['ErrorEndUserMessage'];
}
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
notifyListeners();
} catch (error) {
throw error;
}
}
PatiantInformtion getSelectedPatient() {
return _selectedPatient;
}
setSelectedPatient(PatiantInformtion patient) {
// return _selectedPatient;
_selectedPatient = patient;
}
}

@ -62,6 +62,7 @@ class ScheduleProvider with ChangeNotifier {
isError = true;
error = 'Please Check The Internet Connection';
}
print('Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer');
notifyListeners();
} catch (error) {
throw error;

@ -9,7 +9,7 @@ import './screens/dashboard_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';
import './screens/patients/profile/patient_profile_screen.dart';
import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_screen.dart';

@ -72,7 +72,7 @@ class _LoginsreenState extends State<Loginsreen> {
return Text('Error: ${snapshot.error}');
} else {
return Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0),
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 30),
alignment: Alignment.topLeft,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/services.dart';
@ -13,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import '../../lookups/patient_lookup.dart';
import '../../models/patient_model.dart';
import '../../widgets/patients/dynamic_elements.dart';
import '../../config/config.dart';
@ -66,8 +66,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
// _formKey.currentState.save();
sharedPref.getString(TOKEN).then((token) {
print(token+"EEEEEE");
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.TokenID = '@dm!n';
_patientSearchFormValues.ProjectID= 15;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {

@ -1,8 +1,9 @@
import '../../models/patient_model.dart';
import '../../providers/patients_provider.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../providers/patients_provider.dart';
class PatientsListScreen extends StatefulWidget {
@override
_PatientsListScreenState createState() => _PatientsListScreenState();

@ -6,7 +6,7 @@
*@desc:
*/
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/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';
@ -31,12 +31,11 @@ class PatientsScreen extends StatefulWidget {
}
class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
bool _isInit = true;
@ -46,21 +45,21 @@ class _PatientsScreenState extends State<PatientsScreen> {
//*******Amjad add to search box******
final _controller = TextEditingController();
//**************
PatientModel patient;
PatientModel patient;
@override
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
//PatientModel patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
//PatiantInformtion patiantInfo = routeArgs['patientSearchForm'];
print(patient.TokenID+"EEEEEE");
print(patient.TokenID + "EEEEEE");
String patientType = routeArgs['selectedType'];
print("**************patiant Type**************");
print(patientType);
print("**************test**************");
print("**************test**************");
if (_isInit) {
// setState(() {});
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
@ -68,20 +67,20 @@ class _PatientsScreenState extends State<PatientsScreen> {
// print('MessageStatus${res['MessageStatus']}');
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() {
int val2=int.parse(patientType);
litems =res[SERVICES_PATIANT2[val2]];//res['List_MyInPatient'];
int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]]; //res['List_MyInPatient'];
//********************
// litems2=res[SERVICES_PATIANT2[val2]];
//PatiantInformtion
//List<PatiantInformtion> responseModelList = new PatiantInformtion.fromJson(litems).;//TopTenUsersModelResponse.fromJson(parsed).list;
final List parsed = litems;//json.decode(response.body);
//List<PatientModel> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// List<PatiantInformtion> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// litems2=res[SERVICES_PATIANT2[val2]];
//PatiantInformtion
//List<PatiantInformtion> responseModelList = new PatiantInformtion.fromJson(litems).;//TopTenUsersModelResponse.fromJson(parsed).list;
final List parsed = litems; //json.decode(response.body);
//List<PatientModel> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// List<PatiantInformtion> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
responseModelList =
new TopTenUsersModelResponse.fromJson(parsed).list;
//********************
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
@ -94,70 +93,83 @@ class _PatientsScreenState extends State<PatientsScreen> {
@override
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold(
appBarTitle: 'Patients',
//***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container(child:ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
Container(
//child:litems == null?Column():Column(children: <Widget>[
child:litems == null?Column():Column(children: <Widget>[
Container(
width: SizeConfig.screenWidth * 0.80,
child: TextField(
controller: _controller,
onSubmitted: (value) {
// fetch all the news related to the keyword
if (value.isNotEmpty) {
// vm.search(value);
}
},
decoration: buildInputDecoration(
context, 'Search patiant'),
appBarTitle: 'Patients',
//***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container(
child: ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
Container(
//child:litems == null?Column():Column(children: <Widget>[
child: litems == null
? Column()
: Column(
children: <Widget>[
Container(
width: SizeConfig.screenWidth * 0.80,
child: TextField(
controller: _controller,
onSubmitted: (value) {
// fetch all the news related to the keyword
if (value.isNotEmpty) {
// vm.search(value);
}
},
decoration:
buildInputDecoration(context, 'Search patiant'),
),
),
),
Column(children: responseModelList.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
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),
],
),
Column(
children:
responseModelList.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
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": item});
},
);
}).toList())
],
),
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {"patient": responseModelList});
},
);
}).toList())
),
],
),
),
],
))
);
)));
}
//***********amjad update*************
InputDecoration buildInputDecoration(BuildContext context, hint) {
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon:Icon(Icons.search,color: Colors.red),
prefixIcon: Icon(Icons.search, color: Colors.red),
filled: true,
fillColor: Colors.white,
//Image.asset(asset),
/* icon: Padding(
/* icon: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
),*/
@ -175,30 +187,4 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
//*************
}
//***********************
class CustomShapeClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
final Path path = Path();
path.lineTo(0.0, size.height);
var firstEndPoint = Offset(size.width * .5, size.height / 2);
var firstControlpoint = Offset(size.width * 0.25, size.height * 0.95 + 30);
path.quadraticBezierTo(firstControlpoint.dx, firstControlpoint.dy,
firstEndPoint.dx, firstEndPoint.dy);
var secondEndPoint = Offset(size.width, size.height * 0.10);
var secondControlPoint = Offset(size.width * .75, size.height * .10 - 20);
path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
secondEndPoint.dx, secondEndPoint.dy);
path.lineTo(size.width, 0.0);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper oldClipper) => true;
}
//***********************

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import '../../widgets/patients/profile/patient_profile_widget.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/patients/profile/patient_profile_widget.dart';
import '../../../widgets/shared/app_scaffold_widget.dart';
class PatientProfileScreen extends StatelessWidget {
const PatientProfileScreen({Key key}) : super(key: key);

@ -1,15 +1,16 @@
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';
import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../providers/patients_provider.dart';
import '../../../../screens/patients/patiant_info_model.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -20,103 +21,114 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
*@return:VitalSignScreen
*@desc: VitalSignScreen class
*/
class VitalSignScreen extends StatefulWidget {
@override
_VitalSignScreenState createState() => _VitalSignScreenState();
}
class _VitalSignScreenState extends State<VitalSignScreen> {
List<String> litems = [
"1",
"1",
"1",
];
var _isLoading = true;
var _hasError;
PatientsProvider patientsProv;
var _isInit = true;
@override
void didChangeDependencies() {
/*
*@author: Elham Rababah
*@Date:28/4/2020
*@param: context
*@return:
*@desc: getVitalSignList Function
*/
getVitalSignList(context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
var patient = routeArgs['patient'];
print(patient);
// String patientType = routeArgs['selectedType'];
// print(patientType);
PatiantInformtion patient = routeArgs['patient'];
sharedPref.getString(TOKEN).then((token) {
print(token);
var model = {
"PatientID": patient['PatientID'],
"ProjectID": patient['ProjectID'],
"PatientTypeID": patient['PatientType'],
"InOutPatientType": 1,
"TransNo": patient['AdmissionNo'] != null
? int.parse(patient['AdmissionNo'])
: 0,
"LanguageID": 2,
"stamp": "2020-04-26T09:32:18.317Z",
"IPAdress": "11.11.11.11",
"VersionID": 1.2,
"Channel": 9,
"TokenID": token,
"SessionID": "E2bsEeYEJo",
"IsLoginForDoctorApp": true,
"PatientOutSA": false
};
if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientVitalSign(model).then((res) {
print('wwww');
debugPrint("${res}");
setState(() {
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
print(error);
});
}
_isInit = false;
VitalSignReqModel vitalSignReqModel = VitalSignReqModel(
patientID: 1237159, //patient.patientId,
projectID: 12, //patient.projectId,
tokenID: '@dm!n',
patientTypeID: patient.patientType,
inOutpatientType: 2,
languageID: 2,
transNo: 0,
);
//patient.admissionNo != null ? int.parse(patient.admissionNo) : 0);
patientsProv.getPatientVitalSign(vitalSignReqModel.toJson());
});
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (_isInit) {
patientsProv = Provider.of<PatientsProvider>(context);
getVitalSignList(context);
}
_isInit = false;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "VITAL SIGN",
body: Container(
child: Column(
children: litems.map((item) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Fahad AlSlehm - 324599',
fontSize: 2.5 * SizeConfig.textMultiplier,
body: patientsProv.isLoading
? DrAppCircularProgressIndeicator()
: patientsProv.isError
? Center(
child: Text(
patientsProv.error,
style: TextStyle(color: Theme.of(context).errorColor),
),
)
: patientsProv.patientVitalSignList.length == 0
? Center(
child: Text(
'You don\'t have any Schedule',
style: TextStyle(color: Theme.of(context).errorColor),
),
)
: Container(
child: ListView.builder(
itemCount: patientsProv.patientVitalSignList.length,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'DoctorName - ${patientsProv.patientVitalSignList[index].doctorName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText('painScoreDesc - ${patientsProv.patientVitalSignList[index].painScoreDesc}',
fontSize:
2.5 * SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
],
),
),
onTap: () {},
);
}),
),
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);
},
);
}).toList(),
),
),
);
}
}
// patientsProv.patientVitalSignList.map((VitalSignResModel item) {
// return InkWell(
// child: CardWithBgWidget(
// line1Text: 'DoctorName - ${item.doctorName}',
// line2Text:
// 'PainScoreDesc - ${item.painScoreDesc}',
// heightPercentage: 0.15,
// widthPercentage: 0.80),
// onTap: () {
// Navigator.of(context).pushNamed(VITAL_SIGN);
// },
// );
// }).toList()

@ -6,8 +6,8 @@ import '../util/dr_app_toast_msg.dart';
import 'package:connectivity/connectivity.dart';
DrAppToastMsg toastMsg = DrAppToastMsg();
/*
*@author: Elham Rababah
*@Date:12/4/2020
@ -48,8 +48,7 @@ class Helpers {
children: items.map((item) {
return Text(
'${item["$decKey"]}',
style:
TextStyle(color: Theme.of(context).primaryColor, fontSize: 20),
style: TextStyle(fontSize: 20),
);
}).toList(),
@ -63,6 +62,13 @@ class Helpers {
);
}
/*
*@author: Elham Rababah
*@Date:12/4/2020
*@param: msg
*@return:
*@desc: showErrorToast
*/
showErrorToast([msg = null]) {
String localMsg = 'Something wrong happened, please contact the admin';
@ -80,9 +86,9 @@ class Helpers {
*@return: Boolean
*@desc: Check The Internet Connection
*/
static Future<bool> checkConnection() async {
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;

@ -200,7 +200,13 @@ class _VerifyAccountState extends State<VerifyAccount> {
}
return null;
}
/*
*@author: Elham Rababah
*@Date:28/4/2020
*@param: context
*@return:InputDecoration
*@desc: buildInputDecoration
*/
InputDecoration buildInputDecoration(BuildContext context) {
return InputDecoration(
// ts/images/password_icon.png
@ -215,6 +221,13 @@ class _VerifyAccountState extends State<VerifyAccount> {
));
}
/*
*@author: Elham Rababah
*@Date:28/4/2020
*@param:
*@return: RichText
*@desc: buildText
*/
RichText buildText() {
var text = RichText(
text: new TextSpan(
@ -253,7 +266,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
verifyAccountFormValue['digit3'] +
verifyAccountFormValue['digit4'];
print(activationCode);
print('${_loggedUser}');
Map model = {
"activationCode": activationCode,
"DoctorID": _loggedUser['DoctorID'],

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';

@ -1,4 +1,7 @@
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import './profile_general_info_content_widget.dart';
import '../../../config/size_config.dart';
@ -12,26 +15,28 @@ import '../../shared/rounded_container_widget.dart';
*@desc: Profile General Info Widget class
*/
class ProfileGeneralInfoWidget extends StatelessWidget {
const ProfileGeneralInfoWidget({
Key key,
}) : super(key: key);
ProfileGeneralInfoWidget({Key key, this.patient}) : super(key: key);
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
// PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
// patient = patientsProv.getSelectedPatient();
return RoundedContainer(
child: ListView(
children: <Widget>[
ProfileGeneralInfoContentWidget(
title: "Age",
info: '55 Yr',
info: '${patient.age}',
),
ProfileGeneralInfoContentWidget(
title: "Contact Number",
info: '00 966 5000000000',
info: '${patient.mobileNumber}',
),
ProfileGeneralInfoContentWidget(
title: "Email",
info: 'Elham@yahoo.com',
info: '${patient.emailAddress}',
),
],
),
@ -39,4 +44,4 @@ class ProfileGeneralInfoWidget extends StatelessWidget {
height: SizeConfig.screenHeight * 0.25,
);
}
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import './Profile_general_info_Widget.dart';
@ -13,42 +14,48 @@ import './profile_status_info_widget.dart';
*@desc: Patient Profile Widget
*/
class PatientProfileWidget extends StatelessWidget {
Map patient = {
"ProjectID": 15,
"ClinicID": null,
"DoctorID": 70907,
"PatientID": 3315674,
"DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
"DoctorNameN": null,
"FirstName": "WALEED",
"MiddleName": "ALI",
"LastName": "AL-YAZIDI",
"FirstNameN": null,
"MiddleNameN": null,
"LastNameN": null,
"Gender": 1,
"DateofBirth": "/Date(534286800000+0300)/",
"NationalityID": null,
"MobileNumber": "0500014559",
"EmailAddress": "unknown@unknown.com",
"PatientIdentificationNo": "1063236754",
"NationalityName": "Saudi",
"NationalityNameN": null,
"PatientStatusType": null,
"PatientType": 1,
"AppointmentDate": "/Date(1587848400000+0300)/",
"StartTime": "13:00:00",
"Age": "34 Yr",
"ClinicDescription": "INTERNAL MEDICINE CLINIC",
"GenderDescription": "Male",
"AdmissionDate": "/Date(1587848400000+0300)/",
"AdmissionNo": "2020008652"
};
// Map patient = {
// "ProjectID": 15,
// "ClinicID": null,
// "DoctorID": 70907,
// "PatientID": 3315674,
// "DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
// "DoctorNameN": null,
// "FirstName": "WALEED",
// "MiddleName": "ALI",
// "LastName": "AL-YAZIDI",
// "FirstNameN": null,
// "MiddleNameN": null,
// "LastNameN": null,
// "Gender": 1,
// "DateofBirth": "/Date(534286800000+0300)/",
// "NationalityID": null,
// "MobileNumber": "0500014559",
// "EmailAddress": "unknown@unknown.com",
// "PatientIdentificationNo": "1063236754",
// "NationalityName": "Saudi",
// "NationalityNameN": null,
// "PatientStatusType": null,
// "PatientType": 1,
// "AppointmentDate": "/Date(1587848400000+0300)/",
// "StartTime": "13:00:00",
// "Age": "34 Yr",
// "ClinicDescription": "INTERNAL MEDICINE CLINIC",
// "GenderDescription": "Male",
// "AdmissionDate": "/Date(1587848400000+0300)/",
// "AdmissionNo": "2020008652"
// };
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
final routeArgs =ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return ListView(padding: EdgeInsets.zero, children: <Widget>[
ProfileHeaderWidget(patient: patient),
ProfileGeneralInfoWidget(),
ProfileGeneralInfoWidget(patient: patient),
ProfileMedicalInfoWidget(patient: patient),
ProfileStatusInfoWidget()
]);

@ -1,5 +1,8 @@
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../../config/size_config.dart';
import '../../shared/profile_image_widget.dart';
@ -12,25 +15,27 @@ import '../../shared/profile_image_widget.dart';
*@desc: Profile Header Widget class
*/
class ProfileHeaderWidget extends StatelessWidget {
const ProfileHeaderWidget({
ProfileHeaderWidget({
Key key,
this.patient
}) : super(key: key);
final patient;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
// PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
// patient = patientsProv.getSelectedPatient();
return Container(
height: SizeConfig.heightMultiplier * 30,
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
name: patient['FirstName']+' '+patient['LastName'] ,
des: patient['FirstName'],
name: patient.firstName + ' ' + patient.lastName,
des: patient.patientId.toString(),
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),
);
}
}

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -15,7 +16,7 @@ import '../../shared/rounded_container_widget.dart';
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
Map patient;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
String url = "assets/images/";

Loading…
Cancel
Save