NEW: Patient Manager Provider Setup pt1

This commit is contained in:
2025-10-27 18:46:20 +02:00
parent fd2f3a2138
commit f548db7d82
18 changed files with 1784 additions and 2202 deletions

View File

@@ -1,15 +1,21 @@
import 'package:flutter/material.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/patients.dart';
class PatientManagerProvider extends ChangeNotifier {
int patientProfileIndex;
int patientManagerIndex;
int fileViewerIndex;
bool personalMode;
Patient? selectedPatient;
List<Note>? consultationNotes;
List<PFile>? patientDocuments;
PatientManagerProvider({
this.patientProfileIndex = 0,
this.patientManagerIndex = 0,
this.fileViewerIndex = 0,
this.personalMode = true,
});
@@ -30,6 +36,11 @@ class PatientManagerProvider extends ChangeNotifier {
notifyListeners();
}
void setFileViewerIndex(int index) {
patientProfileIndex = index;
notifyListeners();
}
void setPersonalMode(bool personalMode) {
this.personalMode = personalMode;
notifyListeners();
@@ -39,4 +50,14 @@ class PatientManagerProvider extends ChangeNotifier {
this.selectedPatient = selectedPatient;
notifyListeners();
}
void setConsultationNotes({required List<Note>? consultationNotes}) {
this.consultationNotes = consultationNotes ?? [];
notifyListeners();
}
void setPatientDocuments({required List<PFile>? patientDocuments}) {
this.patientDocuments = patientDocuments ?? [];
notifyListeners();
}
}