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

Updated product, application, ivp #539

Merged
merged 3 commits into from
Aug 20, 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
8 changes: 4 additions & 4 deletions src/app/core/assets/data/product_dictionary.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"Administravail Pharmacedical Dosage Form":{
"lucenePath":"root_pharmacedicalDosageForm",
"description":"Pharmaceutical Form of the product",
"Product Container":{
"lucenePath":"root_productContainer",
"description":"Product Container of the product",
"type":"string",
"cvDomain":"PROD_PHARMACEDICAL_DOSAGE_FORM",
"cvDomain":"PROD_CONTAINER",
"priority":null,
"suggest":null
},
Expand Down
8 changes: 6 additions & 2 deletions src/app/core/facets-manager/facet-display.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export class FacetDisplayPipe implements PipeTransform {
codeTerm = this.configService.configData.approvalCodeName;
}



if (args) {
if (args === 'userList') {
if (name.includes(':')){
Expand Down Expand Up @@ -98,6 +96,12 @@ export class FacetDisplayPipe implements PipeTransform {
if (name === 'root_submitDate') {
return 'Submit Date';
}
if (name === 'root_creationDate') {
return 'Record Create Date';
}
if (name === 'root_lastModifiedDate') {
return 'Record Last Edited';
}

return name.trim();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class SubstanceFormSsg4mProcessCardComponent extends SubstanceCardBaseFil
window['schemeUtil'].maxTextLen = 19;
window['schemeUtil'].BREAK_GAP = 300;
window['schemeUtil'].maxTitleTextLen = 100;

const url = `${(this.configService.configData && this.configService.configData.apiBaseUrl) || '/'}api/v1/`;
const httpp = this.http;
window['schemeUtil'].apiBaseURL = url;
Expand Down Expand Up @@ -99,7 +99,7 @@ export class SubstanceFormSsg4mProcessCardComponent extends SubstanceCardBaseFil
window['schemeUtil'].onClickMaterial = (d) => {
this.openImageModal(d.refuuid, d.name, d.bottomText);
};

if (window['schemeUtil'].executeWhenLoaded) {
window['schemeUtil'].executeWhenLoaded();
}
Expand Down
10 changes: 4 additions & 6 deletions src/app/fda/advanced-search/service/advanced-search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import { BaseHttpService } from '@gsrs-core/base';
import { PagingResponse } from '@gsrs-core/utils';
import { FacetParam, FacetHttpParams, FacetQueryResponse } from '@gsrs-core/facets-manager';
import { SubstanceDetail, SubstanceName, SubstanceCode } from '@gsrs-core/substance/substance.model';
import { ProductAll } from '../../product/model/product.model';
import { ClinicalTrial } from '../../clinical-trials/clinical-trial/clinical-trial.model';
// import { map, switchMap, tap } from 'rxjs/operators';
// import { Facet } from '@gsrs-core/facets-manager';
import { Product } from '../../product/model/product.model'
import { Application, ApplicationIngredient } from '../../application/model/application.model';
import { ClinicalTrial } from '../../clinical-trials/clinical-trial/clinical-trial.model';

@Injectable(
{ providedIn: 'root' }
Expand Down Expand Up @@ -119,7 +117,7 @@ export class AdvancedSearchService extends BaseHttpService {
pageSize: number = 10,
searchTerm?: string,
facets?: FacetParam
): Observable<PagingResponse<ProductAll>> {
): Observable<PagingResponse<Product>> {
let params = new FacetHttpParams();
params = params.append('skip', skip.toString());
params = params.append('top', '1'); // setting top=1, faster result, no content
Expand All @@ -134,7 +132,7 @@ export class AdvancedSearchService extends BaseHttpService {
params: params
};

return this.http.get<PagingResponse<ProductAll>>(url, options);
return this.http.get<PagingResponse<Product>>(url, options);
}

getClinicalTrials(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ControlledVocabularyService } from '../../../core/controlled-vocabulary
import { VocabularyTerm } from '../../../core/controlled-vocabulary/vocabulary.model';
import { Application, ValidationMessage } from '../model/application.model';
import { Subscription } from 'rxjs';
import * as moment from 'moment';
import { Title } from '@angular/platform-browser';
import { take } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog';
Expand Down Expand Up @@ -455,11 +456,17 @@ export class ApplicationFormComponent implements OnInit, AfterViewInit, OnDestro
}

showJSON(): void {
const date = new Date();
let jsonFilename = 'application_' + moment(date).format('MMM-DD-YYYY_H-mm-ss');

let cleanApplication = this.cleanApplication();

let data = {jsonData: cleanApplication, jsonFilename: jsonFilename};

const dialogRef = this.dialog.open(JsonDialogFdaComponent, {
width: '90%',
height: '90%',
data: cleanApplication
data: data
});

// this.overlayContainer.style.zIndex = '1002';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<div class="col-2 flex-column related-substance">
<div class="related-substance-border">
<app-substance-search-selector (selectionUpdated)="ingredientNameUpdated($event)"
(showMessage)="showMessageIngredientName($event)" (searchValueOut)="searchValueOutChange($event)" eventCategory="ingredName" placeholder="Ingredient Name"
header="Ingredient Name" [subuuid]="substanceUuid">
(showMessage)="showMessageIngredientName($event)" (searchValueOut)="searchValueOutChange($event)"
eventCategory="ingredName" placeholder="Ingredient Name" header="Ingredient Name" [subuuid]="substanceUuid">
</app-substance-search-selector>

<div *ngIf="ingredientNameMessage" class="colorred font12px">
Expand All @@ -62,9 +62,11 @@
{{active}} <span class="colorgray font11px">(Active Moiety)</span>
</div>
</div>
<div *ngIf="ingredient.substanceKey">
<span class="colororange">{{ingredient.substanceKey}}</span><span class="colorgray font11px">
({{ingredient.substanceKeyType}})</span>
<div *ngIf="ingredient.substanceKey || ingredientName">
<span class="colororange">{{ingredient.substanceKey}}</span>
<span class="colorgray font11px">
<span *ngIf="ingredient.substanceKeyType"> ({{ingredient.substanceKeyType}})</span>
</span>
<br>
<button mat-icon-button color="primary" (click)="confirmDeleteIngredientName(ingredIndex)"
matTooltip="Delete Ingredient Name {{ingredIndex + 1}}">
Expand All @@ -81,8 +83,8 @@
<div class="related-substance-border">
<app-substance-search-selector (selectionUpdated)="basisOfStrengthUpdated($event)"
(showMessage)="showMessageBasisOfStrength($event)" (searchValueOut)="searchValueBasisOutChange($event)"
eventCategory="substanceRelationshipRelatedSub"
placeholder="Basis Of Strength" header="Basis Of Strength" [subuuid]="basisOfStrengthSubstanceUuid">
eventCategory="substanceRelationshipRelatedSub" placeholder="Basis Of Strength" header="Basis Of Strength"
[subuuid]="basisOfStrengthSubstanceUuid">
</app-substance-search-selector>


Expand All @@ -100,9 +102,13 @@
</div>
</div>

<div *ngIf="ingredient.basisOfStrengthSubstanceKey">
<span class="colororange">{{ingredient.basisOfStrengthSubstanceKey}}</span><span class="colorgray font11px">
({{ingredient.basisOfStrengthSubstanceKeyType}})</span>
<div *ngIf="ingredient.basisOfStrengthSubstanceKey || basisOfStrengthIngredientName">
<span class="colororange">{{ingredient.basisOfStrengthSubstanceKey}}</span>
<span class="colorgray font11px">
<span *ngIf="ingredient.basisOfStrengthSubstanceKeyType">
({{ingredient.basisOfStrengthSubstanceKeyType}})
</span>
</span>
<br>
<button mat-icon-button color="primary" (click)="confirmDeleteBasisOfStrength(ingredIndex)"
matTooltip="Delete Basis of Strength {{ingredIndex + 1}}">
Expand Down
Loading
Loading