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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ null as weightField,
cast((
SELECT round(cast(AVG(w2.weight) as double), 2) AS _expr
FROM study.weight w2
WHERE w.id=w2.id AND w.MostRecentWeightDate=w2.date
WHERE w2.qcstate.publicdata = true AND w.id=w2.id AND w.MostRecentWeightDate=w2.date
) as double) AS MostRecentWeight

FROM (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE ehr_lookups.cageclass ADD COLUMN LSID LSIDtype;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE ehr_lookups.cageclass ADD Lsid LsidType null;
11 changes: 11 additions & 0 deletions ehr/resources/schemas/ehr_lookups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@
<fkColumnName>entityid</fkColumnName>
</fk>
</column>
<column columnName="lsid">
<datatype>lsidtype</datatype>
<isReadOnly>true</isReadOnly>
<isHidden>true</isHidden>
<isUserEditable>false</isUserEditable>
<fk>
<fkColumnName>ObjectUri</fkColumnName>
<fkTable>Object</fkTable>
<fkDbSchema>exp</fkDbSchema>
</fk>
</column>
</columns>
</table>
<table tableName="conc_units" tableDbType="TABLE" useColumnOrder="true">
Expand Down
2 changes: 1 addition & 1 deletion ehr/src/org/labkey/ehr/EHRModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
return 25.001;
return 25.002;
}

@Override
Expand Down
7 changes: 6 additions & 1 deletion snd/src/org/labkey/snd/SNDManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,12 @@ private String generateEventDataNarrative(Container c, User u, Event event, Even
value = "<span class='" + AttributeData.ATTRIBUTE_DATA_CSS_CLASS + "'>" + value + "</span>";
}

eventDataNarrative = new StringBuilder(eventDataNarrative.toString().replace("{" + pd.getName() + "}", value));
// Trim any spaces immediately inside '{' and '}' to make tokens like "{ route 2}" -> "{route 2}"
String normalized = eventDataNarrative.toString()
.replaceAll("\\{\\s+", "{")
.replaceAll("\\s+\\}", "}");

eventDataNarrative = new StringBuilder(normalized.replace("{" + pd.getName() + "}", value));
}
}

Expand Down