Nouvelle publication

查找

Question
· Juil 2, 2024

getFile from rest api and swagger

I use a swagger file and ##class(%REST.API).CreateApplication to create the rest api.

There is an interesting post: https://community.intersystems.com/post/download-file-rest-api-operation, but it is code, not a swagger configuration. disp.cls returns always a header content : application/json that of course fails as I am not always returning a json

I can not figure out what to put in swagger. Some examples I tried:

produces:
- application/pdf
- image/png

responses:
   200:
      schema:
           type: file
responses:
   200:
       schema:
           type: string
           format: binary

Thank you

2 Comments
Discussion (2)0
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 2, 2024

How to call another method in a generated method

I have a class with two methods

Class Foo.Bar
{

ClassMethod Helper()
{
// do something
}

ClassMethod Generated() [ CodeMode = objectgenerator ]
{
do ..Helper()
// do something else
}

}

Since the method Generated is run before the class is compiled, the call to do ..Helper() fails. Is there a way around this other than manual inlining?

3 Comments
Discussion (3)3
Connectez-vous ou inscrivez-vous pour continuer
Job
· Juil 2, 2024

Looking for Integration Engineer expertise in IRIS

Hello All,

I am looking for some Integration engineers who have expertise in IRIS/Healthshare in North America.

Have a project going on , if interested please feel free to reach out to me.

1 Comment
Discussion (1)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 2, 2024

Help Needed: Empty Bundle When Converting CCDA to FHIR in InterSystems IRIS

Hello Community,

I'm a beginner and currently working on a project to convert CCDA files to FHIR using InterSystems IRIS. I have developed a web form to upload CCDA files, and I'm attempting to convert the uploaded CCDA files to FHIR. However, I am encountering an issue where the conversion process results in an empty entry.
Here's the Output it displays on HTML page:

Size of CCDA Stream: 74152
vR4
{"resourceType":"Bundle","type":"transaction","entry":[]}

Here is my code: CCDtoFHIR.csp

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CCDA to FHIR Converter</title>
</head>
<body>
    <section>
        <div>
            <p>CCDA to FHIR Converter</p>
            <div>
                <div>
                    <h1>Upload CCDA File</h1>
                    <form id="fileUploadForm" enctype="multipart/form-data" method="post" action="CCDtoFHIR.csp">
                        <div>
                            <label for="file">Upload CCDA File</label>
                            <input type="file" name="file" id="file" required>
                        </div>
                        <div>
                            <button type="submit">Upload</button>
                        </div>
                    </form>
                    <csp:if condition='($data(%request.MimeData("file",1)))'>
                        <hr><br>
                        <b>FHIR Conversion Result:</b><br>
                        <ul>
                            <script language="cache" runat="server">
                                try {
                                    // Read the uploaded file stream
                                    set ccdaStream = ##class(%Stream.TmpBinary).%New()
                                    do ccdaStream.CopyFrom(%request.MimeData("file",1))
                                    
                                    // Ensure the stream is an object
                                    if ('$isobject(ccdaStream)) {
                                        write "Failed to read uploaded file stream"
                                        quit
                                    }
                                    
                                    // Debug: Output the size of the CCDA stream
                                    write "Size of CCDA Stream: ", ccdaStream.Size, "<br>"
                                    
                                    // Read some content from the stream for debugging
                                    do ccdaStream.Rewind()

                                    // Determine the appropriate XSLT transform based on the document type
                                    set xsltTransform = "SDA3/CCDA-to-SDA.xsl"  // Default to CCDA-to-SDA
                                    
                                    // Convert CCDA to SDA3 using HealthShare's built-in methods
                                    set tTransformer = ##class(HS.Util.XSLTTransformer).%New()
                                    set tSC = tTransformer.Transform(ccdaStream, xsltTransform, .tSDA3Stream)

                                    if $$$ISERR(tSC) {
                                        write "Transformation to SDA3 failed", "<br>"
                                        quit
                                    }
                                    
                                    set sdaStream = ##class(%Stream.TmpBinary).%New()
                                    do tSDA3Stream.Rewind()
                                    do sdaStream.CopyFrom(tSDA3Stream)
                                    
                                    // Convert SDA3 to FHIR using HealthShare's built-in methods
                                    set fhirStream = ##class(%Stream.TmpBinary).%New()
                                    set SDA3ToFHIRObject = ##class(HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR).TransformStream(tSDA3Stream, "HS.SDA3.Container", "R4")

                                    // Check if the transformation returned a valid bundle
                                    if '$isobject(SDA3ToFHIRObject.bundle) {
                                        write "Failed to transform SDA3 to FHIR", "<br>"
                                        quit
                                    }

                                    // Serialize the FHIR bundle to JSON
                                    do SDA3ToFHIRObject.bundle.%ToJSON(fhirStream)
                                    do fhirStream.Rewind()

                                    // Write the FHIR data to the response
                                    while ('fhirStream.AtEnd) {
                                        write fhirStream.ReadLine(), "<br>"
                                    }
                                } catch (ex) {
                                    // Handle exceptions
                                    write "Error during conversion: ", ex.DisplayString(), "<br>"
                                }
                            </script>
                        </ul>
                    </csp:if>
                </div>
            </div>
        </div>
    </section>
</body>
</html>

 

Problem Description:

  • The CCDA file uploads successfully, and I can see the size of the uploaded stream.
  • The transformation to SDA3 seems to work fine without errors.
  • The conversion from SDA3 to FHIR appears to be successful, but the resulting FHIR bundle is empty.

Debugging Steps:

  • I've ensured that the CCDA stream is read correctly.
  • I confirmed that the transformation to SDA3 does not produce any errors.
  • I attempted to output some content from the SDA3 stream, which seems fine.
  • The FHIR transformation does not produce any errors, but the resulting FHIR bundle is empty.

Questions:

  1. What could be the reason for obtaining an empty FHIR bundle after the transformation?
  2. Are there any additional debugging steps or checks I can perform to identify the issue?
  3. Is there a specific configuration or additional steps required for the HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR transformation process?
9 Comments
Discussion (9)2
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 1, 2024 6m de lecture

This CPU is not supported by this version of IRIS***, which requires "AVX" and "BMI" CPU instructions.

これは InterSystems FAQ サイトの記事です。
 

IRIS2024.1以降のバージョンをインストールしようとした際に、以下のようなエラーになることがあります。

This CPU is not supported by this version of IRISHealth, which requires “AVX” and “BMI” CPU instructions.


これは、2024.1以降のバージョンより最小CPUの条件として、AVX および BMI 拡張命令が含まれることが条件となっているのですが、ご使用の環境に含まれない(仮想環境やFTサーバ等の特殊なシステムでは無効化されている場合も)ときに出力されるエラーです。

最小CPUサポートバージョンについては、以下のドキュメントをご覧ください。
Minimum Supported CPU

現在使用中のCPUの拡張命令セットの情報の確認方法については、以下のDC記事をご覧ください。
CPU のマイクロアーキテクチャファミリと命令セットの判定方法


Linuxの場合は、lscpuコマンド、または lshw -class processor コマンドで確認できます。

実行例:

lscpu
アーキテクチャ:                      x86_64
CPU 操作モード:                      32-bit, 64-bit
バイト順序:                          Little Endian
CPU:                                 1
オンラインになっている CPU のリスト: 0
コアあたりのスレッド数:              1
ソケットあたりのコア数:              1
ソケット数:                          1
NUMA ノード数:                       1
ベンダー ID:                         GenuineIntel
BIOS Vendor ID:                      GenuineIntel
CPU ファミリー:                      6
モデル:                              142
モデル名:                            Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
BIOS Model name:                     Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
ステッピング:                        12
CPU MHz:                             2112.006
BogoMIPS:                            4224.01
ハイパーバイザのベンダー:            VMware
仮想化タイプ:                        完全仮想化
L1d キャッシュ:                      32K
L1i キャッシュ:                      32K
L2 キャッシュ:                       256K
L3 キャッシュ:                       8192K
NUMA ノード 0 CPU:                   0
フラグ:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xsaves arat flush_l1d arch_capabilities


または

sudo lshw -class processor
 *-cpu:0          
    description: CPU

    capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp x86-64 constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xsaves arat flush_l1d arch_capabilities


 

Windowsの場合は、coreinfo ユーティリティで確認できます。

実行例:

C:\work\Coreinfo>Coreinfo64.exe
Coreinfo v3.6 - Dump information on system CPU and memory topology
Copyright (C) 2008-2022 Mark Russinovich
Sysinternals - www.sysinternals.com 13th Gen Intel(R) Core(TM) i7-1365U
Intel64 Family 6 Model 186 Stepping 3, GenuineIntel
Microcode signature: 00004114

AES             *       Supports AES extensions
AVX             *       Supports AVX instruction extensions
AVX2            *       Supports AVX2 instruction extensions

AVX-512-F       -       Supports AVX-512 Foundation instructions
AVX-512-DQ      -       Supports AVX-512 double and quadword instructions
AVX-512-IFAMA   -       Supports AVX-512 integer Fused multiply-add instructions
AVX-512-PF      -       Supports AVX-512 prefetch instructions
AVX-512-ER      -       Supports AVX-512 exponential and reciprocal instructions
AVX-512-CD      -       Supports AVX-512 conflict detection instructions
AVX-512-BW      -       Supports AVX-512 byte and word instructions
AVX-512-VL      -       Supports AVX-512 vector length instructions
FMA             *       Supports FMA extensions using YMM state
MSR             *       Implements RDMSR/WRMSR instructions
MTRR            *       Supports Memory Type Range Registers
XSAVE           *       Supports XSAVE/XRSTOR instructions
OSXSAVE         *       Supports XSETBV/XGETBV instructions
RDRAND          *       Supports RDRAND instruction
RDSEED          *       Supports RDSEED instruction CMOV            *       Supports CMOVcc instruction
CLFSH           *       Supports CLFLUSH instruction
CX8             *       Supports compare and exchange 8-byte instructions
CX16            *       Supports CMPXCHG16B instruction
BMI1            *       Supports bit manipulation extensions 1
BMI2            *       Supports bit manipulation extensions 2

ADX             *       Supports ADCX/ADOX instruction:

(※ * になっていればOK)


enlightened【ご参考】
InterSystems IRIS ミニマムサポート CPU モデル

Discussion (0)0
Connectez-vous ou inscrivez-vous pour continuer