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,23 +90,59 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
0, 0,
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
0), 0),
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(20.0),
),
),
child: ListView.builder( child: ListView.builder(
itemCount: patientsProv.patientRadiologyList.length, itemCount: patientsProv.patientRadiologyList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return InkWell(
child: CardWithBgWidget( onTap: () {
widget: Column( Navigator.push(
crossAxisAlignment: CrossAxisAlignment.start, 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>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
ProfileImageWidget( LargeAvatar(
url: patientsProv url: patientsProv
.patientRadiologyList[index] .patientRadiologyList[index]
.doctorImageURL), .doctorImageURL,
name: patientsProv
.patientLabResultOrdersList[
index]
.doctorName,
),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding:
const EdgeInsets.fromLTRB(
8, 0, 0, 0), 8, 0, 0, 0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
@ -123,7 +161,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
AppText( AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 * fontSize: 2 *
SizeConfig.textMultiplier, SizeConfig
.textMultiplier,
), ),
SizedBox( SizedBox(
height: 8, height: 8,
@ -131,7 +170,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
AppText( AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}', ' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 * fontSize: 2 *
SizeConfig.textMultiplier, SizeConfig
.textMultiplier,
color: Theme.of(context) color: Theme.of(context)
.primaryColor, .primaryColor,
), ),
@ -147,10 +187,10 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
], ],
), ),
), ),
onTap: () {},
); );
}), }),
), ),
),
); );
} }
} }

@ -75,8 +75,7 @@ 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(
@ -97,10 +96,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(
@ -122,13 +118,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
], ],
), ),
), ),
)
] ]
), ),
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(
@ -150,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(
@ -174,14 +166,12 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
) )
], ],
), ),
),
) )
] ]
), ),
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(
@ -203,9 +193,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(
@ -228,7 +216,6 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
) )
], ],
), ),
),
) )
], ],
), ),

@ -86,8 +86,7 @@ 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(),
@ -110,9 +109,7 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
), Container(
Expanded(
child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 4, left: 4,
top: 2.5, top: 2.5,
@ -138,12 +135,10 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
),
]), ]),
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(
@ -165,9 +160,7 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
), Container(
Expanded(
child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 4, left: 4,
top: 2.5, top: 2.5,
@ -193,13 +186,11 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
) )
], ],
), ),
),
) )
], ],
), ),
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),
child: Column( child: Column(
@ -221,9 +212,7 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
], ],
), ),
), ),
), Container(
Expanded(
child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 4, left: 4,
top: 2.5, top: 2.5,
@ -250,7 +239,6 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
) )
], ],
), ),
),
) )
]) ])
], ],

Loading…
Cancel
Save