fix vital sign items

merge-requests/931/head
Elham Rababh 4 years ago
parent adc20b91dd
commit 8dade058a4

@ -34,7 +34,8 @@ class PatientProfileScreen extends StatefulWidget {
_PatientProfileScreenState createState() => _PatientProfileScreenState(); _PatientProfileScreenState createState() => _PatientProfileScreenState();
} }
class _PatientProfileScreenState extends State<PatientProfileScreen> with SingleTickerProviderStateMixin { class _PatientProfileScreenState extends State<PatientProfileScreen>
with SingleTickerProviderStateMixin {
late PatiantInformtion patient; late PatiantInformtion patient;
LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel(); LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel();
@ -140,8 +141,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onModelReady: (model) async { onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1) if (isFromLiveCare && patient.patientStatus == 1)
await model.addPatientToDoctorList(patient!.vcId!); await model.addPatientToDoctorList(patient!.vcId!);
},builder: (_, model, w) => AppScaffold( },
baseViewModel: model,isLoading: true, builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isLoading: true,
appBarTitle: TranslationBase.of(context).patientProfile ?? "", appBarTitle: TranslationBase.of(context).patientProfile ?? "",
isShowAppBar: false, isShowAppBar: false,
body: Column( body: Column(
@ -151,7 +154,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
Column( Column(
children: [ children: [
PatientProfileAppBar( PatientProfileAppBar(
patient, patient,
patientProfileAppBarModel: PatientProfileAppBarModel( patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient, patient: patient,
videoCallDurationStream: videoCallDurationStream, videoCallDurationStream: videoCallDurationStream,
@ -191,7 +194,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
isInpatient: isInpatient, isInpatient: isInpatient,
from: from, from: from,
to: to, to: to,
isDischargedPatient: isDischargedPatient, isDischargedPatient:
isDischargedPatient,
isFromSearch: isFromSearch, isFromSearch: isFromSearch,
) )
: ProfileGridForOther( : ProfileGridForOther(
@ -214,9 +218,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
if ((isInpatient && !isDischargedPatient) if ((isInpatient && !isDischargedPatient)
? true ? true
:isFromLiveCare : isFromLiveCare
? patient.episodeNo != null ? patient.episodeNo != null
: patient.patientStatusType != null && patient.patientStatusType == 43) : patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.getDoctorProfile(); model.getDoctorProfile();
@ -228,14 +233,14 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
top: 180, top: 180,
left: 20, left: 20,
right: 20, right: 20,
child: Row( child: Row(
children: [ children: [
Expanded(child: Container()), Expanded(child: Container()),
if (patient.episodeNo == 0) if (patient.episodeNo == 0)
AppButton( AppButton(
loading: model.state== ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal, disabled:
model.state == ViewState.BusyLocal,
title: title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare || isInpatient color: isFromLiveCare || isInpatient
@ -257,7 +262,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onPressed: () async { onPressed: () async {
if ((isFromLiveCare && if ((isFromLiveCare &&
patient.appointmentNo != null) || patient.appointmentNo != null) ||
patient.patientStatusType == 43 || isInpatient ) { patient.patientStatusType == 43 ||
isInpatient) {
createEpisode( createEpisode(
patient: patient, model: model); patient: patient, model: model);
} }
@ -265,12 +271,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
if (patient.episodeNo != 0) if (patient.episodeNo != 0)
AppButton( AppButton(
loading: model.state== ViewState.BusyLocal, loading:
disabled: model.state== ViewState.BusyLocal, model.state == ViewState.BusyLocal,
disabled:
model.state == ViewState.BusyLocal,
title: title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: ((isInpatient) || isFromLiveCare) && model.state!= ViewState.BusyLocal color: ((isInpatient) ||
isFromLiveCare) &&
model.state != ViewState.BusyLocal
? Colors.red.shade700 ? Colors.red.shade700
: patient.patientStatusType == 43 : patient.patientStatusType == 43
? Colors.red.shade700 ? Colors.red.shade700
@ -399,7 +408,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
: true, : true,
callConnected, callConnected,
callDisconnected); callDisconnected);
}, type: ''); },
type: '');
} }
} }
}, },
@ -418,7 +428,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
); );
} }
createEpisode({required PatiantInformtion patient, required SOAPViewModel model}) async { createEpisode(
{required PatiantInformtion patient,
required SOAPViewModel model}) async {
await locator<AnalyticsService>().logEvent( await locator<AnalyticsService>().logEvent(
eventCategory: "Patient Profile", eventCategory: "Patient Profile",
eventAction: "Create Episode", eventAction: "Create Episode",
@ -458,7 +470,12 @@ class AvatarWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.08), offset: Offset(0.0, 5.0), blurRadius: 16.0)], boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)), borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC), color: Color(0xffCCCCCC),
), ),

@ -2,6 +2,7 @@ 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/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
@ -190,8 +191,13 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
appBarTitle: pageTitle ?? "", appBarTitle: pageTitle ?? "",
backgroundColor: Color.fromRGBO(248, 248, 248, 1), backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true, isShowAppBar: true,
appBar: PatientProfileAppBar( // appBar: PatientProfileAppBar(
patient,), // patient,),
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient,
),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

Loading…
Cancel
Save