Adrian Zeeman · Jan 17, 2019 go to post

Thank you Benjamin, I'm using my own class for the hooks but I'm extending %Studio.SourceControl.ISC.cls.

I'm overriding some of the methods (GetStatus for instance) I noticed that if I add a new class to source control, check it in and then open it again I can't check it out again. It only gives me check in or undo options. After I check it in, %Studio.SourceControl.Change still shows it as Committed=0 but even if I manually change it to committed it still doesn't show the check out option. 

I have set up the shared workspaces so it should pick it up as a multi-developer instance, that's the criteria as far as I can see in the code.

Adrian Zeeman · Feb 22, 2019 go to post

What is it that you're trying to do? Can you post some of the code that you're trying to execute

Adrian Zeeman · Feb 8, 2019 go to post

Hi Thembalani,

The property SegCount will only show you on the message level how many "lines" the message has. Ex (MSH,PID,PV1) = 3

If you want the individual pieces in the message you will have to first get to the segment correctly, this is dependent on the version of HL7 you're using. My exampe is from 2.6

>w o.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:PatientIdentifierList()")
6107145310089^^^^NNZAF
 

You can then piece it out on "^"

>w $L(o.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:PatientIdentifierList()"),"^")
5
 

Hope this helps

Adrian Zeeman · Feb 23, 2019 go to post

Hi Daniel,

Try instantiating the object with the filename as parameter. The filename property is just there for Cache to set and use, as far as I'm aware.

If the goal is just to write to a file try this:

set file=##class(%File).%New(filename)

do file.Open("WSN")

do file.WriteLine("Writing this to a file")

do file.Close()

You can look up the %File in the docs for usage on the open parameter

Adrian Zeeman · Sep 23, 2020 go to post

You can use the contains operator "["

IF ",A39,A40,O01,O11,O09,R01,"'[(","_msgType_",") {
return pHL7.GetValueAt("PID:SSNNumberPatient")}

Adrian Zeeman · Sep 23, 2020 go to post

I'm not sure about the lookup syntax, I haven't used it.

The code that I sent is not contains. It has an apostrophe in front of the open square bracket. If you want to check if it's contained in the list it will just be a open square bracket 

Adrian Zeeman · Jan 22, 2021 go to post

There should be a flag in your business service config "Use ACK Commit Codes" that it by default ticked. Remove the tick and try again

Adrian Zeeman · Sep 20, 2021 go to post

Hi Thomas,

You can write to a file by using the %File library class as follows:

        set tTempFile=##class(%FileCharacterStream).%New()
        set tTempFile.Filename=filename
        set tSC=tTempFile.CopyFrom(tStream)
        set returnValue=tTempFile.%Save()
 

You will be able to get the file name that was read in the service from the Ens.StreamContainer. It has a property called OriginalFilename that has the absolute filename saved. If the business service managed to pick up the type of file that it processed it will be populated in the Type property.