fist commit ftc staff app clone
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user