For a solo developer developing web applications what will be the best technology to use IRIS or Studio with cache database and containers for deployment
Is there a way or can it be done to use conditional logic in sql like so
Query Q1(formal as %String) As %SQLQuery [ Final ]
{
SELECT patientnumber,ID, CASE
WHEN ID = 50 THEN "The is 50"
WHEN ID = 30 THEN "This is 30"
ELSE "The quantity is under 30"
END FROM Audit.Table WHERE ID = :formal AND EndDate is null} }
I am trying to get the values of a PID:3 segment to an array but I will need to know the length of the segment to process .
set o = ##class(EnsLib.HL7.Message).%OpenId(458)
w o.GetValueAt("PID:3")
w o.GetValueAt("PID:3").SegCount This throws an error any help appreciated
I need to select my result into a list and be able to loop through the list when query finished any help appreciated here is where I am
##sql(SELECT %ID INTO :IDArray() FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID = :Key AND EndDate IS NULL)
for I=1;1:$LISTLENGTH(IDArray)
{
w $Data(IDArray),i
}
I have this query That I am trying to use in my class when testing on the terminal I expect to get the results printed on the terminal but I am only getting zero printed please can anyone out there advice on what I am doing wrong
Method PatientInfo(ID As %String) As %Status
{ #dim status as %Status=$$$OK
SET myquery="SELECT GUID, IDType,IDValue FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID ="_ID
SET rset=##class(%ResultSet.SQL).%Prepare(myquery,.err,"")
WHILE rset.%Next() {
WRITE !,rset.GUID & ":" & rset.IDType& ":" & rset.IDValue
}
WRITE "End of data"I have an sql statement that I would like to execute but I get the error
"zSearchChanges+5^MergeHyland.TypeTwoUtil.1 *KeyID"and here is my sq
l "&sql(SELECT Key INTO :KeyID FROM MergeHyland.TypeTwoDimesionalTable WHERE Key = :Key)" any ideas why Is it possible to mimic what selenium does like navigating to a site and logging in and filling out a form then logout in COS.I am trying to do that in COS using %Net.HttpRequest class or should I be using a different class the idea is to be able to call a web app login into it and fill out form and log out
I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on. I have used SoapUI with 200 result so as postman and swagger
I am trying to work with Java Selenium through Cache my java programme works fine but I would like to pass parameters to the jar file form my Ensemble production. I followed this Tutorial here, For starters I wanted to copy it as it is and run that as an example but the (Stateless Service Mode Example) is not working within my eclipse environment with errors on the com.intersys.
I am having trouble configuring the environment in eclipse have download eclipse for java script and web developers followed the video but could not connect to the server I have my Apache server 7.0 added to the java environment and I can start and stop the server through eclipse IDE but when I fire atelier and add server I get the above error any help please .This is the first time I am trying to use the plug in through eclipse .Just in case There is another installation I need to do please advice but I am guessing something to do with atelier not seeing my configurations or permissions I
I am trying to write a generic process that will take any incoming message but would like to know where it came from so in my code I would like to do something like this
If (Document.Source="some serviceorProcess").Just to be clear in the route you get these features is there a way of accessing them in code
I have a service that takes a file and pass it through to the production .While I am passing the file through I get the file stream and set it to a variable within my message and the variable is of type %Ens.StreamContainer. But after all processing and I need to write out my file to a pdf format The file gets written but is a corrupt file since I can not read it I have tried this with asimple pass through everything is fine .But here I do not know what I am doing wrong here is the operation code
set pInput=pRequest.FileStream
;the variable to hold the status for the method
#dimI have a csv record mapper that reads in a batch and my batch has a header and trailer that changes all the time but it is of fixed length so I override the Get Batch Header method from the simplebatch class to something like below but my problem is when the batch is read in It still tries to bring in another empty batch like the picture below any reason why that is here is my code.The red code is the changes made. After several trace logs it is being called twice first time with the batch [1] and[5]is the second call how can I stop that from happening
/// Get the Batch Header from anI have a SQL procedure that I call into and it does some processing and passes back any data validations that fail. I would like to receive those message in my operation and act upon the message received .The question is how do you get output messages from a stored procedure I am using MsSQL 2012 with ensemble
I have a batch and would like to see the records in it on a terminal
First will use .%OpenId(Id) then will want to get the first record something around GetAT(1) with this I get the object reference but will actual need to see the data any help
I have a batch that uses the record mapper class .I would like to have a custom operation that will write this batch to a csv file .My operation has a batch as its request and I would like to read that batch data to a csv.So far here is what I have.
Method BatchFile(pRequest As ResponseRBAT, Output pResponse As EnsLib.RecordMap.BatchResponse) As %Status
{
#dim status as %Status=$$$OK
#dim inrec as HSCIC.DBS.ResponseRMAP.Record=##class(ResponseRMAP.Record).%New()
set x=0
set:$$$ISOK(status) status= ..Adapter.PutLine(pRequest.%Source,pRequest.BatchHeader)
//setI have a lookup table and record batch Table I would like to do a count on the records stored in that batch by counting the number of records in that batch that have a certain key on the responseKey column. This column keys are stored in the look up table for comparison. So I would like to do a join sql pivot that will use my keys stored in the lookup as columns and count as values
so far I have managed to do this but this is not efficient I would like to fire that sql once not on every count
SELECT * FROM
(
SELECT tMatch.DataValue, Count(*)
FROM ResponseRMAP.Record bRecord
JOIN Match ONI am using the EnsLib.RecordMap.Operation.BatchFileOperation to write a batch to a file but for some reason this has been working fine as of yesterday I had a problem with the cache databases filling up running out of memory so had to compact my database and gain space now when I run the operation I get the above error .Of course in my batch table there is no batch record with ID 1.The message is passed with the correct header information but still get this error any suggestions why?
Morning guys I have a SQL operation that I use to read data and results to a record map. But seems to have trouble saving the objects to a record map as I get this message
ERROR ErrException:
zInsertObject+2^%Library.RelationshipObject.1 -- logged as '-' number - @''
please help here is my code let me know if I missing anything thank you in advance
Method OnRequest(pRequest As DQToolsSet.PrimaryMessageREQ, Output pResponse As HSCIC.DBS.RequestRBAT) As %Status
{
#dim status as %Status=$$$OK
#dim resultSet as %SQL.StatementResult
setI am trying to read data from MySQL Server 2012 to a stream and I keep getting an error here is my code so far
ERROR
An error was received : ERROR <Ens>ErrException: <INVALID OREF>zGetBatchDetails+14^DDQTools.DQTGetBatchOpp.3 -- logged as '-' number - @' set sc=reStream.WriteLine(rec) '< set tSC=$$$OK
set ^tvalue=1
set ^tvalue=$INCREMENT(^tvalue)
#dim rs as EnsLib.SQL.GatewayResultSet
#dim reStream as %Stream.GlobalCharacter
if $$$ISERR(pRequest) quit pRequest
set sc=..Adapter.ExecuteQuery(.rs,..GetTheSubmissionData(pRequest.pMonth, pRequest.pApp,Hi guys have an operation that I would like to write the results from the results set to a csv file but have been struggling to get it to work here is my code so far and also here is the error that I get when I try to test this operation using the testing on the ensemble
error:
An error was received : ERROR <Ens>ErrException: <COMMAND>zMessageHandler+6^DQTools.DQTOpp.1 -- logged as '-' number - @' Set tSC=..CheckRequests(.pRequest,.pResponse)'
code: set file = ##class(%Stream.FileCharacter).%New()
set fileName="C:\File\99_Testing\123.txt"
do file.LinkToFile(fileName)
whileI have a service that that I would like to use to poll the database table in MySQL server 2012 and get an id to use if the condition is met but have trouble achieving this here is what I have so far any suggestions please.
Method OnProcessInput(pInput As EnsLib.SQL.Snapshot, Output pOutput As %RegisteredObject) As %Status
{
set pRequest=##class(SamsReq).%New()
set pRequest.pID=pInput.Get("pID")
< set sc=..SendRequestSync("DQTT",pRequest,.pOutput)
quit sc
}
the error that I am getting
>}
ERROR <Ens>ErrBPTerminated: Terminating BP DQTT # due to error:I am trying to write an application that will take some information on the database make a call to the Google API distance matrix and get the information to use with rest of the application without using the ensemble part of the development is this possible and how can I do my communication with the API from a cache class thanks in advance
Is it possible to reference a property on a schema in the routing rule for instance Document.SomeSchema.Property
I have read here and tried to use the supplied examples to see what they do but keep on getting error please advice:
Method GetXMLDocFromFile(file = "C:test2.xml") As %XML.Document
{
set reader=##class(%XML.Reader).%New()
set status=reader.OpenFile(file)
if $$$ISERR(status) {do $System.Status.DisplayError(status) quit $$$NULLOREF}
set document=reader.Document
set reNo=##class(%XML.Node).%New()//check here
set reNo.Document=document//check here
do ..ShowNamespaces(document)
do ..ShowNode(reNo)//check here
quit document
}
Method ShowNamespaces(docI am trying to achieve this in cache objects I am using 2014.1 here is the original code in C# and would like to convert this to cache
here is my code first c# and cache follows
class Program
{
/// <summary>
/// This function loads a XML document from the specified string.
/// </summary>
/// <param name="xml">Input XML string</param>
/// <returns>XML to Json converted string</returns>
public static string XmlToJSON(string xml)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xml);I am trying to read an xml document using %XML.TextReader and that's is all well and l can get my elements values but would like to determine where the next record start on the xml without referring to the document path in essence would like to use the same method to read different xml docs. I would like to know if is there a way or a function that I can use to get the start and end of a record in xml as I would to get the start and end element.
Typical example l would like to get the highlighted paths please note this would need to go for any xml doc
<productListing title="ABC Products">I have a business operation which I want to run an d I keep getting the above error have tried trace and logging every stage but can not figure out why the error comes from I am expecting this service to run everytime it is called hence the implementation so could anyone help out please
Operation
Class XmlToJsonOperation Extends (Ens.BusinessOperation, )
{
Parameter ADAPTER = "EnsLib.File.OutboundAdapter";
Property Adapter As EnsLib.File.OutboundAdapter;
Parameter INVOCATION = "Queue";
Property CompiledStyleSheet As %XML.XSLT.CompiledStyleSheet;
/// Style sheet to convert Message toI am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome so far I have come to this and I keep getting an error
:ERROR{ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zXMLTOJson+6^TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 *Parameters,EnsLib.EDI.XML}Class XLT.XMLToJsonOperation1 Extends (Ens.BusinessOperation,I am trying to age based on a given date and current date here is my code:
Property DOB As %Date
Method GetAge() As %Integer
{
if (..DOB="")
{
set today=0
}
else
{
set today=$ZDate($HOROLOG,2)-$ZDate(..DOB)
}
write "Today's==="_$ZDate($HOROLOG),!
write today
return today
}