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

@ -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,23 +90,59 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
0,
SizeConfig.realScreenWidth * 0.05,
0),
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 ctxt, int index) {
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
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>[
ProfileImageWidget(
LargeAvatar(
url: patientsProv
.patientRadiologyList[index]
.doctorImageURL),
.doctorImageURL,
name: patientsProv
.patientLabResultOrdersList[
index]
.doctorName,
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(
padding:
const EdgeInsets.fromLTRB(
8, 0, 0, 0),
child: Column(
crossAxisAlignment:
@ -123,7 +161,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
AppText(
'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}',
fontSize: 2 *
SizeConfig.textMultiplier,
SizeConfig
.textMultiplier,
),
SizedBox(
height: 8,
@ -131,7 +170,8 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
AppText(
' ${patientsProv.patientRadiologyList[index].clinicName}',
fontSize: 2 *
SizeConfig.textMultiplier,
SizeConfig
.textMultiplier,
color: Theme.of(context)
.primaryColor,
),
@ -147,10 +187,10 @@ class _RadiologyScreenState extends State<RadiologyScreen> {
],
),
),
onTap: () {},
);
}),
),
),
);
}
}

@ -75,8 +75,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
children: [
TableRow(
children: [
Expanded(
child: Container(
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
@ -97,10 +96,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(
@ -122,13 +118,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
],
),
),
)
]
),
TableRow(
children: [
Expanded(
child: Container(
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
@ -150,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(
@ -174,14 +166,12 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
)
],
),
),
)
]
),
TableRow(
children: [
Expanded(
child: Container(
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
@ -203,9 +193,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(
@ -228,7 +216,6 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
)
],
),
),
)
],
),

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

Loading…
Cancel
Save