merge-requests/564/head
Sultan Khan 4 years ago
commit 9e87c63d22

@ -71,7 +71,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
// appBarTitle: TranslationBase.of(context).progressNote, // appBarTitle: TranslationBase.of(context).progressNote,
appBar: PatientProfileHeaderNewDesignAppBar( appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString() ?? '0', arrivalType), patient, patient.patientType.toString() ?? '0', arrivalType),
body: notesList == null || notesList.length == 0 body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoProgressNote) error: TranslationBase.of(context).errorNoProgressNote)
: Container( : Container(
@ -94,7 +94,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
child: Container( child: Container(
child: ListView.builder( child: ListView.builder(
itemCount: notesList.length, itemCount: model.patientProgressNoteList.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Column( return Column(
children: [ children: [
@ -112,8 +112,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
if (notesList[index].status != 2 && if (model.patientProgressNoteList[index].status != 2 &&
notesList[index].status != 4) model.patientProgressNoteList[index].status != 4)
Row( Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
@ -125,7 +125,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
MaterialPageRoute( MaterialPageRoute(
builder: (context) => builder: (context) =>
UpdateNoteOrder( UpdateNoteOrder(
note: notesList[ note: model.patientProgressNoteList[
index], index],
patientModel: patientModel:
model, model,
@ -186,13 +186,13 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.admissionNo), .admissionNo),
cancelledNote: true, cancelledNote: true,
lineItemNo: lineItemNo:
notesList[index] model.patientProgressNoteList[index]
.lineItemNo, .lineItemNo,
createdBy: createdBy:
notesList[index] model.patientProgressNoteList[index]
.createdBy, .createdBy,
notes: notes:
notesList[index] model.patientProgressNoteList[index]
.notes, .notes,
verifiedNote: false, verifiedNote: false,
patientTypeID: patient patientTypeID: patient
@ -251,12 +251,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
admissionNo: int.parse( admissionNo: int.parse(
patient.admissionNo), patient.admissionNo),
cancelledNote: false, cancelledNote: false,
lineItemNo: notesList[index] lineItemNo: model.patientProgressNoteList[index]
.lineItemNo, .lineItemNo,
createdBy: notesList[index] createdBy: model.patientProgressNoteList[index]
.createdBy, .createdBy,
notes: notes:
notesList[index].notes, model.patientProgressNoteList[index].notes,
verifiedNote: true, verifiedNote: true,
patientTypeID: patientTypeID:
patient.patientType, patient.patientType,
@ -334,14 +334,14 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
notesList[index].doctorName??'',fontWeight: FontWeight.w600,fontSize: 12,), model.patientProgressNoteList[index].doctorName??'',fontWeight: FontWeight.w600,fontSize: 12,),
), ),
], ],
), ),
if(notesList[index].status == 4) if(model.patientProgressNoteList[index].status == 4)
AppText( AppText(
'Canceled',fontWeight: FontWeight.w600, color: Colors.red.shade700,fontSize: 12,), 'Canceled',fontWeight: FontWeight.w600, color: Colors.red.shade700,fontSize: 12,),
if(notesList[index].status == 2) if(model.patientProgressNoteList[index].status == 2)
AppText( AppText(
'verified',fontWeight: FontWeight.w600, color: Colors.grey.shade700,fontSize: 12,), 'verified',fontWeight: FontWeight.w600, color: Colors.grey.shade700,fontSize: 12,),
], ],
@ -350,12 +350,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
Column( Column(
children: [ children: [
AppText( AppText(
notesList[index] model.patientProgressNoteList[index]
.createdOn != .createdOn !=
null null
? DateUtils ? DateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateUtils.getDateTimeFromServerFormat(notesList[index].createdOn)) DateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn))
: DateUtils : DateUtils
.getDayMonthYearDateFormatted( .getDayMonthYearDateFormatted(
DateTime.now()), DateTime.now()),
@ -363,12 +363,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
fontSize: 14, fontSize: 14,
), ),
AppText( AppText(
notesList[index] model.patientProgressNoteList[index]
.createdOn != .createdOn !=
null null
? DateUtils ? DateUtils
.getHour( .getHour(
DateUtils.getDateTimeFromServerFormat(notesList[index].createdOn )) DateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn ))
: DateUtils : DateUtils
.getHour( .getHour(
DateTime.now()), DateTime.now()),
@ -376,13 +376,25 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
fontSize: 14, fontSize: 14,
), ),
], ],
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment:
CrossAxisAlignment.end,
) )
], ],
), ),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: AppText(
model.patientProgressNoteList[index].notes,
fontSize: 10,
),
),
])
], ],
), ),
), ),

Loading…
Cancel
Save