Skip to content

Commit

Permalink
deprecate previous rateProgramIDs field
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed May 15, 2024
1 parent 70ddbc9 commit 7101bb3
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN;
ALTER TABLE "RateRevisionTable"
RENAME COLUMN "rateProgramIDs" to "deprecatedRateProgramIDs";
ALTER TABLE "RateRevisionTable"
ADD COLUMN "rateProgramIDS" TEXT[];
COMMIT;
1 change: 1 addition & 0 deletions services/app-api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ model RateRevisionTable {
rateDateCertified DateTime? @db.Date
amendmentEffectiveDateStart DateTime? @db.Date
amendmentEffectiveDateEnd DateTime? @db.Date
deprecatedRateProgramIDs String[]
rateProgramIDs String[]
rateCertificationName String?
certifyingActuaryContacts ActuaryContact[] @relation(name: "CertifyingActuaryOnRateRevision")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const rateFormDataSchema = z.object({
rateDateCertified: z.date().optional(),
amendmentEffectiveDateStart: z.date().optional(),
amendmentEffectiveDateEnd: z.date().optional(),
deprecatedRateProgramIDs: z.array(z.string()).optional(),
rateProgramIDs: z.array(z.string()).optional(),
rateCertificationName: z.string().optional(),
certifyingActuaryContacts: z.array(actuaryContactSchema).optional(),
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/src/postgres/contractAndRates/insertRate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function insertDraftRate(
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts,
addtlActuaryContacts,
Expand Down Expand Up @@ -97,6 +98,7 @@ async function insertDraftRate(
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts: {
create:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ describe('parseDomainData', () => {
amendmentEffectiveDateStart: null,
amendmentEffectiveDateEnd: null,
rateProgramIDs: [],
deprecatedRateProgramIDs: [],
rateCertificationName: null,
actuaryCommunicationPreference: null,
contractsWithSharedRateRevision: [],
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/src/resolvers/rate/submitRate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ export function submitRate(
amendmentEffectiveDateEnd:
formData.amendmentEffectiveDateEnd ?? undefined,
rateProgramIDs: formData.rateProgramIDs ?? [],
deprecatedRateProgramIDs:
formData.deprecatedRateProgramIDs ?? [],
certifyingActuaryContacts:
formData.certifyingActuaryContacts
? formData.certifyingActuaryContacts.map(
Expand Down
1 change: 1 addition & 0 deletions services/app-api/src/testHelpers/gqlRateHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function addNewRateToRateInput(
amendmentEffectiveDateStart: '2024-02-01',
amendmentEffectiveDateEnd: '2025-02-01',
rateProgramIDs: [defaultFloridaRateProgram().id],
deprecatedRateProgramIDs: [],

rateDocuments: [
{
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/src/testHelpers/rateDataMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const mockRateRevision = (
rateID: 'rateID',
rateCertificationName: 'testState-123',
rateProgramIDs: [statePrograms[0].id],
deprecatedRateProgramIDs: [statePrograms[0].id],
rateCapitationType: 'RATE_CELL',
rateDateStart: new Date(),
rateDateEnd: new Date(),
Expand Down Expand Up @@ -147,6 +148,7 @@ function mockRateFormDataInput(): RateFormDataInput {
amendmentEffectiveDateStart: '2024-02-01',
amendmentEffectiveDateEnd: '2025-02-01',
rateProgramIDs: ['foo'],
deprecatedRateProgramIDs: ['foo'],

rateDocuments: [
{
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/submitContract.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ fragment rateRevisionFragmentForFetchContract on RateRevision {
amendmentEffectiveDateStart
amendmentEffectiveDateEnd
rateProgramIDs
deprecatedRateProgramIDs
rateCertificationName
certifyingActuaryContacts {
id
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/submitRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ mutation submitRate($input: SubmitRateInput!) {
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts {
id
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/unlockRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fragment rateRevisionFragmentForUnlock on RateRevision {
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ mutation updateDraftContractRates($input: UpdateDraftContractRatesInput!) {
amendmentEffectiveDateStart
amendmentEffectiveDateEnd
rateProgramIDs
deprecatedRateProgramIDs
rateCertificationName
actuaryCommunicationPreference
certifyingActuaryContacts {
Expand Down Expand Up @@ -141,6 +142,7 @@ mutation updateDraftContractRates($input: UpdateDraftContractRatesInput!) {
amendmentEffectiveDateStart
amendmentEffectiveDateEnd
rateProgramIDs
deprecatedRateProgramIDs
rateCertificationName
actuaryCommunicationPreference
certifyingActuaryContacts {
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/queries/fetchContract.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ fragment rateRevisionFragmentForFetchContract on RateRevision {
amendmentEffectiveDateStart
amendmentEffectiveDateEnd
rateProgramIDs
deprecatedRateProgramIDs
rateCertificationName
certifyingActuaryContacts {
id
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/queries/fetchRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ fragment rateRevisionFragmentForFetchRate on RateRevision {
amendmentEffectiveDateStart
amendmentEffectiveDateEnd
rateProgramIDs
deprecatedRateProgramIDs
rateCertificationName
certifyingActuaryContacts {
id
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/queries/indexRates.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ query indexRates {
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts {
name
Expand Down Expand Up @@ -187,6 +188,7 @@ query indexRates {
amendmentEffectiveDateStart,
amendmentEffectiveDateEnd,
rateProgramIDs,
deprecatedRateProgramIDs,
rateCertificationName,
certifyingActuaryContacts {
name
Expand Down
14 changes: 11 additions & 3 deletions services/app-graphql/src/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,11 @@ type RateFormData {
"""
amendmentEffectiveDateEnd: Date
"""
An array of IDs representing state programs that the rate covers
Deprecated an array of IDs representing historic state programs that the rate covers
"""
deprecatedRateProgramIDs: [String!]!
"""
An array of IDs representing historic state programs that the rate covers
"""
rateProgramIDs: [String!]!
"""
Expand Down Expand Up @@ -1535,7 +1539,11 @@ input RateFormDataInput {
"""
amendmentEffectiveDateEnd: Date
"""
An array of IDs representing state programs that the rate covers
Deprecated an array of IDs representing historic state programs that the rate covers
"""
deprecatedRateProgramIDs: [String!]!
"""
An array of IDs representing historic state programs that the rate covers
"""
rateProgramIDs: [String!]!
"""
Expand All @@ -1561,7 +1569,7 @@ input RateFormDataInput {
"""
actuaryCommunicationPreference: ActuaryCommunication
"""
An array of PackageWithSameRate elements
Deprecated - an array of PackageWithSameRate elements
which contain the packageName, packageId, and packageStatus
These elements represent other packages in the system
that are using this rate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ export const RateDetailsSummarySectionV2 = ({
</h3>
<dl>
<DoubleColumnGrid>
{/* {ratePrograms && (
<DataDetail
id="historicRatePrograms"
label="Programs this rate certification covers"
explainMissingData={
!isSubmittedOrCMSUser
}
children={ratePrograms(rate)}
/>
)} */}
{ratePrograms && (
<DataDetail
id="ratePrograms"
Expand Down

0 comments on commit 7101bb3

Please sign in to comment.