Merge branch 'mohammad' into 'master'

Mohammad

See merge request Cloud_Solution/doctor_app_flutter!86
merge-requests/88/merge
Mohammad Aljammal 6 years ago
commit 4afca06aec

@ -12,8 +12,15 @@ import 'package:http/http.dart';
*@Date:28/5/2020 *@Date:28/5/2020
*@param: url, onSuccess callBack, onFailure callBack *@param: url, onSuccess callBack, onFailure callBack
*@return: *@return:
*@desc: convert DateTime to data formatted *@desc:
*/ */
///Example
/*
await BaseAppClient.post('',
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {},
body: null);
* */
class BaseAppClient { class BaseAppClient {
static Client client = HttpInterceptor().getClient(); static Client client = HttpInterceptor().getClient();

@ -20,3 +20,14 @@
{"text": "Out Sudia Arabia", "val": "2"}, {"text": "Out Sudia Arabia", "val": "2"},
]; ];
enum vitalSignDetails {
bodyMeasurements,
temperature,
pulse,
pespiration,
bloodPressure,
oxygenation,
painScale
}

@ -44,7 +44,7 @@ class MyApp extends StatelessWidget {
], ],
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
primaryColor: Hexcolor('#B8382C'), primaryColor: Colors.grey,
buttonColor: Hexcolor('#B8382C'), buttonColor: Hexcolor('#B8382C'),
fontFamily: 'WorkSans', fontFamily: 'WorkSans',
dividerColor: Colors.grey[200], dividerColor: Colors.grey[200],

@ -0,0 +1,7 @@
/// Sample linear data type.
class ChartAxis {
final int xAxis;
final int yAxis;
ChartAxis(this.xAxis, this.yAxis);
}

@ -5,6 +5,8 @@
*@return:LabOrdersResModel *@return:LabOrdersResModel
*@desc: LabOrdersResModel class *@desc: LabOrdersResModel class
*/ */
import 'package:doctor_app_flutter/util/helpers.dart';
class LabOrdersResModel { class LabOrdersResModel {
String setupID; String setupID;
int projectID; int projectID;
@ -19,7 +21,7 @@ class LabOrdersResModel {
int status; int status;
String createdBy; String createdBy;
Null createdByN; Null createdByN;
String createdOn; DateTime createdOn;
String editedBy; String editedBy;
Null editedByN; Null editedByN;
String editedOn; String editedOn;
@ -65,7 +67,7 @@ class LabOrdersResModel {
status = json['Status']; status = json['Status'];
createdBy = json['CreatedBy']; createdBy = json['CreatedBy'];
createdByN = json['CreatedByN']; createdByN = json['CreatedByN'];
createdOn = json['CreatedOn']; createdOn = Helpers.convertStringToDate(json['CreatedOn']);
editedBy = json['EditedBy']; editedBy = json['EditedBy'];
editedByN = json['EditedByN']; editedByN = json['EditedByN'];
editedOn = json['EditedOn']; editedOn = json['EditedOn'];

@ -0,0 +1,124 @@
class LabResult {
String setupID;
int projectID;
int orderNo;
int lineItemNo;
int packageID;
int testID;
String description;
String resultValue;
String referenceRange;
Null convertedResultValue;
Null convertedReferenceRange;
Null resultValueFlag;
int status;
String createdBy;
Null createdByN;
String createdOn;
String editedBy;
Null editedByN;
String editedOn;
String verifiedBy;
Null verifiedByN;
String verifiedOn;
Null patientID;
int gender;
Null maleInterpretativeData;
Null femaleInterpretativeData;
String testCode;
String statusDescription;
LabResult(
{this.setupID,
this.projectID,
this.orderNo,
this.lineItemNo,
this.packageID,
this.testID,
this.description,
this.resultValue,
this.referenceRange,
this.convertedResultValue,
this.convertedReferenceRange,
this.resultValueFlag,
this.status,
this.createdBy,
this.createdByN,
this.createdOn,
this.editedBy,
this.editedByN,
this.editedOn,
this.verifiedBy,
this.verifiedByN,
this.verifiedOn,
this.patientID,
this.gender,
this.maleInterpretativeData,
this.femaleInterpretativeData,
this.testCode,
this.statusDescription});
LabResult.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
orderNo = json['OrderNo'];
lineItemNo = json['LineItemNo'];
packageID = json['PackageID'];
testID = json['TestID'];
description = json['Description'];
resultValue = json['ResultValue'];
referenceRange = json['ReferenceRange'];
convertedResultValue = json['ConvertedResultValue'];
convertedReferenceRange = json['ConvertedReferenceRange'];
resultValueFlag = json['ResultValueFlag'];
status = json['Status'];
createdBy = json['CreatedBy'];
createdByN = json['CreatedByN'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedByN = json['EditedByN'];
editedOn = json['EditedOn'];
verifiedBy = json['VerifiedBy'];
verifiedByN = json['VerifiedByN'];
verifiedOn = json['VerifiedOn'];
patientID = json['PatientID'];
gender = json['Gender'];
maleInterpretativeData = json['MaleInterpretativeData'];
femaleInterpretativeData = json['FemaleInterpretativeData'];
testCode = json['TestCode'];
statusDescription = json['StatusDescription'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['OrderNo'] = this.orderNo;
data['LineItemNo'] = this.lineItemNo;
data['PackageID'] = this.packageID;
data['TestID'] = this.testID;
data['Description'] = this.description;
data['ResultValue'] = this.resultValue;
data['ReferenceRange'] = this.referenceRange;
data['ConvertedResultValue'] = this.convertedResultValue;
data['ConvertedReferenceRange'] = this.convertedReferenceRange;
data['ResultValueFlag'] = this.resultValueFlag;
data['Status'] = this.status;
data['CreatedBy'] = this.createdBy;
data['CreatedByN'] = this.createdByN;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedByN'] = this.editedByN;
data['EditedOn'] = this.editedOn;
data['VerifiedBy'] = this.verifiedBy;
data['VerifiedByN'] = this.verifiedByN;
data['VerifiedOn'] = this.verifiedOn;
data['PatientID'] = this.patientID;
data['Gender'] = this.gender;
data['MaleInterpretativeData'] = this.maleInterpretativeData;
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
data['TestCode'] = this.testCode;
data['StatusDescription'] = this.statusDescription;
return data;
}
}

@ -0,0 +1,68 @@
class RequestLabResult {
int projectID;
String setupID;
int orderNo;
int invoiceNo;
int patientTypeID;
int languageID;
String stamp;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
RequestLabResult(
{this.projectID,
this.setupID,
this.orderNo,
this.invoiceNo,
this.patientTypeID,
this.languageID,
this.stamp,
this.iPAdress,
this.versionID,
this.channel,
this.tokenID,
this.sessionID,
this.isLoginForDoctorApp,
this.patientOutSA});
RequestLabResult.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
setupID = json['SetupID'];
orderNo = json['OrderNo'];
invoiceNo = json['InvoiceNo'];
patientTypeID = json['PatientTypeID'];
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['SetupID'] = this.setupID;
data['OrderNo'] = this.orderNo;
data['InvoiceNo'] = this.invoiceNo;
data['PatientTypeID'] = this.patientTypeID;
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;
}
}

@ -5,6 +5,8 @@
*@return:VitalSignResModel *@return:VitalSignResModel
*@desc: VitalSignResModel class *@desc: VitalSignResModel class
*/ */
import 'package:doctor_app_flutter/util/helpers.dart';
class VitalSignResModel { class VitalSignResModel {
var transNo; var transNo;
var projectID; var projectID;
@ -42,7 +44,7 @@ class VitalSignResModel {
var triageCategory; var triageCategory;
var gCScore; var gCScore;
var lineItemNo; var lineItemNo;
var vitalSignDate; DateTime vitalSignDate;
var actualTimeTaken; var actualTimeTaken;
var sugarLevel; var sugarLevel;
var fBS; var fBS;
@ -168,7 +170,7 @@ class VitalSignResModel {
triageCategory = json['TriageCategory']; triageCategory = json['TriageCategory'];
gCScore = json['GCScore']; gCScore = json['GCScore'];
lineItemNo = json['LineItemNo']; lineItemNo = json['LineItemNo'];
vitalSignDate = json['VitalSignDate']; vitalSignDate = Helpers.convertStringToDate(json['VitalSignDate']);
actualTimeTaken = json['ActualTimeTaken']; actualTimeTaken = json['ActualTimeTaken'];
sugarLevel = json['SugarLevel']; sugarLevel = json['SugarLevel'];
fBS = json['FBS']; fBS = json['FBS'];

@ -1,7 +1,10 @@
import 'dart:convert'; import 'dart:convert';
import 'package:doctor_app_flutter/client/app_client.dart'; import 'package:doctor_app_flutter/client/app_client.dart';
import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result.dart';
import 'package:doctor_app_flutter/models/patient/lab_result_req_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart'; import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart';
import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart'; import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart';
@ -27,14 +30,16 @@ class PatientsProvider with ChangeNotifier {
bool isError = false; bool isError = false;
String error = ''; String error = '';
List<VitalSignResModel> patientVitalSignList = []; List<VitalSignResModel> patientVitalSignList = [];
List<VitalSignResModel> patientVitalSignOrderdSubList = [];
List<LabOrdersResModel> patientLabResultOrdersList = []; List<LabOrdersResModel> patientLabResultOrdersList = [];
List<PrescriptionResModel> patientPrescriptionsList = []; List<PrescriptionResModel> patientPrescriptionsList = [];
List<RadiologyResModel> patientRadiologyList = []; List<RadiologyResModel> patientRadiologyList = [];
List<LabResult> labResultList = [];
var patientProgressNoteList = []; var patientProgressNoteList = [];
var insuranceApporvalsList = []; var insuranceApporvalsList = [];
Client client = Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]); HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
PatiantInformtion _selectedPatient; PatiantInformtion _selectedPatient;
@ -89,9 +94,9 @@ class PatientsProvider with ChangeNotifier {
notifyListeners(); notifyListeners();
} }
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:27/4/2020 *@Date:27/4/2020
*@param: patient *@param: patient
*@return: *@return:
*@desc: getPatientVitalSign *@desc: getPatientVitalSign
@ -117,6 +122,22 @@ class PatientsProvider with ChangeNotifier {
res['List_DoctorPatientVitalSign'].forEach((v) { res['List_DoctorPatientVitalSign'].forEach((v) {
patientVitalSignList.add(new VitalSignResModel.fromJson(v)); patientVitalSignList.add(new VitalSignResModel.fromJson(v));
}); });
if (patientVitalSignList.length > 0) {
List<VitalSignResModel> patientVitalSignOrderdSubListTemp = [];
patientVitalSignOrderdSubListTemp = patientVitalSignList;
patientVitalSignOrderdSubListTemp
.sort((VitalSignResModel a, VitalSignResModel b) {
return b.vitalSignDate.microsecondsSinceEpoch -
a.vitalSignDate.microsecondsSinceEpoch;
});
patientVitalSignOrderdSubList.clear();
for (int x = 0; x < 20; x++) {
patientVitalSignOrderdSubList
.add(patientVitalSignOrderdSubListTemp[x]);
}
var asd = "";
}
// patientVitalSignList = res['List_DoctorPatientVitalSign']; // patientVitalSignList = res['List_DoctorPatientVitalSign'];
} else { } else {
isError = true; isError = true;
@ -134,8 +155,8 @@ class PatientsProvider with ChangeNotifier {
} }
} }
/*@author: Elham Rababah /*@author: Elham Rababah
*@Date:27/4/2020 *@Date:27/4/2020
*@param: patient *@param: patient
*@return: *@return:
*@desc: getLabResult Orders *@desc: getLabResult Orders
@ -179,8 +200,8 @@ class PatientsProvider with ChangeNotifier {
} }
} }
/*@author: Elham Rababah /*@author: Elham Rababah
*@Date:3/5/2020 *@Date:3/5/2020
*@param: patient *@param: patient
*@return: *@return:
*@desc: getPatientPrescriptions *@desc: getPatientPrescriptions
@ -193,7 +214,7 @@ class PatientsProvider with ChangeNotifier {
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = final response =
await AppClient.post(GET_PRESCRIPTION, body: json.encode(patient)); await AppClient.post(GET_PRESCRIPTION, body: json.encode(patient));
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
isLoading = false; isLoading = false;
@ -225,8 +246,8 @@ class PatientsProvider with ChangeNotifier {
} }
} }
/*@author: Elham Rababah /*@author: Elham Rababah
*@Date:12/5/2020 *@Date:12/5/2020
*@param: patient *@param: patient
*@return: *@return:
*@desc: getPatientRadiology *@desc: getPatientRadiology
@ -239,8 +260,8 @@ class PatientsProvider with ChangeNotifier {
throw err; throw err;
} }
/*@author: Elham Rababah /*@author: Elham Rababah
*@Date:3/5/2020 *@Date:3/5/2020
*@param: patient *@param: patient
*@return: *@return:
*@desc: getPatientRadiology *@desc: getPatientRadiology
@ -252,7 +273,7 @@ class PatientsProvider with ChangeNotifier {
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = final response =
await AppClient.post(GET_RADIOLOGY, body: json.encode(patient)); await AppClient.post(GET_RADIOLOGY, body: json.encode(patient));
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
isLoading = false; isLoading = false;
@ -283,12 +304,12 @@ class PatientsProvider with ChangeNotifier {
} }
} }
getPatientProgressNote(patient) async {
getPatientProgressNote(patient) async{
setBasicData(); setBasicData();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response =await AppClient.post(PATIENT_PROGRESS_NOTE_URL, body: json.encode(patient)); final response = await AppClient.post(PATIENT_PROGRESS_NOTE_URL,
body: json.encode(patient));
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
isLoading = false; isLoading = false;
@ -299,7 +320,7 @@ class PatientsProvider with ChangeNotifier {
var res = json.decode(response.body); var res = json.decode(response.body);
print('$res'); print('$res');
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
patientProgressNoteList = res['List_GetPregressNoteForInPatient']; patientProgressNoteList = res['List_GetPregressNoteForInPatient'];
} else { } else {
isError = true; isError = true;
error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; error = res['ErrorMessage'] ?? res['ErrorEndUserMessage'];
@ -316,12 +337,37 @@ class PatientsProvider with ChangeNotifier {
} }
} }
getPatientInsuranceApprovals(patient) async{ getLabResult(LabOrdersResModel labOrdersResModel) async {
labResultList.clear();
isLoading = true;
notifyListeners();
RequestLabResult requestLabResult = RequestLabResult();
requestLabResult.sessionID = labOrdersResModel.setupID;
requestLabResult.orderNo = labOrdersResModel.orderNo;
requestLabResult.invoiceNo = labOrdersResModel.invoiceNo;
requestLabResult.patientTypeID = labOrdersResModel.patientType;
await BaseAppClient.post('DoctorApplication.svc/REST/GetPatientLabResults',
onSuccess: (dynamic response, int statusCode) {
isError = false;
isLoading = false;
response['List_GetLabNormal'].forEach((v) {
labResultList.add(new LabResult.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
isError = true;
isLoading = false;
this.error = error;
}, body: requestLabResult.toJson());
notifyListeners();
}
getPatientInsuranceApprovals(patient) async {
setBasicData(); setBasicData();
try { try {
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response =await AppClient.post(PATIENT_INSURANCE_APPROVALS_URL, body: json.encode(patient)); final response = await AppClient.post(
PATIENT_INSURANCE_APPROVALS_URL, body: json.encode(patient));
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
isLoading = false; isLoading = false;
@ -350,4 +396,5 @@ class PatientsProvider with ChangeNotifier {
} }
} }
} }

@ -16,7 +16,7 @@ class MyReferredPatientProvider with ChangeNotifier {
String error = ''; String error = '';
RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel();
// RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); // RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks();
VerifyReferralDoctorRemarks _verifyreferraldoctorremarks = VerifyReferralDoctorRemarks(); VerifyReferralDoctorRemarks _verifyreferraldoctorremarks = VerifyReferralDoctorRemarks();
MyReferredPatientProvider() { MyReferredPatientProvider() {
getMyReferralPatient(); getMyReferralPatient();
@ -51,38 +51,38 @@ class MyReferredPatientProvider with ChangeNotifier {
// Future replay( // Future replay(
// String referredDoctorRemarks, MyReferredPatientModel model) async { // String referredDoctorRemarks, MyReferredPatientModel model) async {
Future replay( Future replay(
MyReferredPatientModel model) async { MyReferredPatientModel model) async {
try { try {
_verifyreferraldoctorremarks.patientID=model.projectId; _verifyreferraldoctorremarks.patientID=model.projectId;
_verifyreferraldoctorremarks.admissionNo =model.admissionNo; _verifyreferraldoctorremarks.admissionNo =model.admissionNo;
_verifyreferraldoctorremarks.lineItemNo = model.lineItemNo; _verifyreferraldoctorremarks.lineItemNo = model.lineItemNo;
_verifyreferraldoctorremarks.referredDoctorRemarks=model.referredDoctorRemarks; _verifyreferraldoctorremarks.referredDoctorRemarks=model.referredDoctorRemarks;
_verifyreferraldoctorremarks.referringDoctor=model.referringDoctor; _verifyreferraldoctorremarks.referringDoctor=model.referringDoctor;
_verifyreferraldoctorremarks.firstName=model.firstName; _verifyreferraldoctorremarks.firstName=model.firstName;
_verifyreferraldoctorremarks.middleName=model.middleName; _verifyreferraldoctorremarks.middleName=model.middleName;
_verifyreferraldoctorremarks.lastName=model.lastName; _verifyreferraldoctorremarks.lastName=model.lastName;
_verifyreferraldoctorremarks.patientMobileNumber=model.mobileNumber; _verifyreferraldoctorremarks.patientMobileNumber=model.mobileNumber;
_verifyreferraldoctorremarks.patientIdentificationID=model.patientIdentificationNo; _verifyreferraldoctorremarks.patientIdentificationID=model.patientIdentificationNo;
await BaseAppClient.post( await BaseAppClient.post(
'DoctorApplication.svc/REST/GtMyReferredPatient', 'DoctorApplication.svc/REST/GtMyReferredPatient',
body: _verifyreferraldoctorremarks.toJson(),//_requestAddReferredDoctorRemarks.toJson(), body: _verifyreferraldoctorremarks.toJson(),//_requestAddReferredDoctorRemarks.toJson(),
onSuccess: (dynamic body, int statusCode) { onSuccess: (dynamic body, int statusCode) {
listMyReferredPatientModel[ listMyReferredPatientModel[
listMyReferredPatientModel.indexOf(model)] = model; listMyReferredPatientModel.indexOf(model)] = model;
notifyListeners(); notifyListeners();
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -11,7 +11,7 @@ import 'package:provider/provider.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
class MyReferredPatient extends StatelessWidget { class MyReferredPatient extends StatelessWidget {
MyReferredPatientProvider referredPatientProvider; MyReferredPatientProvider referredPatientProvider;
@override @override
@ -24,45 +24,45 @@ class MyReferredPatient extends StatelessWidget {
body: referredPatientProvider.isLoading body: referredPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referredPatientProvider.isError : referredPatientProvider.isError
? Center( ? Center(
child: AppText( child: AppText(
referredPatientProvider.error, referredPatientProvider.error,
color: Theme.of(context).errorColor, color: Theme.of(context).errorColor,
),
)
: referredPatientProvider.listMyReferredPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider.listMyReferredPatientModel.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
), ),
) ),
],
: referredPatientProvider.listMyReferredPatientModel.length == 0 ),
? Center( ],
child: AppText( ),
TranslationBase.of(context).errorNoSchedule, ),
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider.listMyReferredPatientModel.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
),
),
],
),
],
),
),
); );
} }
} }

@ -1,4 +1,8 @@
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -13,6 +17,7 @@ import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart'; import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart'; import '../../../../widgets/shared/profile_image_widget.dart';
import 'lab_result_secreen.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -44,12 +49,6 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
// String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
// int inOutpatientType = 1;
// if (type == '0') {
// inOutpatientType = 2;
// }
// print(type);
LabOrdersReqModel labOrdersReqModel = LabOrdersReqModel( LabOrdersReqModel labOrdersReqModel = LabOrdersReqModel(
patientID: patient.patientId, patientID: patient.patientId,
projectID: patient.projectId, projectID: patient.projectId,
@ -88,61 +87,150 @@ class _LabOrdersScreenState extends State<LabOrdersScreen> {
0, 0,
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
0), 0),
child: ListView.builder( child: Container(
itemCount: margin: EdgeInsets.symmetric(vertical: 10),
patientsProv.patientLabResultOrdersList.length, decoration: BoxDecoration(
itemBuilder: (BuildContext ctxt, int index) { color: Colors.white,
return InkWell( borderRadius: BorderRadius.all(
child: CardWithBgWidget( Radius.circular(20.0),
widget: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, ),
children: <Widget>[ child: ListView.builder(
Row( itemCount:
children: <Widget>[ patientsProv.patientLabResultOrdersList.length,
ProfileImageWidget( itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LabResult(
labOrders: patientsProv
.patientLabResultOrdersList[index],
),
),
);
},
child: Container(
padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10)),
border: Border(
bottom: BorderSide(
color: Colors.grey, width: 0.5),
top: BorderSide(
color: Colors.grey, width: 0.5),
left: BorderSide(
color: Colors.grey, width: 0.5),
right: BorderSide(
color: Colors.grey, width: 0.5),
),
),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
LargeAvatar(
url: patientsProv url: patientsProv
.patientLabResultOrdersList[ .patientLabResultOrdersList[
index] index]
.doctorImageURL), .doctorImageURL,
Expanded( name: patientsProv
child: Padding( .patientLabResultOrdersList[
padding: const EdgeInsets.fromLTRB( index]
8, 0, 0, 0), .doctorName,
child: Column( ),
crossAxisAlignment: Expanded(
CrossAxisAlignment.start, child: Padding(
children: <Widget>[ padding:
AppText( const EdgeInsets.fromLTRB(
'${patientsProv.patientLabResultOrdersList[index].doctorName}', 8, 0, 0, 0),
fontSize: 2.5 * child: Column(
SizeConfig.textMultiplier, crossAxisAlignment:
fontWeight: FontWeight.bold, CrossAxisAlignment.start,
), children: <Widget>[
SizedBox( AppText(
height: 8, '${patientsProv.patientLabResultOrdersList[index].doctorName}',
), fontSize: 1.7 *
AppText( SizeConfig
' ${patientsProv.patientLabResultOrdersList[index].clinicName}', .textMultiplier,
fontSize: 2 * fontWeight: FontWeight.w600,
SizeConfig.textMultiplier, ),
color: Theme.of(context) SizedBox(
.primaryColor, height: 8,
), ),
SizedBox( AppText(
height: 8, ' ${patientsProv.patientLabResultOrdersList[index].projectName}',
), fontSize: 2 *
], SizeConfig
.textMultiplier,
color: Colors.grey[800]),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
' Invoice No :',
fontSize: 2 *
SizeConfig
.textMultiplier,
color: Colors.grey[800],
),
AppText(
' ${patientsProv.patientLabResultOrdersList[index].invoiceNo}',
fontSize: 2 *
SizeConfig
.textMultiplier,
color: Colors.grey[800],
),
],
)
],
),
), ),
)
],
),
SizedBox(
height: 3,
),
Divider(
color: Colors.grey,
),
SizedBox(
height: 3,
),
Row(
children: <Widget>[
Icon(
EvaIcons.calendar,
color: Colors.grey[700],
), ),
) SizedBox(
], width: 10,
), ),
], Expanded(
child: AppText(
'${Helpers.getDate(patientsProv.patientLabResultOrdersList[index].createdOn)}',
fontSize: 2.0 *
SizeConfig.textMultiplier,
),
)
],
)
],
),
), ),
), );
onTap: () {}, }),
); ),
}),
), ),
); );
} }

@ -0,0 +1,86 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/doctor/lab_result_widget.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_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LabResult extends StatefulWidget {
final LabOrdersResModel labOrders;
LabResult({Key key, this.labOrders});
@override
_LabResultState createState() => _LabResultState();
}
class _LabResultState extends State<LabResult> {
PatientsProvider patientsProv;
bool _isInit = true;
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (_isInit) {
patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getLabResult(widget.labOrders);
// getLabResultOrders(context);
}
_isInit = false;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "Lab Orders",
showAppDrawer: false,
showBottomBar: false,
body: patientsProv.isLoading
? DrAppCircularProgressIndeicator()
: patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.labResultList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Orders')
: Container(
margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05,
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView(
children: <Widget>[
CardWithBgWidgetNew(
widget: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
' Invoice No :',
fontSize:
2 * SizeConfig.textMultiplier,
color: Colors.grey[800],
),
AppText(
' ${widget.labOrders.invoiceNo}',
fontSize:
2 * SizeConfig.textMultiplier,
color: Colors.grey[800],
),
],
),
),
CardWithBgWidgetNew(widget: LabResultWidget(labResult: patientsProv.labResultList,))
],
),
),
);
}
}

@ -1,3 +1,6 @@
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -92,42 +95,34 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
child: ListView.builder( child: ListView.builder(
itemCount: itemCount:
patientsProv.patientPrescriptionsList.length, patientsProv.patientPrescriptionsList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return InkWell(
child: CardWithBgWidget( child: CardWithBgWidgetNew(
widget: Column( widget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget( LargeAvatar(
url: patientsProv url: patientsProv.patientPrescriptionsList[index].doctorImageURL,name:patientsProv.patientPrescriptionsList[index].doctorName ,radius: 10,width: 70,),
.patientPrescriptionsList[index]
.doctorImageURL),
Expanded( Expanded(
child: Padding( child: Container(
padding: const EdgeInsets.fromLTRB( margin: EdgeInsets.only(left: 15,right: 15),
8, 0, 0, 0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'${patientsProv.patientPrescriptionsList[index].doctorName}', '${patientsProv.patientPrescriptionsList[index].name}',
fontSize: 2.5 * fontSize: 2.5 * SizeConfig.textMultiplier,
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', ' ${patientsProv.patientPrescriptionsList[index].clinicDescription}',
fontSize: 2 * fontSize: 2.5 * SizeConfig.textMultiplier,
SizeConfig color: Theme.of(context).primaryColor),
.textMultiplier,
color: Theme.of(context)
.primaryColor),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

@ -1,143 +1,180 @@
import 'package:charts_flutter/flutter.dart' as charts; import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_ding_chart_and_detials.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class BodyMeasurementsScreen extends StatelessWidget { class BodyMeasurementsScreen extends StatelessWidget {
BodyMeasurementsScreen(); BodyMeasurementsScreen();
List<VitalSignResModel> vitalList; // ;
PatientsProvider patientsProv;
List<VitalSignResModel> vitalList = [];
String pageTitle;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
_seriesData = List<charts.Series<Pollution, String>>(); patientsProv = Provider.of<PatientsProvider>(context);
_seriesPieData = List<charts.Series<Task, String>>(); final routeArgs = ModalRoute.of(context).settings.arguments as Map;
_seriesLineData = List<charts.Series<Sales, int>>(); pageTitle = routeArgs['title'];
_generateData(); var pageKey = routeArgs['key'];
return AppScaffold( List<Map> VSchart;
appBarTitle: 'Body Measurements', vitalList = patientsProv.patientVitalSignOrderdSubList;
body: RoundedContainer( switch (pageKey) {
height: SizeConfig.realScreenHeight*0.4, case vitalSignDetails.bodyMeasurements:
child: Padding( VSchart = [
padding: EdgeInsets.all(8.0), {
child: Container( 'name': 'Highet',
child: Center( 'title1': 'Date',
child: Column( 'title2': 'Cm',
children: <Widget>[ 'viewKey': 'HeightCm',
Text( },
'Body Mass Index', {
style: TextStyle( 'name': 'Weight Kg',
fontSize: 24.0, fontWeight: FontWeight.bold), 'title1': 'Date',
), 'title2': 'Kg',
Expanded( 'viewKey': 'WeightKg',
child: charts.BarChart( },
_seriesData, {
animate: true, 'name': 'BodyMassIndex',
barGroupingType: charts.BarGroupingType.grouped, 'title1': 'Date',
// behaviors: [new charts.SeriesLegend()], 'title2': 'BodyMass',
// primaryMeasureAxis: , 'viewKey': 'BodyMassIndex',
animationDuration: Duration(seconds: 1), },
), {
), 'name': 'HeadCircumCm',
], 'title1': 'Date',
), 'title2': 'Cm',
), 'viewKey': 'HeadCircumCm',
), },
), {
), 'name': 'Ideal Body Weight (Lbs)',
); 'title1': 'Date',
} 'title2': 'Ideal Weight',
'viewKey': 'IdealBodyWeightLbs',
},
{
'name': 'LeanBodyWeightLbs (Lbs)',
'title1': 'Date',
'title2': 'Lean Weight',
'viewKey': 'LeanBodyWeightLbs',
}
];
List<charts.Series<Pollution, String>> _seriesData; break;
List<charts.Series<Task, String>> _seriesPieData;
List<charts.Series<Sales, int>> _seriesLineData;
_generateData() { case vitalSignDetails.temperature:
var data1 = [ VSchart = [
new Pollution(1980, 'USA', 40), {
]; 'name': 'Temperature In Celcius',
'title1': 'Date',
'title2': 'C',
'viewKey': 'TemperatureCelcius',
},
];
_seriesData.add( break;
charts.Series( case vitalSignDetails.pulse:
domainFn: (Pollution pollution, _) => '', VSchart = [
measureFn: (Pollution pollution, _) => pollution.quantity, {
id: '2017', 'name': 'Pulse Beat Per Minute',
data: data1, 'title1': 'Date',
fillPatternFn: (_, __) => charts.FillPatternType.solid, 'title2': 'Minute',
fillColorFn: (Pollution pollution, _) => 'viewKey': 'PulseBeatPerMinute',
charts.ColorUtil.fromDartColor(Color(0xff990099)), },
), ];
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
_seriesData.add(
charts.Series(
domainFn: (Pollution pollution, _) => '',
measureFn: (Pollution pollution, _) => pollution.quantity,
id: '2017',
data: data1,
fillPatternFn: (_, __) => charts.FillPatternType.solid,
fillColorFn: (Pollution pollution, _) =>
charts.ColorUtil.fromDartColor(Color(0xff990099)),
),
);
break;
} case vitalSignDetails.pespiration:
} VSchart = [
{
'name': 'Respiration Beat Per Minute',
'title1': 'Date',
'title2': 'Beat Per Minute',
'viewKey': 'RespirationBeatPerMinute',
},
];
break;
case vitalSignDetails.bloodPressure:
VSchart = [
{
'name': 'Blood Pressure Higher',
'title1': 'Date',
'title2': 'Minute',
'viewKey': 'BloodPressureHigher',
},
{
'name': 'Blood Pressure Lower',
'title1': 'Date',
'title2': 'Minute',
'viewKey': 'BloodPressureLower',
}
];
break;
case vitalSignDetails.oxygenation:
VSchart = [
{
'name': 'FIO2',
'title1': 'Date',
'title2': 'Cm',
'viewKey': 'FIO2',
},
{
'name': 'SAO2',
'title1': 'Date',
'title2': 'Cm',
'viewKey': 'SAO2',
},
];
class Pollution { break;
String place; case vitalSignDetails.painScale:
int year; VSchart = [
int quantity; {
'name': 'PainScore',
'title1': 'Date',
'title2': 'Cm',
'viewKey': 'PainScore',
},
];
Pollution(this.year, this.place, this.quantity); break;
default:
}
// generateData();
return AppScaffold(
appBarTitle: pageTitle,
body: ListView(
children: VSchart.map((chartInfo) {
var vitalListTemp = vitalList.where((element) => element.toJson()[chartInfo['viewKey']] != null,);
return vitalListTemp.length !=0 ? VitalSingChartAndDetials(
vitalList: vitalList,
name: chartInfo['name'],
title1: chartInfo['title1'],
title2: chartInfo['title2'],
viewKey: chartInfo['viewKey']) : Container();
}).toList(),
),
);
}
} }
class Task { class LinearSales {
String task; final int year;
double taskvalue; final int sales;
Color colorval;
Task(this.task, this.taskvalue, this.colorval); LinearSales(this.year, this.sales);
} }
class Sales { /// Sample time series data type.
int yearval; class TimeSeriesSales {
int salesval; final DateTime time;
final int sales;
Sales(this.yearval, this.salesval); TimeSeriesSales(this.time, this.sales);
} }

@ -0,0 +1,39 @@
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/widgets/patients/vital_sign_details_wideget.dart';
import 'package:doctor_app_flutter/widgets/shared/charts/app_time_series_chart.dart';
import 'package:flutter/material.dart';
class VitalSingChartAndDetials extends StatelessWidget {
VitalSingChartAndDetials({
Key key,
@required this.vitalList,
@required this.name,
@required this.viewKey,
@required this.title1,
@required this.title2,
}) : super(key: key);
final List<VitalSignResModel> vitalList ;
final String name;
final String viewKey;
final String title1;
final String title2;
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
AppTimeSeriesChart(
vitalList: vitalList,
chartName: name,
viewKey: viewKey,
),
VitalSignDetailsWidget(
vitalList: vitalList.reversed.toList(),
title1: '${title1}',
title2: '${title2}',
viewKey: '${viewKey}',
),
],
);
}
}

@ -1,16 +1,18 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart'; import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../../config/size_config.dart'; import '../../../../config/size_config.dart';
import '../../../../models/patient/vital_sign_res_model.dart'; import '../../../../models/patient/vital_sign_res_model.dart';
import '../../../../widgets/patients/profile/profile_medical_info_widget.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
class VitalSignDetailsScreen extends StatefulWidget { class VitalSignDetailsScreen extends StatefulWidget {
@ -73,54 +75,202 @@ class _VitalSignDetailsScreenState extends State<VitalSignDetailsScreen> {
vitalSing = routeArgs['vitalSing']; vitalSing = routeArgs['vitalSing'];
return AppScaffold( return AppScaffold(
appBarTitle: "vital Sing ", appBarTitle: "vital Sing ",
body: CustomScrollView( isloading: patientsProv.isLoading,
primary: false, body: Container(
slivers: <Widget>[ child: Column(
SliverPadding( children: <Widget>[
padding: const EdgeInsets.all(10), Row(
sliver: SliverGrid.count(
childAspectRatio: 0.7,
crossAxisSpacing: 10,
mainAxisSpacing: 0,
crossAxisCount: 3,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: (){ onTap: () {
Navigator.of(context).pushNamed(BODY_MEASUREMENTS); Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'Body Measurements',
'key': vitalSignDetails.bodyMeasurements
});
}, },
child: CircleAvatarWidget( child: Expanded(
des: 'Body Measurements', child: VitalSignItem(
url: url + 'heartbeat.png', des: 'Body Measurements',
url: url + 'heartbeat.png',
lastVal: '137',
unit: 'Cm',
),
), ),
), ),
CircleAvatarWidget( InkWell(
des: 'Temperature', onTap: () {
url: url + 'heartbeat.png', Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'Temperature',
'key': vitalSignDetails.temperature
});
},
child: Expanded(
child: VitalSignItem(
des: 'Temperature',
url: url + 'heartbeat.png',
),
),
), ),
CircleAvatarWidget( ],
des: 'Pulse', ),
url: url + 'heartbeat.png', Row(
children: <Widget>[
InkWell(
onTap: () {
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'pulse',
'key': vitalSignDetails.pulse
});
},
child: VitalSignItem(
des: 'Pulse',
url: url + 'heartbeat.png',
),
), ),
CircleAvatarWidget( InkWell(
des: 'Respiration', onTap: () {
url: url + 'heartbeat.png', Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'pespiration',
'key': vitalSignDetails.pespiration
});
},
child: VitalSignItem(
des: 'Respiration',
url: url + 'heartbeat.png',
),
), ),
CircleAvatarWidget( ],
des: 'Blood Pressure', ),
url: url + 'heartbeat.png', Row(
children: <Widget>[
InkWell(
onTap: () {
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'Blood Pressure',
'key': vitalSignDetails.bloodPressure
});
},
child: VitalSignItem(
des: 'Blood Pressure',
url: url + 'heartbeat.png',
),
), ),
CircleAvatarWidget( InkWell(
des: 'Oxygenation', onTap: () {
url: url + 'heartbeat.png', Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'Oxygenation',
'key': vitalSignDetails.oxygenation
});
},
child: VitalSignItem(
des: 'Oxygenation',
url: url + 'heartbeat.png',
),
), ),
CircleAvatarWidget( ],
des: 'Pain Scale', ),
url: url + 'heartbeat.png', Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
Navigator.of(context).pushNamed(BODY_MEASUREMENTS,
arguments: {
'title': 'Pain Scale',
'key': vitalSignDetails.painScale
});
},
child: VitalSignItem(
des: 'Pain Scale',
url: url + 'heartbeat.png',
),
), ),
], ],
), ),
],
),
));
}
}
class VitalSignItem extends StatelessWidget {
const VitalSignItem(
{Key key,
@required this.url,
@required this.des,
this.lastVal = 'N/A',
this.unit = '',
this.height,
this.width})
: super(key: key);
final String url;
final String des;
final String lastVal;
final String unit;
final double height;
final double width;
@override
Widget build(BuildContext context) {
return RoundedContainer(
margin: 0.025 * SizeConfig.realScreenWidth,
height: 0.14 * SizeConfig.realScreenHeight,
width: 0.45 * SizeConfig.realScreenWidth,
child: Container(
padding: EdgeInsets.all(5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 2,
child: Text(
des,
style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold),
),
), ),
Expanded(
flex: 1,
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Image.asset(
url,
height: SizeConfig.heightMultiplier * 7,
),
),
Expanded(
child: RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
new TextSpan(text: lastVal),
new TextSpan(
text: ' ${unit}',
style:
TextStyle(color: Theme.of(context).primaryColor)),
],
),
))
],
),
)
], ],
)); ),
),
);
} }
} }

@ -402,6 +402,10 @@ class _VerifyAccountState extends State<VerifyAccount> {
} }
}).catchError((err) { }).catchError((err) {
print('$err'); print('$err');
changeLoadingStata(false);
print('$err');
helpers.showErrorToast();
}); });
} }
} }

@ -0,0 +1,174 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/lab_result.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class LabResultWidget extends StatefulWidget {
final List<LabResult> labResult;
LabResultWidget({Key key, this.labResult});
@override
_LabResultWidgetState createState() => _LabResultWidgetState();
}
class _LabResultWidgetState extends State<LabResultWidget> {
bool _showDetails = true;
@override
Widget build(BuildContext context) {
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'General Result',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
InkWell(
onTap: () {
setState(() {
_showDetails = !_showDetails;
});
},
child: Icon(_showDetails
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down)),
],
),
Divider(
color: Colors.grey,
height: 0.5,
),
!_showDetails
? Container()
: AnimatedContainer(
duration: Duration(microseconds: 200),
child: Container(
margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
),
child: Column(
children: widget.labResult.map((result) {
return Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10)),
border: Border(
bottom: BorderSide(
color: Colors.grey, width: 0.5),
top: BorderSide(
color: Colors.grey, width: 0.5),
left: BorderSide(
color: Colors.grey, width: 0.5),
right: BorderSide(
color: Colors.grey, width: 0.5),
),
),
margin: EdgeInsets.only(top: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
'Description',
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
color: Hexcolor('#515B5D'),
child: Center(
child: Texts('Value', color: Colors.white),
),
height: 60),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts('Range', color: Colors.white),
),
height: 60),
),
],
),
Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
'${result.description}',
color: Colors.grey[800],
),
),
height: 60,
),
),
Expanded(
child: Container(
child: Center(
child: Texts(
'${result.resultValue}',
color: Colors.grey[800]),
),
height: 60),
),
Expanded(
child: Container(
child: Center(
child: Texts(
'${result.referenceRange}',
color: Colors.grey[800]),
),
height: 60),
),
],
)
],
),
);
}).toList(),
),
),
)
],
),
);
}
}

@ -5,23 +5,33 @@ import 'package:flutter/material.dart';
import 'avatar_gradients.dart'; import 'avatar_gradients.dart';
class LargeAvatar extends StatelessWidget { class LargeAvatar extends StatelessWidget {
LargeAvatar({Key key, this.name, this.url, this.disableProfileView: false}) LargeAvatar(
{Key key,
this.name,
this.url,
this.disableProfileView: false,
this.radius = 60.0,
this.width = 90,
this.height = 90})
: super(key: key); : super(key: key);
final String name; final String name;
final String url; final String url;
final bool disableProfileView; final bool disableProfileView;
final double radius;
final double width;
final double height;
Widget _getAvatar() { Widget _getAvatar() {
if (url != null && url.isNotEmpty && Uri.parse(url).isAbsolute) { if (url != null && url.isNotEmpty && Uri.parse(url).isAbsolute) {
return Center( return Center(
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(60.0)), borderRadius: BorderRadius.all(Radius.circular(radius)),
child: Image.network( child: Image.network(
url.trim(), url.trim(),
fit: BoxFit.cover, fit: BoxFit.cover,
width: 90.0, width: width,
height: 90.0, height: height,
), ),
), ),
); );
@ -35,7 +45,9 @@ class LargeAvatar extends StatelessWidget {
return Center( return Center(
child: AppText( child: AppText(
name[0].toUpperCase(), name[0].toUpperCase(),
color: Colors.white,fontSize: 18,fontWeight: FontWeight.bold, color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
)); ));
} }
} }
@ -50,24 +62,23 @@ class LargeAvatar extends StatelessWidget {
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment(-1, -1), begin: Alignment(-1, -1),
end: Alignment(1, 1), end: Alignment(1, 1),
colors: [ colors: [
Colors.grey[100], Colors.grey[100],
Colors.grey[800], Colors.grey[800],
] ]),
), boxShadow: [
boxShadow: [ BoxShadow(
BoxShadow( color: Color.fromRGBO(0, 0, 0, 0.08),
color: Color.fromRGBO(0, 0, 0, 0.08), offset: Offset(0.0, 5.0),
offset: Offset(0.0, 5.0), blurRadius: 16.0)
blurRadius: 16.0) ],
], borderRadius: BorderRadius.all(Radius.circular(50.0)),
borderRadius: BorderRadius.all(Radius.circular(50.0)), ),
), width: width,
width: 90.0, height: height,
height: 90.0,
child: _getAvatar()), child: _getAvatar()),
); );
} }

@ -0,0 +1,118 @@
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class VitalSignDetailsWidget extends StatefulWidget {
final List<VitalSignResModel> vitalList;
final String title1;
final String title2;
final String viewKey;
VitalSignDetailsWidget({Key key, this.vitalList, this.title1, this.title2,this.viewKey});
@override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
}
class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
margin: EdgeInsets.all(20),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
),
),
child: Center(
child: Texts(
widget.title1,
color: Colors.white,
),
),
height: 60,
),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Hexcolor('#515B5D'),
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
),
),
child: Center(
child: Texts(widget.title2, color: Colors.white),
),
height: 60),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.vitalList.map((vital) {
return Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(
height: 50,
color: Colors.white,
child: Center(
child: Texts(
'${Helpers.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${Helpers.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ',
textAlign: TextAlign.center,
),
),
),
),
SizedBox(
width: 2,
),
Expanded(
child: Container(
height: 50,
color: Colors.white,
child: Center(
child: Texts(
'${vital.toJson()[widget.viewKey]}',
textAlign: TextAlign.center,
),
),
),
),
],
),
SizedBox(
height: 2,
),
],
);
}).toList(),
),
],
),
),
);
}
}

@ -20,22 +20,21 @@ class CardWithBgWidgetNew extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectProvider projectProvider = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 10.0), margin: EdgeInsets.symmetric(vertical: 10.0),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(20.0), Radius.circular(10.0),
),
), ),
),
child: Material( child: Material(
borderRadius: BorderRadius.all(Radius.circular(20.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Hexcolor('#FFFFFF'), color: Hexcolor('#FFFFFF'),
child: Stack( child: Stack(
children: [ children: [
Container( Container(
padding: EdgeInsets.all(15.0), padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 10), margin: EdgeInsets.only(left: 10),
child: widget) child: widget)
], ],

@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
class AppLineChart extends StatelessWidget {
const AppLineChart({
Key key,
@required this.seriesList,
this.chartTitle,
}) : super(key: key);
final List<charts.Series> seriesList;
final String chartTitle;
@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: <Widget>[
Text(
'Body Mass Index',
style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold),
),
Expanded(
child: charts.LineChart(seriesList,
defaultRenderer: new charts.LineRendererConfig(
includeArea: false, stacked: true),
animate: true),
),
],
),
);
}
}

@ -0,0 +1,93 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_res_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/body_measurements_screen.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/material.dart';
class AppTimeSeriesChart extends StatelessWidget {
AppTimeSeriesChart(
{Key key,
@required this.vitalList,
@required this.viewKey,
this.chartName = ''});
final List<VitalSignResModel> vitalList;
final String chartName;
final String viewKey;
List<charts.Series> seriesList;
@override
Widget build(BuildContext context) {
seriesList = generateData();
return RoundedContainer(
height: SizeConfig.realScreenHeight * 0.47,
child: Column(
children: <Widget>[
Text(
chartName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 3),
),
Container(
height: SizeConfig.realScreenHeight * 0.37,
child: Center(
child: Expanded(
child: charts.TimeSeriesChart(
seriesList,
animate: true,
behaviors: [
new charts.RangeAnnotation(
[
new charts.RangeAnnotationSegment(
DateTime(
vitalList[vitalList.length - 1]
.vitalSignDate
.year,
vitalList[vitalList.length - 1]
.vitalSignDate
.month +
3,
vitalList[vitalList.length - 1]
.vitalSignDate
.day),
vitalList[0].vitalSignDate,
charts.RangeAnnotationAxisType.domain),
],
),
],
),
),
),
),
],
),
);
}
generateData() {
final List<TimeSeriesSales> data = [];
if (vitalList.length > 0) {
vitalList.forEach(
(element) {
data.add(
TimeSeriesSales(
new DateTime(element.vitalSignDate.year,
element.vitalSignDate.month, element.vitalSignDate.day),
element.toJson()[viewKey].toInt(),
),
);
},
);
}
return [
new charts.Series<TimeSeriesSales, DateTime>(
id: 'Sales',
domainFn: (TimeSeriesSales sales, _) => sales.time,
measureFn: (TimeSeriesSales sales, _) => sales.sales,
data: data,
)
];
}
}

@ -277,6 +277,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.7" version: "1.0.7"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.4"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -462,6 +469,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.4" version: "1.6.4"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save