Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMBCESSMOD-4899 - Dietary and Medication Requirements Removal #1918

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ess/src/API/EMBC.ESS/Resources/Evacuations/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ public class NeedsAssessment
public bool? CanProvideClothing { get; set; }
public bool? CanProvideTransportation { get; set; }
public bool? CanProvideIncidentals { get; set; }
public bool HaveSpecialDiet { get; set; }
public string SpecialDietDetails { get; set; }
public bool TakeMedication { get; set; }
public bool? HaveMedicalSupplies { get; set; }
public IEnumerable<HouseholdMember> HouseholdMembers { get; set; } = Array.Empty<HouseholdMember>();
public IEnumerable<Pet> Pets { get; set; } = Array.Empty<Pet>();
public bool? HavePetsFood { get; set; }
Expand Down
8 changes: 0 additions & 8 deletions ess/src/API/EMBC.ESS/Resources/Evacuations/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ public Mappings()
.ForMember(d => d.era_canevacueeprovideincidentals, opts => opts.MapFrom(s => Lookup(s.CanProvideIncidentals)))
.ForMember(d => d.era_canevacueeprovidelodging, opts => opts.MapFrom(s => Lookup(s.CanProvideLodging)))
.ForMember(d => d.era_canevacueeprovidetransportation, opts => opts.MapFrom(s => Lookup(s.CanProvideTransportation)))
.ForMember(d => d.era_dietaryrequirement, opts => opts.MapFrom(s => s.HaveSpecialDiet))
.ForMember(d => d.era_dietaryrequirementdetails, opts => opts.MapFrom(s => s.SpecialDietDetails))
.ForMember(d => d.era_medicationrequirement, opts => opts.MapFrom(s => s.TakeMedication))
.ForMember(d => d.era_hasenoughsupply, opts => opts.MapFrom(s => s.HaveMedicalSupplies))
.ForMember(d => d.era_insurancecoverage, opts => opts.MapFrom(s => (int?)Enum.Parse<InsuranceOptionOptionSet>(s.Insurance.ToString())))
.ForMember(d => d.era_householdrecoveryplan, opts => opts.MapFrom(s => resolveNoteContent(s.Notes.FirstOrDefault(n => n.Type == NoteType.RecoveryPlan))))
.ForMember(d => d.era_evacuationimpacttohousehold, opts => opts.MapFrom(s => resolveNoteContent(s.Notes.FirstOrDefault(n => n.Type == NoteType.EvacuationImpact))))
Expand Down Expand Up @@ -124,11 +120,7 @@ public Mappings()
.ForMember(d => d.CanProvideIncidentals, opts => opts.MapFrom(s => Lookup(s.era_canevacueeprovideincidentals)))
.ForMember(d => d.CanProvideLodging, opts => opts.MapFrom(s => Lookup(s.era_canevacueeprovidelodging)))
.ForMember(d => d.CanProvideTransportation, opts => opts.MapFrom(s => Lookup(s.era_canevacueeprovidetransportation)))
.ForMember(d => d.TakeMedication, opts => opts.MapFrom(s => s.era_medicationrequirement))
.ForMember(d => d.HaveMedicalSupplies, opts => opts.MapFrom(s => s.era_hasenoughsupply))
.ForMember(d => d.Insurance, opts => opts.MapFrom(s => Enum.Parse<InsuranceOption>(((InsuranceOptionOptionSet)s.era_insurancecoverage).ToString())))
.ForMember(d => d.HaveSpecialDiet, opts => opts.MapFrom(s => s.era_dietaryrequirement))
.ForMember(d => d.SpecialDietDetails, opts => opts.MapFrom(s => s.era_dietaryrequirementdetails))
.ForMember(d => d.HavePetsFood, opts => opts.Ignore())
.ForMember(d => d.HouseholdMembers, opts => opts.MapFrom(s => s.era_era_householdmember_era_needassessment))
.ForMember(d => d.Pets, opts => opts.Ignore())
Expand Down
9 changes: 0 additions & 9 deletions ess/src/API/EMBC.ESS/Resources/Reports/Contract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,6 @@ public class Evacuee
[Display(Name = "Able to Provide Transportation")]
public bool CanProvideTransportation { get; set; }

[Display(Name = "Medication Needs")]
public bool NeedsMedication { get; set; }

[Display(Name = "Medication supply for 3 days")]
public bool HasEnoughSupply { get; set; }

[Display(Name = "Dietary Needs")]
public string DietaryNeeds { get; set; }

[Display(Name = "Supports Provided")]
public int NumberOfSupports { get; set; }

Expand Down
3 changes: 0 additions & 3 deletions ess/src/API/EMBC.ESS/Resources/Reports/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ public Mappings()
.ForMember(d => d.CanProvideFood, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_canevacueeprovidefood))
.ForMember(d => d.CanProvideIncidentals, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_canevacueeprovideincidentals))
.ForMember(d => d.CanProvideTransportation, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_canevacueeprovidetransportation))
.ForMember(d => d.NeedsMedication, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_medicationrequirement))
.ForMember(d => d.HasEnoughSupply, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_hasenoughsupply))
.ForMember(d => d.DietaryNeeds, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid == null ? null : s.era_EvacuationFileid.era_CurrentNeedsAssessmentid.era_dietaryrequirement))
.ForMember(d => d.NumberOfSupports, opts => opts.MapFrom(s => s.era_EvacuationFileid == null ? 0 : s.era_EvacuationFileid.era_era_evacuationfile_era_evacueesupport_ESSFileId.Count))
.ForMember(d => d.SupportsTotalAmount, opts => opts.Ignore())
.AfterMap((s, d) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ public async Task CanSubmitAnonymousRegistration()
DateOfBirth = "2010-01-01"
}
},
TakeMedication = false,
HaveMedicalSupplies = false,
Insurance = InsuranceOption.Yes,
HaveSpecialDiet = true,
SpecialDietDetails = "Gluten Free",
HavePetsFood = true,
CanProvideClothing = false,
CanProvideFood = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,8 @@ public async Task CanMapEvacuationFile()
needsAssessment.CanProvideIncidentals.ShouldBe(originalNeedsAssessment.CanProvideIncidentals);
needsAssessment.CanProvideLodging.ShouldBe(originalNeedsAssessment.CanProvideLodging);
needsAssessment.CanProvideTransportation.ShouldBe(originalNeedsAssessment.CanProvideTransportation);
needsAssessment.TakeMedication.ShouldBe(originalNeedsAssessment.TakeMedication);
needsAssessment.HaveMedicalSupplies.ShouldBe(originalNeedsAssessment.HaveMedicalSupplies);
needsAssessment.HavePetsFood.ShouldBe(originalNeedsAssessment.HavePetsFood);
needsAssessment.HaveSpecialDiet.ShouldBe(originalNeedsAssessment.HaveSpecialDiet);
needsAssessment.SpecialDietDetails.ShouldBe(originalNeedsAssessment.SpecialDietDetails);


needsAssessment.HouseholdMembers.Count().ShouldBe(originalNeedsAssessment.HouseholdMembers.Count());
needsAssessment.HouseholdMembers.Where(m => m.IsPrimaryRegistrant).ShouldHaveSingleItem().LinkedRegistrantId.ShouldBe(primaryContact.Id);
for (var j = 0; j < originalNeedsAssessment.HouseholdMembers.Count(); j++)
Expand Down Expand Up @@ -292,11 +288,7 @@ private EvacuationFile CreateTestFile(Evacuee primaryContact)
PostalCode = "V8V 2W3"
},
Type = NeedsAssessmentType.Preliminary,
TakeMedication = false,
HaveMedicalSupplies = false,
Insurance = InsuranceOption.Yes,
HaveSpecialDiet = true,
SpecialDietDetails = "Shellfish allergy",
HavePetsFood = true,
CanProvideClothing = true,
CanProvideFood = true,
Expand Down
4 changes: 0 additions & 4 deletions ess/src/API/EMBC.Tests.Integration.ESS/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ public static EvacuationFile CreateNewTestEvacuationFile(string prefix, Registra
new NeedsAssessment
{
Type = NeedsAssessmentType.Preliminary,
TakeMedication = false,
HaveMedicalSupplies = false,
Insurance = InsuranceOption.Yes,
HaveSpecialDiet = true,
SpecialDietDetails = "Shellfish allergy",
HavePetsFood = true,
CanProvideClothing = true,
CanProvideFood = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ public class NeedsAssessment
public bool? CanEvacueeProvideClothing { get; set; }
public bool? CanEvacueeProvideTransportation { get; set; }
public bool? CanEvacueeProvideIncidentals { get; set; }
public bool HaveSpecialDiet { get; set; }
public string? SpecialDietDetails { get; set; }
public bool HaveMedication { get; set; }
public IEnumerable<HouseholdMember> HouseholdMembers { get; set; } = Array.Empty<HouseholdMember>();
public IEnumerable<Pet> Pets { get; set; } = Array.Empty<Pet>();
public bool? HasPetsFood { get; set; }
Expand Down
3 changes: 0 additions & 3 deletions registrants/src/API/EMBC.Registrants.API/Mappers/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ public Mappings()
.ForMember(d => d.CompletedOn, opts => opts.MapFrom(s => DateTime.UtcNow))
.ForMember(d => d.Notes, opts => opts.Ignore())
.ForMember(d => d.RecommendedReferralServices, opts => opts.Ignore())
.ForMember(d => d.HaveMedicalSupplies, opts => opts.Ignore())
.ForMember(d => d.CanProvideFood, opts => opts.MapFrom(s => s.CanEvacueeProvideFood))
.ForMember(d => d.CanProvideLodging, opts => opts.MapFrom(s => s.CanEvacueeProvideLodging))
.ForMember(d => d.CanProvideClothing, opts => opts.MapFrom(s => s.CanEvacueeProvideClothing))
.ForMember(d => d.CanProvideTransportation, opts => opts.MapFrom(s => s.CanEvacueeProvideTransportation))
.ForMember(d => d.CanProvideIncidentals, opts => opts.MapFrom(s => s.CanEvacueeProvideIncidentals))
.ForMember(d => d.TakeMedication, opts => opts.MapFrom(s => s.HaveMedication))
.ForMember(d => d.HavePetsFood, opts => opts.MapFrom(s => s.HasPetsFood))
.ForMember(d => d.CompletedBy, opts => opts.Ignore())
;
Expand All @@ -69,7 +67,6 @@ public Mappings()
.ForMember(d => d.CanEvacueeProvideClothing, opts => opts.MapFrom(s => s.CanProvideClothing))
.ForMember(d => d.CanEvacueeProvideTransportation, opts => opts.MapFrom(s => s.CanProvideTransportation))
.ForMember(d => d.CanEvacueeProvideIncidentals, opts => opts.MapFrom(s => s.CanProvideIncidentals))
.ForMember(d => d.HaveMedication, opts => opts.MapFrom(s => s.TakeMedication))
.ForMember(d => d.HasPetsFood, opts => opts.MapFrom(s => s.HavePetsFood))
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,6 @@ public class NeedsAssessment
[Required]
public IEnumerable<EvacuationFileHouseholdMember> HouseholdMembers { get; set; } = Array.Empty<EvacuationFileHouseholdMember>();

public bool HaveSpecialDiet { get; set; }
public string? SpecialDietDetails { get; set; }
public bool TakeMedication { get; set; }
public bool? HaveMedicalSupplies { get; set; }
public IEnumerable<Pet> Pets { get; set; } = Array.Empty<Pet>();
public bool? HavePetsFood { get; set; }
public bool? CanProvideFood { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,9 @@ private static NeedsAssessment CreateNeedsAssessment()
.RuleFor(o => o.CanProvideIncidentals, f => f.Random.NullableBool())
.RuleFor(o => o.CanProvideLodging, f => f.Random.NullableBool())
.RuleFor(o => o.CanProvideTransportation, f => f.Random.NullableBool())
.RuleFor(o => o.HaveMedicalSupplies, f => f.Random.NullableBool())
.RuleFor(o => o.HavePetsFood, f => f.Random.NullableBool())
.RuleFor(o => o.HaveSpecialDiet, f => f.Random.Bool())
.RuleFor(o => o.Insurance, f => f.Random.Enum<InsuranceOption>())
.RuleFor(o => o.RecommendedReferralServices, f => f.Random.EnumValues<ReferralServices>())
.RuleFor(o => o.SpecialDietDetails, f => f.Lorem.Paragraph(50))
.RuleFor(o => o.TakeMedication, f => f.Random.Bool())
.RuleFor(o => o.Type, f => f.Random.Enum<NeedsAssessmentType>())
.RuleFor(o => o.Notes, f => f.Make(f.Random.Int(0, 20), CreateNote))
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export interface NeedsAssessment {
createdOn?: null | string;
evacuationExternalReferrals?: null | string;
evacuationImpact?: null | string;
haveMedicalSupplies?: null | boolean;
havePetsFood?: null | boolean;
haveSpecialDiet?: boolean;
houseHoldRecoveryPlan?: null | string;
householdMembers: Array<EvacuationFileHouseholdMember>;
id?: null | string;
Expand All @@ -31,7 +29,5 @@ export interface NeedsAssessment {
recommendedReferralServices?: Array<ReferralServices>;
reviewingTeamMemberDisplayName?: null | string;
reviewingTeamMemberId?: null | string;
specialDietDetails?: null | string;
takeMedication?: boolean;
type?: null | NeedsAssessmentType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export enum SupportReprintReason {
ErrorOnPrintedReferral = 'ErrorOnPrintedReferral',
PrinterError = 'PrinterError',
EvacueeLostTheReferral = 'EvacueeLostTheReferral',
RemoteSupports = 'RemoteSupports',
RemoteMutualAid = 'RemoteMutualAid'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* tslint:disable */
/* eslint-disable */
export interface UpdateUserProfileRequest {
email?: string;
email?: null | string;
firstName?: string;
lastName?: string;
phone?: string;
phone?: null | string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/* eslint-disable */
export interface UserProfile {
agreementSignDate?: null | string;
email?: string;
email?: null | string;
firstName?: string;
id?: string;
label?: string;
lastLoginDate?: null | string;
lastName?: string;
phone?: string;
phone?: null | string;
requiredToSignAgreement?: boolean;
role?: string;
teamId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,31 +163,6 @@
</mat-table>
</div>
</div>

<div class="row">
<div class="col-md-4">Household Dietary Requirements</div>
<div class="col-md-8 bold">
{{
essFile?.needsAssessment?.haveSpecialDiet
? 'Yes - ' + essFile?.needsAssessment?.specialDietDetails
: 'No'
}}
</div>
</div>

<div class="row">
<div class="col-md-4">Household Medication Requirements</div>
<div class="col-md-8 bold">
{{ essFile?.needsAssessment?.takeMedication ? 'Yes' : 'No' }}
</div>
</div>

<div class="row" *ngIf="essFile?.needsAssessment?.takeMedication">
<div class="col-md-4">Has Sufficient Medication</div>
<div class="col-md-8 bold">
{{ essFile?.needsAssessment?.haveMedicalSupplies ? 'Yes' : 'No' }}
</div>
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ describe('EssFileDetailsComponent', () => {
isVerified: null
}
],
haveSpecialDiet: false,
specialDietDetails: null,
takeMedication: false,
haveMedicalSupplies: false,
pets: [],
havePetsFood: false,
canProvideFood: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,39 +260,6 @@
</div>
</div>

<div class="row">
<div class="col-4">Household Dietary Requirements</div>
<div class="col-8 bold">
{{
stepEssFileService?.haveSpecialDiet === 'Yes'
? stepEssFileService?.specialDietDetails
? 'Yes - ' + stepEssFileService?.specialDietDetails
: 'Yes'
: 'No'
}}
</div>
</div>

<div class="row">
<div class="col-4">Household Medication Requirements</div>
<div class="col-8 bold">
{{ stepEssFileService?.takeMedication }}
</div>
</div>

<div
class="row"
*ngIf="stepEssFileService?.takeMedication === 'Yes'"
>
<div class="col-4">Has Sufficient Medication</div>
<div class="col-8 bold">
{{ stepEssFileService?.haveMedicationSupply }}
</div>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-12">
<div class="review-panel data-panel">
Expand Down
Loading
Loading