go to post Julian Matthews · Apr 4, 2022 Hey Shamus. I do appreciate you replying, however I may not be being clear in my original question. Even if I have the correct settings in the Business Service, if the content format is one that conflicts with UTF-8, the display within the management portal will show as per my examples because the browser is trying to display non UTF-8 content as UTF-8. My original question was asking how others work with this. If you spot my second top-level comment, you will see that I had looked into using the browser to change the http content-type header, but that the major browsers no longer support such a feature. I'm guessing my only option is to export a message and then review the content there.
go to post Julian Matthews · Apr 4, 2022 Hey Shamus. I'm back to eat some humble pie! Turns out, I had confused myself early on and wrongly believed that Windows-1252/Latin1 were the same and I had my service set to Latin 1. This was then creating a scenario where I was digging myself into a hole of bad information. In fact, they are almost the same except for the exact characters I was using in my example. These code points are used by Latin-1 as control codes, and when Windows-1252 is mislabeled as Latin-1 they get lost... Thanks again for replying to my initial question and comments.
go to post Julian Matthews · Apr 1, 2022 I have looked at how I can change the behavior of the browser, but it seems that the big 3 (well, two) no longer have this feature. Here is an article giving some back story. Basically, Chrome used to have the option to manually overwrite the encoding type, but this was removed (however there are some 3rd party extensions out there to replace this feature, but I feel uncomfortable using random 3rd party extensions around healthcare data) Firefox also used to have this feature, but they replaced it with a tool that attempts to repair the character encoding, however it didn't do a great job as it decided it was "IBM866" so the content looked like this:
go to post Julian Matthews · Apr 1, 2022 Hey Shamus. My issue isn't with the actual character encoding, but the display of the characters because the management portal (being browser based) uses UTF-8. In my initial example, if I were to write the output to a file with the the correct character encoding set, it will look fine when opened in a text editor.
go to post Julian Matthews · Mar 24, 2022 Hey Token. You could use ##class(%PopulateUtils).VarString() to generate the random string.
go to post Julian Matthews · Mar 7, 2022 Hey Leon. The element of this issue that is perplexing me is that there is a difference between the RAW and Full view. Could you try sending a sample message to a HL7 File operation with the charset set to UTF-8? I'm curious to know if the characters display as expected, stay as the ANSI character, or become something else. I am wondering if the ANSI displaying in just the Full message viewer is contained to just the display of the full message, and any issues you are seeing in a destination system are a separate but similar issue with character encoding.
go to post Julian Matthews · Mar 3, 2022 I believe the privilege comes from the OS user that is launching Terminal. Have you tried running Terminal as an Admin and seeing if runs as expected?
go to post Julian Matthews · Feb 17, 2022 Hey Kurro. You should be able to include the allowed source in the rule constraint: Alternatively, you could add a rule above that looks like this:
go to post Julian Matthews · Feb 1, 2022 Hey Stefan. Is the file saved as a class when trying to run the formatter? I found previously that it's not enough to just set the language in a new class, but the file needs to be saved as the formatter relies on the file extension.
go to post Julian Matthews · Jan 14, 2022 Hey Connor. You will likely want to look at this which describes reporting asyncs for mirroring.
go to post Julian Matthews · Dec 29, 2021 Hey Yuri. Depending on the context, this answer I gave for a similar question may be relevant: ...you can pass ..Adapter.ExecuteQuery() a snapshot object (EnsLib.SQL.Snapshot) which will then get populated rather than a getting a result set returned. With this populated snapshot object, you can then iterate through it using its Next() method just like the result set, but then you can use its Rewind() method. For example: Set Snapshot = ##Class(EnsLib.SQL.Snapshot).%New() Set sql = "SELECT * FROM MY_TABLE WHERE X= '"_Y_"'" Set status = ..Adapter.ExecuteQuery(Snapshot, sql) While Snapshot.Next(){ //First run through of snapshot } Do Snapshot.Rewind() While Snapshot.Next(){ //Second run through of snapshot }
go to post Julian Matthews · Nov 11, 2021 Hey Nicola. Changing the theme can certainly make Studio a little easier on the eyes (although it does feel like a bit of a hack): https://github.com/doublefint/CacheColorTheme
go to post Julian Matthews · Nov 5, 2021 Hey Nicola. As an alternative to Davids response, you can pass ..Adapter.ExecuteQuery() a snapshot object (EnsLib.SQL.Snapshot) which will then get populated rather than a getting a result set returned. With this populated snapshot object, you can then iterate through it using its Next() method just like the result set, but then you can use its Rewind() method. For example: Set Snapshot = ##Class(EnsLib.SQL.Snapshot).%New() Set sql = "SELECT * FROM MY_TABLE WHERE X= '"_Y_"'" Set status = ..Adapter.ExecuteQuery(Snapshot, sql) While Snapshot.Next(){ //First run through of snapshot } Do Snapshot.Rewind() While Snapshot.Next(){ //Second run through of snapshot } Something to be mindful of - as I'm passing ..Adapter.ExecuteQuery() an object rather than trying to get it to output something, the period before the variable is intentionally missing in my example.
go to post Julian Matthews · Nov 4, 2021 Thanks John, that's very good to know about. It's missing 1 or 2 features I like in ScreenToGif, but it's certainly going in my bookmark bar.
go to post Julian Matthews · Nov 3, 2021 Hey Ben. I use a program called ScreenToGif. Since moving to remote working it has become invaluable for demonstrating functionality for apps via email or IM. However it gets the most use when I'm reporting bugs to a supplier, or in this case how I'm incorrectly using VSCode extensions I'm pretty sure it's a Windows-only app, so you may need to find an alt if you're on another OS and wish to try it out. *edit* As a tip, try to keep any gifs you do make for bug reporting fairly short. No one wants to be waiting 2 minutes for a gif to loop because they missed the important part!
go to post Julian Matthews · Nov 3, 2021 Hey Brett, thank you for your help. I have found the issue. It looks like a file needs to be saved as a .cls first before the formatter is available for use. This differs from other languages within VSCode which just needs the language to be set for the new document.
go to post Julian Matthews · Nov 3, 2021 Hey @Brett Saviano I have the Language Server extension installed, however invoking the formatter using the keyboard shortcut Shift+Alt+F ( as per the VSCode documentation you linked) gives this popup:
go to post Julian Matthews · Nov 3, 2021 Hey Ben. Specifically looking to be able reformat the code layout. For example, if I was working with javascript or json, I can use the keyboard command Shift+Alt+F and it will reformat the code: However, when I attempt this with the language set to ObjectScript or ObjectScript-Class, pressing that same keyboard shortcut gives a popup stating no formatter is installed and it directs me to the Extension Marketplace
go to post Julian Matthews · Oct 29, 2021 Hey Kurro. To access values from your message class, you will need to alter your references to your class in your if statements. For example, rather than just calling "CodigoProveedor", you will need to state "Document.CodigoProveedor" so that the router is looking for "CodigoProveedor" within the document received by the router. You can test this by adding a new "When" within your Rule and use the expression editor to start type "Document.Cod" and this should then start giving you autocomplete options. For example: As an aside (and because it's caught me out a few times) if your router is working with just custom classes and not HL7, do make sure your router is a General message router and not a HL7 message router as this can sometimes lead to odd errors.
go to post Julian Matthews · Oct 28, 2021 Hey Yone. Assuming you're only using ObjectScript for this, then way to achieve this would be to take your HL7 as Enslib.HL7.Message, and then loop through the segments to pull out the PID segment, and then loop through PID:3 for a match. For example: //loop through HL7 and find PID Segment set SegCount = request.SegCount for i=1:1:SegCount{ set segment = request.GetSegmentAt(i) if (segment.Name="PID"){ //Loop through PID:3 set numCnt = segment.GetValueAt("3(*)") for j=1:1:numCnt{ set P341=segment.GetValueAt("3("_j_").4.1") set P5=segment.GetValueAt("3("_j_").5") if (P341="CAC")&&(P5="JHN") { $$$TRACE("Match found!") } } } } Alternatively, you could create a DTL with the logic which you can from the ObjectScript, and then have the target in your DTL be something like a string container that you can then grab a result from. However that might be a bit clunky depending on your use case.