Congratulations... Waiting for the 2nd edition
- Log in to post comments
Congratulations... Waiting for the 2nd edition
Hi, May I translate my article once I've publish in english?
Hi Utsavi,
Thanks for all. I always say "I'm not so important that to have a problem that nobody knows"
Remember, there'll always be someone who doesn't know how to do something that you do with your eyes closed, share knowledge.
Welcome to the community, We look forward to your collaboration.
Best regards,
Kurro Lopez
set classToDelete = "mypackage.myclass"
if ($$$ISOK($system.OBJ.IsValidClassname(classToDelete)))
{
do $system.OBJ.Delete(classToDelete,"e")
}set productionName = "mypackage.myproduction"
set itemName = "NameItemInProduction"
If ##class(Ens.Config.Item).NameExists(productionName,itemName,.idItem)
{
Set production = ##class(Ens.Config.Production).%OpenId(productionName)
Set objItem = production.FindItemByConfigName(itemName)
Do production.RemoveItem(objItem)
Set st = production.%Save()
Do ##class(Ens.Director).RestartProduction(0,1)
}I hope this code helps you.
Best regards,
Kurro Lopez
Hi Gulshan,
There is a lot of videos in Youtube that can help you.
You can start with this
How to Learn Python? (From zero to hero)
For a good book, that is complicated, because it depends on your knowledge level.
Best regards,
Kurro Lopez
Great!!!!
The problem was calling the Query using the "func" function, calling directly it works.
good point.
Thanks for all,
Kurro Lopez
It's a good idea, but I haven't the ID of the row.
My idea was use the object as a parameter to pass a lot of values, and the query reads these values, instead of pass one by one the params.
I've changed my query with all of the parameters that I need to run the query
Query GetInfo(pKeyProcess As %String, pCodeSpecialist As %String, pCodeProvider As %String, pCodeCenter As %String, pDate as %TimeStamp) As %SQLQuery(CONTAINID = 1, ROWSPEC = "IdList:%String,IdProcess:%String,Duration:%String")
{
SELECT IdList, IdProcess, Duration
FROM Kurro.MyClass
WHERE KeyProcess = :pKeyProcess
AND CodeSpecialist = :pCodeSpecialist
AND CodeProvider = :pCodeProvider
AND CodeCenter = :pCodeCenter
AND Date = :pDate
}It works, but I need to pass all params. I wanted to create a class to pass all parameters, like a c# method, and try to use itself.
Thanks for all mate.
Thanks mate for your answer.
My goal was create an string with all codes of activity from a list, and it should be in order alphabetical because the list could be in other order and this key should be the same
ClassMethod CreateKey(pList As %Collection.ListOfObj) As %String
{
for i=1:1:pList.Count()
{
set code = pList.GetAt(i).Codigo
set list(code)=""
}
set myKey = ""
set key=$ORDER(list(""))
while (key'="")
{
set myKey = myKey_key_"#"
set key=$ORDER(lista(key))
}
return myKey
}Thanks for all your time and all explications about this.
Best regards,
Kurro
Thanks for your tip, using LogFile I've found what is the error.
The problem was that the configuration of the URL
.png)
but it works if "Web Service URL" has the full path.
I have other WS Clients and they are working with the Client Class in "Web Service Client Class" field
I think if the WS is like "http://myserver.com/path/service.asmx" it should be separated in both fields. However, if it is a Java WS (it hasn't class file) it sould be in URL field.
I'll bear in mind for future implementations.
Thanks for all your help.
Kurro
Thanks Mark,
Finally I've used that solution.
Best regards,
Kurro
Welcome to the community
欢迎
If you are using IRIS Community Edition, please have a look this link
https://community.intersystems.com/post/avoid-exceed-databases-license-…
Best regards,
Francisco Lopez
Hi.
Try use this command from console (Powershell, console Linux, etc..) for Intersytems Ensemble
ccontrol.exe force HEALTHSHARE
HEALTHSHARE is the name of your instance
This command should be executed in bin folder (ex. c:\Intersystems\Healthshare\bin)
For IRIS the command is
iris.exe forece IRISHealth
IRISHealth is the name of your instance, it is in the folder bin (ex. c:\Intersystems\IRISHealth\bin)
Best regards
Francisco Lopez
Happy new year
Feliz año nuevo
Feliç any nou
C Новым Годом
Feliz Ano Novo
明けましておめでとうございます
Hi,
Have a look this link
https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=R…
Best regards,
Kurro Lopez
A new interface to export production, select several class at the same time. Export MAC in the same file, add default value by environment, etc... By this way, you can create a export file (xml) that you can load using implemetation menu option.
Bem-vindo e boa sorte, a comunidade está crescendo.
It's my time!!!!
I'll go, this is my year
Thanks for all
if you want to use the DTL programmatically....
ClassMethod Clone(pRequest As EnsLib.HL7.Message) As EnsLib.HL7.Message [ Final ]
{
set sc=##class(Kurro.DTL.EDCoder).Transform(pRequest,.request)
if $$$ISERR(sc) {do $system.Status.DisplayError(sc)}
Quit request
}I think the best approach to your goal is create a DTL and clone the message directly, then check the value of DG1:4.1 and set the value in target that you want. See below
.png)
You can call to the DTL and you'll have your new message.
Regards,
Kurro Lopez
Could you please provide a HL7 example?
Hi,
One question... the third line is using ind variable, but you are evaluating ind2 variable, is it a mistake?
.png)
Regards,
Kurro Lopez
This is the transformation code (if you want). In my example, I was transforming OUL^R22 to OUL^R22
Class Kurro.DTL.test Extends Ens.DataTransformDTL [ DependsOn = EnsLib.HL7.Message ]
{
Parameter IGNOREMISSINGSOURCE = 1;
Parameter REPORTERRORS = 1;
Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;
XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='EnsLib.HL7.Message' targetClass='EnsLib.HL7.Message' sourceDocType='2.7:OUL_R22' targetDocType='2.7:OUL_R22' create='new' language='objectscript' >
<assign value='source.{PIDgrp.PID}' property='target.{PIDgrp.PID}' action='set' />
<if condition='..Length(source.{PIDgrp.PID:11(1).8})>0' >
<true>
<assign value='source.{PIDgrp.PID:11(1).1}_" "_source.{PIDgrp.PID:11(1).2}' property='target.{PIDgrp.PID:11(1).1}' action='set' />
<assign value='source.{PIDgrp.PID:11(1).8}' property='target.{PIDgrp.PID:11(1).2}' action='set' />
<assign value='""' property='target.{PIDgrp.PID:11(1).8}' action='set' />
</true>
<false>
<assign value='""' property='target.{PIDgrp.PID:11(1).8}' action='set' />
</false>
</if>
</transform>
}
}Regards,
Kurro Lopez
Hi,
if you read your requirements, that is that you have to write in your DTL
.png)
The first line copy all your PID in the new destination (green box)
the condition, check if the 11(1).8 has value, in this case, concatenate PID:11(1).1_PID:11(1).2 to new PID:11(1).1
I understand, when you say "move 11(1).8 to 11(1).2 means that the value in 11(1).8 will be empty (red box), if it is not the case, don't use this line.
For other case (step 7). remove the value of the PID:11(1).8
The DTL conditions are executed in order, It means, that the value in PID:11(1).2 in step 3 is the original then it is replaced by PID:11(1).8 in the following step.
This is the test result:
.png)
I hope it helps you,
Regards,
Kurro Lopez
Welcome Kevin,
To get badges, you should to participate in Global Master, please add a replay to this link and welcome to Global Master
https://community.intersystems.com/post/join-intersystems-global-master…
Regards,
Kurro
Hi Kurt,
Check if you are using ODBC 32 or 64 bits. Maybe there are two applications (one for each configuration) and not all ODBC connection are displayed.
I'm using ODBC 64 bits and my connections are availables
.png)
Also, check if your ADO .Net driver is for 32 or 64 bits compatible.
I hope it is help for you,
Regards,
Kurro
Hi Tim,
I know that is a old question, and I don't know if you have resolved your problem.
I have something like you are asking in a process. Maybe it could help you.
I created a persistent class with theses properties, also add a Query to retrieve info from a ProcessId:
Class FtpFileReport Extends %Persistent
{
/// ProcessId
Property ProcessId As %String;
/// Filename
Property FileName As %String;
/// Retrieve records of a ProcessId
Query GetRecordsByProcessId(pProcessId As %String) As %SQLQuery
{
SELECT ProcessId, FileName
FROM FtpFileReport
WHERE ProcessId = :pProcessId
}
}Then, when my process start to grabs the file, create a ProcessId, for example, using a combination of horolog and cryptotoken, to create an unique Id.
set pProcessId = "ID"_$PIECE($HOROLOG,",")_$PIECE($HOROLOG,",",*)_$SYSTEM.Encryption.GenCryptToken()For each file grabbed, you save a record in your persistent class
set obj=##class(FtpFileReport).%New()
set obj.ProcessId = pProcessId ;pProcessId is the variable with the Id created previously
set obj.FileName = pFileName ;if you are using retrieveFile method, it is the name the file that is grabbing
do obj.%Save()Afterward, create a message to a BO that send the email with the ID of the process and create the message body based on ProcessId files:
Class SendEmail Extends Ens.BusinessOperation
{
Parameter ADAPTER = "EnsLib.EMail.OutboundAdapter";
Parameter INVOCATION = "Queue";
/// Send email of FTP Report
Method SendFtpReport(pRequest As Ens.StringRequest, Output pResponse As Ens.StringResponse) As %Status
{
#dim myList As %Library.ListOfObjects
set report = ##class(FtpFileReport).%New()
set myList = ##class(%Library.ListOfObjects).%New()
set resultset = report.GetRecordsByProcessId(pRequest.StringValue)
set data = ##class(%Stream.GlobalCharacter).%New()
while resultset.%Next()
{
set fileNum = $Increment(fileNum)
do data.Write("<b>"_fileNum_":</b><p>"_resultset.%Get("FileName")_"</p><hr>")
do myList.Insert(data)
}
set msg = ##class(%Net.MailMessage).%New()
set msg.IsHTML = 1
do msg.TextData.WriteLine("<h1>FileReport</h1><br><h2>This is the FTP report: <h2><br><br>") ; This is the body of the email
for pos=1:1:myList.Size
{
do msg.TextData.Write(myList.GetAt(pos).Read())
}
set msg.To = ##class(%Library.ListOfObjects).%New() ;Destinations address
do msg.To.Insert("destination@mydomain.com")
set msg.Subject= "File report"
do ..Adapter.SendMail(msg)
set pResponse = ##Class(Ens.StringResponse).%New("Ok")
quit $$$OK
}
XData MessageMap
{
<MapItems>
<MapItem MessageType="Ens.StringRequest">
<Method>SendFtpReport</Method>
</MapItem>
</MapItems>
}
}I hope helps you.
Regards,
Francisco Lopez
I think the user _purges has the same privileges than the other task that is working, isn't it?
Hi,
Have you configure your SMTP configuration?
System Administration -> Configuration -> Additional settings -> Task manager email
.png)
The SSL configurate (SSL Dummy) is a empty certificate to use HTTPS instead.
.png)
Best regards,
Francisco Lopez
Hi,
Please, use English in this community.
If you want find information about SHA256 or other encrypt methods, you can find in community
https://community.intersystems.com/tags/encryption
https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c…
Regards,
Francisco Lopez