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
22 changes: 21 additions & 1 deletion onprc_ehr/resources/queries/ehr/protocol_counts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,24 @@ function onUpsert(helper, scriptErrors, row, oldRow){
if (row && row.project){
EHR.Server.Utils.addError(scriptErrors, 'project', 'You should probably leave this field blank. Animal counts are usually associated with the IACUC itself. The project field was left in place to support IRIS data, but should not be used unless there is a good reason to do so.', 'INFO');
}
}
}
//Validate dates. Kollil, 1/19/2021
EHR.Server.TriggerManager.registerHandlerForQuery(EHR.Server.TriggerManager.Events.BEFORE_UPSERT, 'ehr', 'protocol_counts', function(helper, scriptErrors, row, oldRow)
{
var start = row.start;
var end = row.enddate;
//console.log ("In 11");

// Check if startdate and enddate are not empty
if ((start == null && end == null) || (start == null && end != null) || (start != null && end == null)) {
EHR.Server.Utils.addError(scriptErrors, 'start', 'Must enter Start and End dates', 'ERROR');
}

//enddate: verify enddate not prior to startdate
if (start != null && end != null) {
if (start.getTime() > end.getTime()) {
EHR.Server.Utils.addError(scriptErrors, 'enddate', 'End date must be after Start date', 'ERROR');
}
}

});
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
<column columnName="Cage"/>
<column columnName="housingType">
<columnTitle>Housing Type</columnTitle>
</column>column>
</column>
<column columnName="housingCondition">
<columnTitle>Housing Condition</columnTitle>
</column>column>
</column>
<column columnName="ReasonForMove">
<columnTitle>Reason For Move</columnTitle>
</column>column>
</column>
<column columnName="Remark"/>

<column columnName="TotalAnimals">
Expand Down
4 changes: 2 additions & 2 deletions onprc_ehr/resources/queries/study/PMIC_ChargeTypes.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
SELECT chargetype
From Site.{substitutePath moduleProperty('onprc_billing','BillingContainer')}.onprc_billing.chargeUnits
Where servicecenter is null or servicecenter like 'PMIC'
From Site.{substitutePath moduleProperty('ONPRC_Billing','BillingContainer_Public')}.onprc_billing.chargeUnits
Where servicecenter is null or servicecenter like 'PMIC'
47 changes: 47 additions & 0 deletions onprc_ehr/resources/views/PMIC_Wiki.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<p><strong>This page contains the links related to the PMIC data entry services.</strong></p>
<p>&nbsp;</p>
<ul>
<li>
<h4>Click here to go to,&nbsp;<strong><a href="/ehr/ONPRC/EHR/dataEntryForm.view?formType=PMIC%20SERVICES%20REQUEST">PMIC Services Request</a></strong>&nbsp;form</h4>
</li>
</ul>
<p><em>This screen contains the PMIC services request data entry form</em></p>
<ul>
<li>
<h4>Click here to go to,&nbsp;<strong><a href="/ehr/ONPRC/EHR/dataEntryForm.view?formType=PMIC">PMIC Data Entry</a></strong>&nbsp;form</h4>
</li>
</ul>
<p><em>This screen contains the data entry panels for PET Scan, CT Scan, SPECT, Angio, Ultrasound and DEXA procedures.</em></p>
<ul>
<li>
<h4>Click here to go to,&nbsp;<strong><a href="/ehr/ONPRC/EHR/animalHistory.view?">Animal History Page</a></strong>&nbsp;to view the PMIC data</h4>
</li>
</ul>
<p><em>New tabs are created for each PMIC procedure under "<strong>Imaging</strong>" tab&nbsp;</em>on the Animal history form.&nbsp;</p>
<ol>
<li><em><strong>PMIC - PET:&nbsp;</strong>&nbsp;Click on this tab to view the animal's PET Imaging data.</em></li>
<li><em><strong>PMIC - CT:</strong>&nbsp;&nbsp;Click on this tab to view the animal's CT Imaging data.</em></li>
<li><em><strong>PMIC - SPECT:</strong>&nbsp;&nbsp;Click on this tab to view the animal's SPECT Imaging data.</em></li>
<li><em><strong>PMIC - Angio:</strong>&nbsp;&nbsp;Click on this tab to view the animal's Angio Imaging data.</em></li>
<li><em><strong>PMIC - Ultrasound:</strong>&nbsp;&nbsp;Click on this tab to view the animal's Ultrasound Imaging data.</em></li>
<li><em><strong>PMIC - DEXA:</strong>&nbsp;&nbsp;Click on this tab to view the animal's DEXA Imaging data.</em></li>
</ol>
<ul>
<li>
<h4>Click here to maintain the&nbsp;<strong><a href="/ldk/ONPRC/EHR/updateQuery.view?schemaName=onprc_ehr&amp;query.queryName=PMIC_Reference_Data">PMIC Reference Data</a></strong></h4>
</li>
</ul>
<p><em>This is the maintenance screen for the PMIC reference data such as PET radioisotopes, SPECT radioisotopes, Ultrasound procedures, DEXA values &amp; Animal position values and etc. The PMIC admin can add/edit any of these items.</em></p>
<p><em>A new item is added by clicking the "IMPORT BULK DATA" on the top panel and entering valid "Value" and "Name" fields with a blank "End Date" field .</em></p>
<p><em>An item can be disabled by clicking the "EDIT" button and set a valid "End Date". The item will be deleted from the appropriate drop down list(s).</em>&nbsp;</p>
<ul>
<li>
<h4>&nbsp;<span style="font-size: 1em;">Click here to go to,</span><strong><span style="font-size: 1em;">&nbsp; <a href="/project/ONPRC/ResourceScheduler/PMIC%20Scheduler/begin.view?">PMIC Resource Scheduler</a></span></strong></h4>
</li>
</ul>
<ol>
<li><strong style="font-size: 1em;"><em>Click here to view,&nbsp;<a href="/query/ONPRC/ResourceScheduler/PMIC%20Scheduler/executeQuery.view?query.queryName=PMIC_Scheduler_Daily&amp;schemaName=extscheduler&amp;query.containerFilterName=AllFolders">Today's scheduled events</a></em></strong></li>
<li><strong><em>Click here to view,&nbsp;<a href="/query/ONPRC/ResourceScheduler/PMIC%20Scheduler/executeQuery.view?query.queryName=PMIC_Scheduler_Weekly&amp;schemaName=extscheduler&amp;query.containerFilterName=AllFolders">Weekly scheduled events&nbsp;</a></em></strong></li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
5 changes: 5 additions & 0 deletions onprc_ehr/resources/views/PMIC_Wiki.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<view xmlns="http://labkey.org/data/xml/view" title="PMIC Core Services">
<dependencies>
<dependency path="ehr.context" />
</dependencies>
</view>
6 changes: 6 additions & 0 deletions onprc_ehr/resources/views/PMIC_Wiki.webpart.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<webpart xmlns="http://labkey.org/data/xml/webpart" title="PMIC Core Services">
<view name="PMIC_Wiki"/>
<locations>
<location name="body"/>
</locations>
</webpart>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.labkey.onprc_ehr.dataentry;

import org.json.JSONObject;
import org.labkey.api.ehr.dataentry.AnimalDetailsFormSection;
import org.labkey.api.ehr.dataentry.DataEntryFormContext;
import org.labkey.api.ehr.dataentry.FormSection;
Expand All @@ -24,6 +25,8 @@
import org.labkey.api.view.template.ClientDependency;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

//Created: 5/23/2019 Kollil
public class PMICRequestFormType extends RequestForm
Expand All @@ -48,6 +51,18 @@ public PMICRequestFormType(DataEntryFormContext ctx, Module owner)

}

//This function has a property that allows to schedule PMIC service requests in future with no num days restriction - By Kollil, 4/20/21
@Override
public JSONObject toJSON()
{
JSONObject ret = super.toJSON();
Map<String, Object> map = new HashMap<>();
map.put("allowRequestsInDistantFuture", true);
ret.put("extraContext", map);
return ret;
}


// // Added: 12-5-2019 R.Blasa Allow access only to PMIC Access group.
// @Override
// protected boolean canInsert()
Expand Down
Loading