|
|
|
|
@ -1,40 +1,54 @@
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.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/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_in_patient.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../routes.dart';
|
|
|
|
|
|
|
|
|
|
// ignore: must_be_immutable
|
|
|
|
|
class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
class PatientProfileScreen extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
_PatientProfileScreenState createState() => _PatientProfileScreenState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _PatientProfileScreenState extends State<PatientProfileScreen>with SingleTickerProviderStateMixin {
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
|
|
|
|
|
bool isFromSearch = false;
|
|
|
|
|
|
|
|
|
|
bool isInpatient = false;
|
|
|
|
|
|
|
|
|
|
bool isDischargedPatient = false;
|
|
|
|
|
String patientType;
|
|
|
|
|
String arrivalType;
|
|
|
|
|
String from;
|
|
|
|
|
String to;
|
|
|
|
|
TabController _tabController;
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
_tabController = TabController(length: 2,vsync:this);
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@override
|
|
|
|
|
void dispose() {
|
|
|
|
|
_tabController.dispose();
|
|
|
|
|
super.dispose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
String patientType = routeArgs['patientType'];
|
|
|
|
|
String arrivalType = routeArgs['arrivalType'];
|
|
|
|
|
String from = routeArgs['from'];
|
|
|
|
|
String to = routeArgs['to'];
|
|
|
|
|
patient = routeArgs['patient'];
|
|
|
|
|
patientType = routeArgs['patientType'];
|
|
|
|
|
arrivalType = routeArgs['arrivalType'];
|
|
|
|
|
from = routeArgs['from'];
|
|
|
|
|
to = routeArgs['to'];
|
|
|
|
|
if (routeArgs.containsKey("isSearch")) {
|
|
|
|
|
isFromSearch = routeArgs['isSearch'];
|
|
|
|
|
}
|
|
|
|
|
@ -44,156 +58,370 @@ class PatientProfileScreen extends StatelessWidget {
|
|
|
|
|
if (routeArgs.containsKey("isDischargedPatient")) {
|
|
|
|
|
isDischargedPatient = routeArgs['isDischargedPatient'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<PatientViewModel>(
|
|
|
|
|
builder: (_, patientViewModel, w) => AppScaffold(
|
|
|
|
|
baseViewModel: patientViewModel,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: Container(
|
|
|
|
|
color: Color(0XFFF2F2F2),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
!isFromSearch && isInpatient /*patientType == "1"*/
|
|
|
|
|
? PatientProfileHeaderNewDesignInPatient(
|
|
|
|
|
patient, patientType, arrivalType)
|
|
|
|
|
: PatientProfileHeaderNewDesign(
|
|
|
|
|
patient, patientType, arrivalType),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(16.0),
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
isInpatient
|
|
|
|
|
? ProfileMedicalInfoWidgetInPatient(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
isInpatient: isInpatient,
|
|
|
|
|
isDischargedPatient:
|
|
|
|
|
isDischargedPatient,
|
|
|
|
|
)
|
|
|
|
|
: isFromSearch
|
|
|
|
|
? ProfileMedicalInfoWidgetSearch(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
isInpatient: false,
|
|
|
|
|
isDischargedPatient:
|
|
|
|
|
isDischargedPatient,
|
|
|
|
|
)
|
|
|
|
|
: ProfileMedicalInfoWidget(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
isInpatient: isInpatient),
|
|
|
|
|
],
|
|
|
|
|
baseViewModel: patientViewModel,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).patientProfile,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType),
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
DefaultTabController(
|
|
|
|
|
length: 2,
|
|
|
|
|
initialIndex: isInpatient ? 0 : 1,
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 1.0,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
toolbarHeight: 65,
|
|
|
|
|
elevation: 0,
|
|
|
|
|
bottom: TabBar(
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
indicator: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.circular(10), // Creates border
|
|
|
|
|
color: Color(0xffD02126),
|
|
|
|
|
),
|
|
|
|
|
indicatorColor: Colors.red[500],
|
|
|
|
|
unselectedLabelColor: Color(0xff5A6168),
|
|
|
|
|
labelColor: Colors.white,
|
|
|
|
|
tabs: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.06,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text('Inpatient Info'),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.06,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text('OutPatient Info'),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
body: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 15.0,horizontal: 15),
|
|
|
|
|
child: TabBarView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: [
|
|
|
|
|
GridView.count(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
childAspectRatio: 1 / 1.0,
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
children: [
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
nameLine1: TranslationBase.of(context).vital,
|
|
|
|
|
nameLine2: TranslationBase.of(context).signs,
|
|
|
|
|
route: VITAL_SIGN_DETAILS,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
icon: 'patient/vital_signs.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: LAB_RESULT,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
nameLine1: TranslationBase.of(context).lab,
|
|
|
|
|
nameLine2: TranslationBase.of(context).result,
|
|
|
|
|
icon: 'patient/lab_results.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
route: RADIOLOGY_PATIENT,
|
|
|
|
|
nameLine1: TranslationBase.of(context).radiology,
|
|
|
|
|
nameLine2: TranslationBase.of(context).result,
|
|
|
|
|
icon: 'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_PRESCRIPTION_NEW,
|
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
|
nameLine2: TranslationBase.of(context).prescription,
|
|
|
|
|
icon: 'patient/order_prescription.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PROGRESS_NOTE,
|
|
|
|
|
isDischargedPatient: isDischargedPatient,
|
|
|
|
|
nameLine1: TranslationBase.of(context).progress,
|
|
|
|
|
nameLine2: TranslationBase.of(context).note,
|
|
|
|
|
icon: 'patient/Progress_notes.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_NOTE,
|
|
|
|
|
isDischargedPatient: isDischargedPatient,
|
|
|
|
|
nameLine1: "Order", //"Text",
|
|
|
|
|
nameLine2:
|
|
|
|
|
"Sheet", //TranslationBase.of(context).orders,
|
|
|
|
|
icon: 'patient/Progress_notes.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_PROCEDURE,
|
|
|
|
|
nameLine1: TranslationBase.of(context).orders,
|
|
|
|
|
nameLine2: TranslationBase.of(context).procedures,
|
|
|
|
|
icon: 'patient/Order_Procedures.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: MEDICAL_FILE,
|
|
|
|
|
nameLine1: "Health",
|
|
|
|
|
//TranslationBase.of(context).medicalReport,
|
|
|
|
|
nameLine2: "Summary",
|
|
|
|
|
//TranslationBase.of(context).summaryReport,
|
|
|
|
|
icon: 'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isDisable: true,
|
|
|
|
|
route: MEDICAL_FILE,
|
|
|
|
|
nameLine1: "Medical", //Health
|
|
|
|
|
//TranslationBase.of(context).medicalReport,
|
|
|
|
|
nameLine2: "Report", //Report
|
|
|
|
|
//TranslationBase.of(context).summaryReport,
|
|
|
|
|
icon: 'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: REFER_IN_PATIENT_TO_DOCTOR,
|
|
|
|
|
isInPatient: true,
|
|
|
|
|
nameLine1: TranslationBase.of(context).referral,
|
|
|
|
|
nameLine2: TranslationBase.of(context).patient,
|
|
|
|
|
icon: 'patient/refer_patient.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PATIENT_INSURANCE_APPROVALS_NEW,
|
|
|
|
|
nameLine1: TranslationBase.of(context).insurance,
|
|
|
|
|
nameLine2: TranslationBase.of(context).approvals,
|
|
|
|
|
icon: 'patient/vital_signs.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isDisable: true,
|
|
|
|
|
route: null,
|
|
|
|
|
nameLine1: "Discharge",
|
|
|
|
|
nameLine2: "Summery",
|
|
|
|
|
icon: 'patient/patient_sick_leave.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ADD_SICKLEAVE,
|
|
|
|
|
nameLine1: TranslationBase.of(context).patientSick,
|
|
|
|
|
nameLine2: TranslationBase.of(context).leave,
|
|
|
|
|
icon: 'patient/patient_sick_leave.png'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
GridView.count(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
crossAxisSpacing: 10,
|
|
|
|
|
mainAxisSpacing: 10,
|
|
|
|
|
childAspectRatio: 1 / 1.0,
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
children: [
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
from: from,
|
|
|
|
|
to: to,
|
|
|
|
|
nameLine1: TranslationBase.of(context).vital,
|
|
|
|
|
nameLine2: TranslationBase.of(context).signs,
|
|
|
|
|
route: VITAL_SIGN_DETAILS,
|
|
|
|
|
icon: 'patient/vital_signs.png'),
|
|
|
|
|
// if (selectedPatientType != 7)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: MEDICAL_FILE,
|
|
|
|
|
nameLine1:
|
|
|
|
|
"Health", //TranslationBase.of(context).medicalReport,
|
|
|
|
|
nameLine2:
|
|
|
|
|
"Summary", //TranslationBase.of(context).summaryReport,
|
|
|
|
|
icon: 'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: LAB_RESULT,
|
|
|
|
|
nameLine1: TranslationBase.of(context).lab,
|
|
|
|
|
nameLine2: TranslationBase.of(context).result,
|
|
|
|
|
icon: 'patient/lab_results.png'),
|
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
isInPatient: isInpatient,
|
|
|
|
|
route: RADIOLOGY_PATIENT,
|
|
|
|
|
nameLine1: TranslationBase.of(context).radiology,
|
|
|
|
|
nameLine2: TranslationBase.of(context).service,
|
|
|
|
|
icon: 'patient/health_summary.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PATIENT_ECG,
|
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
|
nameLine2: "ECG",
|
|
|
|
|
icon: 'patient/patient_sick_leave.png'),
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_PRESCRIPTION_NEW,
|
|
|
|
|
nameLine1: TranslationBase.of(context).orders,
|
|
|
|
|
nameLine2: TranslationBase.of(context).prescription,
|
|
|
|
|
icon: 'patient/order_prescription.png'),
|
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_PROCEDURE,
|
|
|
|
|
nameLine1: TranslationBase.of(context).orders,
|
|
|
|
|
nameLine2: TranslationBase.of(context).procedures,
|
|
|
|
|
icon: 'patient/Order_Procedures.png'),
|
|
|
|
|
//if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PATIENT_INSURANCE_APPROVALS_NEW,
|
|
|
|
|
nameLine1: TranslationBase.of(context).insurance,
|
|
|
|
|
nameLine2: TranslationBase.of(context).service,
|
|
|
|
|
icon: 'patient/vital_signs.png'),
|
|
|
|
|
// if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ADD_SICKLEAVE,
|
|
|
|
|
nameLine1: TranslationBase.of(context).patientSick,
|
|
|
|
|
nameLine2: TranslationBase.of(context).leave,
|
|
|
|
|
icon: 'patient/patient_sick_leave.png'),
|
|
|
|
|
if (patient.appointmentNo != null &&
|
|
|
|
|
patient.appointmentNo != 0)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PATIENT_UCAF_REQUEST,
|
|
|
|
|
isDisable:
|
|
|
|
|
patient.patientStatusType != 43 ? true : false,
|
|
|
|
|
nameLine1: TranslationBase.of(context).patient,
|
|
|
|
|
nameLine2: TranslationBase.of(context).ucaf,
|
|
|
|
|
icon: 'patient/ucaf.png'),
|
|
|
|
|
if (patient.appointmentNo != null &&
|
|
|
|
|
patient.appointmentNo != 0)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: REFER_PATIENT_TO_DOCTOR,
|
|
|
|
|
isDisable:
|
|
|
|
|
patient.patientStatusType != 43 ? true : false,
|
|
|
|
|
nameLine1: TranslationBase.of(context).referral,
|
|
|
|
|
nameLine2: TranslationBase.of(context).patient,
|
|
|
|
|
icon: 'patient/refer_patient.png'),
|
|
|
|
|
if (patient.appointmentNo != null &&
|
|
|
|
|
patient.appointmentNo != 0)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PATIENT_ADMISSION_REQUEST,
|
|
|
|
|
isDisable:
|
|
|
|
|
patient.patientStatusType != 43 ? true : false,
|
|
|
|
|
nameLine1: TranslationBase.of(context).admission,
|
|
|
|
|
nameLine2: TranslationBase.of(context).request,
|
|
|
|
|
icon: 'patient/admission_req.png'),
|
|
|
|
|
if (isInpatient)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: PROGRESS_NOTE,
|
|
|
|
|
nameLine1: TranslationBase.of(context).progress,
|
|
|
|
|
nameLine2: TranslationBase.of(context).note,
|
|
|
|
|
icon: 'patient/Progress_notes.png'),
|
|
|
|
|
if (isInpatient)
|
|
|
|
|
PatientProfileButton(
|
|
|
|
|
|
|
|
|
|
patient: patient,
|
|
|
|
|
patientType: patientType,
|
|
|
|
|
arrivalType: arrivalType,
|
|
|
|
|
route: ORDER_NOTE,
|
|
|
|
|
nameLine1: "Order", //"Text",
|
|
|
|
|
nameLine2: "Sheet",
|
|
|
|
|
icon: 'patient/Progress_notes.png'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (patient.patientStatusType != null &&
|
|
|
|
|
patient.patientStatusType == 43)
|
|
|
|
|
BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) async {},
|
|
|
|
|
builder: (_, model, w) => Positioned(
|
|
|
|
|
top: 175,
|
|
|
|
|
left: 20,
|
|
|
|
|
right: 20,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(child: Container()),
|
|
|
|
|
if (patient.episodeNo == 0)
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
"${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}",
|
|
|
|
|
color: patient.patientStatusType == 43
|
|
|
|
|
? Colors.red.shade700
|
|
|
|
|
: Colors.grey.shade700,
|
|
|
|
|
fontColor: Colors.white,
|
|
|
|
|
vPadding: 8,
|
|
|
|
|
radius: 30,
|
|
|
|
|
hPadding: 20,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: 1.6,
|
|
|
|
|
icon: Image.asset(
|
|
|
|
|
"assets/images/create-episod.png",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
if (patient.patientStatusType == 43) {
|
|
|
|
|
PostEpisodeReqModel
|
|
|
|
|
postEpisodeReqModel =
|
|
|
|
|
PostEpisodeReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
patient.appointmentNo,
|
|
|
|
|
patientMRN:
|
|
|
|
|
patient.patientMRN);
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(
|
|
|
|
|
context);
|
|
|
|
|
await model.postEpisode(
|
|
|
|
|
postEpisodeReqModel);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(
|
|
|
|
|
context);
|
|
|
|
|
patient.episodeNo = model.episodeID;
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
CREATE_EPISODE,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
if (patient.episodeNo != 0)
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
|
|
|
|
|
color: patient.patientStatusType == 43
|
|
|
|
|
? Colors.red.shade700
|
|
|
|
|
: Colors.grey.shade700,
|
|
|
|
|
fontColor: Colors.white,
|
|
|
|
|
vPadding: 8,
|
|
|
|
|
radius: 30,
|
|
|
|
|
hPadding: 20,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
fontSize: 1.6,
|
|
|
|
|
icon: Image.asset(
|
|
|
|
|
"assets/images/modilfy-episode.png",
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (patient.patientStatusType ==
|
|
|
|
|
43) {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
UPDATE_EPISODE,
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|