diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.html b/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.html index 750c48832..2e8b05548 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.html +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.html @@ -1001,6 +1001,18 @@ + + +
+ +
+
+ + Edit Summary Record + +
+ @@ -1086,8 +1098,9 @@ target="_blank" alt="View Assay Screening Record" matTooltip='View Assay Record'>View     - + @@ -1444,6 +1457,17 @@ + + + From Result Data + + + check_circle_outline + + + + + Reference Source {{assaysum.referenceSourceTypeNumber}} diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.ts b/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.ts index 070dd0ac8..8a70f4515 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.ts +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-browse/invitro-pharmacology-browse.component.ts @@ -138,6 +138,7 @@ export class InvitroPharmacologyBrowseComponent implements OnInit { testAgentSummaryColumns: string[] = [ 'viewDetails', + 'isFromResult', 'referenceSource', 'testAgent', 'assayTarget', @@ -615,6 +616,8 @@ export class InvitroPharmacologyBrowseComponent implements OnInit { summaryObj.relationshipType = screening.invitroSummary.relationshipType; summaryObj.interactionType = screening.invitroSummary.interactionType; + summaryObj.isFromResult = screening.invitroSummary.isFromResult; + assayObj.summary = summaryObj; assayObj.summaries = []; @@ -632,6 +635,7 @@ export class InvitroPharmacologyBrowseComponent implements OnInit { testAgent = screening.invitroAssayResultInformation.invitroTestAgent.testAgent; assayObj.testAgent = testAgent; testAgentSubstanceUuid = screening.invitroAssayResultInformation.invitroTestAgent.testAgentSubstanceUuid; + let testAgentId = screening.invitroAssayResultInformation.invitroTestAgent.id; // Get the index if the value exists in the key 'testAgent' const indexTestAgent = this.browseByTestAgentList.findIndex(record => record.testAgent === testAgent); @@ -648,7 +652,8 @@ export class InvitroPharmacologyBrowseComponent implements OnInit { // Create new card record let assayList = []; assayList.push(assayObj); - const appScreening = { 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentScreeningList': assayList, 'testAgentSummaryList': summaryList }; + const appScreening = { 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentId': testAgentId, + 'testAgentScreeningList': assayList, 'testAgentSummaryList': summaryList }; this.browseByTestAgentList.push(appScreening); } // else } // if invitroTestAgent exists diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.html b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.html index 0c6a37402..1e1daa8dc 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.html +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.html @@ -19,6 +19,7 @@ View All Test Agents +
@@ -27,98 +28,39 @@ - - + - - - - - - - - - - - +
+ +
+    + View +
+
- -
- - - - - - @@ -140,7 +82,15 @@ @@ -151,29 +101,89 @@ - - + + - - + + + + + + + + + + + + - - + + - +
# + Number {{(index+1)}} View Details -
-    - View -
-
-
Update -
-    - - - -   - - - - - -
-
Total Screening - {{assay.invitroAssayScreenings.length}} - Reference - -
-
- {{(i+1)}}. - - {{screening.invitroReference.referenceSourceType}}  - {{screening.invitroReference.referenceSourceNumber}} -
-
+
+ + + +  
-
-
Test Agent - -
    -
    -
    -
    -
  1. - - - {{screening.invitroTestAgent.testAgent}} - - - - {{screening.invitroTestAgent.testAgent}} - -
  2. -
    -
    -
    -
+
Assay ID + {{assay.assayId}} Target Name - {{assay.targetName}} + + + {{assay.targetName}} + Study Type Bioassay Type - {{assay.studyType}} + {{assay.bioassayType}} Bioassay Type Reference-Test Agent + +
+ +
+ +
+ +
+
+ +
+ {{(i+1)}}. +
+ + +
+ + {{screening.invitroAssayResultInformation.invitroReference.referenceSourceType}}  + {{screening.invitroAssayResultInformation.invitroReference.referenceSourceNumber}} +
+
+
+ +
+ + +
+
+ +  -  + + {{screening.invitroAssayResultInformation.invitroTestAgent.testAgent}} + + + + {{screening.invitroAssayResultInformation.invitroTestAgent.testAgent}} + + +
+
+
+ +
+ +
Total Result Records - {{assay.bioassayType}} + {{assay._totalResultRecords}} + Total Summay Records + {{assay._totalSummaryRecords}} Modify Date Assay Modified Date - {{assay.lastModifiedDate|date: 'MM/dd/yyyy hh:mm:ss a'}} + {{assay.modifiedDate|date: 'MM/dd/yyyy hh:mm:ss a'}}
@@ -210,20 +220,35 @@
-
{{(index+1)}}.  Test Agent: - - - +
+
{{(index+1)}}.  Test Agent: + + + + {{screen.testAgent}} + + + {{screen.testAgent}} - + - - {{screen.testAgent}} - - - -
+
+
+ + +
+ +
+
+ + Edit Summary Record + +
+ +
+
@@ -232,21 +257,42 @@ + + + + + + + + + + - - - + + + + + + + + + + + - - + + - +
Number + {{(index+1)}} + View Details
View -     + alt="View Assay Record" matTooltip='View Assay Screening Record'>View + + + +
From Result Data + + check_circle_outline + + Reference Source @@ -264,35 +310,67 @@ Target Name - {{assaysum.targetName}} + + + {{assaysum.targetName}} + Test Agent Concentration - {{assaysum.testAgentConcentration}} - {{assaysum.testAgentConcentrationUnits}} + + Bioassay Type + {{assaysum.bioassayType}} Result Value - {{assaysum.resultValue}}  - {{assaysum.resultValueUnits}} + + {{assaysum.summaryResultValueAvg}} (Avg) + + +
+ {{assaysum.summaryResultValueLow}} (Low) +
+ +
+ {{assaysum.summaryResultValueLow}} (High) +
+
+ {{assaysum.summaryResultValueUnits}} +
Result Type + {{assaysum.resultType}} + Relationship Type + {{assaysum.relationshipType}} Study Type Interaction Type - {{assaysum.studyType}} + {{assaysum.interactionType}}


diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.scss b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.scss index 71adefec2..1e608e8eb 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.scss +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.scss @@ -227,6 +227,10 @@ margin-top: 90px; } +.marginleft10px { + margin-left: 10px; +} + .marginleft30px { margin-left: 30px; } diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.ts b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.ts index 277c043aa..9e758b66f 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.ts +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details-testagent/invitro-pharmacology-details-testagent.component.ts @@ -42,6 +42,9 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { allAssaysList: Array = []; allScreeningTestAgents: Array = []; + totalResultRecords = 0; + totalSummaryRecords = 0; + showSpinner = false; //view = 'cards'; public privateSearchTerm?: string; @@ -118,28 +121,30 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { allAssayColumns: string[] = [ 'number', 'viewDetails', - 'update', - 'totalScreening', - 'reference', - 'testAgent', 'assayId', 'externalAssayId', 'externalAssaySource', 'targetName', 'targetTitle', - 'studyType', 'bioassayType', - 'modifyDate' + 'reference', + 'totalResult', + 'totalSummary', + 'modifiedDate' ]; testAgentSummaryColumns: string[] = [ + 'number', 'viewDetails', + 'isFromResult', 'referenceSource', 'testAgent', 'targetName', - 'testAgentConcentration', + 'bioassayType', 'resultValue', - 'studyType' + 'resultType', + 'relationshipType', + 'interactionType' ]; // needed for facets @@ -200,6 +205,31 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { const invitroSubscribe = this.invitroPharmacologyService.getAllAssays().subscribe(response => { this.assays = response; this.allAssaysList = response; + + this.allAssaysList.forEach(assay => { + this.totalResultRecords = 0; + this.totalSummaryRecords = 0; + assay.invitroAssayScreenings.forEach(screening => { + + /* Invitro Assay Result Object exists */ + if (screening.invitroAssayResult) { + // Count total number of Result record exists for this assay + this.totalResultRecords = this.totalResultRecords + 1; + } // if invitroAssayResult object exists + + /* Invitro Assay Summary Object exists */ + if (screening.invitroSummary) { + // Count total number of Summary record exists for this assay + this.totalSummaryRecords = this.totalSummaryRecords + 1; + } // if invitroAssayResult object exists + + }); // LOOP: screening + + assay._totalResultRecords = this.totalResultRecords; + assay._totalSummaryRecords = this.totalSummaryRecords; + + }); // LOOP: assay + }, error => { this.loadingService.setLoading(false); this.showSpinner = false; // Stop progress spinner @@ -259,10 +289,26 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { }); } + if (screening.invitroSummary) { + + assaySummary.summaryResultValueAvg = screening.invitroSummary.resultValueAverage; + assaySummary.summaryResultValueLow = screening.invitroSummary.resultValueLow; + assaySummary.summaryResultValueHigh = screening.invitroSummary.resultValueHigh; + assaySummary.summaryResultValueUnits = screening.invitroSummary.resultValueUnits; + + assaySummary.resultType = screening.invitroSummary.resultType; + assaySummary.relationshipType = screening.invitroSummary.relationshipType; + assaySummary.interactionType = screening.invitroSummary.interactionType; + + assaySummary.isFromResult = screening.invitroSummary.isFromResult; + + } + /* Invitro Reference Object exists */ - let referenceSourceTypeNumber = ''; - let referenceSourceNumber = ''; if (screening.invitroAssayResultInformation) { + + let referenceSourceTypeNumber = ''; + let referenceSourceNumber = ''; if (screening.invitroAssayResultInformation.invitroReference) { // Need this so it will not display undefined value if (screening.invitroAssayResultInformation.invitroReference.referenceSource) { @@ -278,9 +324,11 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { let testAgent = ''; let testAgentSubstanceUuid = ''; + testAgent = screening.invitroAssayResultInformation.invitroTestAgent.testAgent; assaySummary.testAgent = testAgent; - testAgentSubstanceUuid = screening.invitroAssayResultInformation.invitroTestAgent.testAgentSubstanceUuid; + assaySummary.testAgentSubstanceUuid = screening.invitroAssayResultInformation.invitroTestAgent.testAgentSubstanceUuid; + let testAgentId = screening.invitroAssayResultInformation.invitroTestAgent.id; // Get the index if the value exists in the key 'testAgent' const indexTestAgent = this.allScreeningTestAgents.findIndex(record => record.testAgent === testAgent); @@ -292,7 +340,10 @@ export class InvitroPharmacologyDetailsTestagentComponent implements OnInit { // Create new card record let assayList = []; assayList.push(assaySummary); - const appScreening = { 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentSummaryList': assayList, 'testAgentScreeningList': assayList }; + const appScreening = { + 'testAgent': testAgent, 'testAgentSubstanceUuid': testAgentSubstanceUuid, 'testAgentId': testAgentId, + 'testAgentSummaryList': assayList, 'testAgentScreeningList': assayList + }; this.allScreeningTestAgents.push(appScreening); } // else } // if invitroTestAgent exists diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.html b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.html index 0cb05690f..78cb7f36b 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.html +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.html @@ -184,10 +184,20 @@ Target Name: {{assay.targetName}} @@ -509,6 +519,24 @@ + + Batch Number: + +
+ {{screening.invitroAssayResult.batchNumber}} +
+ + + + + Test Date: + +
+ {{screening.invitroAssayResult.testDate}} +
+ + + Number Of Tests: diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.scss b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.scss index c922c1173..cda77d060 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.scss +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.scss @@ -347,6 +347,10 @@ max-width: 50px; } +.width100px { + width: 100px; +} + .width200px { width: 200px; max-width: 200px; diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.ts b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.ts index f7b11c0be..11d05191a 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.ts +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-details/invitro-pharmacology-details.component.ts @@ -250,6 +250,7 @@ export class InvitroPharmacologyDetailsComponent implements OnInit, OnDestroy { } openImageModal(uuid: string) { + alert(uuid); const dialogRef = this.dialog.open(StructureImageModalComponent, { height: '90%', width: '650px', diff --git a/src/app/fda/invitro-pharmacology/invitro-pharmacology-form/invitro-pharmacology-assay-form/invitro-pharmacology-assay-form.component.scss b/src/app/fda/invitro-pharmacology/invitro-pharmacology-form/invitro-pharmacology-assay-form/invitro-pharmacology-assay-form.component.scss index 426aebe41..877717448 100644 --- a/src/app/fda/invitro-pharmacology/invitro-pharmacology-form/invitro-pharmacology-assay-form/invitro-pharmacology-assay-form.component.scss +++ b/src/app/fda/invitro-pharmacology/invitro-pharmacology-form/invitro-pharmacology-assay-form/invitro-pharmacology-assay-form.component.scss @@ -364,6 +364,10 @@ width: 50px; } +.width100px { + width: 100px; +} + .width200px { width: 200px; } diff --git a/src/app/fda/invitro-pharmacology/model/invitro-pharmacology.model.ts b/src/app/fda/invitro-pharmacology/model/invitro-pharmacology.model.ts index 3cd32e13b..e1af82418 100644 --- a/src/app/fda/invitro-pharmacology/model/invitro-pharmacology.model.ts +++ b/src/app/fda/invitro-pharmacology/model/invitro-pharmacology.model.ts @@ -35,6 +35,8 @@ export interface InvitroAssayInformation { _calculateIC50?: string; _assayTargetSummaries?: Array; _existingAssayList?: Array; + _totalResultRecords?: number; + _totalSummaryRecords?: number; invitroAssaySets?: Array; invitroAssayScreenings?: Array; //invitroSummaries?: Array; @@ -238,6 +240,7 @@ export interface InvitroSummary { resultValueHigh?: number; resultValueUnits?: string; comments?: string; + isFromResult?: string; } export interface ValidationResults {