|
|
|
@ -1,8 +1,4 @@
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/diagnosis/GetDiagnosisForInPatientRequestModel.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/profile/vte_assessment_view_model.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/models/patient/patiant_info_model.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/screens/base/base_view.dart';
|
|
|
|
@ -16,7 +12,6 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
|
|
|
|
import '../../../../core/viewModel/profile/intervention_medication_view_model.dart';
|
|
|
|
import '../../../../widgets/transitions/fade_page.dart';
|
|
|
|
import '../../../../widgets/transitions/fade_page.dart';
|
|
|
|
import 'intervention_medication_history_screen.dart';
|
|
|
|
import 'intervention_medication_history_screen.dart';
|
|
|
|
@ -28,10 +23,12 @@ class InterventionMedicationScreen extends StatefulWidget {
|
|
|
|
const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key);
|
|
|
|
const InterventionMedicationScreen(this.patient, {Key key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_InterventionMedicationScreenState createState() => _InterventionMedicationScreenState();
|
|
|
|
_InterventionMedicationScreenState createState() =>
|
|
|
|
|
|
|
|
_InterventionMedicationScreenState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _InterventionMedicationScreenState extends State<InterventionMedicationScreen> {
|
|
|
|
class _InterventionMedicationScreenState
|
|
|
|
|
|
|
|
extends State<InterventionMedicationScreen> {
|
|
|
|
bool isDischargedPatient = false;
|
|
|
|
bool isDischargedPatient = false;
|
|
|
|
AuthenticationViewModel authenticationViewModel;
|
|
|
|
AuthenticationViewModel authenticationViewModel;
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
@ -42,11 +39,13 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<InterventionMedicationViewModel>(
|
|
|
|
return BaseView<InterventionMedicationViewModel>(
|
|
|
|
onModelReady: (model) => model.getInterventionMedication(patientId: widget.patient.patientId,
|
|
|
|
onModelReady: (model) => model.getInterventionMedication(
|
|
|
|
// admissionNo: 2016023498
|
|
|
|
patientId: widget.patient.patientId,
|
|
|
|
|
|
|
|
admissionNo: int.parse(widget.patient.admissionNo),
|
|
|
|
admissionNo:int.parse(widget.patient.admissionNo)
|
|
|
|
fromDate: model.selectedFromDate,
|
|
|
|
|
|
|
|
toDate: model.selectedToDate,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
baseViewModel: model,
|
|
|
|
baseViewModel: model,
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
@ -61,8 +60,7 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
error: TranslationBase.of(context).noDataAvailable,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: InkWell(
|
|
|
|
: Container(
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
color: Colors.grey[200],
|
|
|
|
color: Colors.grey[200],
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -71,7 +69,8 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
child: ListView.builder(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: model.allInterventionList.length,
|
|
|
|
itemCount: model.allInterventionList.length,
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
return FractionallySizedBox(
|
|
|
|
return InkWell(
|
|
|
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
widthFactor: 0.95,
|
|
|
|
widthFactor: 0.95,
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
hasBorder: false,
|
|
|
|
hasBorder: false,
|
|
|
|
@ -87,7 +86,8 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
MainAxisAlignment
|
|
|
|
|
|
|
|
.spaceBetween,
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -98,7 +98,8 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
0.60,
|
|
|
|
0.60,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment
|
|
|
|
|
|
|
|
.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
@ -108,11 +109,12 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
.allInterventionList[
|
|
|
|
.allInterventionList[
|
|
|
|
index].cS,
|
|
|
|
index]
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
.cS,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.w600,
|
|
|
|
fontSize: 14,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -127,72 +129,23 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
AppDateUtils.convertStringToDate(
|
|
|
|
AppDateUtils.convertStringToDate(model
|
|
|
|
model
|
|
|
|
|
|
|
|
.allInterventionList[
|
|
|
|
.allInterventionList[
|
|
|
|
index].startDatetime)
|
|
|
|
index]
|
|
|
|
,isArabic:
|
|
|
|
.startDatetime),
|
|
|
|
|
|
|
|
isArabic:
|
|
|
|
projectViewModel
|
|
|
|
projectViewModel
|
|
|
|
.isArabic,
|
|
|
|
.isArabic,
|
|
|
|
isMonthShort: true),
|
|
|
|
isMonthShort:
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
true),
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.w600,
|
|
|
|
fontSize: 14,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
// Column(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// model
|
|
|
|
|
|
|
|
// .allInterventionList[
|
|
|
|
|
|
|
|
// index]
|
|
|
|
|
|
|
|
// .startDatetime !=
|
|
|
|
|
|
|
|
// null
|
|
|
|
|
|
|
|
// ? AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
|
|
|
|
// AppDateUtils
|
|
|
|
|
|
|
|
// .getDateTimeFromString(model
|
|
|
|
|
|
|
|
// .allInterventionList[
|
|
|
|
|
|
|
|
// index]
|
|
|
|
|
|
|
|
// .startDatetime),
|
|
|
|
|
|
|
|
// isArabic:
|
|
|
|
|
|
|
|
// projectViewModel
|
|
|
|
|
|
|
|
// .isArabic,
|
|
|
|
|
|
|
|
// isMonthShort: true)
|
|
|
|
|
|
|
|
// : AppDateUtils
|
|
|
|
|
|
|
|
// .getDayMonthYearDateFormatted(
|
|
|
|
|
|
|
|
// DateTime.now(),
|
|
|
|
|
|
|
|
// isArabic:
|
|
|
|
|
|
|
|
// projectViewModel
|
|
|
|
|
|
|
|
// .isArabic),
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
|
|
|
// isCopyable: true,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// model
|
|
|
|
|
|
|
|
// .allInterventionList[
|
|
|
|
|
|
|
|
// index]
|
|
|
|
|
|
|
|
// .startDatetime !=
|
|
|
|
|
|
|
|
// null
|
|
|
|
|
|
|
|
// ? AppDateUtils.getHour(
|
|
|
|
|
|
|
|
// AppDateUtils
|
|
|
|
|
|
|
|
// .getDateTimeFromString(model
|
|
|
|
|
|
|
|
// .allInterventionList[
|
|
|
|
|
|
|
|
// index]
|
|
|
|
|
|
|
|
// .startDatetime))
|
|
|
|
|
|
|
|
// : AppDateUtils.getHour(
|
|
|
|
|
|
|
|
// DateTime.now()),
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
|
|
|
// isCopyable: true,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// crossAxisAlignment:
|
|
|
|
|
|
|
|
// CrossAxisAlignment.end,
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -202,12 +155,10 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
// AppText(
|
|
|
|
AppText(
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
'Description: ',
|
|
|
|
// .VTE_Type +
|
|
|
|
fontSize: 12,
|
|
|
|
// " : ",
|
|
|
|
),
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
@ -226,12 +177,10 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
// AppText(
|
|
|
|
AppText(
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
'Medication: ',
|
|
|
|
// .pharmacology +
|
|
|
|
fontSize: 12,
|
|
|
|
// " : ",
|
|
|
|
),
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
@ -250,12 +199,10 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
// AppText(
|
|
|
|
AppText(
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
'Doctor Comments: ',
|
|
|
|
// .reasonsThrombo +
|
|
|
|
fontSize: 12,
|
|
|
|
// " : ",
|
|
|
|
),
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
@ -270,17 +217,14 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 8,
|
|
|
|
height: 8,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
// AppText(
|
|
|
|
AppText(
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
'Status Description: ',
|
|
|
|
// .reasonsThrombo +
|
|
|
|
fontSize: 12,
|
|
|
|
// " : ",
|
|
|
|
),
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
model
|
|
|
|
model
|
|
|
|
@ -292,7 +236,6 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -301,23 +244,21 @@ class _InterventionMedicationScreenState extends State<InterventionMedicationScr
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
// PatiantInformtion patient;
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
FadePage(
|
|
|
|
FadePage(
|
|
|
|
page: InterventionMedicationHistoryScreen(widget.patient),
|
|
|
|
page: InterventionMedicationHistoryScreen(widget.patient, model.allInterventionList[index]),
|
|
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|