fist commit ftc staff app clone
This commit is contained in:
58
lib/models/clients/HealthIssuesDetailsModel.dart
Normal file
58
lib/models/clients/HealthIssuesDetailsModel.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:ftc_mobile_app/models/clients/body_points_category.dart';
|
||||
|
||||
class HealthIssueDetailsModel {
|
||||
String sId = "";
|
||||
BodyPointsCategory? bodyPointsCategory;
|
||||
bool status = false;
|
||||
String healthNote = "";
|
||||
String complaint = "";
|
||||
String userId = "";
|
||||
String createdAt = "";
|
||||
String updatedAt = "";
|
||||
int iV = -1;
|
||||
String id = "";
|
||||
|
||||
HealthIssueDetailsModel(
|
||||
{required this.sId,
|
||||
required this.bodyPointsCategory,
|
||||
required this.status,
|
||||
required this.healthNote,
|
||||
required this.complaint,
|
||||
required this.userId,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.iV,
|
||||
required this.id});
|
||||
|
||||
HealthIssueDetailsModel.empty();
|
||||
|
||||
HealthIssueDetailsModel.fromJson(Map<String, dynamic> json) {
|
||||
sId = json['_id'] ?? "";
|
||||
bodyPointsCategory = json['category'] != null && json['category'] is Map
|
||||
? BodyPointsCategory.fromJson(json['category'] ?? <String, dynamic>{} )
|
||||
: null;
|
||||
status = json['status']??''=="1";
|
||||
healthNote = json['healthNote'] ?? "";
|
||||
complaint = json['complaint'] ?? "";
|
||||
userId = json['userId'] ?? "";
|
||||
createdAt = json['createdAt'] ?? "";
|
||||
updatedAt = json['updatedAt'] ?? "";
|
||||
iV = json['__v'] ?? "";
|
||||
id = json['id'] ?? "";
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['_id'] = sId;
|
||||
data['category'] = bodyPointsCategory?.toJson();
|
||||
data['status'] = status;
|
||||
data['healthNote'] = healthNote;
|
||||
data['complaint'] = complaint;
|
||||
data['userId'] = userId;
|
||||
data['createdAt'] = createdAt;
|
||||
data['updatedAt'] = updatedAt;
|
||||
data['__v'] = iV;
|
||||
data['id'] = id;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
381
lib/models/clients/PBSPlanModel.dart
Normal file
381
lib/models/clients/PBSPlanModel.dart
Normal file
@@ -0,0 +1,381 @@
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
import 'package:quill_html_editor/quill_html_editor.dart';
|
||||
|
||||
class PBSListDataJson {
|
||||
PBSListDataJson({
|
||||
required this.pbsList,
|
||||
required this.count,
|
||||
});
|
||||
|
||||
List<PbsList> pbsList = [];
|
||||
int count = -1;
|
||||
|
||||
PBSListDataJson.empty();
|
||||
|
||||
PBSListDataJson.fromJson(Map<String, dynamic> json) {
|
||||
for (var item in json['pbsList']) {
|
||||
pbsList.add(PbsList.fromJson(item));
|
||||
}
|
||||
// pbsList = List.from(json['pbsList']).map((e)=>PbsList.fromJson(e)).toList();
|
||||
count = json['count'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['pbsList'] = pbsList.map((e) => e.toJson()).toList();
|
||||
data['count'] = count;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PBSListDataJson{pbsList: $pbsList, count: $count}';
|
||||
}
|
||||
}
|
||||
|
||||
class PbsList {
|
||||
PbsList({
|
||||
required this.id,
|
||||
required this.userIdModelInPbs,
|
||||
required this.staffId,
|
||||
required this.aboutPlan,
|
||||
required this.managementOfBehaviorPlan,
|
||||
required this.secondaryPrevention,
|
||||
required this.reactiveStrategies,
|
||||
required this.postIncidentSupport,
|
||||
required this.updatedAt,
|
||||
required this.createdAt,
|
||||
});
|
||||
|
||||
String id = "";
|
||||
UserData? userIdModelInPbs;
|
||||
UserData? staffId;
|
||||
String aboutPlan = "";
|
||||
String managementOfBehaviorPlan = "";
|
||||
String secondaryPrevention = "";
|
||||
String reactiveStrategies = "";
|
||||
String postIncidentSupport = "";
|
||||
String updatedAt = "";
|
||||
String createdAt = "";
|
||||
|
||||
QuillEditorController aboutPlanQuillController = QuillEditorController();
|
||||
QuillEditorController managementOfBehaviouralPresentationQuillController = QuillEditorController();
|
||||
QuillEditorController secondaryPreventionQuillController = QuillEditorController();
|
||||
QuillEditorController reactiveStrategiesQuillController = QuillEditorController();
|
||||
QuillEditorController postIncidentSupportRecoveryQuillController = QuillEditorController();
|
||||
|
||||
PbsList.empty();
|
||||
|
||||
PbsList.addData({
|
||||
required this.id,
|
||||
required this.aboutPlan,
|
||||
required this.managementOfBehaviorPlan,
|
||||
required this.secondaryPrevention,
|
||||
required this.reactiveStrategies,
|
||||
required this.postIncidentSupport,
|
||||
});
|
||||
|
||||
PbsList.fromJson(Map<String, dynamic> json) {
|
||||
id = json['_id'] ?? "";
|
||||
userIdModelInPbs = UserData.fromJson(json['userId'] ?? {});
|
||||
staffId = UserData.fromJson(json['staffId'] ?? {});
|
||||
aboutPlan = json['aboutPlan'] ?? "";
|
||||
managementOfBehaviorPlan = json['managementOfBehaviorPlan'] ?? "";
|
||||
secondaryPrevention = json['secondaryPrevention'] ?? "";
|
||||
reactiveStrategies = json['reactiveStartegies'] ?? "";
|
||||
postIncidentSupport = json['postIncidentSupport'] ?? "";
|
||||
updatedAt = json['updatedAt'] ?? "";
|
||||
createdAt = json['createdAt'] ?? "";
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['_id'] = id;
|
||||
data['userId'] = userIdModelInPbs?.toJson();
|
||||
data['staffId'] = staffId?.toJson();
|
||||
data['aboutPlan'] = aboutPlan;
|
||||
data['managementOfBehaviorPlan'] = managementOfBehaviorPlan;
|
||||
data['secondaryPrevention'] = secondaryPrevention;
|
||||
data['reactiveStartegies'] = reactiveStrategies;
|
||||
data['postIncidentSupport'] = postIncidentSupport;
|
||||
data['updatedAt'] = updatedAt;
|
||||
data['createdAt'] = createdAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
// class UserIdModelInPbs {
|
||||
// UserIdModelInPbs({
|
||||
// required this.fcmTokens,
|
||||
// required this.location,
|
||||
// required this.id,
|
||||
// required this.userModelName,
|
||||
// required this.name,
|
||||
// required this.version,
|
||||
// required this.email,
|
||||
// required this.phoneNumber,
|
||||
// required this.active,
|
||||
// required this.role,
|
||||
// required this.profilePictureUrl,
|
||||
// required this.deviceId,
|
||||
// required this.verificationCode,
|
||||
// required this.isVerified,
|
||||
// required this.approved,
|
||||
// required this.blocked,
|
||||
// required this.createdAt,
|
||||
// required this.updatedAt,
|
||||
// required this.v,
|
||||
// required this.password,
|
||||
// required this.userSettings,
|
||||
// required this.modelId,
|
||||
// });
|
||||
//
|
||||
// FcmTokens fcmTokens = FcmTokens.empty();
|
||||
// Location location = Location.empty();
|
||||
// String id = "";
|
||||
// String userModelName = "";
|
||||
// String name = "";
|
||||
// String version = "";
|
||||
// String email = "";
|
||||
// String phoneNumber = "";
|
||||
// bool active = false;
|
||||
// String role = "";
|
||||
// String profilePictureUrl = "";
|
||||
// String deviceId = "";
|
||||
// String verificationCode = "";
|
||||
// bool isVerified = false;
|
||||
// bool approved = false;
|
||||
// bool blocked = false;
|
||||
// String createdAt = "";
|
||||
// String updatedAt = "";
|
||||
// int v = -1;
|
||||
// String password = "";
|
||||
// String userSettings = "";
|
||||
// String modelId = "";
|
||||
//
|
||||
// UserIdModelInPbs.empty();
|
||||
//
|
||||
// UserIdModelInPbs.fromJson(Map<String, dynamic> json) {
|
||||
// fcmTokens = FcmTokens.fromJson(json['fcm_tokens'] ?? "");
|
||||
// location = Location.fromJson(json['location'] ?? "");
|
||||
// id = json['_id'] ?? "";
|
||||
// userModelName = json['userModelName'] ?? "";
|
||||
// name = json['name'] ?? "";
|
||||
// version = json['version'] ?? "";
|
||||
// email = json['email'] ?? "";
|
||||
// phoneNumber = json['phoneNumber'] ?? "";
|
||||
// active = json['active'] ?? "";
|
||||
// role = json['role'] ?? "";
|
||||
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
||||
// deviceId = json['deviceId'] ?? "";
|
||||
// verificationCode = json['verification_code'] ?? "";
|
||||
// isVerified = json['is_verified'] ?? "";
|
||||
// approved = json['approved'] ?? "";
|
||||
// blocked = json['blocked'] ?? "";
|
||||
// createdAt = json['createdAt'] ?? "";
|
||||
// updatedAt = json['updatedAt'] ?? "";
|
||||
// v = json['__v'] ?? "";
|
||||
// password = json['password'] ?? "";
|
||||
// userSettings = json['userSettings'] ?? "";
|
||||
// modelId = json['modelId'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['fcm_tokens'] = fcmTokens.toJson();
|
||||
// data['location'] = location.toJson();
|
||||
// data['_id'] = id;
|
||||
// data['userModelName'] = userModelName;
|
||||
// data['name'] = name;
|
||||
// data['version'] = version;
|
||||
// data['email'] = email;
|
||||
// data['phoneNumber'] = phoneNumber;
|
||||
// data['active'] = active;
|
||||
// data['role'] = role;
|
||||
// data['profile_picture_url'] = profilePictureUrl;
|
||||
// data['deviceId'] = deviceId;
|
||||
// data['verification_code'] = verificationCode;
|
||||
// data['is_verified'] = isVerified;
|
||||
// data['approved'] = approved;
|
||||
// data['blocked'] = blocked;
|
||||
// data['createdAt'] = createdAt;
|
||||
// data['updatedAt'] = updatedAt;
|
||||
// data['__v'] = v;
|
||||
// data['password'] = password;
|
||||
// data['userSettings'] = userSettings;
|
||||
// data['modelId'] = modelId;
|
||||
// return data;
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// String toString() {
|
||||
// return 'UserId{fcmTokens: $fcmTokens, location: $location, id: $id, userModelName: $userModelName, name: $name, version: $version, email: $email, phoneNumber: $phoneNumber, active: $active, role: $role, profilePictureUrl: $profilePictureUrl, deviceId: $deviceId, verificationCode: $verificationCode, isVerified: $isVerified, approved: $approved, blocked: $blocked, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, password: $password, userSettings: $userSettings, modelId: $modelId}';
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class FcmTokens {
|
||||
// FcmTokens({
|
||||
// required this.token,
|
||||
// required this.deviceType,
|
||||
// });
|
||||
//
|
||||
// String token = "";
|
||||
// String deviceType = "";
|
||||
//
|
||||
// FcmTokens.empty();
|
||||
//
|
||||
// FcmTokens.fromJson(Map<String, dynamic> json) {
|
||||
// token = json['token'] ?? "";
|
||||
// deviceType = json['deviceType'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['token'] = token;
|
||||
// data['deviceType'] = deviceType;
|
||||
// return data;
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// String toString() {
|
||||
// return 'FcmTokens{token: $token, deviceType: $deviceType}';
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class Location {
|
||||
// Location({
|
||||
// required this.type,
|
||||
// required this.coordinates,
|
||||
// });
|
||||
//
|
||||
// String type = "";
|
||||
// List<double> coordinates = [0, 0];
|
||||
//
|
||||
// Location.empty();
|
||||
//
|
||||
// Location.fromJson(Map<String, dynamic> json) {
|
||||
// type = json['type'];
|
||||
// coordinates = List.castFrom<dynamic, double>(json['coordinates']);
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['type'] = type;
|
||||
// data['coordinates'] = coordinates;
|
||||
// return data;
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// String toString() {
|
||||
// return 'Location{type: $type, coordinates: $coordinates}';
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class StaffId {
|
||||
// StaffId({
|
||||
// required this.fcmTokens,
|
||||
// required this.location,
|
||||
// required this.id,
|
||||
// required this.userModelName,
|
||||
// required this.name,
|
||||
// required this.version,
|
||||
// required this.email,
|
||||
// required this.phoneNumber,
|
||||
// required this.active,
|
||||
// required this.role,
|
||||
// required this.profilePictureUrl,
|
||||
// required this.deviceId,
|
||||
// required this.verificationCode,
|
||||
// required this.isVerified,
|
||||
// required this.approved,
|
||||
// required this.blocked,
|
||||
// required this.createdAt,
|
||||
// required this.updatedAt,
|
||||
// required this.v,
|
||||
// required this.password,
|
||||
// required this.userSettings,
|
||||
// required this.modelId,
|
||||
// });
|
||||
//
|
||||
// FcmTokens fcmTokens = FcmTokens.empty();
|
||||
// Location location = Location.empty();
|
||||
// String id = "";
|
||||
// String userModelName = "";
|
||||
// String name = "";
|
||||
// String version = "";
|
||||
// String email = "";
|
||||
// String phoneNumber = "";
|
||||
// bool active = false;
|
||||
// String role = "";
|
||||
// String profilePictureUrl = "";
|
||||
// String deviceId = "";
|
||||
// String verificationCode = "";
|
||||
// bool isVerified = false;
|
||||
// bool approved = false;
|
||||
// bool blocked = false;
|
||||
// String createdAt = "";
|
||||
// String updatedAt = "";
|
||||
// int v = -1;
|
||||
// String password = "";
|
||||
// String userSettings = "";
|
||||
// String modelId = "";
|
||||
//
|
||||
// StaffId.empty();
|
||||
//
|
||||
// StaffId.fromJson(Map<String, dynamic> json) {
|
||||
// fcmTokens = FcmTokens.fromJson(json['fcm_tokens'] ?? "");
|
||||
// location = Location.fromJson(json['location'] ?? "");
|
||||
// id = json['_id'] ?? "";
|
||||
// userModelName = json['userModelName'] ?? "";
|
||||
// name = json['name'] ?? "";
|
||||
// version = json['version'] ?? "";
|
||||
// email = json['email'] ?? "";
|
||||
// phoneNumber = json['phoneNumber'] ?? "";
|
||||
// active = json['active'] ?? "";
|
||||
// role = json['role'] ?? "";
|
||||
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
||||
// deviceId = json['deviceId'] ?? "";
|
||||
// verificationCode = json['verification_code'] ?? "";
|
||||
// isVerified = json['is_verified'] ?? "";
|
||||
// approved = json['approved'] ?? "";
|
||||
// blocked = json['blocked'] ?? "";
|
||||
// createdAt = json['createdAt'] ?? "";
|
||||
// updatedAt = json['updatedAt'] ?? "";
|
||||
// v = json['__v'] ?? "";
|
||||
// password = json['password'] ?? "";
|
||||
// userSettings = json['userSettings'] ?? "";
|
||||
// modelId = json['modelId'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['fcm_tokens'] = fcmTokens.toJson();
|
||||
// data['location'] = location.toJson();
|
||||
// data['_id'] = id;
|
||||
// data['userModelName'] = userModelName;
|
||||
// data['name'] = name;
|
||||
// data['version'] = version;
|
||||
// data['email'] = email;
|
||||
// data['phoneNumber'] = phoneNumber;
|
||||
// data['active'] = active;
|
||||
// data['role'] = role;
|
||||
// data['profile_picture_url'] = profilePictureUrl;
|
||||
// data['deviceId'] = deviceId;
|
||||
// data['verification_code'] = verificationCode;
|
||||
// data['is_verified'] = isVerified;
|
||||
// data['approved'] = approved;
|
||||
// data['blocked'] = blocked;
|
||||
// data['createdAt'] = createdAt;
|
||||
// data['updatedAt'] = updatedAt;
|
||||
// data['__v'] = v;
|
||||
// data['password'] = password;
|
||||
// data['userSettings'] = userSettings;
|
||||
// data['modelId'] = modelId;
|
||||
// return data;
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// String toString() {
|
||||
// return 'StaffId{fcmTokens: $fcmTokens, location: $location, id: $id, userModelName: $userModelName, name: $name, version: $version, email: $email, phoneNumber: $phoneNumber, active: $active, role: $role, profilePictureUrl: $profilePictureUrl, deviceId: $deviceId, verificationCode: $verificationCode, isVerified: $isVerified, approved: $approved, blocked: $blocked, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, password: $password, userSettings: $userSettings, modelId: $modelId}';
|
||||
// }
|
||||
// }
|
||||
74
lib/models/clients/add_pbs_plan_model.dart
Normal file
74
lib/models/clients/add_pbs_plan_model.dart
Normal file
@@ -0,0 +1,74 @@
|
||||
import 'package:quill_html_editor/quill_html_editor.dart';
|
||||
|
||||
class AddPBSPlanModel{
|
||||
// String incidentTitle = "";
|
||||
// String incidentId = "";
|
||||
// String userId = "";
|
||||
// int incidentDate = 0;
|
||||
// bool active = false;
|
||||
// String createdAt = "";
|
||||
// String updatedAt = "";
|
||||
// int v = 0;
|
||||
String userId = "";
|
||||
String staffId = "";
|
||||
String planId = "";
|
||||
String aboutPlanNote = "";
|
||||
QuillEditorController aboutPlanQuillController = QuillEditorController();
|
||||
String managementOfBehaviouralPresentationNote = "";
|
||||
QuillEditorController managementOfBehaviouralPresentationQuillController = QuillEditorController();
|
||||
String secondaryPreventionNote = "";
|
||||
QuillEditorController secondaryPreventionQuillController = QuillEditorController();
|
||||
String reactiveStrategiesNote = "";
|
||||
QuillEditorController reactiveStrategiesQuillController = QuillEditorController();
|
||||
String postIncidentSupportRecoveryNote = "";
|
||||
QuillEditorController postIncidentSupportRecoveryQuillController = QuillEditorController();
|
||||
|
||||
Future<bool> get areAllFieldsEdited async {
|
||||
String aboutPlanText = await aboutPlanQuillController.getText();
|
||||
String managementOfBehaviouralPresentationText =
|
||||
await managementOfBehaviouralPresentationQuillController.getText();
|
||||
String secondaryPreventionText =
|
||||
await secondaryPreventionQuillController.getText();
|
||||
String reactiveStrategiesText =
|
||||
await reactiveStrategiesQuillController.getText();
|
||||
String postIncidentSupportRecoveryText =
|
||||
await postIncidentSupportRecoveryQuillController.getText();
|
||||
return aboutPlanText.isNotEmpty &&
|
||||
managementOfBehaviouralPresentationText.isNotEmpty &&
|
||||
secondaryPreventionText.isNotEmpty &&
|
||||
reactiveStrategiesText.isNotEmpty &&
|
||||
postIncidentSupportRecoveryText.isNotEmpty;
|
||||
}
|
||||
|
||||
AddPBSPlanModel.empty();
|
||||
|
||||
AddPBSPlanModel.fromJson(Map<String, dynamic> json){
|
||||
userId = json['userId'];
|
||||
staffId = json['staffId'];
|
||||
aboutPlanNote = json['aboutPlan'];
|
||||
managementOfBehaviouralPresentationNote = json['managementOfBehaviorPlan'];
|
||||
secondaryPreventionNote = json['secondaryPrevention'];
|
||||
reactiveStrategiesNote = json['reactiveStartegies'];
|
||||
postIncidentSupportRecoveryNote = json['postIncidentSupport'];
|
||||
planId = json['_id'];
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AddPBSPlanModel{userId: $userId, staffId: $staffId, planId: $planId, aboutPlanNote: $aboutPlanNote, aboutPlanQuillController: $aboutPlanQuillController, managementOfBehaviouralPresentationNote: $managementOfBehaviouralPresentationNote, managementOfBehaviouralPresentationQuillController: $managementOfBehaviouralPresentationQuillController, secondaryPreventionNote: $secondaryPreventionNote, secondaryPreventionQuillController: $secondaryPreventionQuillController, reactiveStrategiesNote: $reactiveStrategiesNote, reactiveStrategiesQuillController: $reactiveStrategiesQuillController, postIncidentSupportRecoveryNote: $postIncidentSupportRecoveryNote, postIncidentSupportRecoveryQuillController: $postIncidentSupportRecoveryQuillController}';
|
||||
}
|
||||
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final _data = <String, dynamic>{};
|
||||
// _data['userId'] = userId;
|
||||
// _data['staffId'] = staffId;
|
||||
// _data['aboutPlan'] = aboutPlan;
|
||||
// _data['managementOfBehaviorPlan'] = managementOfBehaviorPlan;
|
||||
// _data['secondaryPrevention'] = secondaryPrevention;
|
||||
// _data['reactiveStartegies'] = reactiveStartegies;
|
||||
// _data['postIncidentSupport'] = postIncidentSupport;
|
||||
// _data['_id'] = _id;
|
||||
// return _data;
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import 'CareNoteData.dart';
|
||||
|
||||
class AllCareNotesListResponse {
|
||||
AllCareNotesListResponse({
|
||||
this.status,
|
||||
this.message,
|
||||
this.data,
|
||||
});
|
||||
|
||||
AllCareNotesListResponse.success() {
|
||||
status = "Success";
|
||||
}
|
||||
|
||||
AllCareNotesListResponse.fromJson(dynamic json) {
|
||||
status = json['status'];
|
||||
message = json['message'];
|
||||
data = json['data'] != null ? CareNoteData.fromJson(json['data']) : null;
|
||||
}
|
||||
|
||||
String? status;
|
||||
String? message;
|
||||
CareNoteData? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['status'] = status;
|
||||
map['message'] = message;
|
||||
if (data != null) {
|
||||
map['data'] = data?.toJson();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
42
lib/models/clients/allCareNotes/CareNoteData.dart
Normal file
42
lib/models/clients/allCareNotes/CareNoteData.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'CarePlans.dart';
|
||||
|
||||
class CareNoteData {
|
||||
CareNoteData({
|
||||
this.carePlans,
|
||||
this.count,
|
||||
this.carePlanCount,
|
||||
this.offset,
|
||||
this.limit,
|
||||
});
|
||||
|
||||
CareNoteData.fromJson(dynamic json) {
|
||||
if (json['carePlans'] != null) {
|
||||
carePlans = [];
|
||||
json['carePlans'].forEach((v) {
|
||||
carePlans?.add(CarePlan.fromJson(v));
|
||||
});
|
||||
}
|
||||
count = json['count'];
|
||||
carePlanCount = json['carePlanCount'];
|
||||
offset = json['offset'];
|
||||
limit = json['limit'];
|
||||
}
|
||||
|
||||
List<CarePlan>? carePlans;
|
||||
int? count;
|
||||
int? carePlanCount;
|
||||
int? offset;
|
||||
int? limit;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
if (carePlans != null) {
|
||||
map['carePlans'] = carePlans?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
map['count'] = count;
|
||||
map['carePlanCount'] = carePlanCount;
|
||||
map['offset'] = offset;
|
||||
map['limit'] = limit;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
200
lib/models/clients/allCareNotes/CarePlans.dart
Normal file
200
lib/models/clients/allCareNotes/CarePlans.dart
Normal file
@@ -0,0 +1,200 @@
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
import '../body_points_category.dart';
|
||||
|
||||
class CarePlan {
|
||||
CarePlan({
|
||||
this.id,
|
||||
this.eventDateTime,
|
||||
this.userId,
|
||||
this.addedby,
|
||||
this.noteDetails,
|
||||
this.active,
|
||||
this.noteType,
|
||||
this.title,
|
||||
this.flag,
|
||||
this.isHTML,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.healthIssueId,
|
||||
this.keycontacts,
|
||||
this.riskAssesments,
|
||||
});
|
||||
|
||||
CarePlan.fromJson(dynamic json) {
|
||||
id = json['_id'];
|
||||
eventDateTime = json['eventDateTime'];
|
||||
userId = json['userId'] is Map ? UserData.fromJson(json['userId']) : null;
|
||||
addedby = json['addedby'] is Map ? UserData.fromJson(json['addedby']) : null;
|
||||
noteDetails = json['noteDetails'];
|
||||
active = json['active'];
|
||||
noteType = json['noteType'];
|
||||
title = json['title'];
|
||||
flag = json['flag'];
|
||||
isHTML = json['isHTML'];
|
||||
createdAt = json['createdAt'];
|
||||
updatedAt = json['updatedAt'];
|
||||
|
||||
healthIssueId = json['healthIssueId'] != null
|
||||
? HealthIssueId.fromJson(json['healthIssueId'])
|
||||
: null;
|
||||
keycontacts = json['keycontacts'] != null
|
||||
? List<dynamic>.from(json['keycontacts'])
|
||||
: null;
|
||||
riskAssesments = json['riskAssesments'] != null
|
||||
? List<dynamic>.from(json['riskAssesments'])
|
||||
: null;
|
||||
}
|
||||
|
||||
String? id;
|
||||
int? eventDateTime;
|
||||
UserData? userId;
|
||||
UserData? addedby;
|
||||
String? noteDetails;
|
||||
bool? active;
|
||||
String? noteType;
|
||||
String? title;
|
||||
bool? flag;
|
||||
bool? isHTML;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
HealthIssueId? healthIssueId;
|
||||
List<dynamic>? keycontacts;
|
||||
List<dynamic>? riskAssesments;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['_id'] = id;
|
||||
map['eventDateTime'] = eventDateTime;
|
||||
if (userId != null) {
|
||||
map['userId'] = userId?.toJson();
|
||||
}
|
||||
if (addedby != null) {
|
||||
map['addedby'] = addedby?.toJson();
|
||||
}
|
||||
map['noteDetails'] = noteDetails;
|
||||
map['active'] = active;
|
||||
map['noteType'] = noteType;
|
||||
map['title'] = title;
|
||||
map['flag'] = flag;
|
||||
map['isHTML'] = isHTML;
|
||||
map['createdAt'] = createdAt;
|
||||
map['updatedAt'] = updatedAt;
|
||||
if (healthIssueId != null) {
|
||||
map['healthIssueId'] = healthIssueId?.toJson();
|
||||
}
|
||||
if (keycontacts != null) {
|
||||
map['keycontacts'] = keycontacts;
|
||||
}
|
||||
if (riskAssesments != null) {
|
||||
map['riskAssesments'] = riskAssesments;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
class HealthIssueId {
|
||||
HealthIssueId.fromJson(dynamic json) {
|
||||
id = json['_id'];
|
||||
category =
|
||||
json['category'] != null ? SubCat.fromJson(json['category']) : null;
|
||||
status = json['status'];
|
||||
healthNote = json['healthNote'];
|
||||
complaint = json['complaint'];
|
||||
userId = json['userId'];
|
||||
isCarePlanData = json['isCarePlanData'];
|
||||
isPhysicalIntervention = json['isPhysicalIntervention'];
|
||||
createdAt = json['createdAt'];
|
||||
updatedAt = json['updatedAt'];
|
||||
}
|
||||
|
||||
String? id;
|
||||
SubCat? category;
|
||||
bool? status;
|
||||
String? healthNote;
|
||||
String? complaint;
|
||||
String? userId;
|
||||
bool? isCarePlanData;
|
||||
bool? isPhysicalIntervention;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['_id'] = id;
|
||||
if (category != null) {
|
||||
map['category'] = category?.toJson();
|
||||
}
|
||||
map['status'] = status;
|
||||
map['healthNote'] = healthNote;
|
||||
map['complaint'] = complaint;
|
||||
map['userId'] = userId;
|
||||
map['isCarePlanData'] = isCarePlanData;
|
||||
map['isPhysicalIntervention'] = isPhysicalIntervention;
|
||||
map['createdAt'] = createdAt;
|
||||
map['updatedAt'] = updatedAt;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
// class Category {
|
||||
// Category.fromJson(dynamic json) {
|
||||
// id = json['_id'];
|
||||
// name = json['name'];
|
||||
// enumValue = json['enum'];
|
||||
// parentCategory = json['parentCategory'] != null ? ParentCategory.fromJson(json['parentCategory']) : null;
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// }
|
||||
//
|
||||
// String? id;
|
||||
// String? name;
|
||||
// String? enumValue;
|
||||
// ParentCategory? parentCategory;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['_id'] = id;
|
||||
// map['name'] = name;
|
||||
// map['enum'] = enumValue;
|
||||
// if (parentCategory != null) {
|
||||
// map['parentCategory'] = parentCategory?.toJson();
|
||||
// }
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// return map;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class ParentCategory {
|
||||
// ParentCategory.fromJson(dynamic json) {
|
||||
// id = json['_id'];
|
||||
// name = json['name'];
|
||||
// enumValue = json['enum'];
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// }
|
||||
//
|
||||
// String? id;
|
||||
// String? name;
|
||||
// String? enumValue;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['_id'] = id;
|
||||
// map['name'] = name;
|
||||
// map['enum'] = enumValue;
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// return map;
|
||||
// }
|
||||
// }
|
||||
734
lib/models/clients/allClientsList/AllClientsResponse.dart
Normal file
734
lib/models/clients/allClientsList/AllClientsResponse.dart
Normal file
@@ -0,0 +1,734 @@
|
||||
import '../../profileData/user_data.dart';
|
||||
|
||||
class AllClientsResponse {
|
||||
AllClientsResponse({
|
||||
this.success,
|
||||
this.status,
|
||||
this.message,
|
||||
this.data,});
|
||||
|
||||
AllClientsResponse.fromJson(dynamic json) {
|
||||
status = json['status'];
|
||||
message = json['message'];
|
||||
data = json['data'] != null ? AllClientsResponseData.fromJson(json['data']) : null;
|
||||
}
|
||||
|
||||
//Local var
|
||||
bool? success;
|
||||
|
||||
String? status;
|
||||
String? message;
|
||||
AllClientsResponseData? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['status'] = status;
|
||||
map['message'] = message;
|
||||
if (data != null) {
|
||||
map['data'] = data?.toJson();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AllClientsResponseData {
|
||||
AllClientsResponseData({
|
||||
this.users,
|
||||
this.count,
|
||||
this.offset,
|
||||
this.limit,});
|
||||
|
||||
AllClientsResponseData.fromJson(dynamic json) {
|
||||
if (json['users'] != null) {
|
||||
users = [];
|
||||
json['users'].forEach((v) {
|
||||
users?.add(UserData.fromJson(v));
|
||||
});
|
||||
}
|
||||
count = json['count'];
|
||||
offset = json['offset'];
|
||||
limit = json['limit'];
|
||||
}
|
||||
List<UserData>? users;
|
||||
int? count;
|
||||
int? offset;
|
||||
int? limit;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
if (users != null) {
|
||||
map['users'] = users?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
map['count'] = count;
|
||||
map['offset'] = offset;
|
||||
map['limit'] = limit;
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// class Users {
|
||||
// Users({
|
||||
// this.id,
|
||||
// this.userModelName,
|
||||
// this.active,
|
||||
// this.role,
|
||||
// this.profilePictureUrl,
|
||||
// this.profileVideoUrl,
|
||||
// this.deviceId,
|
||||
// this.verificationCode,
|
||||
// this.isVerified,
|
||||
// this.approved,
|
||||
// this.blocked,
|
||||
// this.name,
|
||||
// this.phoneNumber,
|
||||
// this.email,
|
||||
// this.createdAt,
|
||||
// this.updatedAt,
|
||||
// this.v,
|
||||
// this.modelId,});
|
||||
//
|
||||
// Users.fromJson(dynamic json) {
|
||||
// id = json['_id'];
|
||||
// userModelName = json['userModelName'];
|
||||
// active = json['active'];
|
||||
// role = json['role'];
|
||||
// profilePictureUrl = json['profile_picture_url'];
|
||||
// profileVideoUrl = json['profile_video_url'];
|
||||
// deviceId = json['deviceId'];
|
||||
// verificationCode = json['verification_code'];
|
||||
// isVerified = json['is_verified'];
|
||||
// approved = json['approved'];
|
||||
// blocked = json['blocked'];
|
||||
// name = json['name'];
|
||||
// phoneNumber = json['phoneNumber'];
|
||||
// email = json['email'];
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// modelId = json['modelId'] != null ? ModelId.fromJson(json['modelId']) : null;
|
||||
// }
|
||||
// String? id;
|
||||
// String? userModelName;
|
||||
// bool? active;
|
||||
// String? role;
|
||||
// String? profilePictureUrl;
|
||||
// String? profileVideoUrl;
|
||||
// String? deviceId;
|
||||
// String? verificationCode;
|
||||
// bool? isVerified;
|
||||
// bool? approved;
|
||||
// bool? blocked;
|
||||
// String? name;
|
||||
// String? phoneNumber;
|
||||
// String? email;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
// ModelId? modelId;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['_id'] = id;
|
||||
// map['userModelName'] = userModelName;
|
||||
// map['active'] = active;
|
||||
// map['role'] = role;
|
||||
// map['profile_picture_url'] = profilePictureUrl;
|
||||
// map['profile_video_url'] = profileVideoUrl;
|
||||
// map['deviceId'] = deviceId;
|
||||
// map['verification_code'] = verificationCode;
|
||||
// map['is_verified'] = isVerified;
|
||||
// map['approved'] = approved;
|
||||
// map['blocked'] = blocked;
|
||||
// map['name'] = name;
|
||||
// map['phoneNumber'] = phoneNumber;
|
||||
// map['email'] = email;
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// if (modelId != null) {
|
||||
// map['modelId'] = modelId?.toJson();
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class ModelId {
|
||||
// ModelId({
|
||||
// this.id,
|
||||
// this.suProvider,
|
||||
// this.currSU,
|
||||
// this.shifts,
|
||||
// this.serviceUserMedications,
|
||||
// this.homeVisitSignOut,
|
||||
// this.srUsShiftsRequired,
|
||||
// this.suEnquiries,
|
||||
// this.active,
|
||||
// this.diagnosises,
|
||||
// this.suLastName,
|
||||
// this.name,
|
||||
// this.addedby,
|
||||
// this.user,
|
||||
// this.createdAt,
|
||||
// this.updatedAt,
|
||||
// this.v,
|
||||
// this.lastModifiedBy,
|
||||
// this.providerName,
|
||||
// this.referenceId,
|
||||
// this.seMedicalAlert,
|
||||
// this.suAddress1,
|
||||
// this.suAddress2,
|
||||
// this.suAge,
|
||||
// this.suCity,
|
||||
// this.suDOB,
|
||||
// this.suEmailHome,
|
||||
// this.suEmailWork,
|
||||
// this.suEmergencyContact,
|
||||
// this.suFamilyHead,
|
||||
// this.suFirstMiddleName,
|
||||
// this.suFirstVisitDate,
|
||||
// this.suHomePhone,
|
||||
// this.suLastVisitDate,
|
||||
// this.suMobileHomeNo,
|
||||
// this.suMobileWorkNo,
|
||||
// this.suNote,
|
||||
// this.suPrefHomeNo,
|
||||
// this.suPrefWorkNo,
|
||||
// this.suPreferredName,
|
||||
// this.suReferredBY,
|
||||
// this.suSex,
|
||||
// this.suSsn,
|
||||
// this.suState,
|
||||
// this.suWorkPhone,
|
||||
// this.suZip,});
|
||||
//
|
||||
// ModelId.fromJson(dynamic json) {
|
||||
// id = json['_id'];
|
||||
// if (json['suProvider'] != null) {
|
||||
// suProvider = [];
|
||||
// json['suProvider'].forEach((v) {
|
||||
// suProvider?.add(SuProvider.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// currSU = json['currSU'];
|
||||
// if (json['shifts'] != null) {
|
||||
// shifts = [];
|
||||
// json['shifts'].forEach((v) {
|
||||
// shifts?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['serviceUserMedications'] != null) {
|
||||
// serviceUserMedications = [];
|
||||
// json['serviceUserMedications'].forEach((v) {
|
||||
// serviceUserMedications?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['homeVisitSignOut'] != null) {
|
||||
// homeVisitSignOut = [];
|
||||
// json['homeVisitSignOut'].forEach((v) {
|
||||
// homeVisitSignOut?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['srUsShiftsRequired'] != null) {
|
||||
// srUsShiftsRequired = [];
|
||||
// json['srUsShiftsRequired'].forEach((v) {
|
||||
// srUsShiftsRequired?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['suEnquiries'] != null) {
|
||||
// suEnquiries = [];
|
||||
// json['suEnquiries'].forEach((v) {
|
||||
// suEnquiries?.add(SuEnquiries.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// active = json['active'];
|
||||
// if (json['diagnosises'] != null) {
|
||||
// diagnosises = [];
|
||||
// json['diagnosises'].forEach((v) {
|
||||
// diagnosises?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// suLastName = json['suLastName'];
|
||||
// name = json['name'];
|
||||
// addedby = json['addedby'];
|
||||
// user = json['user'];
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// lastModifiedBy = json['lastModifiedBy'];
|
||||
// providerName = json['providerName'];
|
||||
// referenceId = json['referenceId'];
|
||||
// seMedicalAlert = json['seMedicalAlert'];
|
||||
// suAddress1 = json['suAddress1'];
|
||||
// suAddress2 = json['suAddress2'];
|
||||
// suAge = json['suAge'];
|
||||
// suCity = json['suCity'];
|
||||
// suDOB = json['suDOB'];
|
||||
// suEmailHome = json['suEmailHome'];
|
||||
// suEmailWork = json['suEmailWork'];
|
||||
// suEmergencyContact = json['suEmergencyContact'];
|
||||
// suFamilyHead = json['suFamilyHead'];
|
||||
// suFirstMiddleName = json['suFirstMiddleName'];
|
||||
// suFirstVisitDate = json['suFirstVisitDate'];
|
||||
// suHomePhone = json['suHomePhone'];
|
||||
// suLastVisitDate = json['suLastVisitDate'];
|
||||
// suMobileHomeNo = json['suMobileHomeNo'];
|
||||
// suMobileWorkNo = json['suMobileWorkNo'];
|
||||
// suNote = json['suNote'];
|
||||
// suPrefHomeNo = json['suPrefHomeNo'];
|
||||
// suPrefWorkNo = json['suPrefWorkNo'];
|
||||
// suPreferredName = json['suPreferredName'];
|
||||
// suReferredBY = json['suReferredBY'];
|
||||
// suSex = json['suSex'];
|
||||
// suSsn = json['suSsn'];
|
||||
// suState = json['suState'];
|
||||
// suWorkPhone = json['suWorkPhone'];
|
||||
// suZip = json['suZip'];
|
||||
// }
|
||||
// String? id;
|
||||
// List<SuProvider>? suProvider;
|
||||
// bool? currSU;
|
||||
// List<dynamic>? shifts;
|
||||
// List<dynamic>? serviceUserMedications;
|
||||
// List<dynamic>? homeVisitSignOut;
|
||||
// List<dynamic>? srUsShiftsRequired;
|
||||
// List<SuEnquiries>? suEnquiries;
|
||||
// bool? active;
|
||||
// List<dynamic>? diagnosises;
|
||||
// String? suLastName;
|
||||
// String? name;
|
||||
// String? addedby;
|
||||
// String? user;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
// String? lastModifiedBy;
|
||||
// String? providerName;
|
||||
// String? referenceId;
|
||||
// String? seMedicalAlert;
|
||||
// String? suAddress1;
|
||||
// String? suAddress2;
|
||||
// String? suAge;
|
||||
// String? suCity;
|
||||
// String? suDOB;
|
||||
// String? suEmailHome;
|
||||
// String? suEmailWork;
|
||||
// String? suEmergencyContact;
|
||||
// String? suFamilyHead;
|
||||
// String? suFirstMiddleName;
|
||||
// String? suFirstVisitDate;
|
||||
// String? suHomePhone;
|
||||
// String? suLastVisitDate;
|
||||
// String? suMobileHomeNo;
|
||||
// String? suMobileWorkNo;
|
||||
// String? suNote;
|
||||
// String? suPrefHomeNo;
|
||||
// String? suPrefWorkNo;
|
||||
// String? suPreferredName;
|
||||
// String? suReferredBY;
|
||||
// String? suSex;
|
||||
// String? suSsn;
|
||||
// String? suState;
|
||||
// String? suWorkPhone;
|
||||
// String? suZip;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['_id'] = id;
|
||||
// if (suProvider != null) {
|
||||
// map['suProvider'] = suProvider?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// map['currSU'] = currSU;
|
||||
// if (shifts != null) {
|
||||
// map['shifts'] = shifts?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (serviceUserMedications != null) {
|
||||
// map['serviceUserMedications'] = serviceUserMedications?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (homeVisitSignOut != null) {
|
||||
// map['homeVisitSignOut'] = homeVisitSignOut?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (srUsShiftsRequired != null) {
|
||||
// map['srUsShiftsRequired'] = srUsShiftsRequired?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (suEnquiries != null) {
|
||||
// map['suEnquiries'] = suEnquiries?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// map['active'] = active;
|
||||
// if (diagnosises != null) {
|
||||
// map['diagnosises'] = diagnosises?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// map['suLastName'] = suLastName;
|
||||
// map['name'] = name;
|
||||
// map['addedby'] = addedby;
|
||||
// map['user'] = user;
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// map['lastModifiedBy'] = lastModifiedBy;
|
||||
// map['providerName'] = providerName;
|
||||
// map['referenceId'] = referenceId;
|
||||
// map['seMedicalAlert'] = seMedicalAlert;
|
||||
// map['suAddress1'] = suAddress1;
|
||||
// map['suAddress2'] = suAddress2;
|
||||
// map['suAge'] = suAge;
|
||||
// map['suCity'] = suCity;
|
||||
// map['suDOB'] = suDOB;
|
||||
// map['suEmailHome'] = suEmailHome;
|
||||
// map['suEmailWork'] = suEmailWork;
|
||||
// map['suEmergencyContact'] = suEmergencyContact;
|
||||
// map['suFamilyHead'] = suFamilyHead;
|
||||
// map['suFirstMiddleName'] = suFirstMiddleName;
|
||||
// map['suFirstVisitDate'] = suFirstVisitDate;
|
||||
// map['suHomePhone'] = suHomePhone;
|
||||
// map['suLastVisitDate'] = suLastVisitDate;
|
||||
// map['suMobileHomeNo'] = suMobileHomeNo;
|
||||
// map['suMobileWorkNo'] = suMobileWorkNo;
|
||||
// map['suNote'] = suNote;
|
||||
// map['suPrefHomeNo'] = suPrefHomeNo;
|
||||
// map['suPrefWorkNo'] = suPrefWorkNo;
|
||||
// map['suPreferredName'] = suPreferredName;
|
||||
// map['suReferredBY'] = suReferredBY;
|
||||
// map['suSex'] = suSex;
|
||||
// map['suSsn'] = suSsn;
|
||||
// map['suState'] = suState;
|
||||
// map['suWorkPhone'] = suWorkPhone;
|
||||
// map['suZip'] = suZip;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class SuEnquiries {
|
||||
// SuEnquiries({
|
||||
// this.id,
|
||||
// this.initialContactDate,
|
||||
// this.suEnqContactNo,
|
||||
// this.suEnqEmail,
|
||||
// this.reasonForNeed,
|
||||
// this.suEnqStatus,
|
||||
// this.requestType,
|
||||
// this.suEnqComments,
|
||||
// this.serviceUser,
|
||||
// this.addedby,
|
||||
// this.active,
|
||||
// this.referenceId,
|
||||
// this.createdAt,
|
||||
// this.updatedAt,
|
||||
// this.v,
|
||||
// this.lastModifiedBy,});
|
||||
//
|
||||
// SuEnquiries.fromJson(dynamic json) {
|
||||
// id = json['_id'];
|
||||
// initialContactDate = json['initialContactDate'];
|
||||
// suEnqContactNo = json['suEnqContactNo'];
|
||||
// suEnqEmail = json['suEnqEmail'];
|
||||
// reasonForNeed = json['reasonForNeed'];
|
||||
// suEnqStatus = json['suEnqStatus'];
|
||||
// requestType = json['requestType'];
|
||||
// suEnqComments = json['suEnqComments'];
|
||||
// serviceUser = json['serviceUser'];
|
||||
// addedby = json['addedby'];
|
||||
// active = json['active'];
|
||||
// referenceId = json['referenceId'];
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// lastModifiedBy = json['lastModifiedBy'];
|
||||
// }
|
||||
// String? id;
|
||||
// String? initialContactDate;
|
||||
// String? suEnqContactNo;
|
||||
// String? suEnqEmail;
|
||||
// String? reasonForNeed;
|
||||
// String? suEnqStatus;
|
||||
// String? requestType;
|
||||
// String? suEnqComments;
|
||||
// String? serviceUser;
|
||||
// String? addedby;
|
||||
// bool? active;
|
||||
// String? referenceId;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
// String? lastModifiedBy;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['_id'] = id;
|
||||
// map['initialContactDate'] = initialContactDate;
|
||||
// map['suEnqContactNo'] = suEnqContactNo;
|
||||
// map['suEnqEmail'] = suEnqEmail;
|
||||
// map['reasonForNeed'] = reasonForNeed;
|
||||
// map['suEnqStatus'] = suEnqStatus;
|
||||
// map['requestType'] = requestType;
|
||||
// map['suEnqComments'] = suEnqComments;
|
||||
// map['serviceUser'] = serviceUser;
|
||||
// map['addedby'] = addedby;
|
||||
// map['active'] = active;
|
||||
// map['referenceId'] = referenceId;
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// map['lastModifiedBy'] = lastModifiedBy;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class SuProvider {
|
||||
// SuProvider({
|
||||
// this.contractedHours,
|
||||
// this.id,
|
||||
// this.staffMemberName,
|
||||
// this.staffDesignation,
|
||||
// this.staffOnLeave,
|
||||
// this.supervisorId,
|
||||
// this.holidays,
|
||||
// this.complianceDocuments,
|
||||
// this.driverFields,
|
||||
// this.niNumber,
|
||||
// this.kin,
|
||||
// this.user,
|
||||
// this.clients,
|
||||
// this.staffWorkLoads,
|
||||
// this.staffHolidayRequests,
|
||||
// this.staffTrainings,
|
||||
// this.supervision,
|
||||
// this.underSupervisions,
|
||||
// this.staffWorkingDays,
|
||||
// this.stafDob,
|
||||
// this.active,
|
||||
// this.covidCheck,
|
||||
// this.createdAt,
|
||||
// this.updatedAt,
|
||||
// this.v,
|
||||
// this.staffDisciplinaries,
|
||||
// this.staffReferences,});
|
||||
//
|
||||
// SuProvider.fromJson(dynamic json) {
|
||||
// contractedHours = json['contractedHours'] != null ? ContractedHours.fromJson(json['contractedHours']) : null;
|
||||
// id = json['_id'];
|
||||
// staffMemberName = json['staffMemberName'];
|
||||
// staffDesignation = json['staffDesignation'];
|
||||
// staffOnLeave = json['staffOnLeave'];
|
||||
// supervisorId = json['supervisorId'];
|
||||
// if (json['holidays'] != null) {
|
||||
// holidays = [];
|
||||
// json['holidays'].forEach((v) {
|
||||
// holidays?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['complianceDocuments'] != null) {
|
||||
// complianceDocuments = [];
|
||||
// json['complianceDocuments'].forEach((v) {
|
||||
// complianceDocuments?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// driverFields = json['driverFields'] != null ? DriverFields.fromJson(json['driverFields']) : null;
|
||||
// niNumber = json['niNumber'];
|
||||
// kin = json['kin'];
|
||||
// user = json['user'];
|
||||
// if (json['clients'] != null) {
|
||||
// clients = [];
|
||||
// json['clients'].forEach((v) {
|
||||
// clients?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// staffWorkLoads = json['staffWorkLoads'] != null ? json['staffWorkLoads'].cast<String>() : [];
|
||||
// if (json['staffHolidayRequests'] != null) {
|
||||
// staffHolidayRequests = [];
|
||||
// json['staffHolidayRequests'].forEach((v) {
|
||||
// staffHolidayRequests?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['staffTrainings'] != null) {
|
||||
// staffTrainings = [];
|
||||
// json['staffTrainings'].forEach((v) {
|
||||
// staffTrainings?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// supervision = json['supervision'] != null ? Supervision.fromJson(json['supervision']) : null;
|
||||
// if (json['underSupervisions'] != null) {
|
||||
// underSupervisions = [];
|
||||
// json['underSupervisions'].forEach((v) {
|
||||
// underSupervisions?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// if (json['staffWorkingDays'] != null) {
|
||||
// staffWorkingDays = [];
|
||||
// json['staffWorkingDays'].forEach((v) {
|
||||
// staffWorkingDays?.add(Dynamic.fromJson(v));
|
||||
// });
|
||||
// }
|
||||
// stafDob = json['stafDob'];
|
||||
// active = json['active'];
|
||||
// covidCheck = json['covidCheck'];
|
||||
// createdAt = json['createdAt'];
|
||||
// updatedAt = json['updatedAt'];
|
||||
// v = json['__v'];
|
||||
// staffDisciplinaries = json['staffDisciplinaries'];
|
||||
// staffReferences = json['staffReferences'];
|
||||
// }
|
||||
// ContractedHours? contractedHours;
|
||||
// String? id;
|
||||
// String? staffMemberName;
|
||||
// String? staffDesignation;
|
||||
// bool? staffOnLeave;
|
||||
// String? supervisorId;
|
||||
// List<dynamic>? holidays;
|
||||
// List<dynamic>? complianceDocuments;
|
||||
// DriverFields? driverFields;
|
||||
// String? niNumber;
|
||||
// String? kin;
|
||||
// String? user;
|
||||
// List<dynamic>? clients;
|
||||
// List<String>? staffWorkLoads;
|
||||
// List<dynamic>? staffHolidayRequests;
|
||||
// List<dynamic>? staffTrainings;
|
||||
// Supervision? supervision;
|
||||
// List<dynamic>? underSupervisions;
|
||||
// List<dynamic>? staffWorkingDays;
|
||||
// String? stafDob;
|
||||
// bool? active;
|
||||
// bool? covidCheck;
|
||||
// String? createdAt;
|
||||
// String? updatedAt;
|
||||
// int? v;
|
||||
// String? staffDisciplinaries;
|
||||
// String? staffReferences;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// if (contractedHours != null) {
|
||||
// map['contractedHours'] = contractedHours?.toJson();
|
||||
// }
|
||||
// map['_id'] = id;
|
||||
// map['staffMemberName'] = staffMemberName;
|
||||
// map['staffDesignation'] = staffDesignation;
|
||||
// map['staffOnLeave'] = staffOnLeave;
|
||||
// map['supervisorId'] = supervisorId;
|
||||
// if (holidays != null) {
|
||||
// map['holidays'] = holidays?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (complianceDocuments != null) {
|
||||
// map['complianceDocuments'] = complianceDocuments?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (driverFields != null) {
|
||||
// map['driverFields'] = driverFields?.toJson();
|
||||
// }
|
||||
// map['niNumber'] = niNumber;
|
||||
// map['kin'] = kin;
|
||||
// map['user'] = user;
|
||||
// if (clients != null) {
|
||||
// map['clients'] = clients?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// map['staffWorkLoads'] = staffWorkLoads;
|
||||
// if (staffHolidayRequests != null) {
|
||||
// map['staffHolidayRequests'] = staffHolidayRequests?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (staffTrainings != null) {
|
||||
// map['staffTrainings'] = staffTrainings?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (supervision != null) {
|
||||
// map['supervision'] = supervision?.toJson();
|
||||
// }
|
||||
// if (underSupervisions != null) {
|
||||
// map['underSupervisions'] = underSupervisions?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// if (staffWorkingDays != null) {
|
||||
// map['staffWorkingDays'] = staffWorkingDays?.map((v) => v.toJson()).toList();
|
||||
// }
|
||||
// map['stafDob'] = stafDob;
|
||||
// map['active'] = active;
|
||||
// map['covidCheck'] = covidCheck;
|
||||
// map['createdAt'] = createdAt;
|
||||
// map['updatedAt'] = updatedAt;
|
||||
// map['__v'] = v;
|
||||
// map['staffDisciplinaries'] = staffDisciplinaries;
|
||||
// map['staffReferences'] = staffReferences;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class Supervision {
|
||||
// Supervision({
|
||||
// this.supervisionName,
|
||||
// this.sprDueDate,
|
||||
// this.sprStatus,
|
||||
// this.sprResult,
|
||||
// this.templateTitleId,});
|
||||
//
|
||||
// Supervision.fromJson(dynamic json) {
|
||||
// supervisionName = json['supervisionName'];
|
||||
// sprDueDate = json['sprDueDate'];
|
||||
// sprStatus = json['sprStatus'];
|
||||
// sprResult = json['sprResult'];
|
||||
// templateTitleId = json['templateTitleId'];
|
||||
// }
|
||||
// String? supervisionName;
|
||||
// String? sprDueDate;
|
||||
// String? sprStatus;
|
||||
// String? sprResult;
|
||||
// String? templateTitleId;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['supervisionName'] = supervisionName;
|
||||
// map['sprDueDate'] = sprDueDate;
|
||||
// map['sprStatus'] = sprStatus;
|
||||
// map['sprResult'] = sprResult;
|
||||
// map['templateTitleId'] = templateTitleId;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class DriverFields {
|
||||
// DriverFields({
|
||||
// this.isDriver,
|
||||
// this.vehicleType,});
|
||||
//
|
||||
// DriverFields.fromJson(dynamic json) {
|
||||
// isDriver = json['isDriver'];
|
||||
// vehicleType = json['vehicleType'];
|
||||
// }
|
||||
// bool? isDriver;
|
||||
// String? vehicleType;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['isDriver'] = isDriver;
|
||||
// map['vehicleType'] = vehicleType;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// class ContractedHours {
|
||||
// ContractedHours({
|
||||
// this.contractedHours,
|
||||
// this.totalShiftHoursWeek,
|
||||
// this.noOfShifts,});
|
||||
//
|
||||
// ContractedHours.fromJson(dynamic json) {
|
||||
// contractedHours = json['contractedHours'];
|
||||
// totalShiftHoursWeek = json['totalShiftHoursWeek'];
|
||||
// noOfShifts = json['noOfShifts'];
|
||||
// }
|
||||
// int? contractedHours;
|
||||
// int? totalShiftHoursWeek;
|
||||
// int? noOfShifts;
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final map = <String, dynamic>{};
|
||||
// map['contractedHours'] = contractedHours;
|
||||
// map['totalShiftHoursWeek'] = totalShiftHoursWeek;
|
||||
// map['noOfShifts'] = noOfShifts;
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
116
lib/models/clients/body_points_category.dart
Normal file
116
lib/models/clients/body_points_category.dart
Normal file
@@ -0,0 +1,116 @@
|
||||
class BodyPointsCategory {
|
||||
String idOne = "";
|
||||
String name = "";
|
||||
String enumed = "";
|
||||
String createdAt = "";
|
||||
String updatedAt = "";
|
||||
int v = 0;
|
||||
List<SubCat> subCategory = [];
|
||||
String id = "";
|
||||
|
||||
BodyPointsCategory({
|
||||
required this.idOne,
|
||||
required this.name,
|
||||
required this.enumed,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.v,
|
||||
required this.subCategory,
|
||||
required this.id,
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BodyPointsCategory{idOne: $idOne, name: $name, enumed: $enumed, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, subCategory: $subCategory, id: $id}';
|
||||
}
|
||||
|
||||
// // Override == operator and hashCode getter
|
||||
// @override
|
||||
// bool operator ==(other) =>
|
||||
// identical(this, other) ||
|
||||
// other is BodyPointsCategory && runtimeType == other.runtimeType && id == other.id;
|
||||
//
|
||||
// @override
|
||||
// int get hashCode => id.hashCode;
|
||||
|
||||
BodyPointsCategory.empty();
|
||||
|
||||
BodyPointsCategory.fromJson(Map<String, dynamic> json) {
|
||||
idOne = json['_id'] ?? "";
|
||||
name = json['name'] ?? "";
|
||||
enumed = json['enum'] ?? "";
|
||||
createdAt = json['createdAt'] ?? "";
|
||||
updatedAt = json['updatedAt'] ?? "";
|
||||
v = json['__v'] ?? 0;
|
||||
subCategory = json['subcat'] != null
|
||||
? List.from(json['subcat']).map((e) => SubCat.fromJson(e)).toList()
|
||||
: [SubCat.empty()];
|
||||
id = json['id'] ?? "";
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['_id'] = idOne;
|
||||
data['name'] = name;
|
||||
data['enum'] = enumed;
|
||||
data['createdAt'] = createdAt;
|
||||
data['updatedAt'] = updatedAt;
|
||||
data['__v'] = v;
|
||||
data['subcat'] = subCategory.map((e) => e.toJson()).toList();
|
||||
data['id'] = id;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class SubCat {
|
||||
String idOne = "";
|
||||
String name = "";
|
||||
String enumed = "";
|
||||
dynamic parentCategory;
|
||||
String createdAt = "";
|
||||
String updatedAt = "";
|
||||
int v = 0;
|
||||
String id = "";
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubCat{idOne: $idOne, name: $name, enumed: $enumed, parentCategory: $parentCategory, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, id: $id}';
|
||||
}
|
||||
|
||||
SubCat({
|
||||
required this.idOne,
|
||||
required this.name,
|
||||
required this.enumed,
|
||||
required this.parentCategory,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.v,
|
||||
required this.id,
|
||||
});
|
||||
|
||||
SubCat.empty();
|
||||
|
||||
SubCat.fromJson(Map<String, dynamic> json) {
|
||||
idOne = json['_id'] ?? "";
|
||||
name = json['name'] ?? "";
|
||||
enumed = json['enum'] ?? "";
|
||||
parentCategory = json['parentCategory'] is Map
|
||||
? BodyPointsCategory.fromJson(json['parentCategory'])
|
||||
: json['parentCategory'];
|
||||
createdAt = json['createdAt'] ?? "";
|
||||
updatedAt = json['updatedAt'] ?? "";
|
||||
id = json['id'] ?? "";
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['_id'] = idOne;
|
||||
data['name'] = name;
|
||||
data['enum'] = enumed;
|
||||
data['parentCategory'] = parentCategory;
|
||||
data['createdAt'] = createdAt;
|
||||
data['updatedAt'] = updatedAt;
|
||||
data['id'] = id;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
50
lib/models/clients/body_points_manager.dart
Normal file
50
lib/models/clients/body_points_manager.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
import 'package:get/get_rx/src/rx_types/rx_types.dart';
|
||||
|
||||
class BodyPointsManager {
|
||||
double? triangleTopPosition;
|
||||
double? triangleBottomPosition;
|
||||
double? triangleRightPosition;
|
||||
double? triangleLeftPosition;
|
||||
double? dialogTopPosition;
|
||||
double? dialogBottomPosition;
|
||||
double? dialogRightPosition;
|
||||
double? dialogLeftPosition;
|
||||
String pointName = "";
|
||||
String healthNote = "";
|
||||
String complaint = "";
|
||||
String lastUpdate = "";
|
||||
String pointParentId = "";
|
||||
String pointId = "";
|
||||
String pointIssueId = "";
|
||||
RxBool isPointInactive = true.obs;
|
||||
RxBool pointVisibility = false.obs;
|
||||
RxString pointStatusSelectedDropdownValue = "Active".obs;
|
||||
String serviceUserId = "";
|
||||
|
||||
BodyPointsManager.empty();
|
||||
|
||||
BodyPointsManager.addPoint({
|
||||
required this.pointParentId,
|
||||
required this.isPointInactive,
|
||||
required this.pointId,
|
||||
required this.pointName,
|
||||
required this.pointVisibility,
|
||||
required this.pointStatusSelectedDropdownValue,
|
||||
this.triangleTopPosition,
|
||||
this.triangleBottomPosition,
|
||||
this.triangleRightPosition,
|
||||
this.triangleLeftPosition,
|
||||
this.dialogTopPosition,
|
||||
this.dialogBottomPosition,
|
||||
this.dialogRightPosition,
|
||||
this.dialogLeftPosition,
|
||||
required this.healthNote,
|
||||
required this.complaint,
|
||||
required this.lastUpdate,
|
||||
});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BodyPointsManager{Point Id $pointId,triangleTopPosition: $triangleTopPosition, triangleBottomPosition: $triangleBottomPosition, triangleRightPosition: $triangleRightPosition, triangleLeftPosition: $triangleLeftPosition, dialogTopPosition: $dialogTopPosition, dialogBottomPosition: $dialogBottomPosition, dialogRightPosition: $dialogRightPosition, dialogLeftPosition: $dialogLeftPosition, pointName: $pointName, healthNote: $healthNote, complaint: $complaint, lastUpdate: $lastUpdate, isPointInactive: $isPointInactive, pointVisibility: $pointVisibility, pointStatusSelectedDropdownValue: $pointStatusSelectedDropdownValue}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
class ABCFormHtmlRequest {
|
||||
final String antecedentEvents;
|
||||
final String behaviour;
|
||||
final String consequenceEvents;
|
||||
|
||||
ABCFormHtmlRequest({
|
||||
required this.antecedentEvents,
|
||||
required this.behaviour,
|
||||
required this.consequenceEvents,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """
|
||||
<div className="col-md-12">
|
||||
<p><strong>Antecedent Events: </strong><span id="antecedentEventsData">$antecedentEvents</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Behaviour: </strong><span id="behaviourData">$behaviour</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Consequence Events: </strong><span id="consequenceEventsData">$consequenceEvents</span></p>
|
||||
</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'package:get/get_rx/get_rx.dart';
|
||||
|
||||
class HtmlTableOption {
|
||||
String id;
|
||||
String requirements;
|
||||
final RxBool isChecked = false.obs;
|
||||
|
||||
HtmlTableOption({
|
||||
required this.id,
|
||||
required this.requirements,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
import 'package:html/parser.dart' as htmlparser;
|
||||
import 'package:html/dom.dart' as dom;
|
||||
import 'HtmlTableOption.dart';
|
||||
|
||||
class ConsentCapacityHtmlRequest {
|
||||
final String comments;
|
||||
final String isMCARequired;
|
||||
final String mentalCapacityAssessmentDetail;
|
||||
final String specificDecisionDetail;
|
||||
final String personUndertakingName;
|
||||
final String personUndertakingRole;
|
||||
final String organisation;
|
||||
final String address;
|
||||
final String tel;
|
||||
final String email;
|
||||
final String dateAndTimeOfAssessment;
|
||||
final String lackCapacityToMakeParticularDecisionDetail;
|
||||
final String recordYourEvidenceDescribe;
|
||||
final String viableOptionsConsidered;
|
||||
final String explainWhyTickedBox;
|
||||
final List<HtmlTableOption> canDecisionBeDelayedOptions;
|
||||
final String selectedImpairmentOption;
|
||||
final String impairmentDescribe;
|
||||
final String selectedCanPersonDecisionInfoOption;
|
||||
final String describeCanPersonDecisionInfo;
|
||||
final String selectedCanTheyRetainOption;
|
||||
final String describeCanTheyRetain;
|
||||
final String selectedCanTheyUseOption;
|
||||
final String describeCanTheyUse;
|
||||
final String selectedCanTheyCommunicateOption;
|
||||
final String describeCanTheyCommunicate;
|
||||
final List<HtmlTableOption> causativeNexusOptions;
|
||||
final String evidence;
|
||||
final String selectedDoYouHaveConcernOption;
|
||||
final String whatIsYourEvidence;
|
||||
final String seekingManagementDescribe;
|
||||
final String recordInterviewDescribe;
|
||||
final String section9DontHaveDecisionNameData;
|
||||
final String section9DontHaveDecisionDateData;
|
||||
final String section9HaveDecisionNameData;
|
||||
final String section9HaveDecisionDateData;
|
||||
final String isIMCARequired;
|
||||
final String giveWhyIMCARequiredReason;
|
||||
final String whyIMCARequiredDateTime;
|
||||
final String section9AssessorsName;
|
||||
final String assessorsDesignation;
|
||||
final String assessorsBaseAddress;
|
||||
final String assessorsContactDetailsData;
|
||||
|
||||
ConsentCapacityHtmlRequest({
|
||||
required this.comments,
|
||||
required this.isMCARequired,
|
||||
required this.mentalCapacityAssessmentDetail,
|
||||
required this.specificDecisionDetail,
|
||||
required this.personUndertakingName,
|
||||
required this.personUndertakingRole,
|
||||
required this.organisation,
|
||||
required this.address,
|
||||
required this.tel,
|
||||
required this.email,
|
||||
required this.dateAndTimeOfAssessment,
|
||||
required this.lackCapacityToMakeParticularDecisionDetail,
|
||||
required this.recordYourEvidenceDescribe,
|
||||
required this.viableOptionsConsidered,
|
||||
required this.explainWhyTickedBox,
|
||||
required this.canDecisionBeDelayedOptions,
|
||||
required this.selectedImpairmentOption,
|
||||
required this.impairmentDescribe,
|
||||
required this.selectedCanPersonDecisionInfoOption,
|
||||
required this.describeCanPersonDecisionInfo,
|
||||
required this.selectedCanTheyRetainOption,
|
||||
required this.describeCanTheyRetain,
|
||||
required this.selectedCanTheyUseOption,
|
||||
required this.describeCanTheyUse,
|
||||
required this.selectedCanTheyCommunicateOption,
|
||||
required this.describeCanTheyCommunicate,
|
||||
required this.causativeNexusOptions,
|
||||
required this.evidence,
|
||||
required this.selectedDoYouHaveConcernOption,
|
||||
required this.whatIsYourEvidence,
|
||||
required this.seekingManagementDescribe,
|
||||
required this.recordInterviewDescribe,
|
||||
required this.section9DontHaveDecisionNameData,
|
||||
required this.section9DontHaveDecisionDateData,
|
||||
required this.section9HaveDecisionNameData,
|
||||
required this.section9HaveDecisionDateData,
|
||||
required this.isIMCARequired,
|
||||
required this.giveWhyIMCARequiredReason,
|
||||
required this.whyIMCARequiredDateTime,
|
||||
required this.section9AssessorsName,
|
||||
required this.assessorsDesignation,
|
||||
required this.assessorsBaseAddress,
|
||||
required this.assessorsContactDetailsData,
|
||||
});
|
||||
|
||||
String toHtml(String htmlString) {
|
||||
// Process the HTML string as needed
|
||||
dom.Document document = htmlparser.parse(htmlString);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'isMCARequiredData', value: isMCARequired, document: document);
|
||||
_addTextToElementId(
|
||||
id: 'commentsData', value: comments, document: document);
|
||||
|
||||
final myElement = document.getElementById("ifMcaRequiredContentDiv");
|
||||
if (isMCARequired == "No") {
|
||||
myElement?.attributes['style'] = 'display: none;';
|
||||
} else {
|
||||
myElement?.attributes['style'] = 'display: block;';
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'mentalCapacityAssessmentDetail',
|
||||
value: mentalCapacityAssessmentDetail,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'specificDecisionDetail',
|
||||
value: specificDecisionDetail,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'personUndertakingName',
|
||||
value: personUndertakingName,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'personUndertakingRole',
|
||||
value: personUndertakingRole,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'organisation', value: organisation, document: document);
|
||||
|
||||
_addTextToElementId(id: 'address', value: address, document: document);
|
||||
_addTextToElementId(id: 'tel', value: tel, document: document);
|
||||
_addTextToElementId(id: 'email', value: email, document: document);
|
||||
_addTextToElementId(
|
||||
id: 'dateAndTimeOfAssessment',
|
||||
value: dateAndTimeOfAssessment,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'lackCapacityToMakeParticularDecisionDetail',
|
||||
value: lackCapacityToMakeParticularDecisionDetail,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'recordYourEvidenceDescribe',
|
||||
value: recordYourEvidenceDescribe,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'viableOptionsConsidered',
|
||||
value: viableOptionsConsidered,
|
||||
document: document);
|
||||
|
||||
//canDecisionBeDelayedTable
|
||||
final String generatedHtml1 =
|
||||
generateHtmlRows(canDecisionBeDelayedOptions);
|
||||
print("table1: $generatedHtml1");
|
||||
final tableBody1 = document.getElementById('canDecisionBeDelayedTable');
|
||||
// document.querySelector('.canDecisionBeDelayedTable tbody');
|
||||
print("is tableBody1 null: ${tableBody1 == null}");
|
||||
tableBody1?.innerHtml = generatedHtml1;
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'explainWhyTickedBox',
|
||||
value: explainWhyTickedBox,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'selectedImpairmentOption',
|
||||
value: selectedImpairmentOption,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'impairmentDescribe',
|
||||
value: impairmentDescribe,
|
||||
document: document);
|
||||
|
||||
_addTextToElementId(
|
||||
id: 'selectedCanPersonDecisionInfoOption',
|
||||
value: selectedCanPersonDecisionInfoOption,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'describeCanPersonDecisionInfo',
|
||||
value: describeCanPersonDecisionInfo,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'selectedCanTheyRetainOption',
|
||||
value: selectedCanTheyRetainOption,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'describeCanTheyRetain',
|
||||
value: describeCanTheyRetain,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'selectedCanTheyUseOption',
|
||||
value: selectedCanTheyUseOption,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'describeCanTheyUse',
|
||||
value: describeCanTheyUse,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'selectedCanTheyCommunicateOption',
|
||||
value: selectedCanTheyCommunicateOption,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'describeCanTheyCommunicate',
|
||||
value: describeCanTheyCommunicate,
|
||||
document: document);
|
||||
|
||||
final String generatedHtml2 = generateHtmlRows(causativeNexusOptions);
|
||||
print("table2: $generatedHtml2");
|
||||
final tableBody2 = document.getElementById('causativeNexusOptions');
|
||||
// final tableBody2 = document.querySelector('.causativeNexusOptions tbody');
|
||||
print("is table2 null: ${tableBody2 == null}");
|
||||
tableBody2?.innerHtml = generatedHtml2;
|
||||
|
||||
_addTextToElementId(id: 'evidence', value: evidence, document: document);
|
||||
_addTextToElementId(
|
||||
id: 'selectedDoYouHaveConcernOption',
|
||||
value: selectedDoYouHaveConcernOption,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'whatIsYourEvidence',
|
||||
value: whatIsYourEvidence,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'seekingManagementDescribe',
|
||||
value: seekingManagementDescribe,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'recordInterviewDescribe',
|
||||
value: recordInterviewDescribe,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'section9DontHaveDecisionNameData',
|
||||
value: section9DontHaveDecisionNameData,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'section9DontHaveDecisionDateData',
|
||||
value: section9DontHaveDecisionDateData,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'section9HaveDecisionNameData',
|
||||
value: section9HaveDecisionNameData,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'section9HaveDecisionDateData',
|
||||
value: section9HaveDecisionDateData,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'isIMCARequired', value: isIMCARequired, document: document);
|
||||
_addTextToElementId(
|
||||
id: 'giveWhyIMCARequiredReason',
|
||||
value: giveWhyIMCARequiredReason,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'whyIMCARequiredDateTime',
|
||||
value: whyIMCARequiredDateTime,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'section9AssessorsName',
|
||||
value: section9AssessorsName,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'assessorsDesignation',
|
||||
value: assessorsDesignation,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'assessorsBaseAddress',
|
||||
value: assessorsBaseAddress,
|
||||
document: document);
|
||||
_addTextToElementId(
|
||||
id: 'assessorsContactDetailsData',
|
||||
value: assessorsContactDetailsData,
|
||||
document: document);
|
||||
}
|
||||
|
||||
return document.outerHtml;
|
||||
}
|
||||
|
||||
_addTextToElementId({
|
||||
required String id,
|
||||
required String value,
|
||||
required dom.Document document,
|
||||
}) {
|
||||
final myElement = document.getElementById(id);
|
||||
if (myElement != null) {
|
||||
myElement.text = value;
|
||||
}
|
||||
}
|
||||
|
||||
String generateHtmlRows(List<HtmlTableOption> options) {
|
||||
final StringBuffer htmlBuffer = StringBuffer();
|
||||
|
||||
for (final option in options) {
|
||||
final String rowHtml = '''<tr>
|
||||
<td>${option.requirements}</td>
|
||||
<td>
|
||||
<img src="${option.isChecked.value ? 'http://16.171.242.62/actionButtonTick.464cd329d1d7b49fd28f9f4d8c486b63.svg' : 'http://16.171.242.62/actionButtonDel.7fcdf165cc653aa57ec7b2167ef2f3cc.svg'}"
|
||||
alt="${option.isChecked.value ? 'Tick' : 'Close'}"
|
||||
width="24"
|
||||
height="24">
|
||||
</td>
|
||||
</tr>
|
||||
''';
|
||||
|
||||
htmlBuffer.write(rowHtml);
|
||||
}
|
||||
|
||||
return htmlBuffer.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
class HealthAppointmentsFormHtmlRequest {
|
||||
final String appointmentWith;
|
||||
final String reason;
|
||||
final String comments;
|
||||
|
||||
HealthAppointmentsFormHtmlRequest({
|
||||
required this.appointmentWith,
|
||||
required this.reason,
|
||||
required this.comments,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """<div className="col-md-6">
|
||||
<p><strong>Appointment with: </strong><span id="appointmentWithData">$appointmentWith </span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Reason for appointment: </strong><span id="reasonForAppointmentData">$reason</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Comments: </strong><span id="commentsData">$comments</span></p>
|
||||
</div>""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
class NutritionHydrationFormHtmlRequest {
|
||||
final String nutritionHydrationType;
|
||||
final String foodFluidType;
|
||||
final String foodFluidAmount;
|
||||
final String comments;
|
||||
|
||||
NutritionHydrationFormHtmlRequest({
|
||||
required this.nutritionHydrationType,
|
||||
required this.foodFluidType,
|
||||
required this.foodFluidAmount,
|
||||
required this.comments,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """<div className="col-md-12">
|
||||
<p className="text-left"><strong>Type: </strong><span id="nutritionHydrationTypeData">$nutritionHydrationType</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p className="text-left"><strong>${nutritionHydrationType == "Food" ? "Meal Type: (Breakfast, Lunch, Dinner, Snack etc)" : nutritionHydrationType == "Fluid" ? "Drink Type" : ""}: </strong><span
|
||||
id="foodFluidTypeData">$foodFluidType</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p className="text-left"><strong>${nutritionHydrationType == "Food" ? "Amount Eaten" : nutritionHydrationType == "Fluid" ? "Amount (ML)" : ""}: </strong><span
|
||||
id="foodFluidAmountData">$foodFluidAmount</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Comments: </strong><span id="commentsData">${comments.isNotEmpty ? comments : "No assistance required"}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
${(nutritionHydrationType == "Food") ? """<img className="observationImg" src="http://16.171.242.62/Plat.png" alt="Plat" width="100%"/>""" : nutritionHydrationType == "Fluid" ? """<img className="observationImg" src="http://16.171.242.62/Glass.png" alt="Glass" width="100%"/>""" : ""}</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
class ObservationsFormHtmlReq {
|
||||
final String heartRate;
|
||||
final String bloodPressure;
|
||||
final String respiratoryRate;
|
||||
final String oxygen;
|
||||
final String temperature;
|
||||
final String bloodSugar;
|
||||
|
||||
ObservationsFormHtmlReq({
|
||||
required this.heartRate,
|
||||
required this.bloodPressure,
|
||||
required this.respiratoryRate,
|
||||
required this.oxygen,
|
||||
required this.temperature,
|
||||
required this.bloodSugar,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """<div className="col-md-6">
|
||||
<p><strong>Heart Rate (BPM): </strong><span
|
||||
id="heartRateData">$heartRate</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Blood Pressure (/MMHG): </strong><span id="bloodPressureData">$bloodPressure</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Respiratory Rate: </strong><span id="respiratoryRateData">$respiratoryRate </span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Oxygen (%): </strong><span id="oxygenData">$oxygen</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Temperature (˚C): </strong><span id="temperatureData">$temperature </span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Blood Sugar (MMOL/L): </strong><span id="bloodSugarData">$bloodSugar</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<img className="observationImg" src="http://16.171.242.62/Observation.png" alt="Observation"
|
||||
width="100%"/>
|
||||
</div>""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
import 'HtmlTableOption.dart';
|
||||
|
||||
class PhysicalInterventionFormHtmlRequest {
|
||||
final String durationOfIncidents;
|
||||
final String staffDebriefFormNumber;
|
||||
final String nameOfWitnesses;
|
||||
final String placeOfIncident;
|
||||
final String priorToIntervention;
|
||||
final String pbsFollowed;
|
||||
final String reasonForPhysicalIntervention;
|
||||
final String staffInvolvedInPI;
|
||||
final String conditionOfSU;
|
||||
final String howSuCalmed;
|
||||
final List<HtmlTableOption> useOfForceNecessary;
|
||||
final String pleaseExplain;
|
||||
final String isParentContacted;
|
||||
final String nameOfParentContacted;
|
||||
final String parentContactedTime;
|
||||
final String howParentContacted;
|
||||
final String parentCarersComments;
|
||||
final String howFormWasShared;
|
||||
|
||||
PhysicalInterventionFormHtmlRequest({
|
||||
required this.durationOfIncidents,
|
||||
required this.staffDebriefFormNumber,
|
||||
required this.nameOfWitnesses,
|
||||
required this.placeOfIncident,
|
||||
required this.priorToIntervention,
|
||||
required this.pbsFollowed,
|
||||
required this.reasonForPhysicalIntervention,
|
||||
required this.staffInvolvedInPI,
|
||||
required this.conditionOfSU,
|
||||
required this.howSuCalmed,
|
||||
required this.useOfForceNecessary,
|
||||
required this.pleaseExplain,
|
||||
required this.isParentContacted,
|
||||
required this.nameOfParentContacted,
|
||||
required this.parentContactedTime,
|
||||
required this.howParentContacted,
|
||||
required this.parentCarersComments,
|
||||
required this.howFormWasShared,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
String ifParentContactedHtml = (isParentContacted == "Yes")
|
||||
? """<div className="col-md-6">
|
||||
<p><strong>Name of Parent Contacted</strong>
|
||||
<span id="nameOfParentContactedData">$nameOfParentContacted</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Contact time</strong>
|
||||
<span id="parentContactedTimeData">$parentContactedTime</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>How parent was contacted</strong>
|
||||
<span id="howParentContactedData">$howParentContacted</span></p>
|
||||
</div>"""
|
||||
: "";
|
||||
|
||||
return """<div className="col-md-6">
|
||||
<p><strong>Duration of incident (Mins)</strong>
|
||||
<span id="durationOfIncidentsData">$durationOfIncidents</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Staff Debrief Form Number</strong>
|
||||
<span id="staffDebriefFormNumberData">$staffDebriefFormNumber</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Name of witnesses/adults present</strong>
|
||||
<span id="nameOfWitnessesData">$nameOfWitnesses</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Place incident occurred</strong>
|
||||
<span id="placeOfIncidentData">$placeOfIncident</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>What was used prior to intervention to defuse/deescalate the situation?</strong>
|
||||
<span id="priorToInterventionData">$priorToIntervention</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Was the PBS followed and was it sufficient enough to manage this incident?</strong>
|
||||
<span id="pbsFollowedData">$pbsFollowed</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Reason for physical intervention</strong>
|
||||
<span id="reasonForPhysicalInterventionData">$reasonForPhysicalIntervention</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Staff involved in the physical intervention</strong>
|
||||
<span id="staffInvolvedInPIData">$staffInvolvedInPI</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>Condition of service user following the incident, including breathing monitoring</strong>
|
||||
<span id="conditionOfSUData">$conditionOfSU</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><strong>How was the service user calmed?</strong>
|
||||
<span id="howSuCalmedData">$howSuCalmed</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Why was the use of force necessary?</strong></p>
|
||||
<div className="keyChecksWrapper">
|
||||
<div className="keyPoints">
|
||||
<div className="table-responsive">
|
||||
<Table striped bordered hover className='dynamicRows'>
|
||||
<tbody>
|
||||
<!-- Use of force necessary details -->
|
||||
${useOfForceNecessary.map((row) {
|
||||
return """<tr key=${row.id}>
|
||||
<td>${row.requirements}</td>
|
||||
<td>
|
||||
${row.isChecked() ? """
|
||||
<img
|
||||
src="http://16.171.242.62/actionButtonTick.464cd329d1d7b49fd28f9f4d8c486b63.svg"
|
||||
alt="Tick"
|
||||
width="24"
|
||||
height="24"
|
||||
/>""" : """<img
|
||||
src="http://16.171.242.62/actionButtonDel.7fcdf165cc653aa57ec7b2167ef2f3cc.svg"
|
||||
alt="Close"
|
||||
width="24"
|
||||
height="24"
|
||||
/> """}
|
||||
</td>
|
||||
</tr>""";
|
||||
}).join()}
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>If ticked "Other" please explain</strong>
|
||||
<span id="pleaseExplainData">$pleaseExplain</span></p>
|
||||
</div>
|
||||
<div className="col-md-12 mb-3">
|
||||
<p><strong>Parent Contacted</strong>
|
||||
<span id="isParentContactedData">$isParentContacted</span></p>
|
||||
</div>
|
||||
<!-- Parent contact details -->
|
||||
$ifParentContactedHtml
|
||||
<div className="col-md-12 mt-5">
|
||||
<p><strong>Parent/carer’s comments</strong>
|
||||
<span id="parentCarersCommentsData">$parentCarersComments</span></p>
|
||||
</div>
|
||||
<div className="col-md-12 mb-3">
|
||||
<p><strong>How was this form shared with parents/carers?</strong>
|
||||
<span id="howFormWasSharedData">$howFormWasShared</span></p>
|
||||
</div>""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
class SafeguardingFormHtmlRequest {
|
||||
final String concernsAboutServiceUser;
|
||||
final String voiceOfTheServiceUser;
|
||||
final String areThereAnyImmediateRisks;
|
||||
final String whatActionDoYouFeel;
|
||||
final String comments;
|
||||
final String yourName;
|
||||
final String anyWitnesses;
|
||||
final String dateTimeReporting;
|
||||
final String yourNameDslDdsl;
|
||||
final String actionTaken;
|
||||
|
||||
SafeguardingFormHtmlRequest({
|
||||
required this.concernsAboutServiceUser,
|
||||
required this.voiceOfTheServiceUser,
|
||||
required this.areThereAnyImmediateRisks,
|
||||
required this.whatActionDoYouFeel,
|
||||
required this.comments,
|
||||
required this.yourName,
|
||||
required this.anyWitnesses,
|
||||
required this.dateTimeReporting,
|
||||
required this.yourNameDslDdsl,
|
||||
required this.actionTaken,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """<div className="col-md-12">
|
||||
<p><strong>Concerns about the service user: </strong><span id="concernsAboutServiceUserData">$concernsAboutServiceUser</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Voice of the service user: </strong><span id="voiceOfTheServiceUserData">$voiceOfTheServiceUser </span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Are there any immediate risks: </strong><span id="areThereAnyImmediateRisksData">$areThereAnyImmediateRisks</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>What action do you feel should be taken?: </strong><span id="whatActionDoYouFeelData">$whatActionDoYouFeel</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Comments: </strong><span id="commentsData">$comments</span></p>
|
||||
</div>
|
||||
<div className="col-md-4">
|
||||
<p><strong>Your Name: </strong><span id="yourNameData">$yourName</span></p>
|
||||
</div>
|
||||
<div className="col-md-4">
|
||||
<p><strong>Any witnesses: </strong><span id="anyWitnessesData">$anyWitnesses</span></p>
|
||||
</div>
|
||||
<div className="col-md-4">
|
||||
<p><strong>Date and time of reporting</strong>
|
||||
<span id="dateTimeReportingData">$dateTimeReporting</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p>To be completed by DSL/DDSL<br /><strong>Your Name: </strong><span id="yourNameDslDdslData">$yourNameDslDdsl</span></p>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<p><br /><strong>Action taken: </strong><span id="actionTakenData">$actionTaken</span></p>
|
||||
</div>""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class ShoweringAndBathFormHtmlRequest {
|
||||
final String showeringBathType;
|
||||
final String comments;
|
||||
|
||||
ShoweringAndBathFormHtmlRequest({
|
||||
required this.showeringBathType,
|
||||
required this.comments,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """
|
||||
<div className="col-md-12">
|
||||
<p><strong>Type: </strong><span id="showeringBathTypeData">$showeringBathType</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Comments: </strong><span id="commentsData">${comments.isNotEmpty ? comments : "No assistance required"}</span></p>
|
||||
</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
class ToiletingFormHtmlRequest {
|
||||
final bool assistanceRequired;
|
||||
final String assistanceType;
|
||||
final String comments;
|
||||
|
||||
ToiletingFormHtmlRequest({
|
||||
required this.assistanceRequired,
|
||||
required this.assistanceType,
|
||||
required this.comments,
|
||||
});
|
||||
|
||||
String toHtml() {
|
||||
return """
|
||||
<div className="col-md-12">
|
||||
<p className="text-left"><strong>Was assistance required with toileting? </strong><span id="assistanceRequiredData" className="${assistanceRequired ? "text-success" : "text-danger"}">${assistanceRequired ? "Yes" : "No"}</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Assistance type: </strong><span id="assistanceTypeData">${assistanceType.isNotEmpty ? assistanceType : "Handled alone"}</span></p>
|
||||
</div>
|
||||
<div className="col-md-12">
|
||||
<p><strong>Comments: </strong><span id="commentsData">${comments.isNotEmpty ? comments : "No assistance required"}</span></p>
|
||||
</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
62
lib/models/clients/care_note_category.dart
Normal file
62
lib/models/clients/care_note_category.dart
Normal file
@@ -0,0 +1,62 @@
|
||||
class CareNoteCategory {
|
||||
CareNoteCategory({
|
||||
this.iconPath,
|
||||
this.category,
|
||||
this.subcategories,
|
||||
});
|
||||
|
||||
CareNoteCategory.fromJson(dynamic json) {
|
||||
iconPath = json['iconPath'];
|
||||
category = json['category'];
|
||||
if (json['subcategories'] != null) {
|
||||
subcategories = [];
|
||||
json['subcategories'].forEach((v) {
|
||||
subcategories?.add(Subcategories.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
String? iconPath;
|
||||
String? category;
|
||||
List<Subcategories>? subcategories;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['iconPath'] = iconPath;
|
||||
map['category'] = category;
|
||||
if (subcategories != null) {
|
||||
map['subcategories'] = subcategories?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
class Subcategories {
|
||||
Subcategories({
|
||||
this.iconPath,
|
||||
this.name,
|
||||
this.formType,
|
||||
this.apiValue,
|
||||
});
|
||||
|
||||
Subcategories.fromJson(dynamic json) {
|
||||
iconPath = json['iconPath'];
|
||||
name = json['name'];
|
||||
formType = json['formType'];
|
||||
apiValue = json['apiValue'];
|
||||
}
|
||||
|
||||
String? iconPath;
|
||||
String? name;
|
||||
String? formType;
|
||||
String? apiValue;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['iconPath'] = iconPath;
|
||||
map['name'] = name;
|
||||
map['formType'] = formType;
|
||||
map['apiValue'] = apiValue;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
25
lib/models/clients/client_data_model.dart
Normal file
25
lib/models/clients/client_data_model.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class ClientDataModel{
|
||||
String firstName = "";
|
||||
String lastName = "";
|
||||
String mobileNo = "";
|
||||
String email = "";
|
||||
String gender = "";
|
||||
DateTime dob = DateTime.now();
|
||||
String age = "";
|
||||
|
||||
ClientDataModel.empty();
|
||||
|
||||
ClientDataModel.addData(
|
||||
{required this.firstName,
|
||||
required this.lastName,
|
||||
required this.mobileNo,
|
||||
required this.email,
|
||||
required this.gender,
|
||||
required this.dob,
|
||||
required this.age});
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ClientDataModel{firstName: $firstName, lastName: $lastName, mobileNo: $mobileNo, email: $email, gender: $gender, dob: $dob, age: $age}';
|
||||
}
|
||||
}
|
||||
34
lib/models/clients/consent_details_model.dart
Normal file
34
lib/models/clients/consent_details_model.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
class ConsentDetailsModel{
|
||||
String id = "";
|
||||
String staffId = "";
|
||||
bool active = false;
|
||||
String description = "";
|
||||
int v = 0;
|
||||
DateTime createdAt =DateTime.now();
|
||||
DateTime updatedAt =DateTime.now();
|
||||
|
||||
ConsentDetailsModel.empty();
|
||||
ConsentDetailsModel.addData(
|
||||
{required this.id,
|
||||
required this.staffId,
|
||||
required this.active,
|
||||
required this.description,
|
||||
required this.v,
|
||||
required this.createdAt,
|
||||
required this.updatedAt});
|
||||
|
||||
ConsentDetailsModel.fromJson(Map<String, dynamic> json){
|
||||
id = json['_id']??"";
|
||||
staffId = json['staffId']??"";
|
||||
active = json['active']??false;
|
||||
description = json['description']??"";
|
||||
v = json['__v']??-1;
|
||||
createdAt = DateTime.tryParse(json['createdAt'])??DateTime.now();
|
||||
updatedAt = DateTime.tryParse(json['updatedAt'])??DateTime.now();
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ConsentDetailsModel{id: $id, staffId: $staffId, active: $active, description: $description, v: $v, createdAt: $createdAt, updatedAt: $updatedAt}';
|
||||
}
|
||||
}
|
||||
338
lib/models/clients/documents_list_model.dart
Normal file
338
lib/models/clients/documents_list_model.dart
Normal file
@@ -0,0 +1,338 @@
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
|
||||
class DocumentsListModel {
|
||||
DocumentsListModel({
|
||||
required this.documentList,
|
||||
required this.count,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
});
|
||||
|
||||
List<DocumentModel> documentList = [];
|
||||
int count = -1;
|
||||
int offset = -1;
|
||||
int limit = -1;
|
||||
|
||||
DocumentsListModel.empty();
|
||||
|
||||
DocumentsListModel.fromJson(Map<String, dynamic> json) {
|
||||
documentList = List.from(json['documentList'] ?? [])
|
||||
.map((e) => DocumentModel.fromJson(e))
|
||||
.toList();
|
||||
count = json['count'] ?? -1;
|
||||
offset = json['offset'] ?? -1;
|
||||
limit = json['limit'] ?? -1;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['documentList'] = documentList.map((e) => e.toJson()).toList();
|
||||
data['count'] = count;
|
||||
data['offset'] = offset;
|
||||
data['limit'] = limit;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DocumentModel {
|
||||
DocumentModel({
|
||||
required this.id,
|
||||
required this.docPath,
|
||||
required this.details,
|
||||
required this.title,
|
||||
required this.userId,
|
||||
required this.addedBy,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
String id = "";
|
||||
String docPath = "";
|
||||
String details = "";
|
||||
String title = "";
|
||||
UserData? userId;
|
||||
UserData? addedBy;
|
||||
String createdAt = "";
|
||||
String updatedAt = "";
|
||||
|
||||
DocumentModel.empty();
|
||||
|
||||
DocumentModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['_id'] ?? "";
|
||||
docPath = json['docPath'] ?? "";
|
||||
details = json['details'] ?? "";
|
||||
title = json['title'] ?? "";
|
||||
userId = json['userId'] is Map ? UserData.fromJson(json['userId']) : null;
|
||||
addedBy =
|
||||
json['addedBy'] is Map ? UserData.fromJson(json['addedBy']) : null;
|
||||
createdAt = json['createdAt'] ?? "";
|
||||
updatedAt = json['updatedAt'] ?? "";
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['_id'] = id;
|
||||
data['docPath'] = docPath;
|
||||
data['details'] = details;
|
||||
data['title'] = title;
|
||||
data['userId'] = userId;
|
||||
data['addedBy'] = addedBy;
|
||||
data['createdAt'] = createdAt;
|
||||
data['updatedAt'] = updatedAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
// class UserId {
|
||||
// UserId({
|
||||
// required this.fcmTokens,
|
||||
// required this.location,
|
||||
// required this.id,
|
||||
// required this.userModelName,
|
||||
// required this.name,
|
||||
// required this.version,
|
||||
// required this.email,
|
||||
// required this.phoneNumber,
|
||||
// required this.active,
|
||||
// required this.role,
|
||||
// required this.profilePictureUrl,
|
||||
// required this.deviceId,
|
||||
// required this.verificationCode,
|
||||
// required this.isVerified,
|
||||
// required this.approved,
|
||||
// required this.blocked,
|
||||
// required this.createdAt,
|
||||
// required this.updatedAt,
|
||||
// required this.V,
|
||||
// required this.password,
|
||||
// required this.userSettings,
|
||||
// required this.modelId,
|
||||
// });
|
||||
//
|
||||
// Location location = Location.empty();
|
||||
// String id = "";
|
||||
// String userModelName = "";
|
||||
// String name = "";
|
||||
// String version = "";
|
||||
// String email = "";
|
||||
// String phoneNumber = "";
|
||||
// bool active = false;
|
||||
// String role = "";
|
||||
// String profilePictureUrl = "";
|
||||
// String deviceId = "";
|
||||
// String verificationCode = "";
|
||||
// bool isVerified = false;
|
||||
// bool approved = false;
|
||||
// bool blocked = false;
|
||||
// String createdAt = "";
|
||||
// String updatedAt = "";
|
||||
// int V = -1;
|
||||
// String password = "";
|
||||
// String userSettings = "";
|
||||
// String modelId = "";
|
||||
//
|
||||
// UserId.empty();
|
||||
//
|
||||
// UserId.fromJson(Map<String, dynamic> json) {
|
||||
// location = Location.fromJson(json['location'] ?? {});
|
||||
// id = json['_id'] ?? "";
|
||||
// userModelName = json['userModelName'] ?? "";
|
||||
// name = json['name'] ?? "";
|
||||
// version = json['version'] ?? "";
|
||||
// email = json['email'] ?? "";
|
||||
// phoneNumber = json['phoneNumber'] ?? "";
|
||||
// active = json['active'] ?? false;
|
||||
// role = json['role'] ?? "";
|
||||
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
||||
// deviceId = json['deviceId'] ?? "";
|
||||
// verificationCode = json['verification_code'] ?? "";
|
||||
// isVerified = json['is_verified'] ?? false;
|
||||
// approved = json['approved'] ?? false;
|
||||
// blocked = json['blocked'] ?? false;
|
||||
// createdAt = json['createdAt'] ?? "";
|
||||
// updatedAt = json['updatedAt'] ?? "";
|
||||
// V = json['__v'] ?? -1;
|
||||
// password = json['password'] ?? "";
|
||||
// userSettings = json['userSettings'] ?? "";
|
||||
// modelId = json['modelId'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['fcm_tokens'] = fcmTokens.toJson();
|
||||
// data['location'] = location.toJson();
|
||||
// data['_id'] = id;
|
||||
// data['userModelName'] = userModelName;
|
||||
// data['name'] = name;
|
||||
// data['version'] = version;
|
||||
// data['email'] = email;
|
||||
// data['phoneNumber'] = phoneNumber;
|
||||
// data['active'] = active;
|
||||
// data['role'] = role;
|
||||
// data['profile_picture_url'] = profilePictureUrl;
|
||||
// data['deviceId'] = deviceId;
|
||||
// data['verification_code'] = verificationCode;
|
||||
// data['is_verified'] = isVerified;
|
||||
// data['approved'] = approved;
|
||||
// data['blocked'] = blocked;
|
||||
// data['createdAt'] = createdAt;
|
||||
// data['updatedAt'] = updatedAt;
|
||||
// data['__v'] = V;
|
||||
// data['password'] = password;
|
||||
// data['userSettings'] = userSettings;
|
||||
// data['modelId'] = modelId;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class FcmTokens {
|
||||
// FcmTokens({
|
||||
// required this.token,
|
||||
// required this.deviceType,
|
||||
// });
|
||||
//
|
||||
// String token = "";
|
||||
// String deviceType = "";
|
||||
//
|
||||
// FcmTokens.empty();
|
||||
//
|
||||
// FcmTokens.fromJson(Map<String, dynamic> json) {
|
||||
// token = json['token'] ?? "";
|
||||
// deviceType = json['deviceType'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['token'] = token;
|
||||
// data['deviceType'] = deviceType;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class Location {
|
||||
// Location({
|
||||
// required this.type,
|
||||
// required this.coordinates,
|
||||
// });
|
||||
//
|
||||
// String type = "";
|
||||
// List<double> coordinates = [];
|
||||
//
|
||||
// Location.empty();
|
||||
//
|
||||
// Location.fromJson(Map<String, dynamic> json) {
|
||||
// type = json['type'] ?? "";
|
||||
// coordinates = List.castFrom<dynamic, double>(json['coordinates'] ?? []);
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['type'] = type;
|
||||
// data['coordinates'] = coordinates;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class AddedBy {
|
||||
// AddedBy({
|
||||
// required this.fcmTokens,
|
||||
// required this.location,
|
||||
// required this.id,
|
||||
// required this.userModelName,
|
||||
// required this.name,
|
||||
// required this.version,
|
||||
// required this.email,
|
||||
// required this.phoneNumber,
|
||||
// required this.active,
|
||||
// required this.role,
|
||||
// required this.profilePictureUrl,
|
||||
// required this.deviceId,
|
||||
// required this.verificationCode,
|
||||
// required this.isVerified,
|
||||
// required this.approved,
|
||||
// required this.blocked,
|
||||
// required this.createdAt,
|
||||
// required this.updatedAt,
|
||||
// required this.V,
|
||||
// required this.password,
|
||||
// required this.userSettings,
|
||||
// required this.modelId,
|
||||
// });
|
||||
//
|
||||
// FcmTokens fcmTokens = FcmTokens.empty();
|
||||
// Location location = Location.empty();
|
||||
// String id = "";
|
||||
// String userModelName = "";
|
||||
// String name = "";
|
||||
// String version = "";
|
||||
// String email = "";
|
||||
// String phoneNumber = "";
|
||||
// bool active = 0 == 1;
|
||||
// String role = "";
|
||||
// String profilePictureUrl = "";
|
||||
// String deviceId = "";
|
||||
// String verificationCode = "";
|
||||
// bool isVerified = 1 == 0;
|
||||
// bool approved = 1 == 0;
|
||||
// bool blocked = 1 == 0;
|
||||
// String createdAt = "";
|
||||
// String updatedAt = "";
|
||||
// int V = 1;
|
||||
// String password = "";
|
||||
// String userSettings = "";
|
||||
// String modelId = "";
|
||||
//
|
||||
// AddedBy.empty();
|
||||
//
|
||||
// AddedBy.fromJson(Map<String, dynamic> json) {
|
||||
// fcmTokens = FcmTokens.fromJson(json['fcm_tokens'] ?? FcmTokens.empty());
|
||||
// location = Location.fromJson(json['location'] ?? Location.empty());
|
||||
// id = json['_id'] ?? "";
|
||||
// userModelName = json['userModelName'] ?? "";
|
||||
// name = json['name'] ?? "";
|
||||
// version = json['version'] ?? "";
|
||||
// email = json['email'] ?? "";
|
||||
// phoneNumber = json['phoneNumber'] ?? "";
|
||||
// active = json['active'] ?? false;
|
||||
// role = json['role'] ?? "";
|
||||
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
||||
// deviceId = json['deviceId'] ?? "";
|
||||
// verificationCode = json['verification_code'] ?? "";
|
||||
// isVerified = json['is_verified'] ?? false;
|
||||
// approved = json['approved'] ?? false;
|
||||
// blocked = json['blocked'] ?? false;
|
||||
// createdAt = json['createdAt'] ?? "";
|
||||
// updatedAt = json['updatedAt'] ?? "";
|
||||
// V = json['__v'] ?? -1;
|
||||
// password = json['password'] ?? "";
|
||||
// userSettings = json['userSettings'] ?? "";
|
||||
// modelId = json['modelId'] ?? "";
|
||||
// }
|
||||
//
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final data = <String, dynamic>{};
|
||||
// data['fcm_tokens'] = fcmTokens.toJson();
|
||||
// data['location'] = location.toJson();
|
||||
// data['_id'] = id;
|
||||
// data['userModelName'] = userModelName;
|
||||
// data['name'] = name;
|
||||
// data['version'] = version;
|
||||
// data['email'] = email;
|
||||
// data['phoneNumber'] = phoneNumber;
|
||||
// data['active'] = active;
|
||||
// data['role'] = role;
|
||||
// data['profile_picture_url'] = profilePictureUrl;
|
||||
// data['deviceId'] = deviceId;
|
||||
// data['verification_code'] = verificationCode;
|
||||
// data['is_verified'] = isVerified;
|
||||
// data['approved'] = approved;
|
||||
// data['blocked'] = blocked;
|
||||
// data['createdAt'] = createdAt;
|
||||
// data['updatedAt'] = updatedAt;
|
||||
// data['__v'] = V;
|
||||
// data['password'] = password;
|
||||
// data['userSettings'] = userSettings;
|
||||
// data['modelId'] = modelId;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
||||
52
lib/models/clients/memoryListResponse/MemoryListData.dart
Normal file
52
lib/models/clients/memoryListResponse/MemoryListData.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
|
||||
class MemoryListData {
|
||||
MemoryListData({
|
||||
this.addedBy,
|
||||
this.userId,
|
||||
this.note,
|
||||
this.filePath,
|
||||
this.isDeleted,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.id,
|
||||
});
|
||||
|
||||
MemoryListData.fromJson(dynamic json) {
|
||||
id = json['_id'];
|
||||
addedBy =
|
||||
json['addedBy'] != null ? UserData.fromJson(json['addedBy']) : null;
|
||||
userId = json['userId'] != null ? UserData.fromJson(json['userId']) : null;
|
||||
note = json['note'];
|
||||
filePath = json['filePath'];
|
||||
isDeleted = json['isDeleted'];
|
||||
createdAt = json['createdAt'];
|
||||
updatedAt = json['updatedAt'];
|
||||
}
|
||||
|
||||
String? id;
|
||||
UserData? addedBy;
|
||||
UserData? userId;
|
||||
String? note;
|
||||
String? filePath;
|
||||
bool? isDeleted;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['_id'] = id;
|
||||
if (addedBy != null) {
|
||||
map['addedBy'] = addedBy?.toJson();
|
||||
}
|
||||
if (userId != null) {
|
||||
map['userId'] = userId?.toJson();
|
||||
}
|
||||
map['note'] = note;
|
||||
map['filePath'] = filePath;
|
||||
map['isDeleted'] = isDeleted;
|
||||
map['createdAt'] = createdAt;
|
||||
map['updatedAt'] = updatedAt;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import 'MemoryListResponseData.dart';
|
||||
|
||||
class MemoryListResponse {
|
||||
MemoryListResponse({
|
||||
this.success,
|
||||
this.status,
|
||||
this.message,
|
||||
this.data,});
|
||||
|
||||
MemoryListResponse.fromJson(dynamic json) {
|
||||
status = json['status'];
|
||||
message = json['message'];
|
||||
data = json['data'] != null ? MemoryListResponseData.fromJson(json['data']) : null;
|
||||
}
|
||||
bool? success;
|
||||
String? status;
|
||||
String? message;
|
||||
MemoryListResponseData? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['status'] = status;
|
||||
map['message'] = message;
|
||||
if (data != null) {
|
||||
map['data'] = data?.toJson();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'MemoryListData.dart';
|
||||
|
||||
class MemoryListResponseData {
|
||||
MemoryListResponseData({
|
||||
this.list,
|
||||
this.count,
|
||||
this.offset,
|
||||
this.limit,
|
||||
});
|
||||
|
||||
MemoryListResponseData.fromJson(dynamic json) {
|
||||
if (json['list'] != null) {
|
||||
list = [];
|
||||
json['list'].forEach((v) {
|
||||
list?.add(MemoryListData.fromJson(v));
|
||||
});
|
||||
}
|
||||
count = json['count'];
|
||||
offset = json['offset'];
|
||||
limit = json['limit'];
|
||||
}
|
||||
|
||||
List<MemoryListData>? list;
|
||||
int? count;
|
||||
int? offset;
|
||||
int? limit;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
if (list != null) {
|
||||
map['list'] = list?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
map['count'] = count;
|
||||
map['offset'] = offset;
|
||||
map['limit'] = limit;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
48
lib/models/clients/recent_incidents_model.dart
Normal file
48
lib/models/clients/recent_incidents_model.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
import 'package:quill_html_editor/quill_html_editor.dart';
|
||||
|
||||
class RecentIncidentsModel{
|
||||
String incidentTitle = "";
|
||||
String incidentId = "";
|
||||
String userId = "";
|
||||
String note = "";
|
||||
int incidentDate = 0;
|
||||
bool active = false;
|
||||
String createdAt = "";
|
||||
String updatedAt = "";
|
||||
int v = 0;
|
||||
QuillEditorController quillController = QuillEditorController();
|
||||
|
||||
RecentIncidentsModel.empty();
|
||||
|
||||
RecentIncidentsModel.fromJson(Map<String,dynamic> json){
|
||||
incidentId = json['_id']??"";
|
||||
userId = json['userId']??"";
|
||||
note = json['note']??"";
|
||||
incidentDate = json['incidentDate']??0;
|
||||
active = json['active']??false;
|
||||
createdAt = json['createdAt']??"";
|
||||
updatedAt = json['updatedAt']??"";
|
||||
incidentTitle = json['incidentTitle']??"";
|
||||
v = json['__v']??0;
|
||||
}
|
||||
|
||||
Map<String,dynamic> toJson(){
|
||||
Map<String,dynamic> json = {
|
||||
'_id' : incidentId,
|
||||
'userId' : userId,
|
||||
'note' : note,
|
||||
'incidentDate' : incidentDate,
|
||||
'active' : active,
|
||||
'createdAt' : createdAt,
|
||||
'updatedAt' : updatedAt,
|
||||
'incidentTitle' : incidentTitle,
|
||||
'__v' : v,
|
||||
};
|
||||
return json;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecentIncidentsModel{incidentId: $incidentId, userId: $userId, note: $note, incidentDate: $incidentDate, active: $active, createdAt: $createdAt, updatedAt: $updatedAt, v: $v}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import 'RiskAssessmentData.dart';
|
||||
|
||||
class GetRiskAssessmentResponse {
|
||||
GetRiskAssessmentResponse({
|
||||
this.success,
|
||||
this.status,
|
||||
this.message,
|
||||
this.data,});
|
||||
|
||||
GetRiskAssessmentResponse.fromJson(dynamic json) {
|
||||
status = json['status'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = [];
|
||||
json['data'].forEach((v) {
|
||||
data?.add(RiskAssessmentData.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
bool? success;
|
||||
String? status;
|
||||
String? message;
|
||||
List<RiskAssessmentData>? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['status'] = status;
|
||||
map['message'] = message;
|
||||
if (data != null) {
|
||||
map['data'] = data?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
20
lib/models/clients/riskAssessmentResponse/InPlace.dart
Normal file
20
lib/models/clients/riskAssessmentResponse/InPlace.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class InPlace {
|
||||
InPlace({
|
||||
this.y,
|
||||
this.n,});
|
||||
|
||||
InPlace.fromJson(dynamic json) {
|
||||
y = json['y'];
|
||||
n = json['n'];
|
||||
}
|
||||
int? y;
|
||||
int? n;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['y'] = y;
|
||||
map['n'] = n;
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
class PureRiskRating {
|
||||
PureRiskRating({
|
||||
this.c,
|
||||
this.l,
|
||||
this.r,});
|
||||
|
||||
PureRiskRating.fromJson(dynamic json) {
|
||||
c = json['c'];
|
||||
l = json['l'];
|
||||
r = json['r'];
|
||||
}
|
||||
int? c;
|
||||
int? l;
|
||||
int? r;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['c'] = c;
|
||||
map['l'] = l;
|
||||
map['r'] = r;
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
class ResidualRiskRating {
|
||||
ResidualRiskRating({
|
||||
this.c,
|
||||
this.l,
|
||||
this.r,});
|
||||
|
||||
ResidualRiskRating.fromJson(dynamic json) {
|
||||
c = json['c'];
|
||||
l = json['l'];
|
||||
r = json['r'];
|
||||
}
|
||||
int? c;
|
||||
int? l;
|
||||
int? r;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
map['c'] = c;
|
||||
map['l'] = l;
|
||||
map['r'] = r;
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import 'PureRiskRating.dart';
|
||||
import 'InPlace.dart';
|
||||
import 'ResidualRiskRating.dart';
|
||||
|
||||
class RiskAssessmentData {
|
||||
RiskAssessmentData({
|
||||
this.pureRiskRating,
|
||||
this.inPlace,
|
||||
this.residualRiskRating,
|
||||
this.id,
|
||||
this.hazard,
|
||||
this.personsExposedToHazard,
|
||||
this.riskIdentified,
|
||||
this.coldMeasureRequired,
|
||||
this.userId,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
});
|
||||
|
||||
RiskAssessmentData.fromJson(dynamic json) {
|
||||
pureRiskRating = json['pureRiskRating'] != null
|
||||
? PureRiskRating.fromJson(json['pureRiskRating'])
|
||||
: null;
|
||||
inPlace =
|
||||
json['inPlace'] != null ? InPlace.fromJson(json['inPlace']) : null;
|
||||
residualRiskRating = json['residualRiskRating'] != null
|
||||
? ResidualRiskRating.fromJson(json['residualRiskRating'])
|
||||
: null;
|
||||
id = json['_id'];
|
||||
hazard = json['hazard'];
|
||||
personsExposedToHazard = json['personsExposedToHazard'];
|
||||
riskIdentified = json['riskIdentified'];
|
||||
coldMeasureRequired = json['coldMeasureRequired'];
|
||||
userId = json['userId'];
|
||||
createdAt = json['createdAt'];
|
||||
updatedAt = json['updatedAt'];
|
||||
}
|
||||
|
||||
PureRiskRating? pureRiskRating;
|
||||
InPlace? inPlace;
|
||||
ResidualRiskRating? residualRiskRating;
|
||||
String? id;
|
||||
String? hazard;
|
||||
String? personsExposedToHazard;
|
||||
String? riskIdentified;
|
||||
String? coldMeasureRequired;
|
||||
String? userId;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
if (pureRiskRating != null) {
|
||||
map['pureRiskRating'] = pureRiskRating?.toJson();
|
||||
}
|
||||
if (inPlace != null) {
|
||||
map['inPlace'] = inPlace?.toJson();
|
||||
}
|
||||
if (residualRiskRating != null) {
|
||||
map['residualRiskRating'] = residualRiskRating?.toJson();
|
||||
}
|
||||
map['_id'] = id;
|
||||
map['hazard'] = hazard;
|
||||
map['personsExposedToHazard'] = personsExposedToHazard;
|
||||
map['riskIdentified'] = riskIdentified;
|
||||
map['coldMeasureRequired'] = coldMeasureRequired;
|
||||
map['userId'] = userId;
|
||||
map['createdAt'] = createdAt;
|
||||
map['updatedAt'] = updatedAt;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
350
lib/models/clients/service_users_model.dart
Normal file
350
lib/models/clients/service_users_model.dart
Normal file
@@ -0,0 +1,350 @@
|
||||
class ServiceUserModel {
|
||||
AboutPatient aboutPatient = AboutPatient.empty();
|
||||
String id = "";
|
||||
String suLastName = "";
|
||||
String suFirstMiddleName = "";
|
||||
String suPreferredName = "";
|
||||
String name = "";
|
||||
String suSsn = "";
|
||||
String providerName = "";
|
||||
String suSex = "";
|
||||
String suTitle = "";
|
||||
DateTime suDob = DateTime.now();
|
||||
String suAge = "";
|
||||
String suReferredBy = "";
|
||||
String suFamilyHead = "";
|
||||
String suAddress1 = "";
|
||||
String suAddress2 = "";
|
||||
String suCity = "";
|
||||
String suState = "";
|
||||
String suZip = "";
|
||||
DateTime suFirstVisitDate = DateTime.now();
|
||||
DateTime suLastVisitDate = DateTime.now();
|
||||
List<dynamic> suProvider = [];
|
||||
bool currSu = false;
|
||||
String suHomePhone = "";
|
||||
String suWorkPhone = "";
|
||||
String suMobileHomeNo = "";
|
||||
String suMobileWorkNo = "";
|
||||
String suEmailHome = "";
|
||||
String suEmailWork = "";
|
||||
String suPrefHomeNo = "";
|
||||
String suPrefWorkNo = "";
|
||||
String suEmergencyContact = "";
|
||||
String seMedicalAlert = "";
|
||||
String suNote = "";
|
||||
List<Diagnosise> diagnosises = [];
|
||||
String user = "";
|
||||
List<dynamic> shifts = [];
|
||||
List<dynamic> serviceUserMedications = [];
|
||||
List<dynamic> homeVisitSignOut = [];
|
||||
List<dynamic> srUsShiftsRequired = [];
|
||||
List<dynamic> suEnquiries = [];
|
||||
bool active = false;
|
||||
DateTime createdAt = DateTime.now();
|
||||
DateTime updatedAt = DateTime.now();
|
||||
int v = 0;
|
||||
|
||||
ServiceUserModel({
|
||||
required this.aboutPatient,
|
||||
required this.id,
|
||||
required this.suLastName,
|
||||
required this.suFirstMiddleName,
|
||||
required this.suPreferredName,
|
||||
required this.name,
|
||||
required this.suSsn,
|
||||
required this.providerName,
|
||||
required this.suSex,
|
||||
required this.suTitle,
|
||||
required this.suDob,
|
||||
required this.suAge,
|
||||
required this.suReferredBy,
|
||||
required this.suFamilyHead,
|
||||
required this.suAddress1,
|
||||
required this.suAddress2,
|
||||
required this.suCity,
|
||||
required this.suState,
|
||||
required this.suZip,
|
||||
required this.suFirstVisitDate,
|
||||
required this.suLastVisitDate,
|
||||
required this.suProvider,
|
||||
required this.currSu,
|
||||
required this.suHomePhone,
|
||||
required this.suWorkPhone,
|
||||
required this.suMobileHomeNo,
|
||||
required this.suMobileWorkNo,
|
||||
required this.suEmailHome,
|
||||
required this.suEmailWork,
|
||||
required this.suPrefHomeNo,
|
||||
required this.suPrefWorkNo,
|
||||
required this.suEmergencyContact,
|
||||
required this.seMedicalAlert,
|
||||
required this.suNote,
|
||||
required this.diagnosises,
|
||||
required this.user,
|
||||
required this.shifts,
|
||||
required this.serviceUserMedications,
|
||||
required this.homeVisitSignOut,
|
||||
required this.srUsShiftsRequired,
|
||||
required this.suEnquiries,
|
||||
required this.active,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.v,
|
||||
});
|
||||
|
||||
String get phoneNo {
|
||||
if (suMobileWorkNo.isNotEmpty) {
|
||||
return suMobileWorkNo;
|
||||
} else if (suMobileHomeNo.isNotEmpty) {
|
||||
return suMobileHomeNo;
|
||||
} else if (suEmergencyContact.isNotEmpty) {
|
||||
return suEmergencyContact;
|
||||
} else if (suPrefHomeNo.isNotEmpty) {
|
||||
return suPrefHomeNo;
|
||||
} else if (suPrefWorkNo.isNotEmpty) {
|
||||
return suPrefWorkNo;
|
||||
} else if (suWorkPhone.isNotEmpty) {
|
||||
return suWorkPhone;
|
||||
} else if (suHomePhone.isNotEmpty) {
|
||||
return suHomePhone;
|
||||
}
|
||||
return "000000000000";
|
||||
}
|
||||
|
||||
String get nameOfUser {
|
||||
if (suFirstMiddleName.isNotEmpty) {
|
||||
return suFirstMiddleName;
|
||||
} else if (suLastName.isNotEmpty) {
|
||||
return suLastName;
|
||||
} else if (suPreferredName.isNotEmpty) {
|
||||
return suPreferredName;
|
||||
} else if (name.isNotEmpty) {
|
||||
return name;
|
||||
}
|
||||
return "Name";
|
||||
}
|
||||
|
||||
String get homeAddress {
|
||||
if (suAddress1.isNotEmpty) {
|
||||
return suAddress1;
|
||||
} else if (suAddress2.isNotEmpty) {
|
||||
return suAddress2;
|
||||
}
|
||||
return "Address";
|
||||
}
|
||||
|
||||
ServiceUserModel.empty();
|
||||
|
||||
ServiceUserModel.fromJson(Map<String, dynamic> json) {
|
||||
aboutPatient = json['aboutPatient'] != null
|
||||
? AboutPatient.fromJson(json['aboutPatient'])
|
||||
: AboutPatient.empty();
|
||||
id = json['_id'] ?? "";
|
||||
suLastName = json['suLastName'] ?? "";
|
||||
suFirstMiddleName = json['suFirstMiddleName'] ?? "";
|
||||
suPreferredName = json['suPreferredName'] ?? "";
|
||||
name = json['name'] ?? "";
|
||||
suSsn = json['suSsn'] ?? "";
|
||||
providerName = json['providerName'] ?? "";
|
||||
suSex = json['suSex'] ?? "";
|
||||
suTitle = json['suTitle'] ?? "";
|
||||
suDob = json['suDOB'] != null
|
||||
? DateTime.parse(json['suDOB']).toLocal()
|
||||
: DateTime.now();
|
||||
suAge = json['suAge'] ?? '';
|
||||
suReferredBy = json['suReferredBY'] ?? "";
|
||||
suFamilyHead = json['suFamilyHead'] ?? "";
|
||||
suAddress1 = json['suAddress1'] ?? "";
|
||||
suAddress2 = json['suAddress2'] ?? "";
|
||||
suCity = json['suCity'] ?? "";
|
||||
suState = json['suState'] ?? "";
|
||||
suZip = json['suZip'] ?? "";
|
||||
suFirstVisitDate = json['suFirstVisitDate'] != null
|
||||
? DateTime.parse(json['suFirstVisitDate']).toLocal()
|
||||
: DateTime.now();
|
||||
suLastVisitDate = json['suLastVisitDate'] != null
|
||||
? DateTime.parse(json['suLastVisitDate']).toLocal()
|
||||
: DateTime.now();
|
||||
if (json['suProvider'] != null) {
|
||||
suProvider = [];
|
||||
json['suProvider'].forEach((v) {
|
||||
suProvider.add(v);
|
||||
});
|
||||
}
|
||||
currSu = json['currSU'] ?? false;
|
||||
suHomePhone = json['suHomePhone'] ?? '';
|
||||
suWorkPhone = json['suWorkPhone'] ?? '';
|
||||
suMobileHomeNo = json['suMobileHomeNo'] ?? '';
|
||||
suMobileWorkNo = json['suMobileWorkNo'] ?? '';
|
||||
suEmailHome = json['suEmailHome'] ?? '';
|
||||
suEmailWork = json['suEmailWork'] ?? '';
|
||||
suPrefHomeNo = json['suPrefHomeNo'] ?? '';
|
||||
suPrefWorkNo = json['suPrefWorkNo'] ?? '';
|
||||
suEmergencyContact = json['suEmergencyContact'] ?? '';
|
||||
seMedicalAlert = json['seMedicalAlert'] ?? '';
|
||||
suNote = json['suNote'] ?? '';
|
||||
if (json['diagnosises'] != null) {
|
||||
diagnosises = [];
|
||||
json['diagnosises'].forEach((v) {
|
||||
diagnosises.add(Diagnosise.fromJson(v));
|
||||
});
|
||||
}
|
||||
user = json['user'] ?? "";
|
||||
if (json['shifts'] != null) {
|
||||
shifts = [];
|
||||
json['shifts'].forEach((v) {
|
||||
shifts.add(v);
|
||||
});
|
||||
}
|
||||
if (json['serviceUserMedications'] != null) {
|
||||
serviceUserMedications = [];
|
||||
json['serviceUserMedications'].forEach((v) {
|
||||
serviceUserMedications.add(v);
|
||||
});
|
||||
}
|
||||
if (json['homeVisitSignOut'] != null) {
|
||||
homeVisitSignOut = [];
|
||||
json['homeVisitSignOut'].forEach((v) {
|
||||
homeVisitSignOut.add(v);
|
||||
});
|
||||
}
|
||||
if (json['srUsShiftsRequired'] != null) {
|
||||
srUsShiftsRequired = [];
|
||||
json['srUsShiftsRequired'].forEach((v) {
|
||||
srUsShiftsRequired.add(v);
|
||||
});
|
||||
}
|
||||
if (json['suEnquiries'] != null) {
|
||||
suEnquiries = [];
|
||||
json['suEnquiries'].forEach((v) {
|
||||
suEnquiries.add(v);
|
||||
});
|
||||
}
|
||||
active = json['active'] ?? false;
|
||||
createdAt = json['createdAt'] != null
|
||||
? DateTime.parse(json['createdAt']).toLocal()
|
||||
: DateTime.now();
|
||||
updatedAt = json['updatedAt'] != null
|
||||
? DateTime.parse(json['updatedAt']).toLocal()
|
||||
: DateTime.now();
|
||||
v = json['__v'] ?? 0;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
// data['aboutPatient'] = this.aboutPatient.toJson();
|
||||
data['_id'] = id;
|
||||
data['suLastName'] = suLastName;
|
||||
data['suFirstMiddleName'] = suFirstMiddleName;
|
||||
data['suPreferredName'] = suPreferredName;
|
||||
data['name'] = name;
|
||||
data['suSsn'] = suSsn;
|
||||
data['providerName'] = providerName;
|
||||
data['suSex'] = suSex;
|
||||
data['suTitle'] = suTitle;
|
||||
data['suDOB'] = suDob;
|
||||
data['suAge'] = suAge;
|
||||
data['suReferredBY'] = suReferredBy;
|
||||
data['suFamilyHead'] = suFamilyHead;
|
||||
data['suAddress1'] = suAddress1;
|
||||
data['suAddress2'] = suAddress2;
|
||||
data['suCity'] = suCity;
|
||||
data['suState'] = suState;
|
||||
data['suZip'] = suZip;
|
||||
data['suFirstVisitDate'] = suFirstVisitDate;
|
||||
data['suLastVisitDate'] = suLastVisitDate;
|
||||
data['suProvider'] = suProvider.map((v) => v.toJson()).toList();
|
||||
data['currSU'] = currSu;
|
||||
data['suHomePhone'] = suHomePhone;
|
||||
data['suWorkPhone'] = suWorkPhone;
|
||||
data['suMobileHomeNo'] = suMobileHomeNo;
|
||||
data['suMobileWorkNo'] = suMobileWorkNo;
|
||||
data['suEmailHome'] = suEmailHome;
|
||||
data['suEmailWork'] = suEmailWork;
|
||||
data['suPrefHomeNo'] = suPrefHomeNo;
|
||||
data['suPrefWorkNo'] = suPrefWorkNo;
|
||||
data['suEmergencyContact'] = suEmergencyContact;
|
||||
data['seMedicalAlert'] = seMedicalAlert;
|
||||
data['suNote'] = suNote;
|
||||
// data['diagnosises'] = this.diagnosises.map((v) => v.toJson()).toList();
|
||||
data['user'] = user;
|
||||
data['shifts'] = shifts.map((v) => v.toJson()).toList();
|
||||
data['serviceUserMedications'] =
|
||||
serviceUserMedications.map((v) => v.toJson()).toList();
|
||||
data['homeVisitSignOut'] = homeVisitSignOut.map((v) => v.toJson()).toList();
|
||||
data['srUsShiftsRequired'] =
|
||||
srUsShiftsRequired.map((v) => v.toJson()).toList();
|
||||
data['suEnquiries'] = suEnquiries.map((v) => v.toJson()).toList();
|
||||
data['active'] = active;
|
||||
data['createdAt'] = createdAt;
|
||||
data['updatedAt'] = updatedAt;
|
||||
data['__v'] = v;
|
||||
return data;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ServiceUserModel{aboutPatient: $aboutPatient, id: $id, suLastName: $suLastName, suFirstMiddleName: $suFirstMiddleName, suPreferredName: $suPreferredName, name: $name, suSsn: $suSsn, providerName: $providerName, suSex: $suSex, suTitle: $suTitle, suDob: $suDob, suAge: $suAge, suReferredBy: $suReferredBy, suFamilyHead: $suFamilyHead, suAddress1: $suAddress1, suAddress2: $suAddress2, suCity: $suCity, suState: $suState, suZip: $suZip, suFirstVisitDate: $suFirstVisitDate, suLastVisitDate: $suLastVisitDate, suProvider: $suProvider, currSu: $currSu, suHomePhone: $suHomePhone, suWorkPhone: $suWorkPhone, suMobileHomeNo: $suMobileHomeNo, suMobileWorkNo: $suMobileWorkNo, suEmailHome: $suEmailHome, suEmailWork: $suEmailWork, suPrefHomeNo: $suPrefHomeNo, suPrefWorkNo: $suPrefWorkNo, suEmergencyContact: $suEmergencyContact, seMedicalAlert: $seMedicalAlert, suNote: $suNote, diagnosises: $diagnosises, user: $user, shifts: $shifts, serviceUserMedications: $serviceUserMedications, homeVisitSignOut: $homeVisitSignOut, srUsShiftsRequired: $srUsShiftsRequired, suEnquiries: $suEnquiries, active: $active, createdAt: $createdAt, updatedAt: $updatedAt, v: $v}';
|
||||
}
|
||||
}
|
||||
|
||||
class AboutPatient {
|
||||
String aboutText = "";
|
||||
DateTime aboutDate = DateTime.now();
|
||||
String aboutBy = "";
|
||||
|
||||
AboutPatient({
|
||||
required this.aboutText,
|
||||
required this.aboutDate,
|
||||
required this.aboutBy,
|
||||
});
|
||||
|
||||
AboutPatient.empty();
|
||||
|
||||
AboutPatient.fromJson(Map<String, dynamic> json) {
|
||||
aboutText = json['aboutText'] ?? "";
|
||||
aboutDate = json['aboutDate'] != null
|
||||
? DateTime.parse(json['aboutDate']).toLocal()
|
||||
: DateTime.now();
|
||||
aboutBy = json['aboutBy'] ?? "";
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AboutPatient{aboutText: $aboutText, aboutDate: $aboutDate, aboutBy: $aboutBy}';
|
||||
}
|
||||
}
|
||||
|
||||
class Diagnosise {
|
||||
String diagnosisText = "";
|
||||
DateTime diagnosisDate = DateTime.now();
|
||||
String diagnosisBy = "";
|
||||
bool isCurrentDiagnosis = false;
|
||||
String id = "";
|
||||
|
||||
Diagnosise({
|
||||
required this.diagnosisText,
|
||||
required this.diagnosisDate,
|
||||
required this.diagnosisBy,
|
||||
required this.isCurrentDiagnosis,
|
||||
required this.id,
|
||||
});
|
||||
|
||||
Diagnosise.empty();
|
||||
|
||||
Diagnosise.fromJson(Map<String, dynamic> json) {
|
||||
diagnosisText = json['diagnosisText'] ?? "";
|
||||
diagnosisDate = json['diagnosisDate'] != null
|
||||
? DateTime.parse(json['diagnosisDate']).toLocal()
|
||||
: DateTime.now();
|
||||
diagnosisBy = json['diagnosisBy'] ?? "";
|
||||
isCurrentDiagnosis = json['isCurrentDiagnosis'] ?? false;
|
||||
id = json['_id'] ?? "";
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Diagnosise{diagnosisText: $diagnosisText, diagnosisDate: $diagnosisDate, diagnosisBy: $diagnosisBy, isCurrentDiagnosis: $isCurrentDiagnosis, id: $id}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user