go to post Enrico Parisi · Jun 20 I suggest to start from the documentation: Introduction to Namespaces and Databases Then come back if you have more specific questions.
go to post Enrico Parisi · Jun 18 Have a look to this two posts: How to programmatically obtain a list of configured namespaces How can I get the name of the data database in the current namespace?
go to post Enrico Parisi · Jun 16 In case anybody cares, I've submitted the idea of supporting 2FA in DBeaver. Add support for two-factor authentication in DBeaver
go to post Enrico Parisi · Jun 16 If you think that it can be important to add something else, please let us know. How about support for two-factor authentication? Now days 2FA/MFA is virtually mandatory in some environment.
go to post Enrico Parisi · Jun 16 Hi @Evgeny Shvarov, as per your suggestion I've submitted the idea: Make DICOM iteroperability adapter usable in Mirror configuration/environment If anyone think this can be useful can now vote for it 😊
go to post Enrico Parisi · Jun 14 No, it doesn't. If the variable String contains a Base 64 encoded HL7 message, then: Set HL7MessageResponse=##class(EnsLib.HL7.Message).ImportFromString($system.Encryption.Base64Decode(String),.sc) ; handle sc error here Set DocType=##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(HL7MessageResponse.TypeVersion,HL7MessageResponse.Name) Set sc=HL7MessageResponse.PokeDocType(DocType) ; handle sc error here After that, the variable HL7MessageResponse is an instance (OREF, object reference) of an Ens.HL7.Message with proper DocType, Name, etc. that you can use as HL7 response back to your HL7 BP Router.
go to post Enrico Parisi · Jun 13 What's the datatype of the HL7 message in SendMessageRespose? I assume that the HL7 message in SendMessageRespose is a %String. String variable contains the HL7 message, then: Set HL7MessageResponse=##class(EnsLib.HL7.Message).ImportFromString(String,.sc) ; handle sc error here Set DocType=##class(EnsLib.HL7.Schema).ResolveSchemaTypeToDocType(HL7MessageResponse.TypeVersion,HL7MessageResponse.Name) Set sc=HL7MessageResponse.PokeDocType(DocType) ; handle sc error here
go to post Enrico Parisi · Jun 13 How did you installed set up your FHIR Server? When installed using the IRIS portal the FHIR Web Application is automatically created and configured with the following Application Roles :%DB_HSCUSTOM%DB_HSLIB%DB_HSSYS%DB_<YourNamespace>X0001R%DB_<YourNamespace>X0001V%HS_DB_<YourNamespace>%HS_ImpersonateUser
go to post Enrico Parisi · Jun 12 The log from ^ISCLOG you posted does not reflect the code you posted. Something MUST happen to the CBORDRequest.encodedMessage property AFTER the code you posted before the request is sent. Please post as much code you can up until InvokeClient().
go to post Enrico Parisi · Jun 11 Fixed for you: /// Returns Age in years from DOB in YYYYMMDD format /// Make sure DOB is not null ("") before calling the function. ClassMethod GetAge(DateOfBirth As %String) As %Integer { Set today=$zd($h,8) Set age=$e(today,1,4)-$e(DateOfBirth,1,4) If $e(today,5,8) < $e(DateOfBirth,5,8) Set age=age-1 Quit age } Not that complex after all.
go to post Enrico Parisi · Jun 11 From the ISCSOAP log it's evident that the the content of encodedMessage property/tag is not the encoded HL7 raw message but it was assigned with an oref (object reference, an object instance) of the osuwmc.Nutrition.OSU.CBOARDNetMenuRequest.SendMessageRequest class. This is not what the code you posted is doing, so I guess the actual code is different or the encodedMessage property is set to an oref after the code you posted. It looks like somewhere after that code there is a: Set CBORDRequest.encodedMessage=CBORDRequest Beside that, my curiosity: set a = $SYSTEM.Encryption.Base64Encode((pMsgOut.RawContent))Why two parenthesis? set CBORDRequest.encodedMessage = $Get(a)Why using $Get for a variable that is indeed/for sure defined?
go to post Enrico Parisi · Jun 11 What product? IRIS, IRIS fir Health, HealthShare HC or HealthShare? How did you created in the Management Portal the new database/namespace?
go to post Enrico Parisi · Jun 10 Do you need to decode a Base64 stream or you just need to read a stream to a string? If so, then: Set string=stream.Read($$$MaxStringLength)
go to post Enrico Parisi · Jun 10 Set string= $System.Encryption.Base64Decode(stream.Read($$$MaxStringLength))
go to post Enrico Parisi · Jun 10 If the B64 is "small" to fit a %String (~3.5MB or less), then just use $System.Encryption.Base64Decode()
go to post Enrico Parisi · Jun 8 IMHO the best approach is to take advantage of the object-oriented development environment that IRIS provide and have the common functions/methods in a single (or multiple) classes, possible abstract classes, and inherit them in the "main" class. Class Community.perf.ClassMain Extends Community.perf.ClassAbs { ClassMethod Compare(NumCalls As %Integer) { Set Start=$zh Do ..ClassCalls(NumCalls) Set End=$zh Write "Class calls: ",End-Start,! } ClassMethod ClassCalls(NumCalls As %Integer) { For i=1:1:NumCalls { Set x=..Compute(NumCalls) } } } Class Community.perf.ClassAbs [ Abstract ] { ClassMethod Compute(Num As %Integer) { ;Quit Num Set ret=Num Quit ret } } How about performance? EPTEST>do ##class(Community.perf.ClassMain).Compare(100000000) Class calls: 31.675438 In latest version of IRIS (and Cachè?) inherited members method code is no longer duplicated, so there is no difference then using separate classes but I think this approach is more modern, elegant and, depending on situations, MUCH more flexible,
go to post Enrico Parisi · Jun 8 To mesure the difference I've a differente approach then Robert and concentrate on same/different class calls without any additional overhead.Please note that is my no means a demonstration of best/worst approach, IMHO there is a better solution, see my next post. I've created two classes and simulated a big number of calls of a class method within the same class and same code calling a class method in a different class. Class Community.perf.Class1 { ClassMethod Compare(NumCalls As %Integer) { Set SingleStart=$zh Do ..SingleClassCalls(NumCalls) Set SingleEnd=$zh Set MultiStart=$zh Do ..MultiClassCalls(NumCalls) Set MultiEnd=$zh Set Difference=(MultiEnd-MultiStart)-(SingleEnd-SingleStart) Set Percent=1-((SingleEnd-SingleStart)/(MultiEnd-MultiStart))*100 Write "Same class calls: ",SingleEnd-SingleStart,! Write "Diff class calls: ",MultiEnd-MultiStart,! Write "Difference: ",Difference," ",Percent,"%",! } ClassMethod SingleClassCalls(NumCalls As %Integer) { For i=1:1:NumCalls { Set x=..Compute(NumCalls) } } ClassMethod MultiClassCalls(NumCalls As %Integer) { For i=1:1:NumCalls { Set x=##class(Community.perf.Class2).Compute(NumCalls) } } ClassMethod Compute(Num As %Integer) { ;Quit Num Set ret=Num Quit ret } } Class Community.perf.Class2 { ClassMethod Compute(Num As %Integer) { ;Quit Num Set ret=Num Quit ret } } Calling the Compare() method with 100M iterations the result is: EPTEST>do ##class(Community.perf.Class1).Compare(100000000) Same class calls: 20.992929 Diff class calls: 31.460201 Difference: 10.467272 33.27147210534351% Please note that changing the Compute() method in both classes to: ClassMethod Compute(Num As %Integer){ Quit Num} Makes a BIG difference: EPTEST>do ##class(Community.perf.Class1).Compare(100000000) Same class calls: 4.606181 Diff class calls: 5.52639 Difference: .920209 16.6511773508565266% Using the first method code it adds the handling of the stack, therefore it takes longer and, for 100M calls, the difference is noticeable.I think the first with "some" stack handling is a more realistic use case. In conclusion, there is a difference and is measurable. Is it noticeable? Not much, IMHO in a computation that probably takes many minutes duplicating codes is not worth the gain. There is however a better approach without duplicating the code, see my next post.
go to post Enrico Parisi · Jun 8 Ciao Robert, I'm not sure your test address the original question, that is: "whenever you call code outside of the routine as opposed to calling code in the same routine, some execution speed is lost" In your test1 you do: [call class method] -> [call class method in other class] -> [call a function in same class] In your test2 you do: [call class method] -> [call a function in same class] This way you are not comparing "call code outside of the routine as opposed to calling code in the same routine", you are ADDING an additional call/level. In addition, to measure the time penalty for calling inside/outside "routine" (or class), adding 100M global access does not help in getting a reliable measure because too many factors may change the time measured between different runs.Finally a doubt, are we sure that calling a function and calling a class method is a fair comparison? May be or may be not, I don't know.
go to post Enrico Parisi · Jun 7 ...whenever you call code outside of the routine as opposed to calling code in the same routine, some execution speed is lost. For reports churning through millions of transactions this lost speed might be noticeable. Can you reproduce this with a small/simple self contained example using code in same class/routine and same code calling different classes/routines where the difference is noticeable?