working on UCAF design

pull/218/head
mosazaid 5 years ago
parent 00e2bb616d
commit 4b5bec8c50

@ -431,4 +431,6 @@ const Map<String, Map<String, String>> localizedValues = {
'itemExist': {'en': "This item already exist", 'ar':"هذا العنصر موجود" },
'selectAllergy': {'en': "Select Allergy", 'ar':"أختر الحساسية" },
'selectSeverity': {'en': "Select Severity", 'ar':"أختر الدرجه" },
'medications': {'en': "Medications", 'ar':"الأدوية" },
'procedures': {'en': "Procedures", 'ar':"الإجراءات" },
};

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart';
@ -91,6 +92,7 @@ const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request';
const String PATIENT_ADMISSION_REQUEST_2 = 'patients/admission-request-second';
const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third';
const String PATIENT_UCAF_REQUEST = 'patients/ucaf';
const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail';
const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
@ -155,4 +157,5 @@ var routes = {
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(),
PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(),
};

@ -0,0 +1,107 @@
import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class UcafDetailScreen extends StatefulWidget {
@override
_UcafDetailScreenState createState() => _UcafDetailScreenState();
}
class _UcafDetailScreenState extends State<UcafDetailScreen> {
int _activeTap = 1;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
final screenSize = MediaQuery.of(context).size;
return BaseView<UcafViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).ucaf,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientHeaderWidgetNoAvatar(patient),
SizedBox(
height: 10,
),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column(
children: [
treatmentStepsBar(context, screenSize),
SizedBox(
height: 16,
),
],
),
),
],
),
),
),
));
}
Widget treatmentStepsBar(BuildContext _context, Size screenSize) {
List<String> __treatmentSteps = [
TranslationBase.of(context).diagnosis.toUpperCase(),
TranslationBase.of(context).medications.toUpperCase(),
TranslationBase.of(context).procedures.toUpperCase(),
];
return Container(
height: screenSize.height * 0.070,
decoration:
Helpers.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC)),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: __treatmentSteps.map((item) {
bool _isActive = __treatmentSteps[_activeTap] == item ? true : false;
return Expanded(
child: InkWell(
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration: Helpers.containerBorderDecoration(
_isActive ? HexColor("#B8382B") : Colors.white,
_isActive ? HexColor("#B8382B") : Colors.white),
child: Center(
child: Text(
item,
style: TextStyle(
fontSize: 12,
color: _isActive
? Colors.white
: Colors.black, //Colors.black,
fontWeight: FontWeight.bold,
),
),
)),
),
onTap: () {
print(__treatmentSteps.indexOf(item));
setState(() {
_activeTap = __treatmentSteps.indexOf(item);
});
},
),
);
}).toList(),
),
);
}
}

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -12,6 +13,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../../routes.dart';
class UCAFInputScreen extends StatefulWidget {
@override
_UCAFInputScreenState createState() => _UCAFInputScreenState();
@ -58,7 +61,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
body: SingleChildScrollView(
child: Column(
children: [
PatientHeaderWidget(patient),
PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column(
@ -349,7 +352,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
title: TranslationBase.of(context).next,
color: HexColor("#B8382B"),
onPressed: (){
// Navigator.of(context).pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: {'patient': patient});
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, arguments: {'patient': patient});
},
),
],
@ -362,72 +365,3 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
);
}
}
class PatientHeaderWidget extends StatelessWidget {
final PatiantInformtion patient;
PatientHeaderWidget(this.patient);
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
Row(
children: [
AppText(
"VIP",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
SizedBox(
width: 8,
),
AppText(
" ${patient.age}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
AppText(
"NEW VISIT",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${patient.companyName}",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
Icon(
Icons.info_outline,
color: Colors.black,
),
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
],
);
}
}

@ -19,7 +19,7 @@ import 'package:hexcolor/hexcolor.dart';
import '../../../QR_reader_screen.dart';
class PatientMakeReferralScreen extends StatefulWidget {
// previous design page is: MyReferralPatient
// previous design page is: ReferPatientScreen
@override
_PatientMakeReferralScreenState createState() =>
_PatientMakeReferralScreenState();

@ -455,6 +455,8 @@ class TranslationBase {
String get createNew => localizedValues['createNew'][locale.languageCode];
String get update => localizedValues['update'][locale.languageCode];
String get episode => localizedValues['episode'][locale.languageCode];
String get medications => localizedValues['medications'][locale.languageCode];
String get procedures => localizedValues['procedures'][locale.languageCode];
String get chiefComplaints=> localizedValues['chiefComplaints'][locale.languageCode];

@ -0,0 +1,73 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class PatientHeaderWidgetNoAvatar extends StatelessWidget {
final PatiantInformtion patient;
PatientHeaderWidgetNoAvatar(this.patient);
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.all(16),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
Row(
children: [
AppText(
"VIP",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.2,
),
SizedBox(
width: 8,
),
AppText(
" ${patient.age}",
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
AppText(
"NEW VISIT",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
AppText(
"${patient.companyName}",
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.0,
),
],
),
),
Icon(
Icons.info_outline,
color: Colors.black,
),
],
),
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
],
);
}
}

@ -454,7 +454,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
version: "0.6.2"
json_annotation:
dependency: transitive
description:
@ -496,7 +496,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -753,7 +753,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
@ -888,5 +888,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <=2.11.0-213.1.beta"
dart: ">=2.10.0 <2.11.0"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save