Skip to content

Commit

Permalink
TAC updates for new ERP system changes and misc bug fix (#750)
Browse files Browse the repository at this point in the history
* - Added new columns to ehr.project table to accommodate speedkeys. In the process the cost_account data that was currently being placed in the account column was moved to the new cost_account column, and the account_id data is now placed in the account field. Speedkey is in the speedkey column.
- updated the source view to supply the new column data
- updated the query metadata in demographicsParentStatus.query.xml
to fix Issue 339: Incorrect links on parents
- added default view for ehr.project table
- added the ehr.project table to browse all datasets

* - Updated ehr.project default vies
  • Loading branch information
spamhurts authored Aug 26, 2024
1 parent 6ab4427 commit 364adc5
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
8 changes: 8 additions & 0 deletions snprc_ehr/resources/domain-templates/ehr.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
<dat:rangeURI>string</dat:rangeURI>
<dat:scale>2</dat:scale>
</dat:column>
<dat:column columnName="cost_account">
<dat:columnTitle>Cost Account</dat:columnTitle>
<dat:rangeURI>string</dat:rangeURI>
</dat:column>
<dat:column columnName="speedkey">
<dat:columnTitle>Speedkey</dat:columnTitle>
<dat:rangeURI>string</dat:rangeURI>
</dat:column>
</dat:columns>
</table>
</template>
Expand Down
16 changes: 16 additions & 0 deletions snprc_ehr/resources/queries/ehr/project/.qview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView" label="Projects">
<columns>
<column name="project"/>
<column name="account"/>
<column name="speedkey"/>
<column name="cost_account"/>
<column name="protocol"/>
<column name="research"/>
<column name="startdate"/>
<column name="enddate"/>
<column name="displayName"/>
</columns>
<sorts>
<sort column="startdate" descending="true" />
</sorts>
</customView>
2 changes: 2 additions & 0 deletions snprc_ehr/resources/queries/study/BrowseDataSets.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ UNION
select 'snprc_ehr' as schema, 'ClinPath' as CategoryId,'Urinalysis Results' as Label, 'HL7UrinalysisPivot' as Name, true as ShowByDefault, true as isAnimal
UNION
select 'ehr' as schema, 'Colony Management' as CategoryId,'Kinship' as Label, 'kinship' as Name, true as ShowByDefault, true as isAnimal
UNION
select 'ehr' as schema, 'Colony Management' as CategoryId,'Project' as Label, 'project' as Name, true as ShowByDefault, false as isAnimal
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
</column>
<column columnName="Parent_id">
<columnTitle>Parent Id</columnTitle>
<fk>
<fkDbSchema>study</fkDbSchema>
<fkTable>animal</fkTable>
<fkColumnName>id</fkColumnName>
</fk>
<url>ehr/participantView.view?participantId=${Parent_id}</url>
</column>
<column columnName="calculated_status">
<columnTitle>Status</columnTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS
SELECT
ca.charge_id AS project,
CASE WHEN vcs.charge_id IS NULL THEN 'True' ELSE 'False' END AS research,
ca.cost_account AS account,
ca.cost_account AS cost_account,
ca.account_id AS account,
pca.speedkey AS speedkey,
ca.working_iacuc AS protocol,
coalesce(right(ca.working_iacuc, 2), vcs.arc_species_code) as species,
ca.start_date AS startdate,
Expand All @@ -46,6 +48,7 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS
FROM dbo.charge_account AS ca
LEFT OUTER JOIN dbo.TAC_COLUMNS AS tc ON tc.object_id = ca.object_id
LEFT OUTER JOIN dbo.valid_charge_by_species AS vcs ON ca.charge_id = vcs.charge_id
LEFT OUTER JOIN dbo.prd_cost_account AS pca on pca.account_id = ca.account_id


GO
Expand Down

0 comments on commit 364adc5

Please sign in to comment.