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

[MINT-2720] Data Exchange Approach #1380

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
742589f
feat: added feature migration, data models, gql
OddTomBrooks Jul 2, 2024
eed69df
chore: updated sql queries
OddTomBrooks Jul 2, 2024
729ce45
feat: several major improvements to first semi-functional data exchan…
OddTomBrooks Jul 3, 2024
343a984
chore: updated postman collection to get all notifications
OddTomBrooks Jul 3, 2024
58ab8f4
chore: updated frontend gql and backend gql for user notification pre…
OddTomBrooks Jul 3, 2024
0706fae
chore: added simple resolver helper to dispatch emails and email test…
OddTomBrooks Jul 3, 2024
95f07f9
chore: removed resolved question
OddTomBrooks Jul 5, 2024
54daae0
chore: Reset all frontend files to main branch as we split the fronte…
OddTomBrooks Jul 5, 2024
d113b08
chore: reran gql gen
OddTomBrooks Jul 5, 2024
6395210
fix: forcing a commit for rebasing purposes
OddTomBrooks Jul 5, 2024
9d4d41c
chore: removed tmp file
OddTomBrooks Jul 5, 2024
3d4e8b1
[EASI-4473] Notification: Data Exchange Approach Completed (#1209)
OddTomBrooks Jul 16, 2024
c1412b7
Merge branch 'main' into feature/MINT-2720_data_exchange_approach
OddTomBrooks Sep 17, 2024
2c829f4
chore: updated migration version
OddTomBrooks Sep 19, 2024
e02d09c
Merge branch 'NOREF/data_exchange_approach' into feature/MINT-2720_da…
OddTomBrooks Sep 20, 2024
6c72a54
wip: data exchange approach
OddTomBrooks Sep 24, 2024
6084f0a
wip: data exchange approach gql, store, and resolvers
OddTomBrooks Sep 25, 2024
ade1e73
feat: working data exchange approach creation and updates
OddTomBrooks Sep 26, 2024
7ec9c2a
feat: several feedback elements implemented
OddTomBrooks Sep 26, 2024
1b03e5f
chore: implementing PR feedback
OddTomBrooks Sep 27, 2024
5bc49a9
chore: implementing PR feedback
OddTomBrooks Sep 27, 2024
13ebcf1
wip: marked complete by user account and dts tracking
OddTomBrooks Sep 27, 2024
ae1095d
feat: first working version of plan data exchange approach
OddTomBrooks Sep 27, 2024
6297312
Merge branch 'main' into feature/MINT-2720_data_exchange_approach
OddTomBrooks Sep 30, 2024
5b11b33
chore: ran linter and fixed cache helper reference
OddTomBrooks Sep 30, 2024
e6ce2e5
run eslint
ClayBenson94 Sep 30, 2024
058e8aa
fix: corrected cyclic dependency and several linter guidances
OddTomBrooks Sep 30, 2024
a53d106
Merge branch 'feature/MINT-2720_data_exchange_approach' of github.com…
OddTomBrooks Sep 30, 2024
0b9ad42
merging changes
OddTomBrooks Sep 30, 2024
b3a1c47
ran sql fluff linter on migrations
StevenWadeOddball Sep 30, 2024
779970a
Merge branch 'feature/MINT-2720_data_exchange_approach' of https://gi…
StevenWadeOddball Sep 30, 2024
70c8856
run lint
ClayBenson94 Sep 30, 2024
ba212c3
fix: restructed logic for is marked complete to utilize null state of…
OddTomBrooks Sep 30, 2024
d4d3adb
Merge branch 'feature/MINT-2720_data_exchange_approach' of github.com…
OddTomBrooks Sep 30, 2024
5051a64
feat: added status handling
OddTomBrooks Oct 1, 2024
e0c358e
chore: corrected file name
OddTomBrooks Oct 1, 2024
a8c58d6
chore: removed old debug print
OddTomBrooks Oct 1, 2024
a3ab8fb
fix: fixed lagging status
OddTomBrooks Oct 1, 2024
7920d75
fix: added status to sql queries
OddTomBrooks Oct 1, 2024
5ffbb51
fix: corrected enum references from COMPLETE to COMPELETED
OddTomBrooks Oct 1, 2024
4a71ec1
chore: removed delete logic for dea
OddTomBrooks Oct 1, 2024
dfe0f74
chore: refactored IsDataExchangeApproachComplete resolver
OddTomBrooks Oct 2, 2024
1c369a7
chore: updated enum to READY to conform more closely with other task …
OddTomBrooks Oct 2, 2024
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
165 changes: 31 additions & 134 deletions MINT.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"opsEvalAndLearningID = responseData.opsEvalAndLearning.id",
"modelLeadID = responseData.collaborators[0].id",
"paymentsID = responseData.payments.id",
"dataExchangeApproachID = responseData.dataExchangeApproach.id",
"firstOpNeed = responseData.operationalNeeds[0].id",
"userID = responseData.createdByUserAccount.id",
"",
Expand All @@ -36,6 +37,7 @@
"pm.collectionVariables.set(\"opsEvalAndLearningID\", opsEvalAndLearningID);",
"pm.collectionVariables.set(\"modelLeadID\", modelLeadID);",
"pm.collectionVariables.set(\"paymentsID\", paymentsID);",
"pm.collectionVariables.set(\"dataExchangeApproachID\", dataExchangeApproachID)",
"pm.collectionVariables.set(\"operationalNeedID\", firstOpNeed);",
"pm.collectionVariables.set(\"userID\", userID);"
],
Expand All @@ -50,7 +52,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createModelPlan{\n \n createModelPlan(modelName:\"Excellent Model\" ){\n id\n modelName\n createdByUserAccount{\n givenName\n id\n }\n operationalNeeds {\n id\n modelPlanID\n name\n key\n nameOther\n needed\n section \n } \n basics{\n id \n }\n generalCharacteristics {\n id\n }\n participantsAndProviders {\n id\n }\n beneficiaries {\n id\n }\n opsEvalAndLearning {\n id\n }\n collaborators {\n id\n }\n payments{\n id\n }\n }\n}\n ",
"query": "mutation createModelPlan{\n \n createModelPlan(modelName:\"Excellent Model\" ){\n id\n modelName\n createdByUserAccount{\n givenName\n id\n }\n operationalNeeds {\n id\n modelPlanID\n name\n key\n nameOther\n needed\n section \n } \n basics{\n id \n }\n generalCharacteristics {\n id\n }\n participantsAndProviders {\n id\n }\n beneficiaries {\n id\n }\n opsEvalAndLearning {\n id\n }\n collaborators {\n id\n }\n payments{\n id\n }\n dataExchangeApproach{\n id\n }\n }\n}\n ",
"variables": ""
}
},
Expand Down Expand Up @@ -411,6 +413,27 @@
},
"response": []
},
{
"name": "Update Data Exchange Approach",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation updatePlanDataExchangeApproach {\n updatePlanDataExchangeApproach(id: \"{{dataExchangeApproachID}}\", changes: {\n # Page 1\n dataToCollectFromParticipants: [CLINICAL_DATA, OTHER]\n dataToCollectFromParticipantsReportsDetails: \"Detailed reports information\"\n dataToCollectFromParticipantsOther: \"Additional data to collect from participants\"\n dataWillNotBeCollectedFromParticipants: false\n dataToCollectFromParticipantsNote: \"Notes regarding data collection from participants\"\n\n # Page 2\n dataToSendToParticipants: [DATA_FEEDBACK_DASHBOARD]\n dataToSendToParticipantsNote: \"Notes about data being sent to participants\"\n\n # Page 3\n doesNeedToMakeMultiPayerDataAvailable: YES\n anticipatedMultiPayerDataAvailabilityUseCase: MORE_COMPETENT_ALERT_DISCHARGE_TRANSFER_NOTIFICATION\n doesNeedToMakeMultiPayerDataAvailableNote: \"Notes on multi-payer data availability\"\n\n doesNeedToCollectAndAggregateMultiSourceData: YES\n multiSourceDataToCollect: [COMMERCIAL_CLAIMS]\n multiSourceDataToCollectOther: \"Additional multi-source data to collect\"\n doesNeedToCollectAndAggregateMultiSourceDataNote: \"Notes on multi-source data collection\"\n\n # Page 4\n willImplementNewDataExchangeMethods: YES\n newDataExchangeMethodsDescription: \"Description of new data exchange methods\"\n newDataExchangeMethodsNote: \"Notes on new data exchange methods\"\n\n # Meta\n isDataExchangeApproachComplete: false\n }) {\n # Meta Fields\n id\n modelPlanID\n isDataExchangeApproachComplete\n\n # Page 1\n dataToCollectFromParticipants\n dataToCollectFromParticipantsReportsDetails\n dataToCollectFromParticipantsOther\n dataWillNotBeCollectedFromParticipants\n dataToCollectFromParticipantsNote\n\n # Page 2\n dataToSendToParticipants\n dataToSendToParticipantsNote\n\n # Page 3\n doesNeedToMakeMultiPayerDataAvailable\n anticipatedMultiPayerDataAvailabilityUseCase\n doesNeedToMakeMultiPayerDataAvailableNote\n doesNeedToCollectAndAggregateMultiSourceData\n multiSourceDataToCollect\n multiSourceDataToCollectOther\n doesNeedToCollectAndAggregateMultiSourceDataNote\n\n # Page 4\n willImplementNewDataExchangeMethods\n newDataExchangeMethodsDescription\n newDataExchangeMethodsNote\n additionalDataExchangeConsiderationsDescription\n isDataExchangeApproachComplete\n\n # User Accounts\n createdBy\n createdDts\n modifiedBy\n modifiedDts\n markedCompleteDts\n markedCompleteBy\n markedCompleteByUserAccount {\n id\n email\n }\n\n createdByUserAccount {\n commonName\n }\n modifiedByUserAccount {\n commonName\n }\n \n status\n }\n}\n",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
},
{
"name": "Get Plan Payments (Deprecated)",
"request": {
Expand Down Expand Up @@ -650,7 +673,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createDiscussionReply {\n createDiscussionReply (input: {\n discussionID: \"{{discussionID}}\"\n content: \"Let me look into it, ok? <span data-type=\\\"mention\\\" tag-type=\\\"USER_ACCOUNT\\\" class=\\\"mention\\\" data-id=\\\"ADMI\\\" data-label=\\\"ADMI\\\">@Audrey Abrams</span>!\"\n userRole: SOLUTION_ARCHITECT\n }) {\n id\n discussionID\n content{\n rawContent\n tags{\n id\n taggedField\n taggedContentTable\n taggedContentID\n entityUUID\n entityIntID\n entity{\n __typename\n ... on UserAccount{\n id\n commonName\n email\n }\n ... on PossibleOperationalSolution {\n name\n key\n }\n }\n }\n }\n isAssessment\n createdBy\n createdDts\n modifiedBy\n modifiedDts\n createdByUserAccount \n {\n commonName\n } \n modifiedByUserAccount\n {\n commonName\n } \n }\n}",
"query": "mutation createDiscussionReply {\n createDiscussionReply (input: {\n discussionID: \"{{discussionID}}\"\n content: \"Let me look into it, ok? <span data-type=\\\"mention\\\" tag-type=\\\"USER_ACCOUNT\\\" class=\\\"mention\\\" data-id=\\\"ADMI\\\" data-label=\\\"ADMI\\\">@Audrey Abrams</span>!\"\n userRole: IT_ARCHITECT\n }) {\n id\n discussionID\n content{\n rawContent\n tags{\n id\n taggedField\n taggedContentTable\n taggedContentID\n entityUUID\n entityIntID\n entity{\n __typename\n ... on UserAccount{\n id\n commonName\n email\n }\n ... on PossibleOperationalSolution {\n name\n key\n }\n }\n }\n }\n isAssessment\n createdBy\n createdDts\n modifiedBy\n modifiedDts\n createdByUserAccount \n {\n commonName\n } \n modifiedByUserAccount\n {\n commonName\n } \n }\n}",
"variables": ""
}
},
Expand Down Expand Up @@ -2656,137 +2679,6 @@
"response": []
}
]
},
{
"name": "ECHIMP",
"item": [
{
"name": "CR Echimp by id",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query echimpCR {\n echimpCR(id: \"FFS3550\") {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n sensitiveFlag\n implementationDate\n crSummary {\n rawContent\n }\n crStatus\n emergencyCrFlag\n relatedCrNumbers\n relatedCrTdlNumbers\n associatedModelUids\n }\n}",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
},
{
"name": "All CR Echimp data",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query echimpCR {\n echimpCRs {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n sensitiveFlag\n implementationDate\n crSummary {\n rawContent\n }\n crStatus\n emergencyCrFlag\n relatedCrNumbers\n relatedCrTdlNumbers\n associatedModelUids\n }\n}",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
},
{
"name": "All Echimp CRS And TDLS",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query echimpCRAndTDLS {\n echimpCRAndTDLS{\n __typename\n ... on EChimpCR {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n sensitiveFlag\n implementationDate\n crSummary {\n rawContent\n }\n crStatus\n emergencyCrFlag\n relatedCrNumbers\n relatedCrTdlNumbers\n associatedModelUids\n }\n ... on EChimpTDL {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n issuedDate\n status\n associatedModelUids\n }\n }\n}",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
},
{
"name": "TDL Echimp by id",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query echimpTDL {\n echimpTDL(id: \"TDL240535\") {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n issuedDate\n status\n associatedModelUids\n }\n\n}",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
},
{
"name": "ALL TDL Echimp data",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query echimpTDL {\n echimpTDLs {\n id\n versionNum\n initiator\n firstName\n lastName\n title\n issuedDate\n status\n associatedModelUids\n }\n\n}",
"variables": ""
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
}
]
},
{
"name": "Get Model Plan with ECHIMP data",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "query modelPlan ($id: UUID!) {\n modelPlan (id: $id) {\n id\n modelName\n echimpCRs{\n title\n }\n echimpTDLs{\n title\n }\n\n }\n}",
"variables": "{\n \"id\": \"{{modelPlanID}}\"\n}"
}
},
"url": {
"raw": "{{url}}",
"host": [
"{{url}}"
]
}
},
"response": []
}
],
"auth": {
Expand Down Expand Up @@ -2842,7 +2734,7 @@
},
{
"key": "modelPlanID",
"value": "082b49d3-b548-48cb-9119-77a281bc2a8c"
"value": ""
},
{
"key": "basicsID",
Expand Down Expand Up @@ -2872,6 +2764,11 @@
"key": "paymentsID",
"value": ""
},
{
"key": "dataExchangeApproachID",
"value": "",
"type": "string"
},
{
"key": "operationalNeedID",
"value": ""
Expand Down
40 changes: 39 additions & 1 deletion cmd/dbseed/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,48 @@ func (s *Seeder) SeedData() {
"cmmiGroups": []string{"PATIENT_CARE_MODELS_GROUP", "SEAMLESS_CARE_MODELS_GROUP"},
"completeICIP": "2020-05-13T20:47:50.12Z",
"phasedIn": true,
"clearanceStarts": now.AddDate(0, 3, 0),
"clearanceStarts": time.Now().AddDate(0, 3, 0),
"highLevelNote": "Some high level note",
},
)

// Send a notification for Data Exchange Approach Completed
dataExchangeApproach := models.NewPlanDataExchangeApproach(
models.NewCoreTaskListSection(
planWithDocuments.CreatedBy,
planWithDocuments.ID,
),
)

dataExchangeApproach.ID = uuid.MustParse("01020304-0506-0708-090a-0b0c0d0e0f10")

// create an actor principal for testing notifications

actorPrincipal := s.getTestPrincipalByUsername("MINT")

// Use a test user to mark the data exchange approach as complete
testUser := s.getTestPrincipalByUsername("BTAL")

err = resolvers.SendDataExchangeApproachCompletedNotification(
s.Config.Context,
s.Config.EmailService,
s.Config.EmailTemplateService,
s.Config.AddressBook,
actorPrincipal.UserAccount.ID,
s.Config.Store,
[]*models.UserAccountAndNotificationPreferences{
{
UserAccount: *testUser.UserAccount,
PreferenceFlags: models.DefaultUserNotificationPreferencesFlags(),
},
},
planWithDocuments,
dataExchangeApproach,
testUser.UserAccount.ID,
)
if err != nil {
panic(fmt.Errorf("failed to send data exchange approach completed notification: %w", err))
}
}

func (s *Seeder) SetDefaultUserViews() {
Expand Down
26 changes: 26 additions & 0 deletions cmd/test_email/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ func main() {
//DiscussionReply email
sendDiscussionReplyOriginatorTestEmail(emailService, templateService, addressBook)

// Model plan emails
sendModelPlanShareTest(emailService, templateService, addressBook)
sendDateChangedEmailsTest(emailService, templateService, addressBook)
sendCollaboratorAddedEmailTest(emailService, templateService, addressBook)
sendDataExchangeApproachCompletedEmailNotificationTest(emailService, templateService, addressBook)
sendFeedbackEmail(emailService, templateService, addressBook)
reportAProblemEmail(emailService, templateService, addressBook)

Expand Down Expand Up @@ -395,6 +397,30 @@ func sendCollaboratorAddedEmailTest(
noErr(err)
}

func sendDataExchangeApproachCompletedEmailNotificationTest(
emailService oddmail.EmailService,
templateService email.TemplateService,
addressBook email.AddressBook,
) {

modelPlan := models.NewModelPlan(
uuid.Nil,
"Retcon Plan",
)

err := resolvers.SendDataExchangeApproachCompletedEmailNotification(
emailService,
templateService,
addressBook,
modelPlan,
"marty.mcfly@delorean.88",
"Doc Brown",
true,
)

noErr(err)
}

func sendFeedbackEmail(
emailService oddmail.EmailService,
templateService email.TemplateService,
Expand Down
Loading
Loading