Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
78a37e2
Modified Surgical Rounds form to now include a "P2" input field.
Ohsudev Mar 5, 2026
54b6bee
Modified Surgical Rounds so that P2 input loads data as
Ohsudev Mar 12, 2026
b8e3c9f
Modified Surgical Rounds so that P2 input loads data as
Ohsudev Mar 12, 2026
1e639f6
Merge branch 'refs/heads/release25.11-SNAPSHOT' into 25.11_fb_Surgery…
Ohsudev Mar 19, 2026
91a4dd5
Merge branch 'refs/heads/release25.11-SNAPSHOT' into 25.11_fb_Surgery…
Ohsudev Mar 24, 2026
f350409
Modified Surgical Rounds to accommodate a new "P2" remarks
Ohsudev Mar 25, 2026
77cd487
Modified Surgical Rounds to accommodate a new "P2" remarks
Ohsudev Mar 25, 2026
ce25906
Modified Surgical Rounds to accommodate a new "P2" remarks
Ohsudev Mar 25, 2026
5b9b883
Merge branch 'refs/heads/release25.11-SNAPSHOT' into 25.11_fb_Surgery…
Ohsudev Mar 26, 2026
82d524e
Merge branch 'release25.11-SNAPSHOT' into 25.11_fb_SurgeryRounds_P2
Apr 2, 2026
747e76a
Modified Surgical Rounds configurations
Apr 3, 2026
d73c8d3
Modified Surgery Rounds report to include P2 surgery exclusive entries.
Apr 3, 2026
b8254dc
Modified Surgery Rounds report to include P2 surgery exclusive entries.
Apr 3, 2026
c8d89e5
Modified Surgery Rounds report to include P2 surgery exclusive entries.
Apr 6, 2026
c2f053a
Merge branch 'release25.11-SNAPSHOT' into 25.11_fb_SurgeryRounds_P2
Apr 8, 2026
0c00bd3
Merge remote-tracking branch 'origin/25.11_fb_SurgeryRounds_P2' into …
May 29, 2026
f08d533
Merge branch 'release26.3-SNAPSHOT' into 26.3_fb_Surgical_Module_P2_P…
Jun 27, 2026
f7db154
Modified surgical rounds input form to allow S2 remark's field to loa…
Ohsudev Jun 29, 2026
c470d1d
Modified Surgical reporting of S2 as part of Full Animal History.
Ohsudev Jun 30, 2026
adce4f4
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 1, 2026
4fd5bcd
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 1, 2026
0c59c35
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 2, 2026
5455a7e
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 2, 2026
77aaf77
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 2, 2026
5138c05
Merge branch 'release26.3-SNAPSHOT' into 26.3_fb_Surgical_Module_P2_P…
Ohsudev Jul 2, 2026
761522d
Modified Surgical Rounds process to allow displaying of S2 on the Rou…
Ohsudev Jul 2, 2026
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
2 changes: 2 additions & 0 deletions onprc_ehr/resources/queries/study/clinremarks/.qview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<column name="performedby"/>
<column name="category"/>
<column name="taskid" />
<column name="category" />

</columns>
<sorts>
<sort column="date" descending="true"/>
Expand Down
201 changes: 201 additions & 0 deletions onprc_ehr/resources/web/onprc_ehr/form/field/PlanTextArea.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
/**
* Created: R.Blasa on 10/25/2017.
*/
/*
* Copyright (c) 2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
Ext4.define('ONPRC_EHR.form.field.CEG_PlantextArea', {
extend: 'Ext.form.field.TextArea',
alias: 'widget.onprc_ehr-CEG_Plantextarea',

onAnimalChange: function(){
this.updateDisplayEl();
},

onRender : function(ct, position){
this.callParent(arguments);

this.wrap = this.inputEl.wrap({
tag: 'div',
cls: 'x4-form-field-wrap'
});

this.linkDiv = this.wrap.createChild({
tag: 'div',
style: 'vertical-align:top;'
}, this.inputEl);

this.linkEl = this.linkDiv.createChild({
tag: 'a',
cls: 'labkey-text-link',
html: (this.getValue() ? 'Copy Latest CEG_Plan' : 'Edit CEG_Plan')
});

var panel = this.up('ehr-formpanel');
if (panel){
this.mon(panel, 'bindrecord', this.onAnimalChange, this, {buffer: 100});
}
else {
LDK.Utils.logToServer({
message: 'Unable to find ehr-formpanel in PlanTextArea'
})
}

var dataEntryPanel = this.up('ehr-dataentrypanel');
if (dataEntryPanel){
this.mon(dataEntryPanel, 'animalchange', this.onAnimalChange, this, {buffer: 100});
}
else {
LDK.Utils.logToServer({
message: 'Unable to find ehr-dataentrypanel in PlanTextArea'
})
}

this.linkEl.on('click', this.copyMostRecentCEG_Plan, this);
this.setupMask();
},

setupMask: function(){
if (this.getValue()){
this.showTextArea();
return;
}

this.inputEl.setVisibilityMode(Ext4.dom.AbstractElement.DISPLAY);
this.inputEl.setVisible(false);

this.displayEl = this.wrap.createChild({
tag: 'div',
style: 'vertical-align:top;',
html: ''
});

this.displayEl.setWidth(this.width - this.labelWidth);
this.displayEl.setHeight(this.getHeight());

this.updateDisplayEl();
},

showTextArea: function(){
if (!this.rendered){
return;
}

if (this.displayEl){
this.displayEl.remove();
delete this.displayEl;
}

if (this.linkEl){
this.linkEl.update('Copy Latest CEG_Plan');
}

if (this.inputEl)
this.inputEl.setVisible(true);
},

updateDisplayEl: function(){
if (!this.displayEl){
return;
}

var rec = EHR.DataEntryUtils.getBoundRecord(this);
if (rec && rec.get('Id')){
this.getMostRecentCEG_Plan(rec, function(ret, Id){
if (!ret || !this.displayEl){
return;
}

if (ret.mostRecentCeg_Plan && ret.isActive){
this.displayEl.update(ret.mostRecentCeg_Plan);
}
else {
this.displayEl.update('Either no active case or no CEG_Plan for ' + (Id || rec.get('Id')));
}
});
}
else {
this.displayEl.update('No animal entered');
}
},

copyMostRecentCEG_Plan: function(){
var rec = EHR.DataEntryUtils.getBoundRecord(this);
if (!rec || !rec.get('Id')){
Ext4.Msg.alert('Error', 'No Id Entered');
return;
}

Ext4.Msg.wait('Loading...');
this.showTextArea();

this.getMostRecentCEG_Plan(rec, function(ret){
Ext4.Msg.hide();

if (ret){
this.setValue(ret.mostRecentCeg_Plan);
this.linkEl.update('Refresh CEG Plan');
}
}, true);
},

getMostRecentCEG_Plan: function(rec, cb, alwaysUseCallback){
var date = rec.get('date') || new Date();
var id = rec.get('Id');
this.pendingIdRequest = id;

LABKEY.Query.executeSql({
schemaName: 'study',
sql: 'SELECT c.Id, c.CEG_Plan as mostRecentCeg_Plan, c.caseid, c.caseid.category as caseCategory, c.caseid.isActive as isActive FROM study.clinRemarks c WHERE (c.category != \'Replaced SOAP\' OR c.category IS NULL) AND c.CEG_Plan IS NOT NULL AND c.Id = \'' + rec.get('Id') + '\' ORDER BY c.date DESC LIMIT 1',
failure: LDK.Utils.getErrorCallback(),
scope: this,
success: function(results){
if (!alwaysUseCallback && id != this.pendingIdRequest){
console.log('more recent request, aborting');
return;
}

if (results && results.rows && results.rows.length && results.rows[0].mostRecentCeg_Plan){
cb.call(this, results.rows[0], results.rows[0].Id);
}
else {
cb.call(this, null, id);
}
}
});
},

onDestroy : function(){
if (this.linkEl){
this.linkEl.removeAllListeners();
this.linkEl.remove();
}

if (this.linkDiv){
this.linkDiv.removeAllListeners();
this.linkDiv.remove();
}

if (this.displayEl){
//NOTE: no listeners were added
//this.displayEl.removeAllListeners();
this.displayEl.remove();
}

if (this.wrap){
this.wrap.remove();
}

this.callParent(this);
},

setValue: function(){
this.callParent(arguments);

if (this.getValue()){
this.showTextArea();
}
}
});
52 changes: 52 additions & 0 deletions onprc_ehr/resources/web/onprc_ehr/model/sources/SurgicalRounds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2013-2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
EHR.model.DataModelManager.registerMetadata('SurgicalRounds', {
allQueries: {
Id: {
editable: false,
columnConfig: {
editable: false
}
}
},
byQuery: {
'study.clinremarks': {
category: {
defaultValue: 'Surgery',
hidden: true
},
hx: {
hidden: true
},
s: {
hidden: true
},
o: {
hidden: true
},
a: {
hidden: true
},
p: {
hidden: true
},
CEG_Plan: {
hidden: true
},
P2: {
header: 'P2',
hidden: false,
height: 75
}

},
'study.blood': {
reason: {
defaultValue: 'Clinical'
}
}
}
});
100 changes: 100 additions & 0 deletions onprc_ehr/resources/web/onprc_ehr/panel/ClinicalRemarkPanel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* Copyright (c) 2013-2019 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
/**
* @cfg remarkFormat
*/
Ext4.define('ONPRC_EHR.panel.ClinicalRemarkPanel', {
extend: 'Ext.form.Panel',
alias: 'widget.onprc_ehr-clinicalremarkpanel',

initComponent: function(){
Ext4.apply(this, {
bodyStyle: 'padding: 5px;',
defaults: {
labelWidth: 140,
width: 550
},
items: [{
xtype: 'xdatetime',
itemId: 'dateField',
fieldLabel: 'Date',
allowBlank: false,
name: 'date',
value: new Date()
},{
xtype: 'combo',
fieldLabel: 'Remark Format',
isFormField: false,
itemId: 'remarkFormat',
displayField: 'label',
valueField: 'label',
store: {
type: 'store',
fields: ['label', 'fields', 'fieldLabels'],
data: [
{label: 'SOAP', fields: ['s', 'o', 'a', 'p'], fieldLabels: ['S', 'O', 'A', 'P']},
{label: 'S2', fields: ['p2'], fieldLabels: ['S2']},
{label: 'Hx', fields: ['hx'], fieldLabels: ['Hx']},
{label: 'Simple Remark', fields: ['remark'], fieldLabels: ['Remark']}
]
},
value: this.remarkFormat,
editable: false,
listeners: {
scope: this,
change: function(field){
var panel = this.down('#remarkPanel');
panel.removeAll();
panel.add(this.getItems(field.store.findRecord('label', field.getValue())));
},
beforerender: function(field){
if (field.getValue()){
field.fireEvent('change', field, field.getValue());
}
}
}
},{
xtype: 'container',
itemId: 'remarkPanel'
}]
});

this.store = this.getStoreCfg();

this.callParent();
},

getItems: function(rec){
var fields = rec.get('fields');
var labels = rec.get('fieldLabels');

var toAdd = [];
Ext4.each(fields, function(field, idx){
toAdd.push({
xtype: 'textarea',
fieldLabel: labels[idx],
labelWidth: 140,
name: field,
width: 550,
height: 60
});
});

return toAdd;
},

getStoreCfg: function(){
return {
type: 'labkey-store',
schemaName: 'study',
queryName: 'Clinical Remarks',
filterArray: [LABKEY.Filter.create('caseId/category', 'Surgery', LABKEY.Filter.Types.EQUAL)],
columns: 'Id,date,caseid,s,o,a,p,p2,hx,remark',
maxRows: 0,
autoLoad: true
}
}
});
Loading