Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bot] Merge 24.7 to develop #430

Merged
merged 2 commits into from
Oct 29, 2024
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
3 changes: 0 additions & 3 deletions nirc_ehr/resources/queries/study/cases/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
</column>
<column name="caseHistory"/>
</columns>
<filters>
<filter column="category" operator="eq" value="Clinical"/>
</filters>
<sorts>
<sort column="date" descending="true"/>
</sorts>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<column name="caseCheck"/>
<column name="caseHistory"/>
<column name="Id"/>
<column name="Id/Demographics/species"/>
<column name="Id/curLocation/room/building"/>
<column name="Id/curLocation/room"/>
<column name="Id/curLocation/cage"/>
<column name="date"/>
<column name="reviewdate"/>
<column name="enddate"/>
<column name="Id/demographics/mostRecentHx"/>
<column name="problemCategory"/>
<column name="problemSubcategory"/>
<column name="Id/curLocation/daysInRoom"/>
<column name="remark"/>
<column name="plan"/>
<column name="daysSinceLastVetReview"/>
</columns>
<filters>
<filter column="isOpen" operator="eq" value="true"/>
<filter column="category" operator="eq" value="Behavior"/>
</filters>
<sorts>
<sort column="Id/curLocation/room"/>
<sort column="Id/curLocation/cage"/>
<sort column="date" descending="true"/>
</sorts>
</customView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<customView xmlns="http://labkey.org/data/xml/queryCustomView">
<columns>
<column name="Id"/>
<column name="Id/curLocation/room"/>
<column name="Id/curLocation/cage"/>
<column name="date"/>
<column name="reviewdate"/>
<column name="enddate"/>
<column name="problemCategory"/>
<column name="problemSubcategory"/>
<column name="remark"/>
<column name="plan"/>
<column name="caseHistory"/>
<column name="taskid"/>
</columns>
<filters>
<filter column="category" operator="eq" value="Behavior"/>
</filters>
<sorts>
<sort column="Id/curLocation/room"/>
<sort column="Id/curLocation/cage"/>
<sort column="date" descending="true"/>
</sorts>
</customView>
6 changes: 4 additions & 2 deletions nirc_ehr/resources/reports/additionalReports.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ observationSchedule Daily Reports js Observation Schedule true study observatio
activeObservationOrders Clinical query Active Observation Orders true study observation_order Active Orders date false false qcstate/publicdata This report contains a list of today's treatments to be administered
observationOrders Clinical query Observation Orders true study observation_order date false false qcstate/publicdata This report contains a list of today's treatments to be administered
alopecia Clinical query Alopecia Scores TRUE study clinical_observations Alopecia Scores date FALSE FALSE qcstate/publicdata This report contains the alopecia scores for the animal
behaviorCases
bloodSchedule
behaviorCases Behavior query Active Behavior Cases true study cases Active Behavior Cases date false false qcstate/publicdata This displays active behavioral cases
allBehaviorCases Behavior query Behavior Cases true study cases All Behavior Cases date false false qcstate/publicdata This displays all behavioral cases
behaviorRemarks
bloodSchedule
cases Clinical query Active Clinical Cases true study cases Active Clinical Cases date false false qcstate/publicdata This displays active clinical cases
clinCases Clinical query All Clinical Cases true study Cases All Clinical Cases date false false qcstate/publicdata This report contains one record for each clinical case
clinMedicationSchedule Daily Reports js Medication Schedule true study clinMedicationSchedule date false false qcstate/publicdata This report contains a list of today's treatments to be administered
Expand Down
1 change: 1 addition & 0 deletions nirc_ehr/resources/views/begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
},
items: [
{name: 'Active Clinical Cases', url: '<%=contextPath%>' + ctx['EHRStudyContainer'] + '/ehr-animalHistory.view#inputType:none&showReport:1&activeReport:cases'},
{name: 'Active Behavior Cases', url: '<%=contextPath%>' + ctx['EHRStudyContainer'] + '/ehr-animalHistory.view#inputType:none&showReport:1&activeReport:behaviorCases'},
]
},
{
Expand Down
107 changes: 107 additions & 0 deletions nirc_ehr/resources/web/nirc_ehr/model/sources/BehaviorDefaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
EHR.model.DataModelManager.registerMetadata('BehaviorDefaults', {
byQuery: {
'study.clinremarks': {
hx: {
formEditorConfig: {
xtype: 'ehr-hxtextarea'
},
},
p: {
hidden: true,
},
s: {
hidden: true,
},
o: {
hidden: true,
},
a: {
hidden: true,
},
remark: {
label: 'Remark',
height: 120
},
vetreview: {
hidden: true,
},
category: {
getInitialValue: function (v, rec) {
return 'Behavior'
},
editable: false,
hidden: true,
columnConfig: {
editable: false
}
},
enddate: {
hidden: true
},
dateFinalized: {
hidden: true
},
qcstate: {
hidden: true
},
performedby: {
hidden: false,
defaultValue: LABKEY.Security.currentUser.id.toString(),
editorConfig: {
store: {
type: 'labkey-store',
schemaName: 'core',
sql: 'SELECT CAST (UserId AS VARCHAR) AS UserId,DisplayName,FirstName,LastName FROM core.users',
autoLoad: true
}
}
},
},
'study.clinical_observations': {
category: {
lookup: {
filterArray: [LABKEY.Filter.create('category', 'Behavior')]
}
},
type: {
hidden: true,
defaultValue: 'Behavior'
}
},
'study.observation_order': {
category: {
lookup: {
filterArray: [LABKEY.Filter.create('category', 'Behavior')]
}
},
type: {
hidden: true,
defaultValue: 'Behavior'
}
},
'study.drug': {
category: {
defaultValue: 'Behavior',
hidden: true
},
scheduledDate: {
columnConfig: {
width: 130,
fixed: true
},
},
treatmentId: {
hidden: true
}
},
'study.treatment_order': {
category: {
defaultValue: 'Behavior',
hidden: true
},
performedby: {
hidden: true
}
},
}
});
112 changes: 112 additions & 0 deletions nirc_ehr/resources/web/nirc_ehr/model/sources/BehavioralCase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@

EHR.model.DataModelManager.registerMetadata('BehavioralCase', {
allQueries: {
Id: {
inheritFromParent: true,
editable: false,
hidden: true,
columnConfig: {
editable: false
}
},
date: {
editable: true,
hidden: false,
columnConfig: {
editable: true
}
},
caseid: {
inheritFromParent: true,
editable: false,
hidden: true,
columnConfig: {
editable: false
}
}
},
byQuery: {
'study.cases': {
Id: {
xtype: 'nirc_ehr-animalIdCases',
inheritFromParent: false,
editable: true,
hidden: false,
columnConfig: {
editable: true
}
},
category: {
getInitialValue: function (v, rec){
return 'Behavior'
},
editable: false,
hidden: true,
columnConfig: {
editable: false
}
},
problemCategory: {
editorConfig: {
listeners: {
select: function (field, recs) {
if (!recs || recs.length !== 1)
return;

var record = EHR.DataEntryUtils.getBoundRecord(field);
if (record) {
var rec = recs[0];
var meta = record.store.model.prototype.fields.get('problemSubcategory');
var storeId = LABKEY.ext4.Util.getLookupStoreId(meta);
var store = Ext4.StoreMgr.get(storeId);
if (store) {
store.filterArray = [LABKEY.Filter.create('category', rec.get('value'))];
store.load();
}
}
}
}
},
},
openRemark: {
height: 120
},
plan: {
height: 120
},
closeRemark: {
height: 120
},
qcstate: {
hidden: true
},
openDiagnosis: {
hidden: true
},
closeDiagnosis: {
hidden: true
},
attachmentFile: {
hidden: true
},
caseCategory: {
hidden: true
},
performedby: {
hidden: false,
defaultValue: LABKEY.Security.currentUser.id.toString(),
editorConfig: {
store: {
type: 'labkey-store',
schemaName: 'core',
sql: 'SELECT CAST (UserId AS VARCHAR) AS UserId,DisplayName,FirstName,LastName FROM core.users',
autoLoad: true
}
}
},
formCasesLink: {
xtype: 'nirc_ehr-editCases'
}
}
}
});
1 change: 1 addition & 0 deletions nirc_ehr/src/org/labkey/nirc_ehr/NIRC_EHRModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ private void registerDataEntry()
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCExemptionsFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCNotesFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCCasesFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCBehavioralCasesFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCBuildingFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCRoomFormType.class, this));
EHRService.get().registerFormType(new DefaultDataEntryFormFactory(NIRCFloorFormType.class, this));
Expand Down
Loading
Loading