first step from modification

merge-requests/557/head
Elham Rababah 5 years ago
parent b2a2884586
commit 9e31cf5379

@ -126,6 +126,27 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText('Update',
fontSize: 10,
),
SizedBox(width: 10,),
Container(
color:Colors.red[600],
child: AppText('Canceled',
fontSize: 10,
),
),
SizedBox(width: 10,),
AppText('Verify',
fontSize: 10,
),
SizedBox(width: 10,)
],
),
SizedBox(height: 15,),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -189,6 +210,72 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
fontSize: 10, 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,
))
], ],
), ),
], ],
@ -227,40 +314,5 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
)); ));
} }
// searchData(String str, PatientViewModel model) {
// var strExist = str.length > 0 ? true : false;
//
// if (strExist) {
// filteredNotesList = null;
// filteredNotesList = model.patientProgressNoteList
// .where((note) =>
// note["DoctorName"].toString().contains(str.toUpperCase()))
// .toList();
// setState(() {
// notesList = filteredNotesList;
// });
// } else {
// setState(() {
// notesList = model.patientProgressNoteList;
// });
// }
// }
convertDateFormat(String str) {
const start = "/Date(";
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString();
}
} }

@ -69,8 +69,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
BottomSheetTitle(title: widget.visitType == 3 BottomSheetTitle(title: widget.visitType == 3
? 'Add Order Sheet' ? (widget.isUpdate?'Update':'Add')+' Order Sheet'
: 'Add Progress Note',), : (widget.isUpdate?'Update':'Add')+' Progress Note',),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
@ -82,12 +82,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
children: [ children: [
AppTextFieldCustom( AppTextFieldCustom(
hintText: widget.visitType == 3 hintText: widget.visitType == 3
? 'Add Order Sheet' ? (widget.isUpdate?'Update':'Add')+' Order Sheet'
: 'Add Progress Note', : (widget.isUpdate?'Update':'Add')+' Progress Note',
//TranslationBase.of(context).addProgressNote, //TranslationBase.of(context).addProgressNote,
controller: progressNoteController, controller: progressNoteController,
maxLines: 25, maxLines: 35,
minLines: 10, minLines: 25,
hasBorder: true, hasBorder: true,
validationError:progressNoteController.text.isEmpty&&isSubmitted?TranslationBase.of(context).emptyMessage:null , validationError:progressNoteController.text.isEmpty&&isSubmitted?TranslationBase.of(context).emptyMessage:null ,
@ -109,8 +109,8 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
children: <Widget>[ children: <Widget>[
AppButton( AppButton(
title: widget.visitType == 3 title: widget.visitType == 3
? 'Add Order Sheet' ? (widget.isUpdate?'Update':'Add')+' Order Sheet'
: 'Add Progress Note', : (widget.isUpdate?'Update':'Add')+' Progress Note',
color: Color(0xff359846), color: Color(0xff359846),
// disabled: progressNoteController.text.isEmpty, // disabled: progressNoteController.text.isEmpty,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@ -131,11 +131,10 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
admissionNo: int.parse(widget.patient admissionNo: int.parse(widget.patient
.admissionNo), .admissionNo),
cancelledNote: false, cancelledNote: false,
lineItemNo: 30, lineItemNo: widget.note.lineItemNo,
createdBy: widget.note.createdBy, createdBy: widget.note.createdBy,
notes: progressNoteController.text notes: progressNoteController.text,
,
verifiedNote: false, verifiedNote: false,
patientTypeID: widget.patient.patientType, patientTypeID: widget.patient.patientType,

Loading…
Cancel
Save