Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into get_pending_orders
Conflicts: lib/routes.dart lib/screens/patients/profile/operation_report/operation_report.dart lib/screens/patients/profile/profile_screen/profile_gird_for_InPatient.dartmerge-requests/864/head
commit
3f7a839950
@ -0,0 +1,32 @@
|
|||||||
|
class GetDiagnosisForInPatientRequestModel {
|
||||||
|
int patientID;
|
||||||
|
int admissionNo;
|
||||||
|
String setupID;
|
||||||
|
int patientType;
|
||||||
|
int patientTypeID;
|
||||||
|
|
||||||
|
GetDiagnosisForInPatientRequestModel(
|
||||||
|
{this.patientID,
|
||||||
|
this.admissionNo,
|
||||||
|
this.setupID,
|
||||||
|
this.patientType,
|
||||||
|
this.patientTypeID});
|
||||||
|
|
||||||
|
GetDiagnosisForInPatientRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
class GetDiagnosisForInPatientResponseModel {
|
||||||
|
String iCDCode10ID;
|
||||||
|
int diagnosisTypeID;
|
||||||
|
int conditionID;
|
||||||
|
bool complexDiagnosis;
|
||||||
|
String asciiDesc;
|
||||||
|
int createdBy;
|
||||||
|
String createdOn;
|
||||||
|
int editedBy;
|
||||||
|
String editedOn;
|
||||||
|
|
||||||
|
GetDiagnosisForInPatientResponseModel(
|
||||||
|
{this.iCDCode10ID,
|
||||||
|
this.diagnosisTypeID,
|
||||||
|
this.conditionID,
|
||||||
|
this.complexDiagnosis,
|
||||||
|
this.asciiDesc,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedOn});
|
||||||
|
|
||||||
|
GetDiagnosisForInPatientResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
iCDCode10ID = json['ICDCode10ID'];
|
||||||
|
diagnosisTypeID = json['DiagnosisTypeID'];
|
||||||
|
conditionID = json['ConditionID'];
|
||||||
|
complexDiagnosis = json['ComplexDiagnosis'];
|
||||||
|
asciiDesc = json['Ascii_Desc'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
editedOn = json['EditedOn'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ICDCode10ID'] = this.iCDCode10ID;
|
||||||
|
data['DiagnosisTypeID'] = this.diagnosisTypeID;
|
||||||
|
data['ConditionID'] = this.conditionID;
|
||||||
|
data['ComplexDiagnosis'] = this.complexDiagnosis;
|
||||||
|
data['Ascii_Desc'] = this.asciiDesc;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['EditedOn'] = this.editedOn;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
|
||||||
|
class GetNursingProgressNoteRequestModel {
|
||||||
|
int patientID;
|
||||||
|
int admissionNo;
|
||||||
|
int patientTypeID;
|
||||||
|
int patientType;
|
||||||
|
String setupID;
|
||||||
|
|
||||||
|
GetNursingProgressNoteRequestModel(
|
||||||
|
{this.patientID, this.admissionNo, this.patientTypeID = 1, this.patientType = 1, this.setupID });
|
||||||
|
|
||||||
|
GetNursingProgressNoteRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
patientTypeID = json['PatientTypeID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['PatientTypeID'] = this.patientTypeID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
class GetNursingProgressNoteResposeModel {
|
||||||
|
String notes;
|
||||||
|
dynamic conditionType;
|
||||||
|
int createdBy;
|
||||||
|
String createdOn;
|
||||||
|
dynamic editedBy;
|
||||||
|
dynamic editedOn;
|
||||||
|
|
||||||
|
GetNursingProgressNoteResposeModel(
|
||||||
|
{this.notes,
|
||||||
|
this.conditionType,
|
||||||
|
this.createdBy,
|
||||||
|
this.createdOn,
|
||||||
|
this.editedBy,
|
||||||
|
this.editedOn});
|
||||||
|
|
||||||
|
GetNursingProgressNoteResposeModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
notes = json['Notes'];
|
||||||
|
conditionType = json['ConditionType'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
editedOn = json['EditedOn'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Notes'] = this.notes;
|
||||||
|
data['ConditionType'] = this.conditionType;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['EditedOn'] = this.editedOn;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
class CreateUpdateOperationReportRequestModel {
|
||||||
|
String setupID;
|
||||||
|
int patientID;
|
||||||
|
int reservationNo;
|
||||||
|
int admissionNo;
|
||||||
|
String preOpDiagmosis;
|
||||||
|
String postOpDiagmosis;
|
||||||
|
String surgeon;
|
||||||
|
String assistant;
|
||||||
|
String anasthetist;
|
||||||
|
String operation;
|
||||||
|
String inasion;
|
||||||
|
String finding;
|
||||||
|
String surgeryProcedure;
|
||||||
|
String postOpInstruction;
|
||||||
|
int createdBy;
|
||||||
|
int editedBy;
|
||||||
|
String complicationDetails;
|
||||||
|
String bloodLossDetail;
|
||||||
|
String histopathSpecimen;
|
||||||
|
String microbiologySpecimen;
|
||||||
|
String otherSpecimen;
|
||||||
|
String scrubNurse;
|
||||||
|
String circulatingNurse;
|
||||||
|
String bloodTransfusedDetail;
|
||||||
|
|
||||||
|
CreateUpdateOperationReportRequestModel(
|
||||||
|
{this.setupID,
|
||||||
|
this.patientID,
|
||||||
|
this.reservationNo,
|
||||||
|
this.admissionNo,
|
||||||
|
this.preOpDiagmosis,
|
||||||
|
this.postOpDiagmosis,
|
||||||
|
this.surgeon,
|
||||||
|
this.assistant,
|
||||||
|
this.anasthetist,
|
||||||
|
this.operation,
|
||||||
|
this.inasion,
|
||||||
|
this.finding,
|
||||||
|
this.surgeryProcedure,
|
||||||
|
this.postOpInstruction,
|
||||||
|
this.createdBy,
|
||||||
|
this.editedBy,
|
||||||
|
this.complicationDetails,
|
||||||
|
this.bloodLossDetail,
|
||||||
|
this.histopathSpecimen,
|
||||||
|
this.microbiologySpecimen,
|
||||||
|
this.otherSpecimen,
|
||||||
|
this.scrubNurse,
|
||||||
|
this.circulatingNurse,
|
||||||
|
this.bloodTransfusedDetail});
|
||||||
|
|
||||||
|
CreateUpdateOperationReportRequestModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
reservationNo = json['reservationNo'];
|
||||||
|
admissionNo = json['AdmissionNo'];
|
||||||
|
preOpDiagmosis = json['preOpDiagmosis'];
|
||||||
|
postOpDiagmosis = json['postOpDiagmosis'];
|
||||||
|
surgeon = json['surgeon'];
|
||||||
|
assistant = json['assistant'];
|
||||||
|
anasthetist = json['anasthetist'];
|
||||||
|
operation = json['operation'];
|
||||||
|
inasion = json['inasion'];
|
||||||
|
finding = json['finding'];
|
||||||
|
surgeryProcedure = json['surgeryProcedure'];
|
||||||
|
postOpInstruction = json['postOpInstruction'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
editedBy = json['EditedBy'];
|
||||||
|
complicationDetails = json['complicationDetails'];
|
||||||
|
bloodLossDetail = json['bloodLossDetail'];
|
||||||
|
histopathSpecimen = json['histopathSpecimen'];
|
||||||
|
microbiologySpecimen = json['microbiologySpecimen'];
|
||||||
|
otherSpecimen = json['otherSpecimen'];
|
||||||
|
scrubNurse = json['scrubNurse'];
|
||||||
|
circulatingNurse = json['circulatingNurse'];
|
||||||
|
bloodTransfusedDetail = json['BloodTransfusedDetail'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['reservationNo'] = this.reservationNo;
|
||||||
|
data['AdmissionNo'] = this.admissionNo;
|
||||||
|
data['preOpDiagmosis'] = this.preOpDiagmosis;
|
||||||
|
data['postOpDiagmosis'] = this.postOpDiagmosis;
|
||||||
|
data['surgeon'] = this.surgeon;
|
||||||
|
data['assistant'] = this.assistant;
|
||||||
|
data['anasthetist'] = this.anasthetist;
|
||||||
|
data['operation'] = this.operation;
|
||||||
|
data['inasion'] = this.inasion;
|
||||||
|
data['finding'] = this.finding;
|
||||||
|
data['surgeryProcedure'] = this.surgeryProcedure;
|
||||||
|
data['postOpInstruction'] = this.postOpInstruction;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['EditedBy'] = this.editedBy;
|
||||||
|
data['complicationDetails'] = this.complicationDetails;
|
||||||
|
data['bloodLossDetail'] = this.bloodLossDetail;
|
||||||
|
data['histopathSpecimen'] = this.histopathSpecimen;
|
||||||
|
data['microbiologySpecimen'] = this.microbiologySpecimen;
|
||||||
|
data['otherSpecimen'] = this.otherSpecimen;
|
||||||
|
data['scrubNurse'] = this.scrubNurse;
|
||||||
|
data['circulatingNurse'] = this.circulatingNurse;
|
||||||
|
data['BloodTransfusedDetail'] = this.bloodTransfusedDetail;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,265 @@
|
|||||||
|
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/model/note/GetNursingProgressNoteRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/AnalyticsService.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/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/locator.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
|
||||||
|
class DiagnosisScreen extends StatefulWidget {
|
||||||
|
const DiagnosisScreen({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ProgressNoteState createState() => _ProgressNoteState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProgressNoteState extends State<DiagnosisScreen> {
|
||||||
|
bool isDischargedPatient = false;
|
||||||
|
AuthenticationViewModel authenticationViewModel;
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
|
||||||
|
getDiagnosisForInPatient(BuildContext context, PatientViewModel model,
|
||||||
|
{bool isLocalBusy = false}) async {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
|
||||||
|
|
||||||
|
print(type);
|
||||||
|
GetDiagnosisForInPatientRequestModel getDiagnosisForInPatientRequestModel =
|
||||||
|
GetDiagnosisForInPatientRequestModel(
|
||||||
|
admissionNo: int.parse(patient.admissionNo),
|
||||||
|
patientTypeID: patient.patientType,
|
||||||
|
patientID: patient.patientId, setupID: "010266");
|
||||||
|
model.getDiagnosisForInPatient(getDiagnosisForInPatientRequestModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
authenticationViewModel = Provider.of(context);
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
if (routeArgs.containsKey('isDischargedPatient'))
|
||||||
|
isDischargedPatient = routeArgs['isDischargedPatient'];
|
||||||
|
return BaseView<PatientViewModel>(
|
||||||
|
onModelReady: (model) => getDiagnosisForInPatient(context, model),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
appBar: PatientProfileAppBar(
|
||||||
|
patient,
|
||||||
|
isInpatient: true,
|
||||||
|
),
|
||||||
|
body: model.diagnosisForInPatientList == null ||
|
||||||
|
model.diagnosisForInPatientList.length == 0
|
||||||
|
? DrAppEmbeddedError(
|
||||||
|
error: TranslationBase.of(context).noItem)
|
||||||
|
: Container(
|
||||||
|
color: Colors.grey[200],
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount:
|
||||||
|
model.diagnosisForInPatientList.length,
|
||||||
|
itemBuilder: (BuildContext ctxt, int index) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
widthFactor: 0.95,
|
||||||
|
child: CardWithBgWidget(
|
||||||
|
hasBorder: false,
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
widget: Column(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.width *
|
||||||
|
0.60,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.createdBy,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.createdBy
|
||||||
|
.toString() ??
|
||||||
|
'',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w600,
|
||||||
|
fontSize: 12,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.createdOn !=
|
||||||
|
null
|
||||||
|
? AppDateUtils.getDayMonthYearDateFormatted(
|
||||||
|
AppDateUtils
|
||||||
|
.getDateTimeFromServerFormat(model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.createdOn),
|
||||||
|
isArabic:
|
||||||
|
projectViewModel
|
||||||
|
.isArabic,
|
||||||
|
isMonthShort: true)
|
||||||
|
: AppDateUtils
|
||||||
|
.getDayMonthYearDateFormatted(
|
||||||
|
DateTime.now(),
|
||||||
|
isArabic:
|
||||||
|
projectViewModel
|
||||||
|
.isArabic),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.createdOn !=
|
||||||
|
null
|
||||||
|
? AppDateUtils.getHour(
|
||||||
|
AppDateUtils
|
||||||
|
.getDateTimeFromServerFormat(model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.createdOn))
|
||||||
|
: AppDateUtils.getHour(
|
||||||
|
DateTime.now()),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.end,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.icd + " : ",
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.iCDCode10ID,
|
||||||
|
fontSize: 12,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
AppText("Ascii Desc : ",
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.diagnosisForInPatientList[
|
||||||
|
index]
|
||||||
|
.asciiDesc,
|
||||||
|
fontSize: 12,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,240 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/note/GetNursingProgressNoteRequestModel.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/core/service/AnalyticsService.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/project_view_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||||
|
import 'package:doctor_app_flutter/locator.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||||
|
import 'package:doctor_app_flutter/screens/patients/profile/notes/note/update_note.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
|
||||||
|
class NursingProgressNoteScreen extends StatefulWidget {
|
||||||
|
const NursingProgressNoteScreen({Key key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ProgressNoteState createState() => _ProgressNoteState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProgressNoteState extends State<NursingProgressNoteScreen> {
|
||||||
|
List<NoteModel> notesList;
|
||||||
|
var filteredNotesList;
|
||||||
|
bool isDischargedPatient = false;
|
||||||
|
AuthenticationViewModel authenticationViewModel;
|
||||||
|
ProjectViewModel projectViewModel;
|
||||||
|
|
||||||
|
getProgressNoteList(BuildContext context, PatientViewModel model,
|
||||||
|
{bool isLocalBusy = false}) async {
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
|
||||||
|
|
||||||
|
print(type);
|
||||||
|
GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel =
|
||||||
|
GetNursingProgressNoteRequestModel(
|
||||||
|
admissionNo: int.parse(patient.admissionNo),
|
||||||
|
patientTypeID: patient.patientType,
|
||||||
|
patientID: patient.patientId, setupID: "010266");
|
||||||
|
model.getNursingProgressNote(getNursingProgressNoteRequestModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
authenticationViewModel = Provider.of(context);
|
||||||
|
projectViewModel = Provider.of(context);
|
||||||
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||||
|
PatiantInformtion patient = routeArgs['patient'];
|
||||||
|
if (routeArgs.containsKey('isDischargedPatient'))
|
||||||
|
isDischargedPatient = routeArgs['isDischargedPatient'];
|
||||||
|
return BaseView<PatientViewModel>(
|
||||||
|
onModelReady: (model) => getProgressNoteList(context, model),
|
||||||
|
builder: (_, model, w) => AppScaffold(
|
||||||
|
baseViewModel: model,
|
||||||
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
// appBarTitle: TranslationBase.of(context).progressNote,
|
||||||
|
appBar: PatientProfileAppBar(
|
||||||
|
patient,
|
||||||
|
isInpatient: true,
|
||||||
|
),
|
||||||
|
body: model.patientNursingProgressNoteList == null ||
|
||||||
|
model.patientNursingProgressNoteList.length == 0
|
||||||
|
? DrAppEmbeddedError(
|
||||||
|
error: TranslationBase.of(context).errorNoProgressNote)
|
||||||
|
: Container(
|
||||||
|
color: Colors.grey[200],
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount:
|
||||||
|
model.patientNursingProgressNoteList.length,
|
||||||
|
itemBuilder: (BuildContext ctxt, int index) {
|
||||||
|
return FractionallySizedBox(
|
||||||
|
widthFactor: 0.95,
|
||||||
|
child: CardWithBgWidget(
|
||||||
|
hasBorder: false,
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
widget: Column(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.width *
|
||||||
|
0.60,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment
|
||||||
|
.start,
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.createdBy,
|
||||||
|
fontSize: 10,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.createdBy
|
||||||
|
.toString() ??
|
||||||
|
'',
|
||||||
|
fontWeight:
|
||||||
|
FontWeight.w600,
|
||||||
|
fontSize: 12,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.createdOn !=
|
||||||
|
null
|
||||||
|
? AppDateUtils.getDayMonthYearDateFormatted(
|
||||||
|
AppDateUtils
|
||||||
|
.getDateTimeFromServerFormat(model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.createdOn),
|
||||||
|
isArabic:
|
||||||
|
projectViewModel
|
||||||
|
.isArabic,
|
||||||
|
isMonthShort: true)
|
||||||
|
: AppDateUtils
|
||||||
|
.getDayMonthYearDateFormatted(
|
||||||
|
DateTime.now(),
|
||||||
|
isArabic:
|
||||||
|
projectViewModel
|
||||||
|
.isArabic),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.createdOn !=
|
||||||
|
null
|
||||||
|
? AppDateUtils.getHour(
|
||||||
|
AppDateUtils
|
||||||
|
.getDateTimeFromServerFormat(model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.createdOn))
|
||||||
|
: AppDateUtils.getHour(
|
||||||
|
DateTime.now()),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 14,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.end,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 8,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: AppText(
|
||||||
|
model
|
||||||
|
.patientNursingProgressNoteList[
|
||||||
|
index]
|
||||||
|
.notes,
|
||||||
|
fontSize: 10,
|
||||||
|
isCopyable: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue