remove patient type and arrival type form patient profile header

merge-requests/737/head
Elham Rababah 5 years ago
parent bc53ca7b8a
commit 411746da98

@ -185,7 +185,7 @@ class _EndCallScreenState extends State<EndCallScreen> {
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
widget.patient, arrivalType ?? '7', '1', widget.patient,
isInpatient: isInpatient, isInpatient: isInpatient,
height: (widget.patient.patientStatusType != null && height: (widget.patient.patientStatusType != null &&
widget.patient.patientStatusType == 43) widget.patient.patientStatusType == 43)

@ -32,8 +32,6 @@ class _HealthSummaryPageState extends State<HealthSummaryPage> {
AppScaffold( AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType.toString() ?? "0",
arrivalType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
isShowAppBar: true, isShowAppBar: true,

@ -104,8 +104,6 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
AppScaffold( AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patient.patientType.toString() ?? "0",
patient.arrivedOn.toString() ?? 0,
doctorName: doctorName, doctorName: doctorName,
profileUrl: doctorImage, profileUrl: doctorImage,
clinic: clinicName, clinic: clinicName,

@ -31,7 +31,7 @@ class ECGPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
appBar: PatientProfileAppBar(patient,arrivalType??'0',patientType), appBar: PatientProfileAppBar(patient),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),

@ -46,8 +46,6 @@ class _InsuranceApprovalScreenNewState
AppScaffold( AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType.toString() ?? "0",
patientType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
isShowAppBar: true, isShowAppBar: true,

@ -55,7 +55,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient.patientType.toString(), patient.arrivedOn), patient),
body: patient.admissionNo != null body: patient.admissionNo != null
? SingleChildScrollView( ? SingleChildScrollView(
child: Container( child: Container(

@ -48,7 +48,7 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: Column( body: Column(
children: [ children: [

@ -66,7 +66,7 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: model.patientVitalSignsHistory.length > 0 && body: model.patientVitalSignsHistory.length > 0 &&
model.patientChiefComplaintList != null && model.patientChiefComplaintList != null &&

@ -62,7 +62,7 @@ class _AdmissionRequestThirdScreenState
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {

@ -53,7 +53,7 @@ class _AdmissionRequestThirdScreenState
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {

@ -75,7 +75,7 @@ class _AdmissionRequestSecondScreenState
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {

@ -40,8 +40,7 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
widget.patient, widget.patient,
widget.patientType ?? "0",
widget.arrivalType ?? "0",
isFromLabResult: true, isFromLabResult: true,
appointmentDate: widget.patientLabOrders.orderDate, appointmentDate: widget.patientLabOrders.orderDate,
), ),

@ -54,8 +54,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patient.patientType.toString() ?? '0',
patientType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

@ -33,8 +33,6 @@ class MedicalReportDetailPage extends StatelessWidget {
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType,
arrivalType,
), ),
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(

@ -45,8 +45,6 @@ class MedicalReportPage extends StatelessWidget {
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType,
arrivalType,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

@ -90,8 +90,6 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
// appBarTitle: TranslationBase.of(context).progressNote, // appBarTitle: TranslationBase.of(context).progressNote,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patient.patientType.toString() ?? '0',
arrivalType,
isInpatient: true, isInpatient: true,
), ),
body: model.patientProgressNoteList == null || body: model.patientProgressNoteList == null ||

@ -103,8 +103,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Column( Column(
children: [ children: [
PatientProfileAppBar( PatientProfileAppBar(
patient, arrivalType ?? '0', patientType, patient,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare, isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && height: (patient.patientStatusType != null &&
patient.patientStatusType == 43) patient.patientStatusType == 43)

@ -37,8 +37,6 @@ class RadiologyDetailsPage extends StatelessWidget {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType ?? "0",
arrivalType ?? "0",
appointmentDate: finalRadiology.orderDate, appointmentDate: finalRadiology.orderDate,
doctorName: finalRadiology.doctorName, doctorName: finalRadiology.doctorName,
clinic: finalRadiology.clinicDescription, clinic: finalRadiology.clinicDescription,

@ -52,8 +52,6 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patient.patientType.toString() ?? '0',
arrivalType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
baseViewModel: model, baseViewModel: model,

@ -138,8 +138,6 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType,
arrivalType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

@ -75,7 +75,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(

@ -82,7 +82,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
PatientProfileAppBar(patient, '7', '7',isFromSOAP: true,), PatientProfileAppBar(patient),
Container( Container(
width: double.infinity, width: double.infinity,
height: 1, height: 1,

@ -41,7 +41,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
isShowAppBar: true, isShowAppBar: true,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient),
appBarTitle: TranslationBase.of(context).vitalSign, appBarTitle: TranslationBase.of(context).vitalSign,
body: mode.patientVitalSignsHistory.length > 0 body: mode.patientVitalSignsHistory.length > 0
? Column( ? Column(

@ -191,7 +191,7 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
backgroundColor: Color.fromRGBO(248, 248, 248, 1), backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patientType, arrivalType), patient,),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -45,7 +45,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient.patientType.toString(), patient.arrivedOn), patient),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(

@ -30,8 +30,6 @@ class PrescriptionItemsPage extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType??"0",
arrivalType??"0",
clinic: prescriptions.clinicDescription, clinic: prescriptions.clinicDescription,
branch: prescriptions.name, branch: prescriptions.name,
isPrescriptions: true, isPrescriptions: true,

@ -37,8 +37,6 @@ class PrescriptionsPage extends StatelessWidget {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
patientType ?? '0',
arrivalType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: patient.admissionNo == null body: patient.admissionNo == null

@ -46,8 +46,6 @@ class ProcedureScreen extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
arrivalType ?? '0',
patientType,
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

@ -36,8 +36,6 @@ class AddSickLeavScreen extends StatelessWidget {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
routeArgs['patientType'] ?? "0",
routeArgs['arrivalType'] ?? "0",
isInpatient: isInpatient, isInpatient: isInpatient,
), ),
body: SingleChildScrollView( body: SingleChildScrollView(

@ -27,8 +27,6 @@ class ShowSickLeaveScreen extends StatelessWidget {
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
appBar: PatientProfileAppBar( appBar: PatientProfileAppBar(
patient, patient,
routeArgs['patientType'] ?? "0",
routeArgs['arrivalType'] ?? "0",
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
@ -8,7 +7,6 @@ import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -17,8 +15,6 @@ import 'large_avatar.dart';
class PatientProfileAppBar extends StatelessWidget class PatientProfileAppBar extends StatelessWidget
with PreferredSizeWidget { with PreferredSizeWidget {
final PatiantInformtion patient; final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final double height; final double height;
final bool isInpatient; final bool isInpatient;
final bool isDischargedPatient; final bool isDischargedPatient;
@ -36,11 +32,10 @@ class PatientProfileAppBar extends StatelessWidget
final String visitDate; final String visitDate;
final String clinic; final String clinic;
final bool isAppointmentHeader; final bool isAppointmentHeader;
final bool isFromSOAP;
final bool isFromLabResult; final bool isFromLabResult;
PatientProfileAppBar( PatientProfileAppBar(
this.patient, this.patientType, this.arrivalType, this.patient,
{this.height = 0.0, {this.height = 0.0,
this.isInpatient = false, this.isInpatient = false,
this.isDischargedPatient = false, this.isDischargedPatient = false,
@ -57,7 +52,6 @@ class PatientProfileAppBar extends StatelessWidget
this.episode, this.episode,
this.visitDate, this.visitDate,
this.isAppointmentHeader = false, this.isAppointmentHeader = false,
this.isFromSOAP = false,
this.isFromLabResult = false}); this.isFromLabResult = false});
@ -86,7 +80,7 @@ class PatientProfileAppBar extends StatelessWidget
? 215 ? 215
: isAppointmentHeader : isAppointmentHeader
? 325 ? 325
: 215 : 200
: height, : height,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
@ -173,25 +167,24 @@ class PatientProfileAppBar extends StatelessWidget
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 12, fontSize: 12,
) )
: AppText( : AppText(
TranslationBase TranslationBase.of(context).notArrived,
.of(context) color: Colors.red[800],
.notArrived, fontWeight: FontWeight.bold,
color: Colors.red[800], fontFamily: 'Poppins',
fontWeight: FontWeight.bold, fontSize: 12,
fontFamily: 'Poppins', ),
fontSize: 12,
),
patient.startTime != null
? AppText(
patient.startTime != null patient.startTime != null
? patient.startTime ? AppText(
: '', patient.startTime != null
fontFamily: 'Poppins', ? patient.startTime
fontWeight: FontWeight.w600, : '',
):SizedBox() fontWeight: FontWeight.w700,
], fontSize: 12,
)) color: Color(0xFF2E303A))
: SizedBox()
],
))
: SizedBox(), : SizedBox(),
Row( Row(
@ -296,13 +289,10 @@ class PatientProfileAppBar extends StatelessWidget
width: 3.5, width: 3.5,
), ),
AppText( AppText(
(isFromSOAP ? AppDateUtils AppDateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
AppDateUtils.convertStringToDate( AppDateUtils.convertStringToDate(
patient.appointmentDate)) : AppDateUtils patient.appointmentDate))
.convertStringToDateFormat(
patient.appointmentDate,
'MM-dd-yyyy'))
, ,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
@ -356,7 +346,12 @@ class PatientProfileAppBar extends StatelessWidget
new TextSpan( new TextSpan(
text: patient.admissionDate == null text: patient.admissionDate == null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils
.getDayMonthYearDateFormatted(
(AppDateUtils
.getDateTimeFromServerFormat(
patient.admissionDate
.toString())))}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 12, fontSize: 12,
@ -552,6 +547,6 @@ class PatientProfileAppBar extends StatelessWidget
@override @override
Size get preferredSize => Size get preferredSize =>
Size(double.maxFinite, height == 0 Size(double.maxFinite, height == 0
? isInpatient ? 215 : isAppointmentHeader ? 325 : 215 ? isInpatient ? 215 : isAppointmentHeader ? 325 : 200
: height); : height);
} }

Loading…
Cancel
Save