fix doctors name

merge-requests/867/head
Elham Rababh 4 years ago
parent 9e2b72a7cb
commit 93bcfff7a0

@ -346,7 +346,7 @@ const GET_MEDICATION_FOR_IN_PATIENT =
const GET_EPISODE_FOR_INPATIENT =
"/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient";
const GET_OPERATION_REPORT =
"/Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails";
"Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails";
const UPDATE_OPERATION_REPORT =
"Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport";

@ -8,6 +8,8 @@ class GetDiagnosisForInPatientResponseModel {
String createdOn;
int editedBy;
String editedOn;
String createdByName;
String editedByName;
GetDiagnosisForInPatientResponseModel(
{this.iCDCode10ID,
@ -18,7 +20,7 @@ class GetDiagnosisForInPatientResponseModel {
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn});
this.editedOn, this.createdByName});
GetDiagnosisForInPatientResponseModel.fromJson(Map<String, dynamic> json) {
iCDCode10ID = json['ICDCode10ID'];
@ -30,6 +32,8 @@ class GetDiagnosisForInPatientResponseModel {
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
createdByName = json['CreatedByName'];
editedByName = json['EditedByName'];
}
Map<String, dynamic> toJson() {

@ -6,13 +6,19 @@ class GetNursingProgressNoteResposeModel {
dynamic editedBy;
dynamic editedOn;
String createdByName;
String editedByName;
GetNursingProgressNoteResposeModel(
{this.notes,
this.conditionType,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn});
this.conditionType,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.editedByName,
this.createdByName});
GetNursingProgressNoteResposeModel.fromJson(Map<String, dynamic> json) {
notes = json['Notes'];
@ -21,6 +27,8 @@ class GetNursingProgressNoteResposeModel {
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
createdByName = json['CreatedByName'];
editedByName = json['EditedByName'];
}
Map<String, dynamic> toJson() {

@ -5,14 +5,15 @@ import 'package:doctor_app_flutter/models/operation_report/get_operation_report_
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_request_model.dart';
class OperationReportService extends BaseService {
List<GetOperationReportModel> get _operationReportList => List();
List<GetOperationReportModel> _operationReportList = [];
List<GetOperationReportModel> get operationReportList => _operationReportList;
Future getOperationReport(
{GetOperationReportRequestModel getOperationReportRequestModel,
int patientId}) async {
getOperationReportRequestModel =
GetOperationReportRequestModel(patientID: patientId);
GetOperationReportRequestModel(patientID: patientId, doctorID: "");
hasError = false;
await baseAppClient.post(GET_OPERATION_REPORT,

@ -124,6 +124,8 @@ var routes = {
ALL_SPECIAL_LAB_RESULT: (_) => AllLabSpecialResult(),
GET_OPERATION_REPORT: (_) => OperationReportScreen(),
PENDING_ORDERS: (_) => PendingOrdersScreen(),
NURSING_PROGRESS_NOTE: (_) => NursingProgressNoteScreen(),
DIAGNOSIS_FOR_IN_PATIENT: (_) => DiagnosisScreen(),
ADMISSION_ORDERS: (_) => AdmissionOrdersScreen(),
DIABETIC_CHART_VALUES: (_) => DiabeticChart(),
};

@ -133,7 +133,7 @@ class _ProgressNoteState extends State<DiagnosisScreen> {
model
.diagnosisForInPatientList[
index]
.createdBy
.createdByName
.toString() ??
'',
fontWeight:

@ -135,7 +135,7 @@ class _ProgressNoteState extends State<NursingProgressNoteScreen> {
model
.patientNursingProgressNoteList[
index]
.createdBy
.createdByName
.toString() ??
'',
fontWeight:

@ -46,37 +46,12 @@ class _ProgressNoteState extends State<OperationReportScreen> {
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 token = await sharedPref.getString(TOKEN);
String type = await sharedPref.getString(SLECTED_PATIENT_TYPE);
print(type);
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest(
visitType: widget.visitType,
// if equal 5 then this will return progress note
admissionNo: int.parse(patient.admissionNo),
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
languageID: 2);
model
.getPatientProgressNote(progressNoteRequest.toJson(),
isLocalBusy: isLocalBusy)
.then((c) {
notesList = model.patientProgressNoteList;
});
}
@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'];
String arrivalType = routeArgs['arrivalType'];
if (routeArgs.containsKey('isDischargedPatient'))
isDischargedPatient = routeArgs['isDischargedPatient'];
return BaseView<OperationReportViewModel>(
@ -133,283 +108,9 @@ class _ProgressNoteState extends State<OperationReportScreen> {
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
if (model.operationReportList[index]
.status ==
1 &&
authenticationViewModel
.doctorProfile.doctorID !=
model
.operationReportList[
index]
.createdBy)
AppText(
TranslationBase.of(context)
.notePending,
fontWeight: FontWeight.bold,
color: Color(0xFFCC9B14),
fontSize: 12,
),
if (model.operationReportList[index]
.status ==
4)
AppText(
TranslationBase.of(context)
.noteCanceled,
fontWeight: FontWeight.bold,
color: Colors.red.shade700,
fontSize: 12,
),
if (model.operationReportList[index]
.status ==
2)
AppText(
TranslationBase.of(context)
.noteVerified,
fontWeight: FontWeight.bold,
color: Colors.green[600],
fontSize: 12,
),
if (model.operationReportList[index]
.status !=
2 &&
model.operationReportList[index]
.status !=
4 &&
authenticationViewModel
.doctorProfile.doctorID ==
model
.operationReportList[
index]
.createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
InkWell(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// UpdateNoteOrder(
// note: model
// .operationReportList[
// index],
// patientModel:
// model,
// patient:
// patient,
// visitType: widget
// .visitType,
// isUpdate: true,
// )),
// );
// },
child: Container(
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius:
BorderRadius.circular(
10),
),
// color:Colors.red[600],
child: Row(
children: [
Icon(
DoctorApp.edit_1,
size: 12,
color: Colors.white,
),
SizedBox(
width: 2,
),
AppText(
TranslationBase.of(
context)
.update,
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
),
),
SizedBox(
width: 10,
),
// InkWell(
// onTap: () async {
// showMyDialog(
// context: context,
// actionName: "verify",
// confirmFun: () async {
// GifLoaderDialogUtils
// .showMyDialog(
// context);
// UpdateNoteReqModel
// reqModel =
// UpdateNoteReqModel(
// admissionNo: int
// .parse(patient
// .admissionNo),
// cancelledNote:
// false,
// lineItemNo: model
// .patientProgressNoteList[
// index]
// .lineItemNo,
// createdBy: model
// .patientProgressNoteList[
// index]
// .createdBy,
// notes: model
// .patientProgressNoteList[
// 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.green[600],
// borderRadius:
// BorderRadius.circular(
// 10),
// ),
// // color:Colors.red[600],
//
// child: Row(
// children: [
// Icon(
// FontAwesomeIcons
// .check,
// size: 12,
// color: Colors.white,
// ),
// SizedBox(
// width: 2,
// ),
// AppText(
// TranslationBase.of(
// context)
// .noteVerify,
// fontSize: 10,
// color: Colors.white,
// ),
// ],
// ),
// padding: EdgeInsets.all(6),
// ),
// ),
SizedBox(
width: 10,
),
// InkWell(
// onTap: () async {
// showMyDialog(
// context: context,
// actionName:
// TranslationBase.of(
// context)
// .cancel,
// confirmFun: () async {
// GifLoaderDialogUtils
// .showMyDialog(
// context,
// );
// UpdateNoteReqModel
// reqModel =
// UpdateNoteReqModel(
// admissionNo: int
// .parse(patient
// .admissionNo),
// cancelledNote: true,
// lineItemNo: model
// .patientProgressNoteList[
// index]
// .lineItemNo,
// createdBy: model
// .patientProgressNoteList[
// index]
// .createdBy,
// notes: model
// .patientProgressNoteList[
// 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: [
// Icon(
// FontAwesomeIcons
// .trash,
// size: 12,
// color: Colors.white,
// ),
// SizedBox(
// width: 2,
// ),
// AppText(
// 'Cancel',
// fontSize: 10,
// color: Colors.white,
// ),
// ],
// ),
// padding: EdgeInsets.all(6),
// ),
// ),
SizedBox(
width: 10,
)
],
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
@ -506,25 +207,153 @@ class _ProgressNoteState extends State<OperationReportScreen> {
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: AppText(
model
.operationReportList[
index]
.remarks,
if (model.operationReportList[index]
.operationDate !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Date : ",
fontSize: 10,
),
),
])
Expanded(
child: AppText(
AppDateUtils.getDayMonthYearDateFormatted(
AppDateUtils
.getDateTimeFromServerFormat(model
.operationReportList[
index]
.operationDate),
isArabic:
projectViewModel
.isArabic,
isMonthShort: true),
fontSize: 10,
),
)
]),
if (model.operationReportList[index]
.timeStart !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Operation Time Start : ",
fontSize: 10,
),
Expanded(
child: AppText(
model.operationReportList[index]
.timeStart,
fontSize: 10,
),
)
]),
if (model.operationReportList[index]
.remarks !=
null)
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
AppText(
"Remarks : ",
fontSize: 10,
),
Expanded(
child: AppText(
model
.operationReportList[
index]
.remarks ??
'',
fontSize: 10,
),
),
])
],
),
SizedBox(
height: 20,
),
// if (
// authenticationViewModel
// .doctorProfile.doctorID ==
// model
// .operationReportList[
// index]
// .createdBy)
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.end,
children: [
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
UpdateOperationReport(
operationReport: model
.operationReportList[
index],
operationReportViewModel:
model,
patient: patient,
isUpdate: true,
)),
);
},
child: Container(
decoration: BoxDecoration(
color: Colors.green[600],
borderRadius:
BorderRadius.circular(10),
),
// color:Colors.red[600],
child: Row(
children: [
Icon(
DoctorApp.edit_1,
size: 12,
color: Colors.white,
),
SizedBox(
width: 2,
),
AppText(
TranslationBase.of(context)
.update,
fontSize: 10,
color: Colors.white,
),
],
),
padding: EdgeInsets.all(6),
),
),
SizedBox(
width: 10,
),
SizedBox(
width: 10,
),
],
),
SizedBox(
height: 10,
),
],
),
),

@ -12,6 +12,7 @@ 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/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_model.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/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
@ -30,7 +31,7 @@ import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class UpdateOperationReport extends StatefulWidget {
final NoteModel note;
final GetOperationReportModel operationReport;
final OperationReportViewModel operationReportViewModel;
final PatiantInformtion patient;
final int visitType;
@ -38,11 +39,11 @@ class UpdateOperationReport extends StatefulWidget {
const UpdateOperationReport(
{Key key,
this.note,
this.operationReportViewModel,
this.patient,
this.visitType,
this.isUpdate})
this.isUpdate,
this.operationReport})
: super(key: key);
@override
@ -77,6 +78,7 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
TextEditingController BloodTransfusedDetailController =
TextEditingController();
TextEditingController anasthetistController = TextEditingController();
TextEditingController OTReservationID = TextEditingController();
setSelectedType(int val) {
setState(() {
@ -92,6 +94,8 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
if(widget.isUpdate)
OTReservationID.text = widget.operationReport.oTReservationID.toString();
//TODO Elham* add translation to hints
return AppScaffold(
isShowAppBar: true,
@ -120,6 +124,18 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
widthFactor: 0.9,
child: Column(
children: [
AppTextFieldCustom(
hintText: "Reservation No",
//TranslationBase.of(context).addoperationReports,
controller: OTReservationID,
maxLines: 1,
minLines: 1,
enabled: false,
hasBorder: true,
),
SizedBox(
height: 4,
),
AppTextFieldCustom(
hintText: "Pre Op Diagmosis",
//TranslationBase.of(context).addoperationReports,
@ -473,14 +489,15 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
});
if (isFormValid()) {
GifLoaderDialogUtils.showMyDialog(context);
await widget.operationReportViewModel.getDoctorProfile();
await widget.operationReportViewModel.getDoctorProfile();
CreateUpdateOperationReportRequestModel
createUpdateOperationReportRequestModel =
CreateUpdateOperationReportRequestModel(
inasion: inasionController.text,
/// TODO Elham* Add dynamic reservation
reservationNo: 0,
reservationNo:widget.operationReport.oTReservationID ,
preOpDiagmosis: preOpDiagmosisController.text,
postOpDiagmosis: postOpDiagmosisNoteController.text,
surgeon: surgeonController.text,
@ -503,7 +520,8 @@ class _UpdateOperationReportState extends State<UpdateOperationReport> {
bloodLossDetailController.text,
patientID: widget.patient.patientId,
admissionNo: int.parse(widget.patient.admissionNo),
createdBy: widget.operationReportViewModel.doctorProfile.doctorID,
createdBy: widget.operationReportViewModel
.doctorProfile.doctorID,
setupID: SETUP_ID);
await widget.operationReportViewModel.updateOperationReport(
createUpdateOperationReportRequestModel);

Loading…
Cancel
Save