Nova postagem

Pesquisar

Pergunta
· Abr. 11, 2024

Select View throwing Error "References to an SQL connection must constitute a whole subquery"

Hi,

I have created view from External table joins internal persistent table. Create VIEW worked but Select * from Viewxxx throwing error.

"References to an SQL connection must constitute a whole subquery"

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...(SELECT%20*%20FROM%20Mylink.

Could it possible to create view with external db table with local persistant table and to access it?

please suggest any thoughts on it..

Thanks,

2 Comments
Discussão (2)2
Entre ou crie uma conta para continuar
Pergunta
· Abr. 11, 2024

Call for FHIR experts: R5 vs R4

Hi Community,

Starting a FHIR repository project with IRIS for Health, what are the pros and cons to use R5 instead of R4 ?
What is the effort to migrate from R4 to R5 the FHIR repo ?
What are the risks or disadvantages to use R5 ?

Thanks

3 Comments
Discussão (3)2
Entre ou crie uma conta para continuar
Pergunta
· Abr. 11, 2024

Question about InterSystems API (IAM) install from tar file with IRIS running locally

I downloaded IAM-3.4.2.0-5604.tar.gz from the Online Distribution site this morning, it the implementation to install it on our Development environment to see if it is a viable solution. Following the instructions, I have ran into an issue trying to make sure I am entering the information into the prompts correctly.

I have IRIS HealthShare Health Connect 2024.1 running locally using a Local Web Server, so when prompted I have entered the IP Address and port 443 is that correct? 

:>iam-setup.sh
Welcome to the InterSystems IRIS and InterSystems API Manager (IAM) setup script.
This script sets the ISC_IRIS_URL environment variable that is used by the IAM container to get the IAM license key from InterSystems IRIS.
Enter the full image repository, name and tag for your IAM docker image:
intersystems/iam:3.4.1.0
Enter the IP address for your InterSystems IRIS instance. The IP address has to be accessible from within the IAM container, therefore, do not use "localhost" or "127.0.0.1" if IRIS is running on your local machine. Instead use the IP address of your local machine. If IRIS is running in a container, use the IP address of the host environment, not the IP address of the IRIS container:
xxx.xxx.xxx.xxx
Enter the web server port for your InterSystems IRIS instance:
443
Enter the password for the IAM user for your InterSystems IRIS instance:
Re-enter your password:
If local policy requires that HTTPS be used for communication, please provide the full path to your CA Certificate file now. Otherwise hit "Return":
/etc/pki/ca-trust/source/anchors/OSUWMC_CA.pem
If your InterSystems IRIS instance is only accessible via its CSPConfigName URL prefix, please provide the prefix with a trailing slash (/) now. Otherwise hit "Return":

Your inputs are:
Full image repository, name and tag for your IAM docker image: intersystems/iam:3.4.1.0
IP address for your InterSystems IRIS instance: xxx.xxx.xxx.xxx
Web server port for your InterSystems IRIS instance: 443
CA Certificate for HTTPS: /etc/pki/ca-trust/source/anchors/OSUWMC_CA.pem
CSPConfigName URL prefix:
Would you like to continue with these inputs (y/n)?
y
Getting IAM license using your inputs...

Couldn't reach InterSystems IRIS at xxx.xxx.xxx.xxx:443. One or both of your IP and Port are incorrect.

I have verified that...

  • IAM user is enabled
  • /api/iam is enabled

What port should be specified if you are running a Local Web Server/Web Gateway?

Thanks

Scott

9 Comments
Discussão (9)2
Entre ou crie uma conta para continuar
Pergunta
· Abr. 11, 2024

Dynamically Generating SQL queries Based on Incremental Column values

I'm facing a challenge in dynamically generating SQL queries based on incremental q_ids for a project I'm working on. Here's the scenario:

  • I have a table log_reports that contains logs of service activities, including timestamps and associated q_ids.
  • Each service log entry is associated with a cls and a q.
  • My goal is to generate SQL queries that calculate statistics such as average, minimum, and maximum time differences between the log creation time and the current timestamp, for each combination of cls_id and q_id.

Current Approach:

Here's the SQL query I'm currently using:

SELECT
    LPAD(FLOOR(AVG(DATEDIFF(HOUR, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(AVG(DATEDIFF(MINUTE, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(AVG(DATEDIFF(SECOND, log.created_at, CURRENT_TIMESTAMP))), 2, '0') AS average_time_difference, 
    
    LPAD(FLOOR(MIN(DATEDIFF(HOUR, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(MIN(DATEDIFF(MINUTE, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(MIN(DATEDIFF(SECOND, log.created_at, CURRENT_TIMESTAMP))), 2, '0') AS min_time_difference,
    
    LPAD(FLOOR(MAX(DATEDIFF(HOUR, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(MAX(DATEDIFF(MINUTE, log.created_at, CURRENT_TIMESTAMP))), 2, '0') || ':' ||
    LPAD(FLOOR(MAX(DATEDIFF(SECOND, log.created_at, CURRENT_TIMESTAMP))), 2, '0') AS max_time_difference
FROM
    log_reports log  
LEFT JOIN
    pass_slip slip ON log.tkt = slip.id  
WHERE
    log.cls_id IN (61)
    AND log.q_id IN (19, 25, 27)
    AND slip.status IS NOT NULL
GROUP BY
     log.cls_id

 

This query works well for a fixed set of q_ids. However, I need to dynamically generate the query to include all q_id up to a certain point.

Expected Solution:

I'm looking for suggestions on how to dynamically generate the SQL query to include q_ids incrementally, such that:

  1. Initially, the query should consider only the first q_id.
  2. In subsequent executions, the query should include an additional q_id until all q_id are covered.

Additional Context:

  • I'm using IRIS Database, which does not support common table expressions (CTEs) or native looping constructs within SQL queries.
  • The solution can involve either SQL techniques.

Questions:

  1. How can I dynamically generate SQL queries to include incremental q_ids without needing to execute the query multiple times?
  2. Are there any best practices or alternative approaches I should consider for this scenario?
  3. What scripting languages or techniques can I use to achieve this dynamic query generation if SQL alone isn't sufficient?

Any insights, code examples, or pointers to relevant resources would be greatly appreciated!

Thank you!

8 Comments
Discussão (8)3
Entre ou crie uma conta para continuar
Pergunta
· Abr. 11, 2024

Hardening the management portal - does this approach make sense?

Hello community,

in addition to HL7 V2 interfaces mediated via TCP/IP, we have been implementing more and more HS.FHIRServer.Interop.Service based services that are addressed via port 57772.
We would like to secure access to the Management Portal now and have come up with a procedure that I would like to discuss.

1. The local server firewall only allows access to port 57772 for the IPs of the administration PCs (and some few other exceptions).
2. A REST service is introduced for access to FHIR endpoints, which listens on a different (accessible) port. This service acts as a proxy and checks the URL suffix to see if a FHIR endpoint is accessed and forwards it to localhost:57772/[FHIR URL]. If not, a 403 is returned. In addition to the existing access control with user credentials this also allows us to restict access with the "Allowed IP Addresses" setting.

The description is somewhat simplified and is only intended to explain the concept. A proof of concept worked and performed quite well. Would you consider this approach to be useful and effective?

I look forward to comments and assessments.

Best regards,
Martin

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar