@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
class ReportsService extends BaseService {
class ReportsService extends BaseService {
List < Reports > reportsList = List ( ) ;
List < Reports > reportsList = List ( ) ;
List < AppointmentHistory > appointHistoryList = List ( ) ;
List < AppointmentHistory > appointHistoryList = List ( ) ;
String userAgreementContent = " " ;
RequestReports _requestReports = RequestReports (
RequestReports _requestReports = RequestReports (
isReport: true ,
isReport: true ,
encounterType: 1 ,
encounterType: 1 ,
@ -44,7 +44,7 @@ class ReportsService extends BaseService {
hasError = false ;
hasError = false ;
Map < String , dynamic > body = new Map < String , dynamic > ( ) ;
Map < String , dynamic > body = new Map < String , dynamic > ( ) ;
body [ ' IsForMedicalReport ' ] = true ;
body [ ' IsForMedicalReport ' ] = true ;
await baseAppClient . post ( GET_PATIENT_AppointmentHistory ,
await baseAppClient . post ( GET_PATIENT_AppointmentHistory ,
onSuccess: ( dynamic response , int statusCode ) {
onSuccess: ( dynamic response , int statusCode ) {
appointHistoryList = [ ] ;
appointHistoryList = [ ] ;
response [ ' AppoimentAllHistoryResultList ' ] . forEach ( ( appoint ) {
response [ ' AppoimentAllHistoryResultList ' ] . forEach ( ( appoint ) {
@ -56,6 +56,33 @@ class ReportsService extends BaseService {
} , body: body ) ;
} , body: body ) ;
}
}
Future getUserTermsAndConditions ( ) async {
hasError = false ;
await baseAppClient . post ( GET_USER_TERMS ,
onSuccess: ( dynamic response , int statusCode ) {
userAgreementContent = response [ ' UserAgreementContent ' ] ;
} , onFailure: ( String error , int statusCode ) {
hasError = true ;
super . error = error ;
} , body: Map < String , dynamic > ( ) ) ;
}
Future updatePatientHealthSummaryReport ( { bool isSummary } ) async {
Map < String , dynamic > body = Map < String , dynamic > ( ) ;
body [ ' RSummaryReport ' ] = isSummary ;
hasError = false ;
await baseAppClient . post ( UPDATE_HEALTH_TERMS ,
onSuccess: ( dynamic response , int statusCode ) {
} , onFailure: ( String error , int statusCode ) {
hasError = true ;
super . error = error ;
} , body: body ) ;
}
Future insertRequestForMedicalReport (
Future insertRequestForMedicalReport (
AppointmentHistory appointmentHistory ) async {
AppointmentHistory appointmentHistory ) async {
Map < String , dynamic > body = new Map < String , dynamic > ( ) ;
Map < String , dynamic > body = new Map < String , dynamic > ( ) ;
@ -63,7 +90,7 @@ class ReportsService extends BaseService {
body [ ' DoctorID ' ] = appointmentHistory . doctorID ;
body [ ' DoctorID ' ] = appointmentHistory . doctorID ;
body [ ' SetupID ' ] = appointmentHistory . setupID ;
body [ ' SetupID ' ] = appointmentHistory . setupID ;
body [ ' EncounterNo ' ] = appointmentHistory . appointmentNo ;
body [ ' EncounterNo ' ] = appointmentHistory . appointmentNo ;
body [ ' EncounterType ' ] = 1 ; / / appointmentHistory . appointmentType ;
body [ ' EncounterType ' ] = 1 ; / / appointmentHistory . appointmentType ;
body [ ' IsActive ' ] = appointmentHistory . isActiveDoctor ;
body [ ' IsActive ' ] = appointmentHistory . isActiveDoctor ;
body [ ' ProjectID ' ] = appointmentHistory . projectID ;
body [ ' ProjectID ' ] = appointmentHistory . projectID ;
body [ ' Remarks ' ] = " " ;
body [ ' Remarks ' ] = " " ;
@ -73,7 +100,7 @@ class ReportsService extends BaseService {
body [ ' Status ' ] = 1 ;
body [ ' Status ' ] = 1 ;
body [ ' CreatedBy ' ] = 102 ;
body [ ' CreatedBy ' ] = 102 ;
hasError = false ;
hasError = false ;
await baseAppClient . post ( INSERT_REQUEST_FOR_MEDICAL_REPORT ,
await baseAppClient . post ( INSERT_REQUEST_FOR_MEDICAL_REPORT ,
onSuccess: ( dynamic response , int statusCode ) { } ,
onSuccess: ( dynamic response , int statusCode ) { } ,
onFailure: ( String error , int statusCode ) {
onFailure: ( String error , int statusCode ) {
hasError = true ;
hasError = true ;