first step from update_operation_report.dart
parent
469556758b
commit
7684b65e8a
@ -1,6 +1,18 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.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';
|
||||
|
||||
class OperationReportService extends BaseService {
|
||||
List<GetOperationReportModel> get operationReportList => List();
|
||||
|
||||
Future updateOperationReport(CreateUpdateOperationReportRequestModel createUpdateOperationReport) async {
|
||||
await baseAppClient.post(UPDATE_OPERATION_REPORT,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: createUpdateOperationReport.toJson(),isFallLanguage: true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,22 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/service/operation_report_servive.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
|
||||
class OperationReportViewModel extends BaseViewModel {}
|
||||
import '../../locator.dart';
|
||||
|
||||
class OperationReportViewModel extends BaseViewModel {
|
||||
OperationReportService _operationReportService =
|
||||
locator<OperationReportService>();
|
||||
|
||||
Future updateOperationReport(
|
||||
CreateUpdateOperationReportRequestModel
|
||||
createUpdateOperationReport) async {
|
||||
setState(ViewState.BusyLocal);
|
||||
if (_operationReportService.hasError) {
|
||||
error = _operationReportService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue