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