To avoid using EVNgrp due to schema issues, I have this code that is meant to append PID and PD1 segment to ADR^A19.
For some reason it is not doing so. Any help please?
If $Length(source.Primary.PID) {
Set oSeg=##class(EnsLib.HL7.Segment).ImportFromString(source.Primary.PID)
Do target.AppendSegment(oSeg)
}
If $Length(source.Primary.PD1) {
Set oSeg=##class(EnsLib.HL7.Segment).ImportFromString(source.Primary.PD1)
Do target.AppendSegment(oSeg)
}
I found out that the issue was caused by environmental problem which was resolved and the code is now working fine.
Thank you all for your help.
Related
I am adding a test that needs to return a different mock value for a selector. So I found a nice way of doing it using overrideSelecor as mentioned here https://ngrx.io/guide/store/testing. But when adding mockstore.overrideSelector, got this error "property overrideSelector does not exist on type Store". Has anyone fixed this before?
In Angular 7 the mockStore does not have that function indeed. Migrating to Angular 8 will fix your issue.
This is most likely just typings issue. If you use provideMockStore it in fact creates an instance of MockStore that is provided as Store instance on DI so it won't break you apps functionality.
So in your tests you should use it like this:
let store: MockStore<State>;
...
store = TestBed.get<Store<State>>(Store);
...
store.overrideSelector(...);
Need to do swapping of my cores and hence need to set the SolrCoreAdmin in my solrFacility, so I can use it throughout my application using my Windsor container.
When I do the following :
var solrFacility = new SolrNetFacility(ConfigurationSettings.ContentSearch_Solr_ServiceBaseAddress);
solrFacility.AddCore(AgentsIndex.IndexName, typeof(AgentsIndexMapper), ConfigurationSettings.ContentSearch_Solr_ServiceBaseAddress +"/"+ AgentsIndex.IndexName);
solrFacility.AddCore(AgentsIndex.SwapIndexName, typeof(AgentsIndexMapper), ConfigurationSettings.ContentSearch_Solr_ServiceBaseAddress + "/" + AgentsIndex.SwapIndexName);
solrFacility.BuildCoreAdmin(ConfigurationSettings.ContentSearch_Solr_ServiceBaseAddress);
_WindsorContainer.AddFacility("solr", solrFacility);
I get following error:
[NullReferenceException: Object reference not set to an instance of an object.]
Castle.Facilities.SolrNetIntegration.SolrNetFacility.BuildCoreAdmin(ISolrConnection conn) +40
I looked up the code inside BuildCoreAdmin using reflector and I think its trying to access a base.Kernel...is that null? How do I set that kernel? The base file is AbstractFacility and that has a function setKernel. What should this kernel be?
How do I solve this? im new to solrnet and need your help. Thanking you.
Regards,
Kasturi Chavan
I got the solution for this. I was doing it wrong. Thought of posting the answer so it helps others.
When initilaizing the solrnetfacility , the solrcoreadmin are also initialised. I later added this solrnetfacility to my container (castle windsor in this case) so i can use it over entire application.
Later when i wanted to swap the indexes after rebuild, i just resolved it
ISolrCoreAdmin _ISolrCoreAdmin = c.GetContainer().Resolve<ISolrCoreAdmin>();
ResponseHeader response = _ISolrCoreAdmin.Swap(corename, othername);
And all set!
Hope it helps someone. Thanks a lot for all help provided.
I am working on an old MFC application which uses xerces 2.7 for XML parsing.
In debug mode, while trying to debug a stack corruption, I have been able to narrow down the issue to the following code:
BOOL CXMLHandler::LoadFile(CString fileName)
{
XMLPlatformUtils::Initialize();
SAXParser* parser = new SAXParser();
delete parser;
XMLPlatformUtils::Terminate();
return TRUE;
}
while deleting the parser, I get the error
"DAMAGE: after Normal block (#1695) at 0x0795EEA8."
the SAXParser class is from xerces.
I cannot figure out what is wrong with the code. Can anyone help in finding out what is wrong here. Could a memory leak/corruption elsewhere in the code be causing this?
If that #1695 is the same each time you run add the following to the start of the program:
_CrtSetBreakAlloc(1695);
Allocation number 1695 is the data that has been damaged. The debugger will halt there.
I did use unless following for Cacheable, but it seems it did not work.
For the function below, it still will cache the result if result = -1.
Not sure what is the reason for its not working. Anyone gets any ideas? Any lib missing?
#Cacheable(value="queueIds", key="#servicePhoneNumber", unless="#result == -1")
public int getQueueIdByPhoneNumber(String servicePhoneNumber) { ... }
I had the same issue. The problem is that I used two different spring versions in a project.
I am looking at some code that looks like the following
if (soap_begin_serve(pImpl))
{
if (pImpl->error >= SOAP_STOP)
{
// TODO.
}
return pImpl->error;
}
and trying to figure out what to do in the TODO section there. Any ideas on what SOAP_STOP means?
There's a few clues to what SOAP_STOP does scattered about the various gSOAP support sites. The best clues are here and here. It appears that any gSOAP error from 1000 on up is meant to tell the gSOAP engine to stop further processing.