merge-requests/44/head
unknown 6 years ago
commit ae524100f7

@ -3,14 +3,11 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]";
/*
*@author: ibrahim albitar
*@Date:27/4/2020
*@param:
*@return:
*@desc:
*/
const BASE_URL = 'https://hmgwebservices.com/Services/';
const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
//*********change value to decode json from Dropdown ************
var SERVICES_PATIANT = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
var SERVICES_PATIANT2 = ["List_MyOutPatient", "List_MyInPatient","List_MyDischargePatient" ,"List_MyReferredPatient","List_MyDischargeReferralPatient","List_MyTomorrowPatient","List_MyReferralPatient"];
var SERVICES_PATIANT_HEADER = ["OutPatient", "InPatient", "Discharge","Referred","Referral Discharge","Tomorrow","Referral"];
//******************

@ -1 +1,2 @@
final TOKEN = 'token';
final TOKEN = 'token';
final PROJECT_ID="projectID";

@ -1,11 +1,16 @@
const PATIENT_TYPE = const [
{"text": "outPatiant", "val": "1"},
{"text": "Tomorrow Patient", "val": "2"},
{"text": "outPatiant", "val": "0"},
{"text": "InPatiant", "val": "1"},
{"text": "Discharge", "val": "2"},
{"text": "Referrd", "val": "3"},
{"text": "Discharge", "val": "4"},
{"text": "InPatiant", "val": "5"},
{"text": "Referral Discharge", "val": "6"},
{"text": "Referral Discharge", "val": "4"},
{"text": "Tomorrow Patient", "val": "5"},
{"text": "Referral", "val": "6"},
];

@ -25,6 +25,9 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider.value(value: ProjectsProvider()),
],
child: MaterialApp(
//******amjad*****To remove debug app*******************
showSemanticsDebugger: false,
//********************************
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,

@ -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;
}
}

@ -0,0 +1,68 @@
class RequestSchedule {
int projectID;
int clinicID;
int doctorID;
int doctorWorkingHoursDays;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
int patientTypeID;
RequestSchedule(
this.projectID,
this.clinicID,
this.doctorID,
this.doctorWorkingHoursDays,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA,
this.patientTypeID);
RequestSchedule.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
doctorWorkingHoursDays = json['DoctorWorkingHoursDays'];
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'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['DoctorWorkingHoursDays'] = this.doctorWorkingHoursDays;
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,21 @@
class ListDoctorWorkingHoursTable {
String date;
String dayName;
String workingHours;
ListDoctorWorkingHoursTable({this.date, this.dayName, this.workingHours});
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = json['Date'] ;
dayName = json['DayName'];
workingHours = json['WorkingHours'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Date'] = this.date;
data['DayName'] = this.dayName;
data['WorkingHours'] = this.workingHours;
return data;
}
}

@ -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,131 @@
import 'dart:convert';
//PatiantInformtion patiantInformtionFromJson(String str) => PatiantInformtion.fromJson(json.decode(str));
////String patiantInformtionToJson(PatiantInformtion data) => json.encode(data.toJson());
//****************************** */
/*
*@author: Amjad Amireh
*@Date:27/4/2020
*@param:
*@return:Patian information Model
*@desc:
*/
class PatiantInformtion {
final List<PatiantInformtion> list;
int projectId;
int clinicId;
int doctorId;
int patientId;
String doctorName;
String doctorNameN;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int gender;
String dateofBirth;
String nationalityId;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomId;
String bedId;
String nursingStationId;
String description;
String clinicDescription;
String clinicDescriptionN;
String nationalityName;
String nationalityNameN;
String age;
String genderDescription;
String nursingStationName;
PatiantInformtion({
this.list,
this.projectId,
this.clinicId,
this.doctorId,
this.patientId,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.nationalityId,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomId,
this.bedId,
this.nursingStationId,
this.description,
this.clinicDescription,
this.clinicDescriptionN,
this.nationalityName,
this.nationalityNameN,
this.age,
this.genderDescription,
this.nursingStationName,
});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
projectId: json["ProjectID"],
clinicId: json["ClinicID"],
doctorId: json["DoctorID"],
patientId: json["PatientID"],
doctorName: json["DoctorName"],
doctorNameN: json["DoctorNameN"],
firstName: json["FirstName"],
middleName: json["MiddleName"],
lastName: json["LastName"],
firstNameN: json["FirstNameN"],
middleNameN: json["MiddleNameN"],
lastNameN: json["LastNameN"],
gender: json["Gender"],
dateofBirth: json["DateofBirth"],
nationalityId: json["NationalityID"],
mobileNumber: json["MobileNumber"],
emailAddress: json["EmailAddress"],
patientIdentificationNo: json["PatientIdentificationNo"],
patientType: json["PatientType"],
admissionNo: json["AdmissionNo"],
admissionDate: json["AdmissionDate"],
roomId: json["RoomID"],
bedId: json["BedID"],
nursingStationId: json["NursingStationID"],
description: json["Description"],
clinicDescription: json["ClinicDescription"],
clinicDescriptionN: json["ClinicDescriptionN"],
nationalityName: json["NationalityName"],
nationalityNameN: json["NationalityNameN"],
age: json["Age"],
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
);
}

@ -20,6 +20,17 @@ class PatientModel {
bool IsLoginForDoctorApp;
bool PatientOutSA;
getFirstName() {
return this.FirstName;
}
setFirstName( FirstName) {
this.FirstName = FirstName;
}
PatientModel(
{this.ProjectID,
this.ClinicID,
@ -41,4 +52,14 @@ class PatientModel {
this.SessionID,
this.IsLoginForDoctorApp,
this.PatientOutSA});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"],
LastName: json["LasttName"],
);
}
//***************************

@ -0,0 +1,32 @@
/*
*@author: Amjad Amireh
*@Date:27/4/2020
*@param:
*@return:pass a List<dynamic> to a List<MyModel> from a JSON
*@desc:
*/
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
//ModelResponse
class ModelResponse {
final List<PatiantInformtion> list;
String firstName;
ModelResponse({
this.list,
this.firstName,
});
factory ModelResponse.fromJson(List<dynamic> parsedJson) {
List<PatiantInformtion> list = new List<PatiantInformtion>();
list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList();
return new ModelResponse(list: list);
}
}
class PatiantInformtionl {
}

@ -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 {
var transNo;
var projectID;
var weightKg;
var heightCm;
var temperatureCelcius;
var pulseBeatPerMinute;
var respirationBeatPerMinute;
var bloodPressureLower;
var bloodPressureHigher;
var sAO2;
var fIO2;
var painScore;
var bodyMassIndex;
var headCircumCm;
var leanBodyWeightLbs;
var idealBodyWeightLbs;
var temperatureCelciusMethod;
var pulseRhythm;
var respirationPattern;
var bloodPressureCuffLocation;
var bloodPressureCuffSize;
var bloodPressurePatientPosition;
var painLocation;
var painDuration;
var painCharacter;
var painFrequency;
bool isPainManagementDone;
var status;
bool isVitalsRequired;
var patientID;
var createdOn;
var doctorID;
var clinicID;
var triageCategory;
var gCScore;
var lineItemNo;
var vitalSignDate;
var actualTimeTaken;
var sugarLevel;
var fBS;
var rBS;
var observationType;
var heartRate;
var muscleTone;
var reflexIrritability;
var bodyColor;
var isFirstAssessment;
var dateofBirth;
var timeOfBirth;
var bloodPressure;
var bloodPressureCuffLocationDesc;
var bloodPressureCuffSizeDesc;
var bloodPressurePatientPositionDesc;
var clinicName;
var doctorImageURL;
var doctorName;
var painScoreDesc;
var pulseRhythmDesc;
var respirationPatternDesc;
var temperatureCelciusMethodDesc;
var 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;
}
}

@ -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;
}
}
}

@ -1,20 +1,40 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.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 '../util/helpers.dart';
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';
/* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType);
final url =
BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
// print("a===========$url=======a");
try {
final response = await client.post(url,
body: json.encode({
@ -39,9 +59,65 @@ class PatientsProvider with ChangeNotifier {
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA
}));
//**********************
//***********************
return Future.value(json.decode(response.body));
} catch (error) {
throw error;
}
}
/*
*@author: Elham Rababah
*@Date:27/4/2020
*@param:
*@return:Future
*@desc: getPatientVitalSign
*/
getPatientVitalSign(patient) async {
try {
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;
}
}

@ -0,0 +1,71 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.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';
import '../models/list_doctor_working_hours_table_model.dart';
import '../models/RequestSchedule.dart';
class ScheduleProvider with ChangeNotifier {
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
List<ListDoctorWorkingHoursTable> listDoctorWorkingHoursTable = [];
bool isLoading = true;
bool isError = false;
String error = '';
RequestSchedule requestSchedule = RequestSchedule(
15,
1,
70907,
7,
2,
'2020-04-22T11:25:57.640Z',
'11.11.11.11',
1.2,
9,
'2lMDFT8U+Uy5jxRzCO8n2w==',
'vV6tg9yyVJ222',
true,
false,
1);
ScheduleProvider() {
getDoctorSchedule();
}
getDoctorSchedule() async {
const url = BASE_URL + 'Doctors.svc/REST/GetDoctorWorkingHoursTable';
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());
parsed['List_DoctorWorkingHoursTable'].forEach((v) {
listDoctorWorkingHoursTable
.add(new ListDoctorWorkingHoursTable.fromJson(v));
});
isError = false;
isLoading = false;
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
print('Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer');
notifyListeners();
} catch (error) {
throw error;
}
}
}

@ -1,3 +1,7 @@
import 'package:doctor_app_flutter/screens/doctor/message_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/services_screen.dart';
import './screens/doctor/my_schedule_screen.dart';
import 'package:doctor_app_flutter/screens/medicine/pharmacies_list_screen.dart';
@ -8,23 +12,22 @@ 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';
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';
import './screens/profile_screen.dart';
import './screens/settings/settings_screen.dart';
const String INIT_ROUTE = LOGIN;
const String HOME = '/';
const String LOGIN = 'login';
const String PROFILE = 'profile';
const String CHANGE_PASSWORD = 'change-password';
const String VERIFY_ACCOUNT = 'verify-account';
const String VERIFICATION_METHODS ='verification-methods';
const String VERIFICATION_METHODS = 'verification-methods';
const String MY_SCHEDULE = 'my-schedule';
const String QR_READER = 'qr-reader';
const String PATIENT_SEARCH = 'patients/patient-search';
@ -34,7 +37,10 @@ const String BLOOD_BANK = 'blood-bank';
const String DOCTOR_REPLY = 'doctor-reply';
const String MEDICINE_SEARCH = 'medicine/medicine-search';
const String PHARMACIES_LIST = 'medicine/pharmacies-list';
const String MESSAGES = 'messages';
const String SERVICES = 'services';
const String SETTINGS = 'settings';
const String VITAL_SIGN = 'vital-sign';
var routes = {
HOME: (_) => DashboardScreen(),
@ -52,5 +58,8 @@ var routes = {
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS:(_)=> VerificationMethodsScreen(),
PATIENTS_PROFILE:(_)=> PatientProfileScreen(),
PHARMACIES_LIST: (_) => PharmaciesListScreen(itemID: null,)
PHARMACIES_LIST: (_) => PharmaciesListScreen(itemID: null,),
VITAL_SIGN: (_) => VitalSignScreen(),
MESSAGES: (_) => MessagesScreen(),
SERVICES: (_) => ServicesScreen()
};

@ -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,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,216 +26,246 @@ class _DashboardScreenState extends State<DashboardScreen> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Home',
body: Container(
child: Column(
appBarTitle: 'Home',
current: 0,
body: Container(
child: Column(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Today's Statistics",
fontWeight: FontWeight.bold,
),
alignment: Alignment.centerLeft,
)),
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,
))),
Expanded(
flex: 2,
child: Row(
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(
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",
)),
],
child: DashboardItemTexts(
"Arrived",
"23",
)),
Expanded(
child: DashboardItemTexts(
"Not Arrived",
"23",
),
),
],
))
])),
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(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: DashboardItemTexts(
"ER",
"23",
)),
Expanded(
child: DashboardItemTexts(
"Walk-in",
"23",
)),
],
)),
],
)),
],
),
)
],
),
),
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,
)),
],
)),
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: 1,
child: Container(
margin: EdgeInsets.all(10),
child: AppText(
"Patient Services",
fontWeight: FontWeight.bold,
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"23",
"In-Patient",
showBorder: true,
),
),
alignment: Alignment.centerLeft,
)),
Expanded(
flex: 2,
child: new DashboardItemIconText(
DoctorApp.home_icon,
"23",
"Operations",
showBorder: true,
)),
],
),
),
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: InkWell(
child: DashboardItemIconText(
DoctorApp.home_icon,
"",
"Out Patient",
showBorder: false,
backgroundColor: Colors.deepPurple[300],
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],
),
onTap: () {
Navigator.of(context).pushNamed(PATIENT_SEARCH);
},
),
),
Expanded(
flex: 2,
child: InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChangeNotifierProvider(
create: (_) => DoctorReplyProvider(),
child: DoctorReplyScreen(),
),
),
onTap: () {
Navigator.of(context).pushNamed(MEDICINE_SEARCH);
},
)),
],
)),
);
},
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: 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],
)),
],
)),
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],
),
),
],
),
),
],
)));
),
),
);
}
}

@ -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(),
)
],
),
),
);
}
}

@ -0,0 +1,15 @@
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class MessagesScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
current: 1,
appBarTitle: 'Messages',
body: Center(
child: Text('Messages heeer'),
),
);
}
}

@ -0,0 +1,121 @@
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';
import '../../config/size_config.dart';
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
class MyScheduleScreen extends StatelessWidget {
ScheduleProvider scheduleProvider;
@override
Widget build(BuildContext context) {
scheduleProvider = Provider.of(context);
return AppScaffold(
// pageOnly: false,
showBottomBar: false,
showAppDrawer: false,
appBarTitle: 'My Schedule',
body: scheduleProvider.isLoading
? DrAppCircularProgressIndeicator()
: scheduleProvider.isError
? Center(
child: AppText(
scheduleProvider.error,
color: Theme.of(context).errorColor,
),
)
: scheduleProvider.listDoctorWorkingHoursTable.length == 0
? Center(
child: AppText(
'You don\'t have any Schedule',
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 20,
),
AppText('My Schedule',
fontSize:
2.5 * SizeConfig.textMultiplier),
scheduleListByDate(),
// scheduleListByDate('Wednesday, 8 April '),
],
),
],
),
],
),
),
);
}
Column scheduleListByDate() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
children: scheduleProvider.listDoctorWorkingHoursTable.map((item) {
return CardWithBgWidget(
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(),
),
),
],
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
}
}

@ -0,0 +1,15 @@
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class ServicesScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
current: 2,
appBarTitle: 'Services',
body: Center(
child: Text('Services heeer'),
),
);
}
}

@ -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,65 +0,0 @@
import 'package:flutter/material.dart';
import '../config/size_config.dart';
import '../widgets/shared/app_scaffold_widget.dart';
import '../widgets/shared/card_with_bg_widget.dart';
class MyScheduleScreen extends StatelessWidget {
List<String> litems = [
"1",
"2",
];
@override
Widget build(BuildContext context) {
return AppScaffold(
// pageOnly: false,
appBarTitle: 'My Schdule',
body: Container(
padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
child: ListView(children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 20,
),
Text('My Schedule', style: textStyle(2.5, FontWeight.w700)),
scheduleListByDate('Today, 7 April '),
scheduleListByDate('Wednesday, 8 April '),
],
),
],
),
]),
));
}
Column scheduleListByDate(date) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Text(date, style: textStyle(2.5)),
Container(
child: Column(
children: litems.map((item) {
return CardWithBgWidget(line1Text: 'ER new development ideas meeting',line2Text:'09:00 AM - 10:50 AM',line3Text: 'Cloud Solution',icon: Icons.add_location, heightPercentage: 0.20, widthPercentage: 0.80,);
}).toList(),
),
),
],
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
}
}

@ -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';
@ -37,8 +37,8 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
var _patientSearchFormValues = PatientModel(
ProjectID: 15,
ClinicID: 0,
DoctorID: 4709,
ClinicID: 90,
DoctorID: 145642,
FirstName: "0",
MiddleName: "0",
LastName: "0",
@ -57,23 +57,21 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
IsLoginForDoctorApp: true,
PatientOutSA: false);
void _validateInputs() {
print("####IBRAHIM TEST#####"+_patientSearchFormValues.From);
void _validateInputs() async {
print("####IBRAHIM TEST#####" + _patientSearchFormValues.From);
// _patientSearchFormValues.TokenID =
if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables
_formKey.currentState.save();
sharedPref.getString(TOKEN).then((token) {
print(token+"EEEEEE");
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID= 15;
print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType
});
// _formKey.currentState.save();
String token = await sharedPref.getString(TOKEN);
int projectID = await sharedPref.getInt(PROJECT_ID);
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID = projectID;
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType
});
} else {
// If all data are not valid then start auto validation.
@ -87,6 +85,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "SEARCH FOR PATIENT",
current: 1,
body: ListView(
children: <Widget>[
RoundedContainer(
@ -170,41 +169,38 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
height: 10,
),
AppTextFormField(
hintText: 'First Name',
onSaved: (value) {
_patientSearchFormValues.FirstName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
hintText: 'First Name',
onSaved: (value) {
_patientSearchFormValues.FirstName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
SizedBox(
height: 10,
),
AppTextFormField(
hintText: 'Middle Name',
onSaved: (value) {
_patientSearchFormValues.MiddleName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
hintText: 'Middle Name',
onSaved: (value) {
_patientSearchFormValues.MiddleName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
SizedBox(
height: 10,
),
AppTextFormField(
hintText: 'Last Name',
onSaved: (value) {
_patientSearchFormValues.LastName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS
),
hintText: 'Last Name',
onSaved: (value) {
_patientSearchFormValues.LastName = value;
},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_LETTERS),
SizedBox(
height: 10,
),
@ -226,7 +222,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
AppTextFormField(
textInputType: TextInputType.number,
hintText: 'Patiant ID',
//
//
inputFormatter: ONLY_NUMBERS,
onSaved: (value) {
_patientSearchFormValues.PatientID = 89000;

@ -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();
@ -20,7 +21,6 @@ class _PatientsListScreenState extends State<PatientsListScreen> {
String patientType = routeArgs['selectedType'];
print(patientType);
if (_isInit) {
// setState(() {});
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) {
// print('MessageStatus${res['MessageStatus']}');
@ -62,3 +62,6 @@ class _PatientsListScreenState extends State<PatientsListScreen> {
);
}
}
/*
{ProjectID: 15, ClinicID: null, DoctorID: 4709, PatientID: 1288076, DoctorName: SHAZIA MAQSOOD, DoctorNameN: null, FirstName: LAMA, MiddleName: ABDULLAH, LastName: AL-SALOOM, FirstNameN: null, MiddleNameN: null, LastNameN: null, Gender: 2, DateofBirth: /Date(522363600000+0300)/, NationalityID: null, MobileNumber: 0543133371, EmailAddress: Lala_as@hotmail.com, PatientIdentificationNo: 1040451369, PatientType: 1, AdmissionNo: 2020008493, AdmissionDate: /Date(1587589200000+0300)/, RoomID: 119, BedID: 119, NursingStationID: null, Description: null, ClinicDescription: OB-GYNE, ClinicDescriptionN: null, NationalityName: Saudi, NationalityNameN: null, Age: 34 Yr, GenderDescription: Female, NursingStationName: Post Natal Ward A2}
*/

@ -1,60 +1,223 @@
/*
*@author: Amjad Amireh Merge to Elham rababah
*@Date:27/4/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
//*************
import '../../config/size_config.dart';
import 'package:hexcolor/hexcolor.dart';
//********
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
class PatientsScreen extends StatelessWidget {
List<String> litems = [
"1",
"1",
"1",
];
import 'package:doctor_app_flutter/config/config.dart';
class PatientsScreen extends StatefulWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Patients',
body: Container(
child: Column(
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),
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE);
},
);
}).toList(),
),
),
);
}
_PatientsScreenState createState() => _PatientsScreenState();
}
class CustomShapeClipper extends CustomClipper<Path> {
class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
List<PatiantInformtion> responseModelList;
List<String> _locations = ['Today', 'Tomorrow', 'Next Week'];
int _activeLocation = 0;
bool _isInit = true;
String patientType;
String patientTypetitle;
var _isLoading = true;
var _hasError;
//*******Amjad add to search box******
final _controller = TextEditingController();
//**************
PatientModel patient;
@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;
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patientSearchForm'];
print(patient.TokenID + "EEEEEE");
patientType = routeArgs['selectedType'];
patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)];
print("**************patiant Type**************");
print(patientType);
if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) {
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() {
int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]];
final List parsed = litems;
responseModelList = new ModelResponse.fromJson(parsed).list;
//********************
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
print(error);
});
}
_isInit = false;
super.didChangeDependencies();
}
@override
bool shouldReclip(CustomClipper oldClipper) => true;
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold(
appBarTitle: patientTypetitle,
//***********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>[
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height * 0.03),
child: _locationBar(context),
),
SizedBox(height: 10.0),
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),
],
),
),
onTap: () {
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {"patient": item});
},
);
}).toList(),
),
],
))
])));
}
//***********amjad update**buildInputDecoration ***to search box********
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon: Icon(Icons.search, color: Colors.red),
filled: true,
fillColor: Colors.white,
hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(20)),
borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).primaryColor),
));
}
Widget _locationBar(BuildContext _context) {
return Container(
height: MediaQuery.of(context).size.height * 0.065,
width: SizeConfig.screenWidth * 0.80,
decoration: BoxDecoration(
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _locations.map((l) {
bool _isActive = _locations[_activeLocation] == l ? true : false;
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
InkWell(
child: Text(
l,
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
onTap: () {
print(l);
print(_locations.indexOf(l));
setState(() {
_activeLocation = _locations.indexOf(l);
});
}),
_isActive
? Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
height: 3,
width: 80,
)
: Container()
]);
}).toList(),
));
}
}

@ -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);

@ -0,0 +1,164 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/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';
import '../../../../config/shared_pref_kay.dart';
import '../../../../models/patient/vital_sign_req_model.dart';
import '../../../../providers/patients_provider.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();
/*
*@author: Elham Rababah
*@Date:26/4/2020
*@param:
*@return:VitalSignScreen
*@desc: VitalSignScreen class
*/
class VitalSignScreen extends StatefulWidget {
@override
_VitalSignScreenState createState() => _VitalSignScreenState();
}
class _VitalSignScreenState extends State<VitalSignScreen> {
PatientsProvider patientsProv;
var _isInit = true;
/*
*@author: Elham Rababah
*@Date:28/4/2020
*@param: context
*@return:
*@desc: getVitalSignList Function
*/
getVitalSignList(context) async {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN);
VitalSignReqModel vitalSignReqModel = VitalSignReqModel(
patientID: patient.patientId,
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
inOutpatientType: 1,
languageID: 2,
transNo:
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",
showAppDrawer: false,
showBottomBar: false,
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(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount: patientsProv.patientVitalSignList.length,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier *
12,
backgroundImage: NetworkImage(
patientsProv
.patientVitalSignList[index]
.doctorImageURL),
backgroundColor: Colors.transparent,
),
Padding(
padding: const EdgeInsets.fromLTRB(8,0,0,0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientVitalSignList[index].doctorName}',
fontSize: 2.5 *
SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientVitalSignList[index].clinicName}',
fontSize: 2.5 *
SizeConfig.textMultiplier),
SizedBox(
height: 8,
),
],
),
)
],
),
],
),
),
onTap: () {},
);
}),
),
);
}
}
// 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()

@ -4,7 +4,10 @@ import 'package:flutter/material.dart';
import '../config/size_config.dart';
import '../util/dr_app_toast_msg.dart';
import 'package:connectivity/connectivity.dart';
DrAppToastMsg toastMsg = DrAppToastMsg();
/*
*@author: Elham Rababah
*@Date:12/4/2020
@ -45,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(),
@ -60,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';
@ -69,4 +78,22 @@ class Helpers {
toastMsg.showErrorToast(localMsg);
}
/*
*@author: Mohammad Aljammal
*@Date:27/4/2020
*@param:
*@return: Boolean
*@desc: Check The Internet Connection
*/
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;
} else {
return false;
}
}
}

@ -99,7 +99,7 @@ class _LoginFormState extends State<LoginForm> {
controller: projectIdController,
onTap: () {
helpers.showCupertinoPicker(
context, projectsList, 'Desciption', onSelectProject);
context, projectsList, 'Name', onSelectProject);
},
showCursor: false,
readOnly: true,
@ -198,6 +198,7 @@ class _LoginFormState extends State<LoginForm> {
changeLoadingStata(true);
if (loginFormKey.currentState.validate()) {
loginFormKey.currentState.save();
sharedPref.setInt(PROJECT_ID, userInfo.ProjectID);
authProv.login(userInfo).then((res) {
changeLoadingStata(false);

@ -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(
@ -243,7 +256,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
*@return:
*@desc: verify Account func call sendActivationCodeByOtpNotificationType service
*/
verifyAccount(AuthProvider authProv, Function changeLoadingStata) {
verifyAccount(AuthProvider authProv, Function changeLoadingStata) async{
if (verifyAccountForm.currentState.validate()) {
changeLoadingStata(true);
@ -253,12 +266,12 @@ class _VerifyAccountState extends State<VerifyAccount> {
verifyAccountFormValue['digit3'] +
verifyAccountFormValue['digit4'];
print(activationCode);
int projectID = await sharedPref.getInt(PROJECT_ID);
Map model = {
"activationCode": activationCode,
"DoctorID": _loggedUser['DoctorID'],
"LogInTokenID": _loggedUser['LogInTokenID'],
"ProjectID": 15,
"ProjectID": projectID,
"LanguageID": 2,
"stamp": "2020-02-26T14:48:27.221Z",
"IPAdress": "11.11.11.11",

@ -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,8 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.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 +16,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 +45,4 @@ class ProfileGeneralInfoWidget extends StatelessWidget {
height: SizeConfig.screenHeight * 0.25,
);
}
}
}

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:flutter/material.dart';
import './Profile_general_info_Widget.dart';
@ -13,12 +15,49 @@ 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"
// };
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(),
ProfileGeneralInfoWidget(),
ProfileMedicalInfoWidget(),
ProfileHeaderWidget(patient: patient),
ProfileGeneralInfoWidget(patient: patient),
ProfileMedicalInfoWidget(patient: patient),
ProfileStatusInfoWidget()
]);
}

@ -1,5 +1,9 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.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,23 +16,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);
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: "Fahad AlSlehm",
des: "324599",
name: patient.firstName + ' ' + patient.lastName,
des: patient.patientId.toString(),
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),
);
}
}

@ -1,3 +1,6 @@
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -5,7 +8,6 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
@ -14,14 +16,12 @@ import '../../shared/rounded_container_widget.dart';
*@desc: Profile Medical Info Widget
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
const ProfileMedicalInfoWidget({
Key key,
}) : super(key: key);
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
String url = "assets/images/";
final double contWidth = SizeConfig.screenWidth * 0.70;
final double contWidth = SizeConfig.realScreenWidth * 0.70;
final double contHeight = SizeConfig.screenHeight * 0.30;
return RoundedContainer(
@ -44,11 +44,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
InkWell(
onTap: () {
navigator(context,VITAL_SIGN);
},
child: CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
),
CircleAvatarWidget(
des: 'Lab Result',
@ -79,6 +84,11 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
height: contHeight,
);
}
void navigator(BuildContext context,route) {
Navigator.of(context).pushNamed(VITAL_SIGN,
arguments: {'patient': patient});
}
}
class CircleAvatarWidget extends StatelessWidget {
@ -106,7 +116,7 @@ class CircleAvatarWidget extends StatelessWidget {
decoration: new BoxDecoration(
// color: Colors.green, // border color
shape: BoxShape.circle,
border: Border.all(color: Hexcolor('#B7831A'),width: 1.5)),
border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)),
child: CircleAvatar(
radius: SizeConfig.imageSizeMultiplier * 12,
child: Image.asset(url),

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/profile_screen.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../config/size_config.dart';
import '../../providers/schedule_provider.dart';
import '../../routes.dart';
import '../../screens/doctor/my_schedule_screen.dart';
import '../../widgets/shared/drawer_item_widget.dart';
import '../../widgets/shared/rounded_container_widget.dart';
import 'app_texts_widget.dart';
@ -27,7 +29,7 @@ class _AppDrawerState extends State<AppDrawer> {
Container(
height: SizeConfig.heightMultiplier * 30,
child: InkWell(
child: DrawerHeader(
child: DrawerHeader(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
@ -50,24 +52,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.of(context).pushNamed(MY_SCHEDULE);
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,

@ -1,11 +1,12 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../config/size_config.dart';
import '../../presentation/doctor_app_icons.dart';
import '../../screens/patients/patients_screen.dart';
import '../../widgets/shared/app_drawer_widget.dart';
import '../../widgets/shared/app_loader_widget.dart';
import '../../widgets/shared/custom_shape_clipper.dart';
class AppScaffold extends StatelessWidget {
bool pageOnly = false;
@ -18,17 +19,19 @@ class AppScaffold extends StatelessWidget {
String appBarTitle = '';
Widget body;
bool isloading = false;
int current;
AppScaffold(
{this.pageOnly,
this.appBarTitle,
this.showAppBar,
this.showBottomBar,
this.showAppDrawer,
this.showAppDrawer = true,
this.body,
this.showbg,
this.showCurve,
this.isloading = false});
this.isloading = false,
this.current});
@override
Widget build(BuildContext context) {
@ -45,15 +48,14 @@ 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,
@ -72,19 +74,43 @@ class AppScaffold extends StatelessWidget {
// ,
bottomNavigationBar: (pageOnly == true || showBottomBar == false)
? null
: BottomNavigationBar(items: [
BottomNavigationBarItem(
icon: Icon(DoctorApp.home_icon),
title: Text('Home'),
backgroundColor: Colors.red,
activeIcon: Icon(Icons.home)),
BottomNavigationBarItem(
icon: new Icon(Icons.mail),
title: new Text('Messages'),
),
BottomNavigationBarItem(
icon: Icon(Icons.apps), title: Text('Menu'))
]),
: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(
Icons.home,
color: current == 0 ? Colors.red : Colors.grey,
),
title: Text(
'Home',
style: TextStyle(
color: current == 0 ? Colors.red : Colors.grey),
),
backgroundColor: Colors.green,
// activeIcon: Icon(DoctorApp.home_icon)
),
BottomNavigationBarItem(
icon: new Icon(
Icons.mail,
color: current == 1 ? Colors.red : Colors.grey,
),
title: new Text('Messages',
style: TextStyle(
color: current == 1 ? Colors.red : Colors.grey)),
// backgroundColor: current == 1?Colors.red:Colors.grey,
),
BottomNavigationBarItem(
icon: Icon(
Icons.apps,
color: current == 2 ? Colors.red : Colors.grey,
),
title: Text('Menu',
style: TextStyle(
color: current == 2 ? Colors.red : Colors.grey)),
)
],
onTap: (index) => navigatot(index, context),
),
body: (pageOnly == true || showCurve == false)
? Stack(children: <Widget>[body, buildAppLoaderWidget(isloading)])
: Stack(
@ -107,4 +133,22 @@ class AppScaffold extends StatelessWidget {
Widget buildAppLoaderWidget(bool isloading) {
return isloading ? AppLoaderWidget() : Container();
}
navigatot(index, context) {
print('index :${index} current : ${current}');
if (index != current) {
switch (index) {
case 0:
Navigator.of(context).pushReplacementNamed(HOME);
break;
case 1:
Navigator.of(context).pushReplacementNamed(MESSAGES);
break;
case 2:
Navigator.of(context).pushReplacementNamed(SERVICES);
break;
default:
}
}
}
}

@ -3,80 +3,50 @@ import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
/*
*@author: Mohammad Aljammal
*@Date:27/4/2020
*@param: Widget
*@return:
*@desc: Card With Bg Widget
*/
class CardWithBgWidget extends StatelessWidget {
String line1Text;
String line2Text;
String line3Text;
IconData icon;
double heightPercentage;
double widthPercentage;
CardWithBgWidget(
{this.line1Text = '',
this.line2Text = '',
this.line3Text = '',
this.icon,
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,
),
Text(line2Text, style: textStyle(2.5)),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Icon(icon),
Text(line3Text, 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,
// raduis: 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);
}
}

@ -148,6 +148,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
connectivity:
dependency: "direct main"
description:
name: connectivity
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8+2"
connectivity_macos:
dependency: transitive
description:
name: connectivity_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0+2"
connectivity_platform_interface:
dependency: transitive
description:
name: connectivity_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
convert:
dependency: transitive
description:
@ -422,6 +443,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
pool:
dependency: transitive
description:
@ -646,4 +674,4 @@ packages:
version: "2.2.0"
sdks:
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

@ -31,6 +31,7 @@ dependencies:
local_auth: ^0.6.1+3
http_interceptor: ^0.2.0
progress_hud_v2: ^2.0.0
connectivity: ^0.4.8+2
# The following adds the Cupertino Icons font to your application.

Loading…
Cancel
Save