fist commit ftc staff app clone
This commit is contained in:
9
lib/utilities/enums/api_method.dart
Normal file
9
lib/utilities/enums/api_method.dart
Normal file
@@ -0,0 +1,9 @@
|
||||
enum ApiMethod {
|
||||
get,
|
||||
post,
|
||||
put,
|
||||
patch,
|
||||
delete;
|
||||
|
||||
String get value => name;
|
||||
}
|
||||
54
lib/utilities/enums/body_parts.dart
Normal file
54
lib/utilities/enums/body_parts.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
enum BodyPart {
|
||||
fronthead(topPercent: 11, leftPercent: 19.5, apiValue: 'fronthead'),
|
||||
backhead(topPercent: 11, leftPercent: 77.5, apiValue: 'backhead'),
|
||||
righteye(topPercent: 14, leftPercent: 17, apiValue: 'righteye'),
|
||||
lefteye(topPercent: 14, leftPercent: 22, apiValue: 'lefteye'),
|
||||
rightear(topPercent: 15, leftPercent: 14, apiValue: 'rightear'),
|
||||
leftear(topPercent: 15, leftPercent: 25.5, apiValue: 'leftear'),
|
||||
nose(topPercent: 16, leftPercent: 19.5, apiValue: 'nose'),
|
||||
mouth(topPercent: 18, leftPercent: 19.5, apiValue: 'mouth'),
|
||||
neck(topPercent: 21, leftPercent: 19.5, apiValue: 'neck'),
|
||||
nape(topPercent: 20, leftPercent: 77.5, apiValue: 'nape'),
|
||||
rightshoulder(topPercent: 26, leftPercent: 7.5, apiValue: 'rightshoulder'),
|
||||
leftshoulder(topPercent: 26, leftPercent: 31.5, apiValue: 'leftshoulder'),
|
||||
rightshoulderblade(topPercent: 26, leftPercent: 88.5, apiValue: 'rightshoulderblade'),
|
||||
leftshoulderblade(topPercent: 26, leftPercent: 66.5, apiValue: 'leftshoulderblade'),
|
||||
rightArm(topPercent: 35, leftPercent: 5.5, apiValue: 'rightArm'),
|
||||
leftArm(topPercent: 35, leftPercent: 33.5, apiValue: 'leftArm'),
|
||||
rightforearm(topPercent: 46, leftPercent: 4.5, apiValue: 'rightforearm'),
|
||||
leftforearm(topPercent: 46, leftPercent: 34.5, apiValue: 'leftforearm'),
|
||||
rightelbow(topPercent: 41, leftPercent: 93, apiValue: 'rightelbow'),
|
||||
leftelbow(topPercent: 41, leftPercent: 62, apiValue: 'leftelbow'),
|
||||
rightwrist(topPercent: 51, leftPercent: 3, apiValue: 'rightwrist'),
|
||||
leftwrist(topPercent: 51, leftPercent: 36, apiValue: 'leftwrist'),
|
||||
righthand(topPercent: 55, leftPercent: 3, apiValue: 'righthand'),
|
||||
lefthand(topPercent: 55, leftPercent: 36, apiValue: 'lefthand'),
|
||||
chest(topPercent: 30, leftPercent: 19.5, apiValue: 'chest'),
|
||||
topback(topPercent: 30, leftPercent: 77.5, apiValue: 'topback'),
|
||||
middleback(topPercent: 38, leftPercent: 77.5, apiValue: 'middleback'),
|
||||
bottomback(topPercent: 47, leftPercent: 77.5, apiValue: 'bottomback'),
|
||||
abdomen(topPercent: 40, leftPercent: 19.5, apiValue: 'abdomen'),
|
||||
lefthip(topPercent: 54, leftPercent: 67, apiValue: 'lefthip'),
|
||||
righthip(topPercent: 54, leftPercent: 88.3, apiValue: 'righthip'),
|
||||
rightbuttock(topPercent: 52, leftPercent: 83, apiValue: 'rightbuttock'),
|
||||
leftbuttock(topPercent: 52, leftPercent: 72, apiValue: 'leftbuttock'),
|
||||
groin(topPercent: 54, leftPercent: 19.5, apiValue: 'groin'),
|
||||
rightthigh(topPercent: 61, leftPercent: 13.5, apiValue: 'rightthigh'),
|
||||
leftthigh(topPercent: 61, leftPercent: 25.5, apiValue: 'leftthigh'),
|
||||
rightknee(topPercent: 73, leftPercent: 13.5, apiValue: 'rightknee'),
|
||||
leftknee(topPercent: 73, leftPercent: 25.5, apiValue: 'leftknee'),
|
||||
rightcalf(topPercent: 81, leftPercent: 84, apiValue: 'rightcalf'),
|
||||
leftcalf(topPercent: 81, leftPercent: 71.5, apiValue: 'leftcalf'),
|
||||
leftankle(topPercent: 93, leftPercent: 25, apiValue: 'leftankle'),
|
||||
rightankle(topPercent: 93, leftPercent: 14.5, apiValue: 'rightankle'),
|
||||
leftfoot(topPercent: 96, leftPercent: 25, apiValue: 'leftfoot'),
|
||||
rightfoot(topPercent: 96, leftPercent: 14.5, apiValue: 'rightfoot'),
|
||||
leftheel(topPercent: 94, leftPercent: 72.5, apiValue: 'leftheel'),
|
||||
rightheel(topPercent: 94, leftPercent: 83, apiValue: 'rightheel');
|
||||
|
||||
final double topPercent;
|
||||
final double leftPercent;
|
||||
final String apiValue;
|
||||
|
||||
const BodyPart({required this.topPercent, required this.leftPercent, required this.apiValue});
|
||||
}
|
||||
120
lib/utilities/enums/care_note_form_type.dart
Normal file
120
lib/utilities/enums/care_note_form_type.dart
Normal file
@@ -0,0 +1,120 @@
|
||||
///Note: when adding new type, make sure to add condition in [CareNotesFormType.fromText] also
|
||||
enum CareNotesFormType {
|
||||
injuryHealthIssueForm("injuryHealthIssueForm", "InjuryHealthIssue"),
|
||||
weightHeightForm("weightHeightForm", "WeightHeight"),
|
||||
healthAppointmentForm("healthAppointmentForm", "HealthAppointments"),
|
||||
observationsForm("observationsForm", "Observations"),
|
||||
healthOtherForm("healthOtherForm", 'HealthOther'),
|
||||
generalNoteForm("generalNoteForm", "GeneralNote"),
|
||||
activitiesForm("activitiesForm", "Activities"),
|
||||
sleepForm("sleepForm", "Sleep"),
|
||||
safeguardingForm("safeguardingForm", "Safeguarding"),
|
||||
generalOtherForm("generalOtherForm", "GeneralOther"),
|
||||
toiletingNoteForm("toiletingNoteForm", "Toileting"),
|
||||
showeringBathForm("showeringBathForm", "ShoweringBath"),
|
||||
mouthHygieneForm("mouthHygieneForm", "MouthHygiene"),
|
||||
personalCareOtherForm("personalCareOtherForm", "PersonalCareOther"),
|
||||
moodRatingForm("moodRatingForm", "MoodRating"),
|
||||
ABCForm("ABCForm", "ABC"),
|
||||
physicalInterventionForm("physicalInterventionForm", "PhysicalIntervention"),
|
||||
consentCapacityForm("consentCapacityForm", "ConsentCapacityMCADOLS"),
|
||||
mentalWellbeingOtherForm("mentalWellbeingOtherForm", "MentalWellbeingOther"),
|
||||
meetingsForm("meetingsForm", "Meetings"),
|
||||
telephoneCallsForm("telephoneCallsForm", "TelephoneCalls"),
|
||||
reviewsForm("reviewsForm", "Reviews"),
|
||||
emailsForm("emailsForm", "Emails"),
|
||||
allOtherInteractionsForm("allOtherInteractionsForm", "AllOtherInteractions"),
|
||||
professionalFamilyInteractionsOtherForm(
|
||||
"professionalFamilyInteractionsOtherForm",
|
||||
"ProfessionalFamilyInteractionsOther"),
|
||||
laundryForm("laundryForm", "Laundry"),
|
||||
cookingForm("cookingForm", "Cooking"),
|
||||
nutritionHydrationForm("nutritionHydrationForm", "NutritionHydration"),
|
||||
cleaningForm("cleaningForm", "Cleaning"),
|
||||
financeForm("financeForm", "Finance"),
|
||||
publicInteractionForm("publicInteractionForm", "PublicInteraction"),
|
||||
educationForm("educationForm", "Education"),
|
||||
independentLivingOtherForm(
|
||||
"independentLivingOtherForm", "IndependentLivingOther"),
|
||||
;
|
||||
|
||||
final String text;
|
||||
final String apiValue;
|
||||
|
||||
const CareNotesFormType(this.text, this.apiValue);
|
||||
|
||||
factory CareNotesFormType.fromText(String text) {
|
||||
if (text == CareNotesFormType.injuryHealthIssueForm.text) {
|
||||
return CareNotesFormType.injuryHealthIssueForm;
|
||||
} else if (text == CareNotesFormType.weightHeightForm.text) {
|
||||
return CareNotesFormType.weightHeightForm;
|
||||
} else if (text == CareNotesFormType.healthAppointmentForm.text) {
|
||||
return CareNotesFormType.healthAppointmentForm;
|
||||
} else if (text == CareNotesFormType.observationsForm.text) {
|
||||
return CareNotesFormType.observationsForm;
|
||||
} else if (text == CareNotesFormType.healthOtherForm.text) {
|
||||
return CareNotesFormType.healthOtherForm;
|
||||
} else if (text == CareNotesFormType.generalNoteForm.text) {
|
||||
return CareNotesFormType.generalNoteForm;
|
||||
} else if (text == CareNotesFormType.activitiesForm.text) {
|
||||
return CareNotesFormType.activitiesForm;
|
||||
} else if (text == CareNotesFormType.sleepForm.text) {
|
||||
return CareNotesFormType.sleepForm;
|
||||
} else if (text == CareNotesFormType.safeguardingForm.text) {
|
||||
return CareNotesFormType.safeguardingForm;
|
||||
} else if (text == CareNotesFormType.generalOtherForm.text) {
|
||||
return CareNotesFormType.generalOtherForm;
|
||||
} else if (text == CareNotesFormType.showeringBathForm.text) {
|
||||
return CareNotesFormType.showeringBathForm;
|
||||
} else if (text == CareNotesFormType.mouthHygieneForm.text) {
|
||||
return CareNotesFormType.mouthHygieneForm;
|
||||
} else if (text == CareNotesFormType.personalCareOtherForm.text) {
|
||||
return CareNotesFormType.personalCareOtherForm;
|
||||
} else if (text == CareNotesFormType.moodRatingForm.text) {
|
||||
return CareNotesFormType.moodRatingForm;
|
||||
} else if (text == CareNotesFormType.toiletingNoteForm.text) {
|
||||
return CareNotesFormType.toiletingNoteForm;
|
||||
} else if (text == CareNotesFormType.ABCForm.text) {
|
||||
return CareNotesFormType.ABCForm;
|
||||
} else if (text == CareNotesFormType.physicalInterventionForm.text) {
|
||||
return CareNotesFormType.physicalInterventionForm;
|
||||
} else if (text == CareNotesFormType.consentCapacityForm.text) {
|
||||
return CareNotesFormType.consentCapacityForm;
|
||||
} else if (text == CareNotesFormType.mentalWellbeingOtherForm.text) {
|
||||
return CareNotesFormType.mentalWellbeingOtherForm;
|
||||
} else if (text == CareNotesFormType.meetingsForm.text) {
|
||||
return CareNotesFormType.meetingsForm;
|
||||
} else if (text == CareNotesFormType.telephoneCallsForm.text) {
|
||||
return CareNotesFormType.telephoneCallsForm;
|
||||
} else if (text == CareNotesFormType.reviewsForm.text) {
|
||||
return CareNotesFormType.reviewsForm;
|
||||
} else if (text == CareNotesFormType.emailsForm.text) {
|
||||
return CareNotesFormType.emailsForm;
|
||||
} else if (text == CareNotesFormType.allOtherInteractionsForm.text) {
|
||||
return CareNotesFormType.allOtherInteractionsForm;
|
||||
} else if (text ==
|
||||
CareNotesFormType.professionalFamilyInteractionsOtherForm.text) {
|
||||
return CareNotesFormType.professionalFamilyInteractionsOtherForm;
|
||||
} else if (text == CareNotesFormType.laundryForm.text) {
|
||||
return CareNotesFormType.laundryForm;
|
||||
} else if (text == CareNotesFormType.cookingForm.text) {
|
||||
return CareNotesFormType.cookingForm;
|
||||
} else if (text == CareNotesFormType.nutritionHydrationForm.text) {
|
||||
return CareNotesFormType.nutritionHydrationForm;
|
||||
} else if (text == CareNotesFormType.cleaningForm.text) {
|
||||
return CareNotesFormType.cleaningForm;
|
||||
} else if (text == CareNotesFormType.financeForm.text) {
|
||||
return CareNotesFormType.financeForm;
|
||||
} else if (text == CareNotesFormType.publicInteractionForm.text) {
|
||||
return CareNotesFormType.publicInteractionForm;
|
||||
} else if (text == CareNotesFormType.educationForm.text) {
|
||||
return CareNotesFormType.educationForm;
|
||||
} else if (text == CareNotesFormType.independentLivingOtherForm.text) {
|
||||
return CareNotesFormType.independentLivingOtherForm;
|
||||
} else {
|
||||
throw ArgumentError(
|
||||
'$text doesn\'t match any CareNotesFormTypes. Add following condition in CareNotesFormType.fromText factory constructor: \nelse if (text == CareNotesFormType.$text.text) {return CareNotesFormType.$text;}',
|
||||
"text");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user