reorder file structure
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
class AccessRequest {
|
||||
final int idpatient_queue;
|
||||
final String business_id;
|
||||
final String app_id;
|
||||
final String date_time;
|
||||
final String access;
|
||||
final String revoke_date;
|
||||
final String Name;
|
||||
final String type;
|
||||
final String logo_path;
|
||||
final String contact_no;
|
||||
|
||||
const AccessRequest({
|
||||
required this.idpatient_queue,
|
||||
required this.business_id,
|
||||
required this.app_id,
|
||||
required this.date_time,
|
||||
required this.access,
|
||||
required this.revoke_date,
|
||||
required this.Name,
|
||||
required this.type,
|
||||
required this.logo_path,
|
||||
required this.contact_no,
|
||||
});
|
||||
|
||||
factory AccessRequest.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idpatient_queue": int idpatient_queue,
|
||||
'business_id': String business_id,
|
||||
'app_id': String app_id,
|
||||
'date_time': String date_time,
|
||||
'access': String access,
|
||||
'revoke_date': String revoke_date,
|
||||
'Name': String Name,
|
||||
'type': String type,
|
||||
'logo_path': String logo_path,
|
||||
'contact_no': String contact_no,
|
||||
} =>
|
||||
AccessRequest(
|
||||
idpatient_queue: idpatient_queue,
|
||||
business_id: business_id,
|
||||
app_id: app_id,
|
||||
date_time: date_time,
|
||||
access: access,
|
||||
revoke_date: revoke_date,
|
||||
Name: Name,
|
||||
type: type,
|
||||
logo_path: logo_path,
|
||||
contact_no: contact_no,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// ignore: file_names
|
||||
class AppUser {
|
||||
final int idUser;
|
||||
final String email;
|
||||
final String fname;
|
||||
final String lname;
|
||||
final String type;
|
||||
final String app_id;
|
||||
final String username;
|
||||
final String pro_pic_path;
|
||||
|
||||
const AppUser(
|
||||
this.idUser,
|
||||
this.email,
|
||||
this.fname,
|
||||
this.lname,
|
||||
this.type,
|
||||
this.app_id,
|
||||
this.username,
|
||||
this.pro_pic_path,
|
||||
);
|
||||
|
||||
factory AppUser.fromJson(dynamic json) {
|
||||
return AppUser(
|
||||
json['idUser'],
|
||||
json['email'],
|
||||
json['fname'],
|
||||
json['lname'],
|
||||
json['type'],
|
||||
json['app_id'],
|
||||
json['username'],
|
||||
json['pro_pic_path'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
class Appointment {
|
||||
final int idappointments;
|
||||
final String app_id;
|
||||
final String business_id;
|
||||
final String date_time;
|
||||
final String title;
|
||||
final String description;
|
||||
|
||||
const Appointment({
|
||||
required this.idappointments,
|
||||
required this.app_id,
|
||||
required this.business_id,
|
||||
required this.date_time,
|
||||
required this.title,
|
||||
required this.description,
|
||||
});
|
||||
|
||||
factory Appointment.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idappointments": int idappointments,
|
||||
'app_id': String app_id,
|
||||
'business_id': String business_id,
|
||||
'date_time': String date_time,
|
||||
'title': String title,
|
||||
'description': String description,
|
||||
} =>
|
||||
Appointment(
|
||||
idappointments: idappointments,
|
||||
app_id: app_id,
|
||||
business_id: business_id,
|
||||
date_time: date_time,
|
||||
title: title,
|
||||
description: description,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,219 +0,0 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../mih_objects/app_user.dart';
|
||||
import '../mih_objects/business.dart';
|
||||
import '../mih_objects/business_user.dart';
|
||||
import '../mih_objects/notification.dart';
|
||||
import '../mih_objects/patients.dart';
|
||||
|
||||
class NotificationArguments {
|
||||
final String title;
|
||||
final String body;
|
||||
final void Function()? onTap;
|
||||
|
||||
NotificationArguments(
|
||||
this.title,
|
||||
this.body,
|
||||
this.onTap,
|
||||
);
|
||||
}
|
||||
|
||||
class BusinessArguments {
|
||||
final AppUser signedInUser;
|
||||
final BusinessUser? businessUser;
|
||||
final Business? business;
|
||||
|
||||
BusinessArguments(
|
||||
this.signedInUser,
|
||||
this.businessUser,
|
||||
this.business,
|
||||
);
|
||||
}
|
||||
|
||||
class HomeArguments {
|
||||
final AppUser signedInUser;
|
||||
final BusinessUser? businessUser;
|
||||
final Business? business;
|
||||
final Patient? patient;
|
||||
final List<MIHNotification> notifi;
|
||||
final String profilePicUrl;
|
||||
|
||||
HomeArguments(
|
||||
this.signedInUser,
|
||||
this.businessUser,
|
||||
this.business,
|
||||
this.patient,
|
||||
this.notifi,
|
||||
this.profilePicUrl,
|
||||
);
|
||||
}
|
||||
|
||||
class AppProfileUpdateArguments {
|
||||
final AppUser signedInUser;
|
||||
final ImageProvider<Object>? propicFile;
|
||||
|
||||
AppProfileUpdateArguments(this.signedInUser, this.propicFile);
|
||||
}
|
||||
|
||||
class FileViewArguments {
|
||||
final String link;
|
||||
final String path;
|
||||
|
||||
FileViewArguments(
|
||||
this.link,
|
||||
this.path,
|
||||
);
|
||||
}
|
||||
|
||||
class PrintPreviewArguments {
|
||||
final Uint8List pdfData;
|
||||
final String fileName;
|
||||
|
||||
PrintPreviewArguments(
|
||||
this.pdfData,
|
||||
this.fileName,
|
||||
);
|
||||
}
|
||||
|
||||
class PatientViewArguments {
|
||||
final AppUser signedInUser;
|
||||
final Patient? selectedPatient;
|
||||
final BusinessUser? businessUser;
|
||||
final Business? business;
|
||||
final String type;
|
||||
|
||||
PatientViewArguments(
|
||||
this.signedInUser,
|
||||
this.selectedPatient,
|
||||
this.businessUser,
|
||||
this.business,
|
||||
this.type,
|
||||
);
|
||||
}
|
||||
|
||||
class PatientEditArguments {
|
||||
final AppUser signedInUser;
|
||||
final Patient selectedPatient;
|
||||
|
||||
PatientEditArguments(
|
||||
this.signedInUser,
|
||||
this.selectedPatient,
|
||||
);
|
||||
}
|
||||
|
||||
class ClaimStatementGenerationArguments {
|
||||
final String document_type;
|
||||
final String patient_app_id;
|
||||
final String patient_full_name;
|
||||
final String patient_id_no;
|
||||
final String has_med_aid;
|
||||
final String med_aid_no;
|
||||
final String med_aid_code;
|
||||
final String med_aid_name;
|
||||
final String med_aid_scheme;
|
||||
final String busName;
|
||||
final String busAddr;
|
||||
final String busNo;
|
||||
final String busEmail;
|
||||
final String provider_name;
|
||||
final String practice_no;
|
||||
final String vat_no;
|
||||
final String service_date;
|
||||
final String service_desc;
|
||||
final String service_desc_option;
|
||||
final String procedure_name;
|
||||
final String procedure_additional_info;
|
||||
final String icd10_code;
|
||||
final String amount;
|
||||
final String pre_auth_no;
|
||||
final String logo_path;
|
||||
final String sig_path;
|
||||
|
||||
ClaimStatementGenerationArguments(
|
||||
this.document_type,
|
||||
this.patient_app_id,
|
||||
this.patient_full_name,
|
||||
this.patient_id_no,
|
||||
this.has_med_aid,
|
||||
this.med_aid_no,
|
||||
this.med_aid_code,
|
||||
this.med_aid_name,
|
||||
this.med_aid_scheme,
|
||||
this.busName,
|
||||
this.busAddr,
|
||||
this.busNo,
|
||||
this.busEmail,
|
||||
this.provider_name,
|
||||
this.practice_no,
|
||||
this.vat_no,
|
||||
this.service_date,
|
||||
this.service_desc,
|
||||
this.service_desc_option,
|
||||
this.procedure_name,
|
||||
this.procedure_additional_info,
|
||||
this.icd10_code,
|
||||
this.amount,
|
||||
this.pre_auth_no,
|
||||
this.logo_path,
|
||||
this.sig_path,
|
||||
);
|
||||
}
|
||||
|
||||
class AuthArguments {
|
||||
final bool personalSelected;
|
||||
final bool firstBoot;
|
||||
|
||||
AuthArguments(
|
||||
this.personalSelected,
|
||||
this.firstBoot,
|
||||
);
|
||||
}
|
||||
|
||||
class CalendarArguments {
|
||||
final AppUser signedInUser;
|
||||
final bool personalSelected;
|
||||
final Business? business;
|
||||
final BusinessUser? businessUser;
|
||||
|
||||
CalendarArguments(
|
||||
this.signedInUser,
|
||||
this.personalSelected,
|
||||
this.business,
|
||||
this.businessUser,
|
||||
);
|
||||
}
|
||||
|
||||
class PatManagerArguments {
|
||||
final AppUser signedInUser;
|
||||
final bool personalSelected;
|
||||
final Business? business;
|
||||
final BusinessUser? businessUser;
|
||||
|
||||
PatManagerArguments(
|
||||
this.signedInUser,
|
||||
this.personalSelected,
|
||||
this.business,
|
||||
this.businessUser,
|
||||
);
|
||||
}
|
||||
|
||||
class WalletArguments {
|
||||
final AppUser signedInUser;
|
||||
final int index;
|
||||
|
||||
WalletArguments(
|
||||
this.signedInUser,
|
||||
this.index,
|
||||
);
|
||||
}
|
||||
|
||||
class MzansiAiArguments {
|
||||
final AppUser signedInUser;
|
||||
final String? startUpQuestion;
|
||||
|
||||
MzansiAiArguments(
|
||||
this.signedInUser,
|
||||
this.startUpQuestion,
|
||||
);
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// ignore: file_names
|
||||
class Business {
|
||||
final String business_id;
|
||||
final String Name;
|
||||
final String type;
|
||||
final String registration_no;
|
||||
final String logo_name;
|
||||
final String logo_path;
|
||||
final String contact_no;
|
||||
final String bus_email;
|
||||
final String app_id;
|
||||
final String gps_location;
|
||||
final String practice_no;
|
||||
final String vat_no;
|
||||
|
||||
const Business(
|
||||
this.business_id,
|
||||
this.Name,
|
||||
this.type,
|
||||
this.registration_no,
|
||||
this.logo_name,
|
||||
this.logo_path,
|
||||
this.contact_no,
|
||||
this.bus_email,
|
||||
this.app_id,
|
||||
this.gps_location,
|
||||
this.practice_no,
|
||||
this.vat_no,
|
||||
);
|
||||
|
||||
factory Business.fromJson(dynamic json) {
|
||||
return Business(
|
||||
json['business_id'],
|
||||
json['Name'],
|
||||
json['type'],
|
||||
json['registration_no'],
|
||||
json['logo_name'],
|
||||
json['logo_path'],
|
||||
json['contact_no'],
|
||||
json['bus_email'],
|
||||
json['app_id'],
|
||||
json['gps_location'],
|
||||
json['practice_no'],
|
||||
json['vat_no'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// ignore: file_names
|
||||
class BusinessEmployee {
|
||||
final String business_id;
|
||||
final String app_id;
|
||||
final String title;
|
||||
final String access;
|
||||
final String fname;
|
||||
final String lname;
|
||||
final String email;
|
||||
final String username;
|
||||
|
||||
const BusinessEmployee(
|
||||
this.business_id,
|
||||
this.app_id,
|
||||
this.title,
|
||||
this.access,
|
||||
this.fname,
|
||||
this.lname,
|
||||
this.email,
|
||||
this.username,
|
||||
);
|
||||
|
||||
factory BusinessEmployee.fromJson(dynamic json) {
|
||||
return BusinessEmployee(
|
||||
json['business_id'],
|
||||
json['app_id'],
|
||||
json['title'],
|
||||
json['access'],
|
||||
json['fname'],
|
||||
json['lname'],
|
||||
json['email'],
|
||||
json['username'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// ignore: file_names
|
||||
class BusinessUser {
|
||||
final int idbusiness_users;
|
||||
final String business_id;
|
||||
final String app_id;
|
||||
final String signature;
|
||||
final String sig_path;
|
||||
final String title;
|
||||
final String access;
|
||||
|
||||
const BusinessUser(
|
||||
this.idbusiness_users,
|
||||
this.business_id,
|
||||
this.app_id,
|
||||
this.signature,
|
||||
this.sig_path,
|
||||
this.title,
|
||||
this.access,
|
||||
);
|
||||
|
||||
factory BusinessUser.fromJson(dynamic json) {
|
||||
return BusinessUser(
|
||||
json['idbusiness_users'],
|
||||
json['business_id'],
|
||||
json['app_id'],
|
||||
json['signature'],
|
||||
json['sig_path'],
|
||||
json['title'],
|
||||
json['access'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
class ClaimStatementFile {
|
||||
final int idclaim_statement_file;
|
||||
final String app_id;
|
||||
final String business_id;
|
||||
final String insert_date;
|
||||
final String file_path;
|
||||
final String file_name;
|
||||
|
||||
const ClaimStatementFile({
|
||||
required this.idclaim_statement_file,
|
||||
required this.app_id,
|
||||
required this.business_id,
|
||||
required this.insert_date,
|
||||
required this.file_path,
|
||||
required this.file_name,
|
||||
});
|
||||
|
||||
factory ClaimStatementFile.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idclaim_statement_file": int idclaim_statement_file,
|
||||
'app_id': String app_id,
|
||||
'business_id': String business_id,
|
||||
'insert_date': String insert_date,
|
||||
'file_path': String file_path,
|
||||
'file_name': String file_name,
|
||||
} =>
|
||||
ClaimStatementFile(
|
||||
idclaim_statement_file: idclaim_statement_file,
|
||||
app_id: app_id,
|
||||
business_id: business_id,
|
||||
insert_date: insert_date,
|
||||
file_path: file_path,
|
||||
file_name: file_name,
|
||||
),
|
||||
_ =>
|
||||
throw const FormatException('Failed to load Claim Statement Object.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
class EditScreenArguments {
|
||||
final String useremail;
|
||||
final String selectedPatient;
|
||||
|
||||
EditScreenArguments({required this.useremail, required this.selectedPatient});
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
class PFile {
|
||||
final int idpatient_files;
|
||||
final String file_path;
|
||||
final String file_name;
|
||||
final String insert_date;
|
||||
final String app_id;
|
||||
|
||||
const PFile(
|
||||
this.idpatient_files,
|
||||
this.file_path,
|
||||
this.file_name,
|
||||
this.insert_date,
|
||||
this.app_id,
|
||||
);
|
||||
|
||||
factory PFile.fromJson(dynamic json) {
|
||||
return PFile(
|
||||
json['idpatient_files'],
|
||||
json['file_path'],
|
||||
json['file_name'],
|
||||
json['insert_date'],
|
||||
json['app_id'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class ICD10Code {
|
||||
final String icd10;
|
||||
final String description;
|
||||
|
||||
const ICD10Code({
|
||||
required this.icd10,
|
||||
required this.description,
|
||||
});
|
||||
|
||||
factory ICD10Code.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"icd10": String icd10,
|
||||
'description': String description,
|
||||
} =>
|
||||
ICD10Code(
|
||||
icd10: icd10,
|
||||
description: description,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load icd10 code object.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
class MIHLoyaltyCard {
|
||||
final int idloyalty_cards;
|
||||
final String app_id;
|
||||
final String shop_name;
|
||||
final String card_number;
|
||||
final String favourite;
|
||||
final int priority_index;
|
||||
final String nickname;
|
||||
|
||||
const MIHLoyaltyCard({
|
||||
required this.idloyalty_cards,
|
||||
required this.app_id,
|
||||
required this.shop_name,
|
||||
required this.card_number,
|
||||
required this.favourite,
|
||||
required this.priority_index,
|
||||
required this.nickname,
|
||||
});
|
||||
|
||||
factory MIHLoyaltyCard.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idloyalty_cards": int idloyalty_cards,
|
||||
"app_id": String app_id,
|
||||
"shop_name": String shop_name,
|
||||
"card_number": String card_number,
|
||||
"favourite": String favourite,
|
||||
"priority_index": int priority_index,
|
||||
"nickname": String nickname,
|
||||
} =>
|
||||
MIHLoyaltyCard(
|
||||
idloyalty_cards: idloyalty_cards,
|
||||
app_id: app_id,
|
||||
shop_name: shop_name,
|
||||
card_number: card_number,
|
||||
favourite: favourite,
|
||||
priority_index: priority_index,
|
||||
nickname: nickname,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load loyalty card objects'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
class Medicine {
|
||||
final String name;
|
||||
final String unit;
|
||||
final String form;
|
||||
|
||||
const Medicine(
|
||||
this.name,
|
||||
this.unit,
|
||||
this.form,
|
||||
);
|
||||
|
||||
factory Medicine.fromJson(dynamic json) {
|
||||
return Medicine(
|
||||
json['name'],
|
||||
json['unit'],
|
||||
json['dosage form'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
class Note {
|
||||
final int idpatient_notes;
|
||||
final String note_name;
|
||||
final String note_text;
|
||||
final String insert_date;
|
||||
final String doc_office;
|
||||
final String doctor;
|
||||
final String app_id;
|
||||
|
||||
const Note({
|
||||
required this.idpatient_notes,
|
||||
required this.note_name,
|
||||
required this.note_text,
|
||||
required this.insert_date,
|
||||
required this.doc_office,
|
||||
required this.doctor,
|
||||
required this.app_id,
|
||||
});
|
||||
|
||||
factory Note.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idpatient_notes": int idpatient_notes,
|
||||
"note_name": String note_name,
|
||||
"note_text": String note_text,
|
||||
"insert_date": String insert_date,
|
||||
"doc_office": String doc_office,
|
||||
"doctor": String doctor,
|
||||
"app_id": String app_id,
|
||||
} =>
|
||||
Note(
|
||||
idpatient_notes: idpatient_notes,
|
||||
note_name: note_name,
|
||||
note_text: note_text,
|
||||
insert_date: insert_date,
|
||||
doc_office: doc_office,
|
||||
doctor: doctor,
|
||||
app_id: app_id,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
class MIHNotification {
|
||||
final int idnotifications;
|
||||
final String app_id;
|
||||
final String notification_message;
|
||||
final String notification_read;
|
||||
final String action_path;
|
||||
final String insert_date;
|
||||
final String notification_type;
|
||||
|
||||
const MIHNotification({
|
||||
required this.idnotifications,
|
||||
required this.app_id,
|
||||
required this.notification_message,
|
||||
required this.notification_read,
|
||||
required this.action_path,
|
||||
required this.insert_date,
|
||||
required this.notification_type,
|
||||
});
|
||||
|
||||
factory MIHNotification.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idnotifications": int idnotifications,
|
||||
"app_id": String app_id,
|
||||
"notification_message": String notification_message,
|
||||
"notification_read": String notification_read,
|
||||
"action_path": String action_path,
|
||||
"insert_date": String insert_date,
|
||||
"notification_type": String notification_type,
|
||||
} =>
|
||||
MIHNotification(
|
||||
idnotifications: idnotifications,
|
||||
app_id: app_id,
|
||||
notification_message: notification_message,
|
||||
notification_read: notification_read,
|
||||
action_path: action_path,
|
||||
insert_date: insert_date,
|
||||
notification_type: notification_type,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load Notifications.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
class PatientAccess {
|
||||
final String business_id;
|
||||
final String business_name;
|
||||
final String app_id;
|
||||
final String fname;
|
||||
final String lname;
|
||||
final String id_no;
|
||||
final String type;
|
||||
final String status;
|
||||
final String approved_by;
|
||||
final String approved_on;
|
||||
final String requested_by;
|
||||
final String requested_on;
|
||||
|
||||
const PatientAccess({
|
||||
required this.business_id,
|
||||
required this.business_name,
|
||||
required this.app_id,
|
||||
required this.fname,
|
||||
required this.lname,
|
||||
required this.id_no,
|
||||
required this.type,
|
||||
required this.status,
|
||||
required this.approved_by,
|
||||
required this.approved_on,
|
||||
required this.requested_by,
|
||||
required this.requested_on,
|
||||
});
|
||||
|
||||
factory PatientAccess.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"business_id": String business_id,
|
||||
'business_name': String business_name,
|
||||
'app_id': String app_id,
|
||||
'fname': String fname,
|
||||
'lname': String lname,
|
||||
'id_no': String id_no,
|
||||
'type': String type,
|
||||
'status': String status,
|
||||
'approved_by': String approved_by,
|
||||
'approved_on': String approved_on,
|
||||
'requested_by': String requested_by,
|
||||
'requested_on': String requested_on,
|
||||
} =>
|
||||
PatientAccess(
|
||||
business_id: business_id,
|
||||
business_name: business_name,
|
||||
app_id: app_id,
|
||||
fname: fname,
|
||||
lname: lname,
|
||||
id_no: id_no,
|
||||
type: type,
|
||||
status: status,
|
||||
approved_by: approved_by,
|
||||
approved_on: approved_on,
|
||||
requested_by: requested_by,
|
||||
requested_on: requested_on,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load Patient Access List.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
class PatientQueue {
|
||||
final int idpatient_queue;
|
||||
final String business_id;
|
||||
final String app_id;
|
||||
final String date_time;
|
||||
final String id_no;
|
||||
final String first_name;
|
||||
final String last_name;
|
||||
final String medical_aid_no;
|
||||
final String business_name;
|
||||
|
||||
const PatientQueue({
|
||||
required this.idpatient_queue,
|
||||
required this.business_id,
|
||||
required this.app_id,
|
||||
required this.date_time,
|
||||
required this.id_no,
|
||||
required this.first_name,
|
||||
required this.last_name,
|
||||
required this.medical_aid_no,
|
||||
required this.business_name,
|
||||
});
|
||||
|
||||
factory PatientQueue.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idpatient_queue": int idpatient_queue,
|
||||
'business_id': String business_id,
|
||||
'app_id': String app_id,
|
||||
'date_time': String date_time,
|
||||
'id_no': String id_no,
|
||||
'first_name': String first_name,
|
||||
'last_name': String last_name,
|
||||
'medical_aid_no': String medical_aid_no,
|
||||
'business_name': String business_name,
|
||||
} =>
|
||||
PatientQueue(
|
||||
idpatient_queue: idpatient_queue,
|
||||
business_id: business_id,
|
||||
app_id: app_id,
|
||||
date_time: date_time,
|
||||
id_no: id_no,
|
||||
first_name: first_name,
|
||||
last_name: last_name,
|
||||
medical_aid_no: medical_aid_no,
|
||||
business_name: business_name,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
class Patient {
|
||||
final int idpatients;
|
||||
final String id_no;
|
||||
final String first_name;
|
||||
final String last_name;
|
||||
final String email;
|
||||
final String cell_no;
|
||||
final String medical_aid;
|
||||
final String medical_aid_name;
|
||||
final String medical_aid_no;
|
||||
final String medical_aid_main_member;
|
||||
final String medical_aid_code;
|
||||
final String medical_aid_scheme;
|
||||
final String address;
|
||||
final String app_id;
|
||||
|
||||
const Patient({
|
||||
required this.idpatients,
|
||||
required this.id_no,
|
||||
required this.first_name,
|
||||
required this.last_name,
|
||||
required this.email,
|
||||
required this.cell_no,
|
||||
required this.medical_aid,
|
||||
required this.medical_aid_name,
|
||||
required this.medical_aid_no,
|
||||
required this.medical_aid_main_member,
|
||||
required this.medical_aid_code,
|
||||
required this.medical_aid_scheme,
|
||||
required this.address,
|
||||
required this.app_id,
|
||||
});
|
||||
|
||||
factory Patient.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"idpatients": int idpatients,
|
||||
'id_no': String id_no,
|
||||
'first_name': String first_name,
|
||||
'last_name': String last_name,
|
||||
'email': String email,
|
||||
'cell_no': String cell_no,
|
||||
'medical_aid': String medical_aid,
|
||||
'medical_aid_name': String medical_aid_name,
|
||||
'medical_aid_no': String medical_aid_no,
|
||||
'medical_aid_main_member': String medical_aid_main_member,
|
||||
'medical_aid_code': String medical_aid_code,
|
||||
'medical_aid_scheme': String medical_aid_scheme,
|
||||
'address': String address,
|
||||
'app_id': String app_id,
|
||||
} =>
|
||||
Patient(
|
||||
idpatients: idpatients,
|
||||
id_no: id_no,
|
||||
first_name: first_name,
|
||||
last_name: last_name,
|
||||
email: email,
|
||||
cell_no: cell_no,
|
||||
medical_aid: medical_aid,
|
||||
medical_aid_name: medical_aid_name,
|
||||
medical_aid_no: medical_aid_no,
|
||||
medical_aid_main_member: medical_aid_main_member,
|
||||
medical_aid_code: medical_aid_code,
|
||||
medical_aid_scheme: medical_aid_scheme,
|
||||
address: address,
|
||||
app_id: app_id,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
|
||||
String getIDNum() {
|
||||
return id_no;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
class Perscription {
|
||||
final String name;
|
||||
final String unit;
|
||||
final String form;
|
||||
final String fullForm;
|
||||
final String quantity;
|
||||
final String dosage;
|
||||
final String times;
|
||||
final String days;
|
||||
final String repeats;
|
||||
|
||||
const Perscription({
|
||||
required this.name,
|
||||
required this.unit,
|
||||
required this.form,
|
||||
required this.fullForm,
|
||||
required this.quantity,
|
||||
required this.dosage,
|
||||
required this.times,
|
||||
required this.days,
|
||||
required this.repeats,
|
||||
});
|
||||
|
||||
factory Perscription.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
"name": String name,
|
||||
'unit': String unit,
|
||||
'form': String form,
|
||||
'fullForm': String fullForm,
|
||||
'quantity': String quantity,
|
||||
'dosage': String dosage,
|
||||
'times': String times,
|
||||
'days': String days,
|
||||
'repeats': String repeats,
|
||||
} =>
|
||||
Perscription(
|
||||
name: name,
|
||||
unit: unit,
|
||||
form: form,
|
||||
fullForm: fullForm,
|
||||
quantity: quantity,
|
||||
dosage: dosage,
|
||||
times: times,
|
||||
days: days,
|
||||
repeats: repeats,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load album.'),
|
||||
};
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
"name": name,
|
||||
'unit': unit,
|
||||
'form': form,
|
||||
'fullForm': fullForm,
|
||||
'quantity': quantity,
|
||||
'dosage': dosage,
|
||||
'times': times,
|
||||
'days': days,
|
||||
'repeats': repeats,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class SessionST {
|
||||
final String status;
|
||||
final bool exists;
|
||||
|
||||
const SessionST({
|
||||
required this.status,
|
||||
required this.exists,
|
||||
});
|
||||
|
||||
factory SessionST.fromJson(Map<String, dynamic> json) {
|
||||
return switch (json) {
|
||||
{
|
||||
'status': String status,
|
||||
'exists': bool exists,
|
||||
} =>
|
||||
SessionST(
|
||||
status: status,
|
||||
exists: exists,
|
||||
),
|
||||
_ => throw const FormatException('Failed to load SessionST.'),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user