Fix Pat Manager

This commit is contained in:
2025-03-10 13:50:50 +02:00
parent 6794aef4e5
commit b693dfd631
3 changed files with 225 additions and 211 deletions

View File

@@ -51,12 +51,14 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
// print("To-Do: Implement the search function");
}
},
child: SingleChildScrollView(
child: Column(mainAxisSize: MainAxisSize.max, children: [
const Text(
"MIH Patient Lookup",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
//spacer
const SizedBox(height: 10),
Row(
@@ -111,15 +113,17 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
snapshot.data!, _mihPatientSearchString);
//print(patientsList);
}
return displayPatientList(patientsList, _mihPatientSearchString);
return displayPatientList(
patientsList, _mihPatientSearchString);
} else {
return Center(
child: Text(
"Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString",
style: TextStyle(
fontSize: 25,
color:
MzanziInnovationHub.of(context)!.theme.errorColor()),
color: MzanziInnovationHub.of(context)!
.theme
.errorColor()),
textAlign: TextAlign.center,
),
);
@@ -127,6 +131,7 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
},
),
]),
),
);
}

View File

@@ -52,6 +52,7 @@ class _MyPatientListState extends State<MyPatientList> {
});
}
},
child: SingleChildScrollView(
child: Column(mainAxisSize: MainAxisSize.max, children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -71,7 +72,8 @@ class _MyPatientListState extends State<MyPatientList> {
),
],
),
Divider(color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
Divider(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),
//spacer
const SizedBox(height: 10),
Row(
@@ -86,8 +88,10 @@ class _MyPatientListState extends State<MyPatientList> {
editable: true,
onTap: () {
setState(() {
_myPatientIdSearchString = _myPatientSearchController.text;
_myPatientList = MIHApiCalls.getPatientAccessListOfBusiness(
_myPatientIdSearchString =
_myPatientSearchController.text;
_myPatientList =
MIHApiCalls.getPatientAccessListOfBusiness(
widget.business!.business_id);
});
},
@@ -132,8 +136,9 @@ class _MyPatientListState extends State<MyPatientList> {
"Error pulling Patient Access Data\n$baseUrl/access-requests/business/patient/${widget.business!.business_id}",
style: TextStyle(
fontSize: 25,
color:
MzanziInnovationHub.of(context)!.theme.errorColor()),
color: MzanziInnovationHub.of(context)!
.theme
.errorColor()),
textAlign: TextAlign.center,
),
);
@@ -141,6 +146,7 @@ class _MyPatientListState extends State<MyPatientList> {
},
),
]),
),
);
}

View File

@@ -61,7 +61,8 @@ class _WaitingRoomState extends State<WaitingRoom> {
Widget getBusinessAppointmentsTool() {
return Stack(
children: [
Column(
SingleChildScrollView(
child: Column(
children: [
const Text(
"Waiting Room",
@@ -88,7 +89,8 @@ class _WaitingRoomState extends State<WaitingRoom> {
FutureBuilder(
future: appointmentResults,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
if (snapshot.connectionState ==
ConnectionState.waiting) {
return const Expanded(
child: Center(child: Mihloadingcircle()));
} else if (snapshot.connectionState ==
@@ -115,6 +117,7 @@ class _WaitingRoomState extends State<WaitingRoom> {
)
],
),
),
Positioned(
right: 0,
bottom: 0,