Skip to content

Commit

Permalink
Merge 23.11 to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed Jan 23, 2024
2 parents 48256a8 + 812a23b commit 6e957a0
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 1 deletion.
106 changes: 106 additions & 0 deletions onprc_ehr/resources/etls/mfshtoRandalData_2024_01.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!--TGHis was updated to change the naming of steps to be seu7ential-->
<etl xmlns="http://labkey.org/etl/xml">
<name>mfshToRandalData_2024</name>
<description>imports the data from mfsh animal details on ONPRC</description>
<transforms>
<transform id="step1">
<description>Define Hansen Study Animals 2022</description>
<source queryName="studyAnimals" schemaName="Randal_data"/>
<destination queryName="StudyDetails_RandalData" schemaName="Onprc_ehr" targetOption="truncate"/>
</transform>
<transform id="step2">
<description>Export Query to File Share</description>
<source queryName="RandData_AnimalGroups" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="AnimalGroups-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step3">
<description>Export Query to File Share</description>
<source queryName="RandData_blood" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="BloodDetails-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step4">
<description>Export Query to File Share</description>
<source queryName="RandData_birth" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="BirthDetails-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step5">
<description>Export Query to File Share</description>
<source queryName="RandData_assignment" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="assignment-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step6">
<description>Export Query to File Share</description>
<source queryName="RandData_arrival" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="arrival-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step7">
<description>Export Query to File Share</description>
<source queryName="RandData_weights" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="weights-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step8">
<description>Export Query to File Share</description>
<source queryName="RandData_Cases" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="Cases-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step9">
<description>Export Query to File Share</description>
<source queryName="RandData_clinremarks" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="clinremarks-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step10">
<description>Export Query to File Share</description>
<source queryName="RandData_demographics" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="demographics-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step11">
<description>Export Query to File Share</description>
<source queryName="RandData_deaths" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="deaths-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step12">
<description>Export Query to File Share</description>
<source queryName="RandData_departure" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="departure-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step13">
<description>Export Query to File Share</description>
<source queryName="RandData_drug" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="drug-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step14">
<description>Export Query to File Share</description>
<source queryName="RandData_flags" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="flags-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step15">
<description>Export Query to File Share</description>
<source queryName="RandData_Hematology" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="Hematology-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step16">
<description>Export Query to File Share</description>
<source queryName="RandData_Housing" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="Housing-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step17">
<description>Export Query to File Share Project</description>
<source queryName="project" schemaName="pf_ehrData"/>
<destination dir="hansenFiles" fileBaseName="Projects-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step18">
<description>Export Query to File Share Protocols</description>
<source queryName="protocol" schemaName="pf_ehrData"/>
<destination dir="hansenFiles" fileBaseName="Protocol-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
<transform id="step19">
<description>Export Query to File Share</description>
<source queryName="RandalData_bcs" schemaName="onprc_ehr"/>
<destination dir="hansenFiles" fileBaseName="Notes-${TransformRunId}-${Timestamp}" fileExtension="csv" type="file"/>
</transform>
</transforms>
<schedule>
<!--5AM-->
<cron expression="0 0 05 * * ?"/>
</schedule>
</etl>
2 changes: 1 addition & 1 deletion onprc_ehr/resources/scripts/onprc_ehr/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ONPRC_EHR.Utils = new function(){
if (!row.remark){
EHR.Server.Utils.addError(scriptErrors, cageField, 'You are required to enter a remark', 'INFO');
EHR.Server.Utils.addError(scriptErrors, 'Id', 'You are required to enter a remark', 'INFO');
EHR.Server.Utils.addError(scriptErrors, 'remark', 'A remark is required because of the case size errors.', 'WARN');
EHR.Server.Utils.addError(scriptErrors, 'remark', 'A remark is required because of the cage size errors.', 'WARN');
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ public List<String> verifyCageSize(String room, String cage, List<Double> weight
List<String> ret = new ArrayList<>();
Double availableSqFt = cageRow.getSqFt();
Double availableHeight = cageRow.getHeight();
String dividername = cageRow.getDividerName();

Double requiredSqFt = 0.0;
for (Double w : weights)
Expand All @@ -922,7 +923,11 @@ public List<String> verifyCageSize(String room, String cage, List<Double> weight
requiredSqFt += s;
}
}
if ("No Slide".equalsIgnoreCase(dividername))
{
availableSqFt = availableSqFt * 2;

}
if (requiredSqFt > availableSqFt)
{
ret.add("These animals are too LARGE for this cage. Has " + Math.round(availableSqFt) + " sq ft. Requires " + Math.round(requiredSqFt) + ".");
Expand Down

0 comments on commit 6e957a0

Please sign in to comment.