patient profile details
parent
bd24b7c196
commit
1f5bca3adc
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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,))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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(),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue