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: *@return:
*@desc: getPatientPrescriptions *@desc: getPatientPrescriptions
*/ */
getPatientPrescriptions(patient) async { getOutPatientPrescriptions(patient) async {
// isLoading = true; // isLoading = true;
// notifyListeners(); // notifyListeners();
setBasicData(); setBasicData();

@ -12,9 +12,7 @@ import '../../../../providers/patients_provider.dart';
import '../../../../util/dr_app_shared_pref.dart'; import '../../../../util/dr_app_shared_pref.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/app_texts_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/dr_app_circular_progress_Indeicator.dart';
import '../../../../widgets/shared/profile_image_widget.dart';
import '../../../../widgets/shared/errors/dr_app_embedded_error.dart'; import '../../../../widgets/shared/errors/dr_app_embedded_error.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -47,12 +45,8 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
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); String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
// int inOutpatientType = 1;
// if (type == '0') {
// inOutpatientType = 2;
// }
// print(type);
PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel( PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel(
patientID: patient.patientId, patientID: patient.patientId,
projectID: patient.projectId, projectID: patient.projectId,
@ -60,7 +54,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
patientTypeID: patient.patientType, patientTypeID: patient.patientType,
languageID: 2, languageID: 2,
setupID: 0); setupID: 0);
patientsProv.getPatientPrescriptions(prescriptionReqModel.toJson()); patientsProv.getOutPatientPrescriptions(prescriptionReqModel.toJson());
} }
@override @override
@ -120,7 +114,7 @@ class _PrescriptionScreenState extends State<PrescriptionScreen> {
height: 8, height: 8,
), ),
AppText( AppText(
' ${patientsProv.patientPrescriptionsList[index].clinicDescription}', '${patientsProv.patientPrescriptionsList[index].clinicDescription}',
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 2.5 * SizeConfig.textMultiplier,
color: Theme.of(context).primaryColor), color: Theme.of(context).primaryColor),
SizedBox( 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:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -88,68 +90,106 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
0, 0,
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
0), 0),
child: ListView.builder( child: Container(
itemCount: patientsProv.patientRadiologyList.length, margin: EdgeInsets.symmetric(vertical: 10),
itemBuilder: (BuildContext ctxt, int index) { decoration: BoxDecoration(
return InkWell( color: Colors.white,
child: CardWithBgWidget( borderRadius: BorderRadius.all(
widget: Column( Radius.circular(20.0),
crossAxisAlignment: CrossAxisAlignment.start, ),
children: <Widget>[ ),
Row( child: ListView.builder(
children: <Widget>[ itemCount: patientsProv.patientRadiologyList.length,
ProfileImageWidget( 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 url: patientsProv
.patientRadiologyList[index] .patientRadiologyList[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.patientRadiologyList[index].doctorName}', 8, 0, 0, 0),
fontSize: 2.5 * 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 SizeConfig
.textMultiplier, .textMultiplier,
fontWeight: color: Theme.of(context)
FontWeight.bold), .primaryColor,
SizedBox( ),
height: 8, 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,
),
],
), ),
), )
) ],
], ),
), ],
], ),
), ),
), );
onTap: () {}, }),
); ),
}),
), ),
); );
} }

@ -75,113 +75,54 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
children: [ children: [
TableRow( TableRow(
children: [ children: [
Expanded( Container(
child: Container( margin: EdgeInsets.all(2.5),
margin: EdgeInsets.all(2.5), padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( 'File No',
'File No', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), AppText(
AppText( '${widget.myReferralPatientModel.referringDoctor}',
'${widget.myReferralPatientModel.referringDoctor}', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.w300,
fontWeight: FontWeight.w300, )
) ],
],
),
), ),
), ),
Expanded( Container(
child: Container( margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( 'Referring Doctor',
'Referring Doctor', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), AppText(
AppText( widget.myReferralPatientModel
widget.myReferralPatientModel .referringClinicDescription,
.referringClinicDescription, fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.w300,
fontWeight: FontWeight.w300, )
) ],
],
),
), ),
) ),
] ]
), ),
TableRow( TableRow(
children: [ children: [
Expanded( Container(
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(
margin: EdgeInsets.all(2.5), margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
@ -189,13 +130,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Priority', 'Referring Clinic',
fontSize: fontSize:
1.7 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
'${widget.myReferralPatientModel.priorityDescription}', '${widget.myReferralPatientModel.referringClinicDescription}',
fontSize: fontSize:
1.7 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
@ -203,9 +144,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
), Container(
Expanded(
child: Container(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
@ -213,21 +152,69 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Max Response Time', 'Frequency',
fontSize: fontSize:
1.7 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
Helpers.getDateFormatted(widget widget.myReferralPatientModel
.myReferralPatientModel .frequencyDescription,
.mAXResponseTime),
fontSize: fontSize:
1.7 * SizeConfig.textMultiplier, 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, 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: [ children: [
TableRow(children: [ TableRow(children: [
Expanded( Container(
child: Container( margin: EdgeInsets.all(2.5),
margin: EdgeInsets.all(2.5), padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), decoration: BoxDecoration(),
decoration: BoxDecoration(), child: Column(
child: Column( crossAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( 'File No',
'File No', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), AppText(
AppText( '${widget.myReferredPatientModel.patientId}',
'${widget.myReferredPatientModel.patientId}', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.w300,
fontWeight: FontWeight.w300, )
) ],
],
),
), ),
), ),
Expanded( Container(
child: Container( margin: EdgeInsets.only(
margin: EdgeInsets.only( left: 4,
left: 4, top: 2.5,
top: 2.5, right: 2.5,
right: 2.5, bottom: 2.5),
bottom: 2.5), padding: EdgeInsets.all(5),
padding: EdgeInsets.all(5), child: Column(
child: Column( crossAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( 'Referral Doctor',
'Referral Doctor', fontSize:
fontSize: 1.7 * SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, ),
), Texts(
Texts( widget.myReferredPatientModel
widget.myReferredPatientModel .referralDoctorName,
.referralDoctorName, maxLength: 80,
maxLength: 80, readMore: true,
readMore: true, ),
), ],
],
),
), ),
), ),
]), ]),
TableRow( TableRow(
children: [ children: [
Expanded( Container(
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(
margin: EdgeInsets.all(2.5), margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Priority', 'Referring Clinic',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
'${widget.myReferredPatientModel.priorityDescription}', '${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
) )
], ],
), ),
), ),
), Container(
Expanded(
child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 4, left: 4,
top: 2.5, top: 2.5,
@ -232,24 +169,75 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Max Response Time', 'Frequency',
fontSize: fontSize: 1.7 *
1.7 * SizeConfig.textMultiplier, SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
AppText( AppText(
Helpers.getDateFormatted(widget widget.myReferredPatientModel
.myReferredPatientModel .frequencyDescription,
.maxResponseTime), fontSize: 1.7 *
fontSize: SizeConfig.textMultiplier,
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300, 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