NPE on Billing Correction with multisite on

Preconditions

Existing bill submitted to OHIP
multisites is on

Steps to Reproduce

-Administration
-Billing
-Billing correction
-enter the invoice number
-search
-change "Billing Status" to bill OHIP
-click Save

Expected Result

the bill is updated with the updated version code or change that is in the

Observed Result

NPE
javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NullPointerException
org.oscarehr.util.DbConnectionFilter.doFilter(DbConnectionFilter.java:69)
org.oscarehr.common.printing.PrivacyStatementAppendingFilter.doFilter(PrivacyStatementAppendingFilter.java:121)
org.oscarehr.util.ProblemCheckFilter.doFilter(ProblemCheckFilter.java:194)
org.oscarehr.util.ResponseDefaultsFilter.doFilter(ResponseDefaultsFilter.java:109)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)

root cause

javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)
oscar.oscarSecurity.LoginFilter.doFilter(LoginFilter.java:204)
net.sf.cookierevolver.servlet.CRFilterImpl.doFilter(CRFilterImpl.java:60)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
org.oscarehr.util.LoggedInUserFilter.doFilter(LoggedInUserFilter.java:56)
org.oscarehr.util.DbConnectionFilter.doFilter(DbConnectionFilter.java:66)
org.oscarehr.common.printing.PrivacyStatementAppendingFilter.doFilter(PrivacyStatementAppendingFilter.java:121)
org.oscarehr.util.ProblemCheckFilter.doFilter(ProblemCheckFilter.java:194)
org.oscarehr.util.ResponseDefaultsFilter.doFilter(ResponseDefaultsFilter.java:109)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)

root cause

java.lang.NullPointerException
oscar.oscarBilling.ca.on.pageUtil.BillingCorrectionAction.updateBillingONCHeader1(BillingCorrectionAction.java:344)
oscar.oscarBilling.ca.on.pageUtil.BillingCorrectionAction.updateInvoice(BillingCorrectionAction.java:146)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)
oscar.oscarSecurity.LoginFilter.doFilter(LoginFilter.java:204)
net.sf.cookierevolver.servlet.CRFilterImpl.doFilter(CRFilterImpl.java:60)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
org.oscarehr.util.LoggedInUserFilter.doFilter(LoggedInUserFilter.java:56)
org.oscarehr.util.DbConnectionFilter.doFilter(DbConnectionFilter.java:66)
org.oscarehr.common.printing.PrivacyStatementAppendingFilter.doFilter(PrivacyStatementAppendingFilter.java:121)
org.oscarehr.util.ProblemCheckFilter.doFilter(ProblemCheckFilter.java:194)
org.oscarehr.util.ResponseDefaultsFilter.doFilter(ResponseDefaultsFilter.java:109)
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.68 (Ubuntu) logs.

Additional Comments

The problem appears to be with
billingONCorrection,jsp
where the providers for the other site are not fully obtained

Our system works if we manually add in the missing providers on line 954

var _providers = [];
<% for (int i=0; i<sites.size(); i++) {
Set<Provider> siteProviders = sites.get.getProviders();
List<Provider> siteProvidersList = new ArrayList<Provider> (siteProviders);
Collections.sort(siteProvidersList,(new Provider()).ComparatorName());%>
_providers["<%= sites.get.getName() %>"]="<% Iterator<Provider> iter = siteProvidersList.iterator();
while (iter.hasNext()) {
Provider p=iter.next();
if (pros.contains(p.getProviderNo())) {
%><option value='<%= p.getProviderNo() %>'><%= p.getLastName() %>, <%= p.getFirstName() %></option><% }} %><option value='100010'>Elgadi, K 64ABTEST</option><option value='100011'>Elgadi, K NAABTEST</option>";
<% } %>

Activity

Show:
Raymond Rusk
July 10, 2019, 2:00 PM

Can't test. Accepting without confirmation.

Marc Dumontier
July 12, 2019, 3:45 PM

I’m trying to fully grasp this one

 

so you have providers assigned to sites, and the select box isn’t showing all the providers from that site?

 

Peter H-C
October 1, 2019, 4:41 PM

correct

Marc Dumontier
November 15, 2019, 2:32 PM

partially fixed..the NPE won’t happen anymore..but ideally that select box should populate properly..i don’t have deep knowledge of the multisite module so it’s difficult to create the proper testing situation (i set up sites, but i can’t create an invoice)

 

Peter H-C
November 19, 2019, 5:10 PM

build tag: 19.17~1021 OSCAR EMR 19

Attempt to change a billing from billed to Ohip to bill to OHIP

 

type Exception report

message javax.servlet.ServletException: org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: org.oscarehr.common.model.BillingONCHeader1.providerNo; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.oscarehr.common.model.BillingONCHeader1.providerNo

description The server encountered an internal error that prevented it from fulfilling this request.

exception

 

root cause

 

root cause

 

root cause

 

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.68 (Ubuntu) logs.

Assignee

Marc Dumontier

Reporter

Peter H-C

Labels

OSCAR Build Date

2019/07/03

OSCAR Build Tag

984

Client Browser

Firefox

Client OS

Ubuntu

Are you or your organization planning on submitting a fix for this bug in the next 30 days?

No

Validated by Reporter

No

SourceForge Link

None

SourceForge Reporter

None

SourceForge Assigned To

None

SourceForge Date Created

None

SourceForge ID

None

Affects versions

Priority

6
Configure