Skip to content

[PW] - DSM tissue request flow #2211

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 3 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ executors:
resource_class: medium+
docker:
# Playwright docker image version MUST match Playwright version in project
- image: mcr.microsoft.com/playwright:v1.31.0-focal
- image: mcr.microsoft.com/playwright:v1.38.0-jammy
working_directory: *playwright_path
environment:
TZ: "America/New_York"
NODE_ENV: development # Needed if playwright is in devDependencies

commands:
Expand Down Expand Up @@ -700,7 +701,7 @@ jobs:
command: npx playwright install --with-deps chromium # Only need Chrome browser

- run:
name: Running Playwright tests
name: Running Playwright tests on << parameters.env >>
working_directory: *playwright_path
command: |
npx playwright test --list | grep -o 'tests/.*.spec.ts' | sort | uniq > e2e_tests.txt
Expand Down Expand Up @@ -843,15 +844,6 @@ workflows:
jobs:
- deploy-stored-build-job:
study_key: << pipeline.parameters.study_key >>
- playwright-build:
env: << pipeline.parameters.deploy_env >>
- playwright-test:
env: << pipeline.parameters.deploy_env >>
parallelism_num: 2
test_suite: UNKNOWN
requires:
- playwright-build
- deploy-stored-build-job

api-run-tests-workflow:
# Run ui tests for study specified in api call by run_ci.sh and tests for sdk and toolkit
Expand Down
2 changes: 1 addition & 1 deletion build-utils/findmodifiedprojects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# If a file from a common area, like the root diretory was modified, we call that _SHARED_
set +x
#ignore these file name patterns when figuring out what modules changed
declare -a exclude_patterns=( '^.*\.md' '^.*.pdf', '^.*\.spec\.ts' )
declare -a exclude_patterns=( '^.*\.md' '^.*.pdf', '^.*\.spec\.ts', 'playwright' )

EXCLUDE_CMD='grep -v -E'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class AppComponent implements OnInit, OnDestroy {
});
});
const modalClose = this.communicationService.closePopupMessage$.subscribe(() => {
this.dialog.getDialogById('ServerMessage').close();
this.dialog.getDialogById('ServerMessage')?.close();
});
this.anchor.addNew(modalOpen).addNew(modalClose);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { forkJoin, Observable, of } from 'rxjs';
import { map, take, switchMap, tap, skipWhile, mergeMap, filter } from 'rxjs/operators';
import {forkJoin, mergeMap, Observable, of} from 'rxjs';
import { map, take, switchMap, tap } from 'rxjs/operators';

import {
SessionMementoService,
ConfigurationService,
GovernedParticipantsServiceAgent,
UserProfile,
ActivityInstance,
UserActivityServiceAgent,
UserManagementServiceAgent,
WorkflowServiceAgent,
LanguageService,
CompositeDisposable,
UserStatusServiceAgent,
ParticipantProfileServiceAgent
SessionMementoService,
ConfigurationService,
GovernedParticipantsServiceAgent,
UserProfile,
ActivityInstance,
UserActivityServiceAgent,
UserManagementServiceAgent,
WorkflowServiceAgent,
LanguageService,
CompositeDisposable,
UserStatusServiceAgent,
UserProfileServiceAgent, UserProfileDecorator
} from 'ddp-sdk';

import { ActivityService } from '../../services/activity.service';
import { RegistrationStatusService } from '../../services/registrationStatus.service';
import * as RouterResources from '../../router-resources';
import { ActivityCodes } from '../../sdk/constants/activityCodes';
import { WorkflowModel } from '../../models/workflow.model';
import {AddParticipantPayload} from '../../../../../ddp-sdk/src/lib/models/addParticipantPayload';

export interface Participant {
guid: string;
Expand Down Expand Up @@ -55,7 +56,7 @@ export class ParticipantListComponent implements OnInit, OnDestroy {
private readonly userStatusService: UserStatusServiceAgent,
private readonly registrationStatusService: RegistrationStatusService,
@Inject('ddp.config') private readonly config: ConfigurationService,
private participantProfileService: ParticipantProfileServiceAgent
private readonly userProfileServiceAgent: UserProfileServiceAgent,
) {}

ngOnInit(): void {
Expand All @@ -79,24 +80,32 @@ export class ParticipantListComponent implements OnInit, OnDestroy {

onAddParticipantClick(): void {
this.disableAddParticipantsButton = true;
const payload: AddParticipantPayload = {
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
};

const addParticipantObs = this.userProfileServiceAgent.profile
.pipe(
mergeMap(({profile: {preferredLanguage}}: UserProfileDecorator) =>
this.governedParticipantsAgent
.addParticipant(this.config.studyGuid, {...payload, languageCode: preferredLanguage})
),
take(1),
tap(participantGuid => this.session.setParticipant(participantGuid)),
switchMap(() => this.workflowAgent.fromParticipantList())
)
.subscribe({
next: () => {
this.disableAddParticipantsButton = false;
this.activityService.setCurrentActivity(null);
this.router.navigateByUrl(RouterResources.Survey);
},
error: () => {
this.disableAddParticipantsButton = false;
}
});

this.governedParticipantsAgent
.addParticipant(this.config.studyGuid)
.pipe(
take(1),
tap(participantGuid => this.session.setParticipant(participantGuid)),
switchMap(() => this.workflowAgent.fromParticipantList()),
)
.subscribe({
next: () => {
this.disableAddParticipantsButton = false;
this.activityService.setCurrentActivity(null);
this.router.navigateByUrl(RouterResources.Survey);
},
error: () => {
this.disableAddParticipantsButton = false;
}
});
this.anchor.addNew(addParticipantObs);
}

private getParticipants(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ export class WelcomeComponent implements OnInit, OnDestroy {
}

public ngOnInit(): void {
const translate$ = this.ngxTranslate.getTranslation(['HomePage.Participate.Steps.Second.Ul'])
.subscribe((list: string[]) => {
this.list = list['HomePage.Participate.Steps.Second.Ul'];
});
this.anchor.addNew(translate$);
if(this.ngxTranslate) {
const translate$ = this.ngxTranslate.getTranslation(['HomePage.Participate.Steps.Second.Ul'])
.subscribe((list: object) => {
this.list = list['HomePage.Participate.Steps.Second.Ul'];
});
this.anchor.addNew(translate$);
}
}

public ngOnDestroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import '../../../styles/breakpoints';

.wrapper {
height: 92px;
min-height: 92px;
display: flex;
margin: 5rem 0;
position: relative;
Expand Down Expand Up @@ -30,7 +30,7 @@
&_active {
color: map-get($colors, 'progress_bar-active');

& .circular {
& .circular {
background: map-get($colors, 'progress_bar-active');
border: 3px solid map-get($colors, 'progress_bar-active-border');
& .number {
Expand All @@ -43,7 +43,7 @@
}

&_white {
& .circular {
& .circular {
background: map-get($colors, 'white');
border: 3px solid map-get($colors, 'progress_bar-active-border');
& .number {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<mat-checkbox color="primary" disableRipple
[checked]="dataFilter.value1" [(ngModel)]="dataFilter.value1" (change)="changeValue($event, dataFilter)"> Yes
</mat-checkbox>
<mat-checkbox color="primary" disableRipple
<mat-checkbox *ngIf="showSearchParameter(dataFilter)" color="primary" disableRipple
[checked]="dataFilter.value2" [(ngModel)]="dataFilter.value2" (change)="changeValue2($event, dataFilter)"> No
</mat-checkbox>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export class FilterColumnComponent implements OnInit {
showOptions = false;
selected: number;

// Hide a search parameter for the following RGP columns
rgpHideSearchParamColumns = [
{ displayName: 'Specialty Project: R21', name: 'r21', tableAlias: 'r' }
];

ngOnInit(): void {
if (this.dataFilter.singleOption) {
for (const [ key, value ] of Object.entries(this.dataFilter.selectedOptions)) {
Expand Down Expand Up @@ -87,4 +92,16 @@ export class FilterColumnComponent implements OnInit {
this.dataFilter.notEmpty = false;
this.dataFilter.empty = false;
}

/**
* Show or hide (remove) a search parameter.
* @param dataFilter
* @returns Return true if dataFilter column is not found in hardcoded rgpHideSearchParamColumns array.
*/
showSearchParameter(dataFilter: Filter): boolean {
const found = this.rgpHideSearchParamColumns.findIndex(column => dataFilter?.participantColumn?.display === column.displayName
&& dataFilter?.participantColumn?.name === column.name
&& dataFilter?.participantColumn?.tableAlias === column.tableAlias);
return found === -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@ export class OncHistoryDetailComponent implements OnInit {
}
}
if (v != null) {
let ddpParticipantId = this.participant.data.profile['guid'];
if (this.participant.data.profile['legacyAltPid']) {
ddpParticipantId = this.participant.data.profile['legacyAltPid'];
}
const realm: string = sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM);
const patch1 = new PatchUtil(
this.oncHistory[index].oncHistoryDetailId, this.role.userMail(),
{
name: parameterName,
value: v
}, null, 'participantId', this.participant.participant.participantId,
Statics.ONCDETAIL_ALIAS, null, realm, this.participant.data.profile['guid']
Statics.ONCDETAIL_ALIAS, null, realm, ddpParticipantId
);
const patch = patch1.getPatch();
this.patchFinished = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,11 @@ export class DSMService {
);
}

public applyDestructionPolicyToAll(source: string, json: string): Observable<any> {
public applyDestructionPolicyToAll(realm: string, json: string): Observable<any> {
const url = this.baseUrl + DSMService.UI + 'institutions';
return this.http.patch(url, json, this.buildHeader()).pipe(
const map: { name: string; value: any }[] = [];
map.push({name: DSMService.REALM, value: realm});
return this.http.patch(url, json, this.buildQueryHeader(map)).pipe(
catchError(this.handleError)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3 class="Color--primary Line--Break">{{additionalMessage}}</h3>
</mat-form-field>
<button mat-raised-button type="button" color="primary"
(click)="searchKit()"
[disabled]="!((searchValue != null && searchValue !== '') && searchField != null)">Search Kit</button>
[disabled]="buttonDisabled">Search Kit</button>
</div>
<br/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import { DSMService } from '../services/dsm.service';
import { KitRequest } from '../shipping/shipping.model';
import { RoleService } from '../services/role.service';
import { Observable, defer } from 'rxjs';
import { ComponentService } from '../services/component.service';

@Component({
selector: 'app-shipping-search',
templateUrl: './shipping-search.component.html',
styleUrls: ['./shipping-search.component.css']
})
export class ShippingSearchComponent implements OnInit {
realm: string;
errorMessage: string;
additionalMessage: string;
searchValue: string | null = null;
Expand All @@ -22,26 +24,40 @@ export class ShippingSearchComponent implements OnInit {
kit: KitRequest[] = [];
private currentPatchField: string | null;
PECGS_RESEARCH = 'PECGS_RESEARCH';
disabled = true;

constructor(private dsmService: DSMService, private auth: Auth, private role: RoleService) {
constructor(private dsmService: DSMService, private auth: Auth, private role: RoleService, private compService: ComponentService) {
if (!auth.authenticated()) {
auth.sessionLogout();
}
}

ngOnInit(): void {
if (sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM) != null) {
this.realm = sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM);
} else {
this.errorMessage = 'Please select a study';
}
this.checkRight();
}

private checkRight(): void {
let allowedToSeeInformation = false;
this.allowedRealms = [];
let jsonData: any[];
this.dsmService.getRealmsAllowed(Statics.SHIPPING).subscribe({
next: data => {
jsonData = data;
jsonData.forEach((val) => {
this.allowedRealms.push(val);
if (sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM) === val) {
allowedToSeeInformation = true;
this.allowedRealms.push(val);
this.disabled = false;
}
});
if (!allowedToSeeInformation) {
this.errorMessage = 'You are not allowed to see kit information of the selected study';
}
},
error: () => null
});
Expand Down Expand Up @@ -166,4 +182,8 @@ saveCompleted(): void{
}
return false;
}

get buttonDisabled(): boolean {
return this.disabled || this.searchField == null || this.searchValue == null || !this.searchValue.trim().length;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class="header-text-inputs-editing-name"
type="text"
[value]="user.name"
(keydown)="onKeyDown($event)"
(click)="$event.stopPropagation()"/>
</p>
<p>Phone:
Expand All @@ -26,6 +27,7 @@
class="header-text-inputs-editing-phone"
type="text"
[value]="user.phone"
(keydown)="onKeyDown($event)"
(click)="$event.stopPropagation()"/>
</p>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export class AdministrationUserComponent implements OnInit, OnDestroy {
}

/* Template methods */
public onKeyDown(event: KeyboardEvent): void {
event.stopPropagation();
}

public get doNotAllowCollapse(): boolean {
return this.hasPermissionsChanged || this.disableUserActionButtons;
Expand Down
2 changes: 1 addition & 1 deletion ddp-workspace/projects/ddp-lms/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@
"countMeInBtn": "Count Me In",
"learMoreBtn": "Learn More",
"paragraph2Headline": "What is the goal of the LMSproject?\n\n",
"paragraph2Text": "The goal of the LMSproject is to transform cancer care by enabling all patients who have ever been diagnosed with leiomyosarcoma to accelerate biomedical research through sharing their cancer samples, clinical information, and their experiences. In order to achieve these goals, datasets containing linked clinical, genomic, molecular, and patient-reported data (without including any personal information) will be regularly shared with the biomedical research community through scientific repositories such as cBioPortal for Cancer Genomics and the National Cancer Institute (NCI) Genomic Data Commons.<br><br>Count Me In's Leiomyosarcoma (LMS) Project is supported by a grant from the National Cancer Institute's Cancer Moonshot program and is part of the <a href='https://pecgs.org/pecgs/home' target='_blank'>Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network</a> of research centers.",
"paragraph2Text": "The goal of the LMSproject is to transform cancer care by enabling all patients who have ever been diagnosed with leiomyosarcoma to accelerate biomedical research through sharing their cancer samples, clinical information, and their experiences. In order to achieve these goals, datasets containing linked clinical, genomic, molecular, and patient-reported data (without including any personal information) will be regularly shared with the biomedical research community through scientific repositories such as cBioPortal for Cancer Genomics and the National Cancer Institute (NCI) Genomic Data Commons.<br><br>Count Me In's Leiomyosarcoma (LMS) Project is supported by a grant from the National Cancer Institute's Cancer Moonshot program and is part of the <a href='https://pe-cgs.org/' target='_blank'>Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network</a> of research centers.",
"paragraph2Button": "Learn More About Us",
"paragraph3Title": "Here’s how to participate:",
"steps": [
Expand Down
2 changes: 1 addition & 1 deletion ddp-workspace/projects/ddp-osteo/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@
{
"Question": "Who is conducting this research?",
"Paragraphs": [
"This project is being conducted by the Broad Institute of MIT and Harvard, Dana-Farber Cancer Institute, and Count Me In, a non-profit research initiative that conducts patient-partnered studies of cancer. Count Me In's Osteosarcoma (OS) Project and Leiomyosarcoma (LMS) Project are supported by a grant from the National Cancer Institute's Cancer Moonshot program and are part of the <a class=\"Link\" href=\"https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/implementation/patient-engagement\" target=\"_blank\"> Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network of research centers.</a>"
"This project is being conducted by the Broad Institute of MIT and Harvard, Dana-Farber Cancer Institute, and Count Me In, a non-profit research initiative that conducts patient-partnered studies of cancer. Count Me In's Osteosarcoma (OS) Project and Leiomyosarcoma (LMS) Project are supported by a grant from the National Cancer Institute's Cancer Moonshot program and are part of the <a class=\"Link\" href=\"https://pe-cgs.org\" target=\"_blank\"> Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network of research centers.</a>"
]
},
{
Expand Down
Loading