|
|
|
|
@ -9,15 +9,12 @@ import 'package:doctor_app_flutter/util/date-utils.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-header-new-design-app-bar.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../../config/shared_pref_kay.dart';
|
|
|
|
|
import '../../../../config/size_config.dart';
|
|
|
|
|
import '../../../../models/patient/patiant_info_model.dart';
|
|
|
|
|
import '../../../../util/dr_app_shared_pref.dart';
|
|
|
|
|
import '../../../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
@ -40,7 +37,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
final _controller = TextEditingController();
|
|
|
|
|
var _isInit = true;
|
|
|
|
|
|
|
|
|
|
getProgressNoteList(BuildContext context, PatientViewModel model) async {
|
|
|
|
|
getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatiantInformtion patient = routeArgs['patient'];
|
|
|
|
|
String token = await sharedPref.getString(TOKEN);
|
|
|
|
|
@ -55,7 +52,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
tokenID: token,
|
|
|
|
|
patientTypeID: patient.patientType,
|
|
|
|
|
languageID: 2);
|
|
|
|
|
model.getPatientProgressNote(progressNoteRequest.toJson()).then((c) {
|
|
|
|
|
model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) {
|
|
|
|
|
notesList = model.patientProgressNoteList;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -114,43 +111,223 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (notesList[index].status != 2 &&
|
|
|
|
|
notesList[index].status != 4)
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
UpdateNoteOrder(
|
|
|
|
|
note: notesList[
|
|
|
|
|
index],
|
|
|
|
|
patientModel:
|
|
|
|
|
model,
|
|
|
|
|
patient: patient,
|
|
|
|
|
visitType: widget
|
|
|
|
|
.visitType,
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.green[600],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
10),
|
|
|
|
|
),
|
|
|
|
|
// color:Colors.red[600],
|
|
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.65,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
DoctorApp.edit_1,
|
|
|
|
|
size: 12,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 2,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Update',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showMyDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmFun: () async {
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.showMyDialog(
|
|
|
|
|
context,
|
|
|
|
|
);
|
|
|
|
|
UpdateNoteReqModel
|
|
|
|
|
reqModel =
|
|
|
|
|
UpdateNoteReqModel(
|
|
|
|
|
admissionNo:
|
|
|
|
|
int.parse(patient
|
|
|
|
|
.admissionNo),
|
|
|
|
|
cancelledNote: true,
|
|
|
|
|
lineItemNo:
|
|
|
|
|
notesList[index]
|
|
|
|
|
.lineItemNo,
|
|
|
|
|
createdBy:
|
|
|
|
|
notesList[index]
|
|
|
|
|
.createdBy,
|
|
|
|
|
notes:
|
|
|
|
|
notesList[index]
|
|
|
|
|
.notes,
|
|
|
|
|
verifiedNote: false,
|
|
|
|
|
patientTypeID: patient
|
|
|
|
|
.patientType,
|
|
|
|
|
patientOutSA: false,
|
|
|
|
|
);
|
|
|
|
|
await model
|
|
|
|
|
.updatePatientProgressNote(
|
|
|
|
|
reqModel);
|
|
|
|
|
await getProgressNoteList(
|
|
|
|
|
context, model, isLocalBusy: true);
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.hideDialog(
|
|
|
|
|
context);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.red[600],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
10),
|
|
|
|
|
),
|
|
|
|
|
// color:Colors.red[600],
|
|
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText('Update',
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.trash,
|
|
|
|
|
size: 12,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 2,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Cancel',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 10,),
|
|
|
|
|
Container(
|
|
|
|
|
color:Colors.red[600],
|
|
|
|
|
child: AppText('Canceled',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
showMyDialog(context: context, confirmFun: () async{
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.showMyDialog(context);
|
|
|
|
|
UpdateNoteReqModel reqModel =
|
|
|
|
|
UpdateNoteReqModel(
|
|
|
|
|
admissionNo: int.parse(
|
|
|
|
|
patient.admissionNo),
|
|
|
|
|
cancelledNote: false,
|
|
|
|
|
lineItemNo: notesList[index]
|
|
|
|
|
.lineItemNo,
|
|
|
|
|
createdBy: notesList[index]
|
|
|
|
|
.createdBy,
|
|
|
|
|
notes:
|
|
|
|
|
notesList[index].notes,
|
|
|
|
|
verifiedNote: true,
|
|
|
|
|
patientTypeID:
|
|
|
|
|
patient.patientType,
|
|
|
|
|
patientOutSA: false,
|
|
|
|
|
);
|
|
|
|
|
await model
|
|
|
|
|
.updatePatientProgressNote(
|
|
|
|
|
reqModel);
|
|
|
|
|
await getProgressNoteList(
|
|
|
|
|
context, model, isLocalBusy: true);
|
|
|
|
|
GifLoaderDialogUtils
|
|
|
|
|
.hideDialog(context);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(
|
|
|
|
|
10),
|
|
|
|
|
),
|
|
|
|
|
// color:Colors.red[600],
|
|
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.check,
|
|
|
|
|
size: 12,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 2,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 10,),
|
|
|
|
|
AppText('Verify',
|
|
|
|
|
AppText(
|
|
|
|
|
'Verify',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 10,)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 15,),
|
|
|
|
|
padding: EdgeInsets.all(6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.65,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText('Created By: ',
|
|
|
|
|
AppText(
|
|
|
|
|
'Created By: ',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
@ -159,8 +336,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if(notesList[index].status == 4)
|
|
|
|
|
AppText(
|
|
|
|
|
'Canceled',fontWeight: FontWeight.w600, color: Colors.red.shade700,fontSize: 12,),
|
|
|
|
|
if(notesList[index].status == 2)
|
|
|
|
|
AppText(
|
|
|
|
|
notesList[index].status == 4?'Canceled':'',fontWeight: FontWeight.w600, color: Colors.red.shade700,fontSize: 12,),
|
|
|
|
|
'verified',fontWeight: FontWeight.w600, color: Colors.grey.shade700,fontSize: 12,),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -200,84 +381,6 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
notesList[index].notes,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => UpdateNoteOrder(
|
|
|
|
|
note: notesList[index],
|
|
|
|
|
patientModel: model,
|
|
|
|
|
patient: patient,
|
|
|
|
|
visitType: widget.visitType,
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
DoctorApp.edit,
|
|
|
|
|
size: 18,
|
|
|
|
|
)),
|
|
|
|
|
SizedBox(width: 10,),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
|
|
|
|
|
admissionNo: int.parse(patient.admissionNo),
|
|
|
|
|
cancelledNote: true,
|
|
|
|
|
lineItemNo: notesList[index].lineItemNo,
|
|
|
|
|
createdBy: notesList[index].createdBy,
|
|
|
|
|
notes: notesList[index].notes,
|
|
|
|
|
verifiedNote: false,
|
|
|
|
|
patientTypeID: patient.patientType,
|
|
|
|
|
patientOutSA: false,
|
|
|
|
|
);
|
|
|
|
|
await model.updatePatientProgressNote(reqModel);
|
|
|
|
|
await getProgressNoteList(context,model);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
FontAwesomeIcons.trash,
|
|
|
|
|
size: 18,
|
|
|
|
|
)),
|
|
|
|
|
SizedBox(width: 10,),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
UpdateNoteReqModel reqModel = UpdateNoteReqModel(
|
|
|
|
|
admissionNo: int.parse(patient.admissionNo),
|
|
|
|
|
cancelledNote: false,
|
|
|
|
|
lineItemNo: notesList[index].lineItemNo,
|
|
|
|
|
createdBy: notesList[index].createdBy,
|
|
|
|
|
notes: notesList[index].notes,
|
|
|
|
|
verifiedNote: true,
|
|
|
|
|
patientTypeID: patient.patientType,
|
|
|
|
|
patientOutSA: false,
|
|
|
|
|
);
|
|
|
|
|
await model.updatePatientProgressNote(reqModel);
|
|
|
|
|
await getProgressNoteList(context,model);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
FontAwesomeIcons.check,
|
|
|
|
|
size: 18,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -291,28 +394,84 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InputDecoration buildInputDecoration(BuildContext context, hint) {
|
|
|
|
|
return InputDecoration(
|
|
|
|
|
prefixIcon: Icon(Icons.search, color: Colors.black),
|
|
|
|
|
filled: true,
|
|
|
|
|
fillColor: Colors.white,
|
|
|
|
|
hintText: hint,
|
|
|
|
|
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
|
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
|
|
|
|
borderSide: BorderSide(color: HexColor('#CCCCCC')),
|
|
|
|
|
),
|
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
|
|
|
|
borderSide: BorderSide(color: Colors.grey), //),
|
|
|
|
|
showMyDialog({BuildContext context, Function confirmFun, isCancel = true}) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width * 0.8,
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.5,
|
|
|
|
|
child: AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
// SizedBox(height: 20,),
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(20),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'Are you sure you want to do this action?',
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.2,),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
FlatButton(
|
|
|
|
|
child: AppText(
|
|
|
|
|
"Cancel", fontWeight: FontWeight.w600,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 16,),//Text("Cancel"),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}),
|
|
|
|
|
FlatButton(
|
|
|
|
|
child: AppText(
|
|
|
|
|
"Confirm", fontWeight: FontWeight.w600,
|
|
|
|
|
color: Colors.red.shade700,
|
|
|
|
|
fontSize: 16,), //Text("Confirm", ),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await confirmFun();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|