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();
}
class _PatientProfileScreenState extends State<PatientProfileScreen> with SingleTickerProviderStateMixin {
class _PatientProfileScreenState extends State<PatientProfileScreen>
with SingleTickerProviderStateMixin {
late PatiantInformtion patient;
LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel();
@ -140,8 +141,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onModelReady: (model) async {
if (isFromLiveCare && patient.patientStatus == 1)
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 ?? "",
isShowAppBar: false,
body: Column(
@ -151,7 +154,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
Column(
children: [
PatientProfileAppBar(
patient,
patient,
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient,
videoCallDurationStream: videoCallDurationStream,
@ -191,7 +194,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
isInpatient: isInpatient,
from: from,
to: to,
isDischargedPatient: isDischargedPatient,
isDischargedPatient:
isDischargedPatient,
isFromSearch: isFromSearch,
)
: ProfileGridForOther(
@ -214,9 +218,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
if ((isInpatient && !isDischargedPatient)
? true
:isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null && patient.patientStatusType == 43)
: isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null &&
patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
onModelReady: (model) async {
model.getDoctorProfile();
@ -228,14 +233,14 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
top: 180,
left: 20,
right: 20,
child: Row(
child: Row(
children: [
Expanded(child: Container()),
if (patient.episodeNo == 0)
AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal,
disabled:
model.state == ViewState.BusyLocal,
title:
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare || isInpatient
@ -257,7 +262,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
onPressed: () async {
if ((isFromLiveCare &&
patient.appointmentNo != null) ||
patient.patientStatusType == 43 || isInpatient ) {
patient.patientStatusType == 43 ||
isInpatient) {
createEpisode(
patient: patient, model: model);
}
@ -265,12 +271,15 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
),
if (patient.episodeNo != 0)
AppButton(
loading: model.state== ViewState.BusyLocal,
disabled: model.state== ViewState.BusyLocal,
loading:
model.state == ViewState.BusyLocal,
disabled:
model.state == ViewState.BusyLocal,
title:
"${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
: patient.patientStatusType == 43
? Colors.red.shade700
@ -399,7 +408,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
: true,
callConnected,
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(
eventCategory: "Patient Profile",
eventAction: "Create Episode",
@ -458,7 +470,12 @@ class AvatarWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
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)),
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/lookups/patient_lookup.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/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';
@ -190,8 +191,13 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
appBarTitle: pageTitle ?? "",
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true,
appBar: PatientProfileAppBar(
patient,),
// appBar: PatientProfileAppBar(
// patient,),
patientProfileAppBarModel: PatientProfileAppBarModel(
patient: patient,
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

Loading…
Cancel
Save