update design Radiology Screen and create Radiology Report Screen

merge-requests/96/head
Mohammad ALjammal 6 years ago
parent afefa0a035
commit c7ad16cbcd

@ -213,7 +213,7 @@ class PatientsProvider with ChangeNotifier
*@return:
*@desc: getPatientPrescriptions
*/
getPatientPrescriptions(patient) async {
getOutPatientPrescriptions(patient) async {
// isLoading = true;
// notifyListeners();
setBasicData();

@ -12,9 +12,7 @@ import '../../../../providers/patients_provider.dart';
import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
import '../../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
import '../../../../widgets/shared/errors/dr_app_embedded_error.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -47,12 +45,8 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String token = await sharedPref.getString(TOKEN);
// String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
// int inOutpatientType = 1;
// if (type == '0') {
// inOutpatientType = 2;
// }
// print(type);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel(
patientID: patient.patientId,
projectID: patient.projectId,
@ -60,7 +54,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
patientTypeID: patient.patientType,
languageID: 2,
setupID: 0);
patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson());
patientsProv.getOutPatientPrescriptions(prescriptionReqModel.toJson());
}
@override
@ -120,7 +114,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
height: 8,
),
AppText(
' ${patientsProv.patientPrescriptionsList[index].clinicDescription}',
'${patientsProv.patientPrescriptionsList[index].clinicDescription}',
fontSize: 2.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor),
SizedBox(

@ -0,0 +1,42 @@
import 'package:doctor_app_flutter/config/size_config.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RadiologyReportScreen extends StatelessWidget {
final String reportData;
RadiologyReportScreen({Key key, this.reportData});
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "Radiology Report",
showAppDrawer: false,
showBottomBar: false,
body: Container(
padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10)),
color: Colors.white,
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: AppText(reportData,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
),
);
}
}

@ -1,3 +1,5 @@
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_report_screen.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -88,68 +90,106 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
0,
SizeConfig.realScreenWidth * 0.05,
0),
child: ListView.builder(
itemCount: patientsProv.patientRadiologyList.length,
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
ProfileImageWidget(
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
),
child: ListView.builder(
itemCount: patientsProv.patientRadiologyList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => RadiologyReportScreen(reportData: patientsProv.patientRadiologyList[index].reportData,)),);
},
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
.patientRadiologyList[index]
.doctorImageURL),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(
8, 0, 0, 0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 *
.doctorImageURL,
name: patientsProv
.patientLabResultOrdersList[
index]
.doctorName,
),
Expanded(
child: Padding(
padding:
const EdgeInsets.fromLTRB(
8, 0, 0, 0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'${patientsProv.patientRadiologyList[index].doctorName}',
fontSize: 2.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold),
SizedBox(
height: 8,
),
AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 *
SizeConfig
.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold),
SizedBox(
height: 8,
),
AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 *
SizeConfig.textMultiplier,
),
SizedBox(
height: 8,
),
AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 *
SizeConfig.textMultiplier,
color: Theme.of(context)
.primaryColor,
),
SizedBox(
height: 8,
),
],
color: Theme.of(context)
.primaryColor,
),
SizedBox(
height: 8,
),
],
),
),
),
)
],
),
],
)
],
),
],
),
),
),
onTap: () {},
);
}),
);
}),
),
),
);
}

@ -75,113 +75,54 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
children: [
TableRow(
children: [
Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'File No',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferralPatientModel.referringDoctor}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'File No',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferralPatientModel.referringDoctor}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referring Doctor',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferralPatientModel
.referringClinicDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referring Doctor',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferralPatientModel
.referringClinicDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
),
]
),
TableRow(
children: [
Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referring Clinic',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferralPatientModel.referringClinicDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Frequency',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferralPatientModel
.frequencyDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
)
]
),
TableRow(
children: [
Expanded(
child: Container(
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
@ -189,13 +130,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
'Referring Clinic',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferralPatientModel.priorityDescription}',
'${widget.myReferralPatientModel.referringClinicDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
@ -203,9 +144,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
],
),
),
),
Expanded(
child: Container(
Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
@ -213,21 +152,69 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Max Response Time',
'Frequency',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferralPatientModel
.mAXResponseTime),
widget.myReferralPatientModel
.frequencyDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
]
),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferralPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Max Response Time',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferralPatientModel
.mAXResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
],

@ -86,144 +86,81 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
),
children: [
TableRow(children: [
Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'File No',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'File No',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referral Doctor',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referral Doctor',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
),
]),
TableRow(
children: [
Expanded(
child: Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Referring Clinic',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Frequency',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferredPatientModel
.frequencyDescription,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
)
],
),
TableRow(children: [
Expanded(
child: Container(
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
fontSize:
1.7 * SizeConfig.textMultiplier,
'Referring Clinic',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
),
Expanded(
child: Container(
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
@ -232,24 +169,75 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Max Response Time',
fontSize:
1.7 * SizeConfig.textMultiplier,
'Frequency',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel
.maxResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
widget.myReferredPatientModel
.frequencyDescription,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
],
),
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Max Response Time',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel
.maxResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
])

Loading…
Cancel
Save