Skip to content
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
17 changes: 12 additions & 5 deletions WNPRC_EHR/resources/queries/study/Necropsy/Summary.qview.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<column name="Id" />
<column name="is_prenatal_necropsy" />
<column name="dam" />
<column name="perfusion_area" />
<column name="perfusion_soln1" />
<column name="perfusion_soln2" />
<column name="project" />
<column name="account" />
<column name="date" />
<column name="location" />
<column name="shipping" />
<column name="shipping_comment" />
<column name="comments" />

<column name="timeofdeath" />
<column name="caseno" />

<column name="project" />
<column name="account" />
<column name="performedby" />
<column name="assistant" />

<!--<column name="nhpbmd" />-->
<!--<column name="perfusion_area" />-->
<!--<column name="perfusion_soln1" />-->
<!--<column name="perfusion_time1" />-->
<!--<column name="perfusion_soln2" />-->
<!--<column name="perfusion_time2" />-->
<column name="grossdescription" />
<!--<column name="patho_notes" />-->
Expand Down
2 changes: 1 addition & 1 deletion WNPRC_EHR/resources/queries/study/necropsy.query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="necropsies" tableDbType="TABLE">
<tableUrl>/EHR/necropsyDetails.view?key=${objectid}</tableUrl>
<tableUrl>/WNPRC_EHR-necropsyDetails.view?key=${objectid}&amp;requestid=${requestid}</tableUrl>
<insertUrl />
<importUrl />
<updateUrl />
Expand Down
86 changes: 86 additions & 0 deletions WNPRC_EHR/resources/views/necropsyDetails.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<script type="text/javascript" nonce="<%=scriptNonce%>">

Ext4.onReady(function (){
if (!LABKEY.ActionURL.getParameter('key')){
alert('Must Provide Necropsy Number');
return;
}

var key = LABKEY.ActionURL.getParameter('key');
var requestid = LABKEY.ActionURL.getParameter('requestid');
var webpart = <%=webpartContext%>;
var domSpec = [{
tag: 'div',
id: 'necropsyDetails_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyReport_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyTissues_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyWeights_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyDiagnosis_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyImages_' + webpart.wrapperDivId
},{
tag: 'div',
style: 'padding-bottom: 10px;',
id: 'necropsyHistology_' + webpart.wrapperDivId
}]

var el = Ext4.get(webpart.wrapperDivId);
Ext4.DomHelper.append(el, domSpec);

Ext4.create('LDK.panel.DetailsPanel', {
store: {
schemaName: 'study',
queryName: 'Necropsies',
viewName: 'Summary',
filterArray: [LABKEY.Filter.create('objectId', key, LABKEY.Filter.Types.EQUAL)]
},
showBackBtn: false,
title: 'Necropsy Details:',
renderTo: 'necropsyDetails_' + webpart.wrapperDivId
});

LDK.Utils.getReadOnlyQWP({
title: 'Morphologic Diagnoses',
schemaName: 'study',
queryName: 'Morphologic Diagnosis',
filters: [LABKEY.Filter.create('parentid', key, LABKEY.Filter.Types.EQUAL)]
}).render('necropsyDiagnosis_' + webpart.wrapperDivId);

LDK.Utils.getReadOnlyQWP({
title: 'Histology',
schemaName: 'study',
queryName: 'histology',
filters: [LABKEY.Filter.create('parentid', key, LABKEY.Filter.Types.EQUAL)],
sort: '-Date'
}).render('necropsyHistology_' + webpart.wrapperDivId);

LDK.Utils.getReadOnlyQWP({
title: 'Tissue Samples',
schemaName: 'study',
queryName: 'tissue_samples',
filters: [LABKEY.Filter.create('requestid', requestid, LABKEY.Filter.Types.EQUAL)],
}).render('necropsyTissues_' + webpart.wrapperDivId);

LDK.Utils.getReadOnlyQWP({
title: 'Organ Weights',
schemaName: 'study',
queryName: 'organ_weights',
filters: [LABKEY.Filter.create('requestid', requestid, LABKEY.Filter.Types.EQUAL)],
}).render('necropsyWeights_' + webpart.wrapperDivId);
});

</script>
5 changes: 5 additions & 0 deletions WNPRC_EHR/resources/views/necropsyDetails.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<view xmlns="http://labkey.org/data/xml/view" frame="none">
<dependencies>
<dependency path="ehr.context" />
</dependencies>
</view>