NEW: Patient Manager Provider Setup pt3
This commit is contained in:
@@ -129,7 +129,6 @@ class MIHClaimStatementGenerationApi {
|
||||
List<ClaimStatementFile> docList = List<ClaimStatementFile>.from(
|
||||
l.map((model) => ClaimStatementFile.fromJson(model)));
|
||||
//print("Here3");
|
||||
print(docList);
|
||||
patientManagerProvider.setClaimsDocuments(
|
||||
patientClaimsDocuments: docList);
|
||||
return docList;
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/appointment.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -291,7 +290,7 @@ class MihMzansiCalendarApis {
|
||||
AppUser signedInUser,
|
||||
bool personalSelected,
|
||||
String patientAppId,
|
||||
BusinessArguments businessArgs,
|
||||
String businessId,
|
||||
String title,
|
||||
String description,
|
||||
String date,
|
||||
@@ -306,7 +305,7 @@ class MihMzansiCalendarApis {
|
||||
},
|
||||
body: jsonEncode(<String, dynamic>{
|
||||
"app_id": patientAppId,
|
||||
"business_id": businessArgs.business?.business_id,
|
||||
"business_id": businessId,
|
||||
"title": title,
|
||||
"description": description,
|
||||
"date": date,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:file_picker/file_picker.dart';
|
||||
import 'package:ken_logger/ken_logger.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/files.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/notes.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patients.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/patient_manager_provider.dart';
|
||||
@@ -289,4 +290,21 @@ class MihPatientServices {
|
||||
}
|
||||
return response.statusCode;
|
||||
}
|
||||
|
||||
Future<List<PatientAccess>> getPatientAccessListOfBusiness(
|
||||
PatientManagerProvider patientManagerProvider,
|
||||
String business_id,
|
||||
) async {
|
||||
final response = await http.get(Uri.parse(
|
||||
"${AppEnviroment.baseApiUrl}/access-requests/business/patient/$business_id"));
|
||||
if (response.statusCode == 200) {
|
||||
Iterable l = jsonDecode(response.body);
|
||||
List<PatientAccess> patientAccesses = List<PatientAccess>.from(
|
||||
l.map((model) => PatientAccess.fromJson(model)));
|
||||
patientManagerProvider.setMyPatientList(myPaitentList: patientAccesses);
|
||||
return patientAccesses;
|
||||
} else {
|
||||
throw Exception('failed to pull patient access List for business');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,29 +126,6 @@ class MIHApiCalls {
|
||||
}
|
||||
}
|
||||
|
||||
/// This function is used to get list of access the business has.
|
||||
///
|
||||
/// Patameters: String business_id.
|
||||
///
|
||||
/// Returns List<PatientAccess> (List of access that match the above parameters).
|
||||
static Future<List<PatientAccess>> getPatientAccessListOfBusiness(
|
||||
String business_id) async {
|
||||
final response = await http.get(Uri.parse(
|
||||
"${AppEnviroment.baseApiUrl}/access-requests/business/patient/$business_id"));
|
||||
// var errorCode = response.statusCode.toString();
|
||||
// print(response.statusCode);
|
||||
// print(response.body);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
Iterable l = jsonDecode(response.body);
|
||||
List<PatientAccess> patientAccesses = List<PatientAccess>.from(
|
||||
l.map((model) => PatientAccess.fromJson(model)));
|
||||
return patientAccesses;
|
||||
} else {
|
||||
throw Exception('failed to pull patient access List for business');
|
||||
}
|
||||
}
|
||||
|
||||
/// This function is used to UPDATE access the business has.
|
||||
///
|
||||
/// Patameters:-
|
||||
|
||||
Reference in New Issue
Block a user