查找

文章
· 8 hr 前 阅读大约需 3 分钟

Celebrando una mente curiosa de la Comunidad de Desarrolladores

Toda comunidad técnica próspera tiene personas cuya curiosidad, perseverancia y generosidad ayudan a dar forma a su conocimiento colectivo. En la Comunidad de Desarrolladores de InterSystems, uno de esos colaboradores es @Scott Roth, que ha sido una presencia inspiradora durante casi una década.

👏 Echemos un vistazo más de cerca al notable recorrido de Scott y a su impacto en el ecosistema de InterSystems.

El recorrido de Scott comenzó en 2015, con los primeros pasos en las tecnologías de InterSystems y, poco después, en 2016, en la propia Comunidad de Desarrolladores. Desde entonces, se han sucedido años de experiencia práctica y aprendizaje continuo, marcados por hitos importantes como la transformación de Ensemble a HealthShare Health Connect. Este cambio no solo aportó mayor escalabilidad y fiabilidad, sino que también abrió un mundo de nuevas capacidades por explorar.

Uno de los capítulos más memorables fue la migración de eGate a Ensemble, un proyecto que impulsó un profundo crecimiento técnico. Desde crear interfaces con Caché ObjectScript, hasta elaborar llamadas a procedimientos almacenados con EnsLib.SQL.OutboundAdapter; desde dominar ZAUTHENTICATE para la autenticación LDAP, hasta crear un entorno seguro usando Apache Web Server, certificados y autenticación LDAP basada en modelos. Cada paso alimentó una curiosidad en constante crecimiento y mejoró la eficiencia de todo el entorno. Fue durante aquella migración formativa de eGate a Ensemble cuando la Comunidad de Desarrolladores se convirtió en un compañero esencial: un lugar para explorar, conectar y aprender.

Pero el progreso rara vez llega sin obstáculos. Muchos retos surgieron de un conocimiento interno limitado o de la escasez de recursos en línea. La lección aprendida: refrescad la mente. Daos un respiro. Volved con claridad. Resolver problemas tiene tanto que ver con el ritmo como con la perseverancia.

Con el tiempo, a medida que más miembros se fueron uniendo, la Comunidad de Desarrolladores evolucionó hasta convertirse en un colectivo más rico en experiencia compartida. Y con ese crecimiento llegó un nuevo papel: pasar de preguntar principalmente a ayudar con confianza a los recién llegados que afrontan los mismos obstáculos que uno encontró al principio. Entre los momentos más gratificantes están las oportunidades de devolver lo aprendido: responder publicaciones y guiar a otros a través de complejidades que antes parecían abrumadoras. Estos momentos reflejan el verdadero espíritu de la Comunidad: colaboración, mentoría y empoderamiento.

El mensaje para los recién llegados es alentador y directo:

Aunque hay mucho conocimiento disponible, no tengáis miedo de hacer preguntas obvias que puedan sonar ridículas. Puede que la respuesta ya esté en la Comunidad de Desarrolladores, pero quizá no sea reconocible según cómo formuléis vuestra pregunta. No tengáis miedo de publicar.

De cara al futuro, hay entusiasmo por profundizar en las capacidades FHIR dentro de Health Connect, para mejorar la mensajería HL7 y ampliar las competencias de interoperabilidad.

Fuera del trabajo, la vida de Scott se centra en la familia, en apoyar el negocio de su pareja, disfrutar del tiempo con los perros y jugar cuando el tiempo lo permite. Aunque no siempre es fácil separar el trabajo de la vida personal, estas pasiones aportan equilibrio y perspectiva.

Esta historia es un testimonio de lo que la curiosidad, la resiliencia y la voluntad de compartir pueden aportar a una comunidad. Celebra a un colaborador que encarna lo mejor de la Comunidad de Desarrolladores: aprender continuamente, ayudar constantemente y elevar siempre a los demás en el camino.

🙏 ¡Celebremos contar con @Scott Roth su dedicación, habilidad y contribuciones a la Comunidad de Desarrolladores!

讨论 (0)1
登录或注册以继续
问题
· 11 hr 前

SEBI Act & Taxation Consultancy Guide for General Public

 

SEBI Act – Taxation Consultancy: A Complete Guide for the General Public

Navigating financial rules can feel like walking through a maze—especially when those rules involve the SEBI Act, taxation issues, SEBI PACL cases, or receiving a show cause notice. But don’t worry—this guide is designed to simplify everything so you can understand these concepts without needing a law degree.

Think of SEBI as the "traffic police" of the Indian financial markets. Just like traffic rules keep roads safe, the SEBI Act keeps investments protected and fair. And when taxation consultancy intersects with SEBI regulations, things can get a little complicated—but that’s exactly what we’ll break down today.

Learn how the SEBI Act affects taxation consultancy, SEBI PACL cases, and show cause notice procedures in simple terms.

Introduction to the SEBI Act

The Securities and Exchange Board of India Act, 1992, commonly known as the SEBI Act, was created to regulate India's securities market. Whether you’re an investor, tax consultant, or curious learner, the Act ensures transparency, fairness, and accountability in financial dealings.

Think of SEBI as a guardian—always watching to ensure no one takes unfair advantage in the stock market.

Why the SEBI Act Matters in Taxation Consultancy

You might wonder: What does taxation consultancy have to do with SEBI?

Taxation consultants deal with individuals and companies that invest in securities or financial instruments. SEBI’s regulations often overlap with financial disclosures, income reporting, investment compliance, and fraud prevention.

In short:
If taxation advisors help clients with investment-related income or financial planning, they must ensure their work aligns with SEBI rules.

Historical Background of the SEBI Act

Before 1992, the Indian securities market wasn’t well regulated. Unfair trade practices, scams, and manipulation were common—remember the Harshad Mehta scam?

To prevent such issues, the Government introduced SEBI first as a non-statutory body (1988), and later passed the SEBI Act, 1992, giving it legal authority.

Key Objectives and Powers of SEBI

SEBI’s main goals include:

  • Protecting investor interests
  • Promoting fair trading practices
  • Maintaining market integrity
  • Regulating intermediaries (like brokers, advisors, and portfolio managers)

It has the power to investigate, levy penalties, issue show cause notices, and even ban entities from trading.

Registration Requirements for Consultants

Taxation consultants who provide investment advisory services must register with SEBI as Investment Advisers (IA).

Why does registration matter?
It ensures the consultant meets standards of qualification, transparency, and ethical practice.

Key criteria include:

  • Proper qualifications and certifications
  • Adequate financial resources
  • Compliance with SEBI’s code of conduct
  • Maintenance of client records

Understanding the SEBI PACL Case

The SEBI PACL case is one of India’s biggest financial fraud cases, involving lakhs of investors and thousands of crores of rupees.

What happened?

  • PACL collected money from people under the pretext of land development projects.
  • SEBI found it was running an illegal investment scheme.
  • A panel was set up to return money to affected investors.

For tax consultants, this case highlights the need to verify the legitimacy of client investments. Helping clients invest in or report earnings from illegal schemes can create compliance troubles.

What Is a Show Cause Notice Under SEBI?

A show cause notice (SCN) is SEBI’s formal way of asking:

Why should we not take action against you?

It is not a punishment but an opportunity to explain your side.

Common reasons for SEBI SCN include:

  • Misleading investment advice
  • Inaccurate financial statements
  • Insider trading violations
  • Non-compliance with registration rules
  • Fraud or market manipulation

Common Triggers for SEBI Show Cause Notices

Taxation consultants may receive SCNs if:

  • They act as unregistered investment advisors
  • They help clients hide financial information
  • They fail to report suspicious transactions
  • Their tax filings do not match investment data
  • They assist clients in non-compliant activities

Sometimes, notices arise simply because of data mismatches—so maintaining clean records is crucial.

Role of Tax Advisors in SEBI-Linked Cases

Tax consultants often play the role of:

  • Compliance guides – ensuring clients follow financial laws
  • Record keepers – maintaining transaction histories
  • Interpreters – simplifying regulations for clients
  • Defenders – helping clients reply to notices

In SEBI PACL cases, many consultants helped investors verify their claims and documentation.

Penalties & Legal Consequences Under SEBI Act

SEBI can impose penalties ranging from thousands to crores of rupees. Penalties depend on:

  • Nature of the violation
  • Financial impact
  • Intent (fraud vs genuine mistake)

Possible actions include:

  • Monetary penalty
  • Suspension of services
  • Debarment from markets
  • Prosecution in serious cases

How to Respond to a SEBI Show Cause Notice

Here’s a simple step-by-step method:

1. Read the notice carefully

Understand what SEBI alleges.

2. Collect relevant documents

Income tax returns, client agreements, records, and emails.

3. Draft a professional reply

Explain facts, provide evidence, and clarify misunderstandings.

4. Seek expert help

Sometimes, consulting a legal expert is wise.

5. Submit within deadline

Missing deadlines can increase penalties.

Best Practices for Taxation Consultants

To avoid SEBI troubles:

  • Always maintain accurate records
  • Avoid giving unregistered investment advice
  • Report suspicious transactions
  • Educate clients about financial compliance
  • Stay updated on SEBI circulars and updates

A consultant’s reputation is like glass—once cracked, it's hard to fix. Staying compliant protects both clients and professionals.

Rights of Investors & Consultants Under the SEBI Act

Both parties enjoy rights such as:

  • Right to fair hearing
  • Right to legal representation
  • Right to receive transparent information
  • Right to access SEBI orders

SEBI follows principles of natural justice before passing any order.

Real-Life Case Scenarios & Lessons

Case 1: Unregistered Investment Advisor

A consultant offering stock tips without SEBI registration received a hefty fine.
Lesson: Don’t mix tax advice with unregistered investment services.

Case 2: SEBI PACL Claims

Tax consultants helped rural investors file refund claims using proper documentation.
Lesson: Proper guidance builds trust.

Case 3: Mismatched Records

A consultant received an SCN due to mismatches in reported investments.
Lesson: Keep immaculate records.

Conclusion

The SEBI Act is like a strong shield—protecting investors and ensuring fair market practices. For taxation consultants, understanding SEBI regulations isn’t just beneficial—it’s essential.

Whether it's the SEBI PACL case, navigating a show cause notice, or ensuring compliance, staying informed helps professionals guide their clients better and avoid legal trouble.

FAQs

1. What is the SEBI Act and why is it important?

The SEBI Act regulates India’s securities market to protect investors and ensure fair trading.

2. How does SEBI PACL relate to taxation consultancy?

Tax consultants help clients verify investment records, file claims, and ensure compliance with SEBI directions in fraud cases like PACL.

3. Why would someone receive a show cause notice from SEBI?

Notices are issued for violations such as unregistered advisory services, misleading statements, or compliance failures.

4. Can a taxation consultant give investment advice?

Only if registered with SEBI as an Investment Adviser. Otherwise, it may lead to penalties.

5. How should one respond to a SEBI show cause notice?

Read carefully, gather documents, draft a clear reply, seek expert help if needed, and submit before the deadline.

讨论 (0)1
登录或注册以继续
文章
· 17 hr 前 阅读大约需 11 分钟

Customizing API Test Code Generation with Mustache Templates

The previous article introduced IrisOASTestGen, a tool designed to generate REST API test code for InterSystems IRIS based on OpenAPI 2.0 specifications. It demonstrated how to scaffold test cases using the default templates bundled with OpenAPI Generator.

This follow-up focuses on the next natural step: customizing the generated test code.
By extending the code generation logic with Mustache templates, it becomes possible to express richer semantics, implement CRUD-aware tests, and create more meaningful test suites.

讨论 (0)1
登录或注册以继续
公告
· 18 hr 前

附完整报告下载 | InterSystems在《2025年ISG买家指南:数据平台》中被评为“典范级领导者”

InterSystems 在《ISG/Ventana 买家指南》(ISG/Ventana Buyers Guide)中综合排名第二——领先于微软、亚马逊云服务(AWS)、谷歌和IBM。

在以创新、敏捷和智能应用为特征的市场中,InterSystems IRIS作为一款完整的云优先数据平台脱颖而出。凭借其在适应性(Adaptability)、可管理性(Manageability)以及总拥有成本/投资回报率(TCO/ROI)方面的卓越得分,InterSystems在产品和客户体验方面均被公认为“典范级领导者(Exemplary Leader)”。

在《2025年ISG买家指南:数据平台》(2025 ISG Buyers Guide™)中,InterSystems被评为“综合领导者(Overall Leader)”,在24家全球供应商中位列第二,仅次于甲骨文,领先于谷歌云和微软等主要厂商。

欢迎下载《2025年ISG买家指南:数据平台》

数据平台不断发展,以支持智能应用和实时分析,随之而来,选择合适的供应商变得至关重要。本报告提供了一个基于研究的框架来指导您的决策,向您展示了为何InterSystems是数据驱动型企业的可靠合作伙伴。

您将在报告中了解到如下内容:

  • InterSystems IRIS如何借助AI实现高性能,以同时支持运营和分析工作负载。
  • InterSystems 为何能够在适应性(Adaptability)方面获评最高分,如何助力企业轻松实现定制和集成。
  • InterSystems在客户成功方面的投资如何转化为实际的投资回报率(ROI)。
  • 横向对比了超过25家领先的数据平台供应商
有什么想进一步了解的内容,欢迎给我们留言!
讨论 (0)1
登录或注册以继续
文章
· 十二月 9 阅读大约需 15 分钟

Implementing openEHR with IRIS for Health

Does your blood run cold when you hear about openEHR? Do archetypes give you goosebumps?

Overcome your fears with this article and master OpenEHR using the capabilities of InterSystems IRIS for Health!

What is openEHR?

openEHR is an open, vendor-neutral specification designed to represent, store, and exchange clinical information in a semantically rich and long-term sustainable way. Instead of defining fixed message structures (as many interoperability standards do) OpenEHR separates clinical knowledge from technical implementation through a multi-layered modelling approach.

At its core, openEHR relies on three fundamental concepts:

  • Reference Model (RM)
    A model that defines the core structures used in health records, such as Compositions, Entries, Observations, Evaluations, and Actions. The RM is deliberately generic and technology-agnostic.
  • Archetypes
    Machine-readable models (expressed in ADL) that define the detailed clinical semantics for a specific concept, such as a blood pressure measurement or a discharge summary. Archetypes constrain the RM and provide a reusable clinical vocabulary.
  • Templates (OPT files)
    Specializations built on top of archetypes. Templates tailor archetypes to a specific use case, system, or form (for example, a vital signs template, or a regional discharge note). Templates eliminate optionality and produce operational definitions that systems can safely implement.

Let's see an example of a RAW file base on a Composition (in JSON):

 
Spoiler

This layered modelling approach enables openEHR systems to remain stable over years—even decades—while allowing clinical models to evolve independently from the underlying software platform.

A key piece of the openEHR ecosystem is AQL (Archetype Query Language), the standard query language used to retrieve clinical data stored in openEHR repositories.

Archetype Query Language (AQL)

AQL is inspired by SQL but adapted to the openEHR information model. Instead of querying relational tables, AQL allows developers to query structured clinical content inside openEHR Compositions, taking advantage of archetype paths.

Key characteristics of AQL

  • Path-based querying: AQL uses archetype paths (similar to XPath) to navigate the internal structure of a Composition, such as:
    /content[openEHR-EHR-OBSERVATION.blood_pressure.v1]/data/events/time
  • Clinical semantic awareness: Queries refer to clinical concepts (archetypes, entry types, data points) rather than database column names.
  • Flexible WHERE clauses: AQL supports filtering on values within Compositions, e.g. systolic blood pressure > 140 or diagnoses matching a specific code.
  • Multi-composition queries: It can retrieve data across multiple Compositions, for example all Observations for a given patient over time.
  • Vendor-neutral: Any openEHR implementation that supports AQL should, in principle, accept the same queries.

Let's see an example of AQL:

SELECT
    c/uid/value AS composition_id,
    o/data[at0001]/events[at0006]/data[at0003]/value/magnitude AS systolic,
    o/data[at0001]/events[at0006]/data[at0004]/value/magnitude AS diastolic
FROM
    EHR e
    CONTAINS COMPOSITION c
    CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.blood_pressure.v1]
WHERE
    e/ehr_id/value = '12345'
AND
    o/data[at0001]/events[at0006]/time/value > '2023-01-01T00:00:00Z'

OpenEHR - FHIR comparation

Technically speaking, OpenEHR and FHIR are very very similar. Information based in documental format, API REST, etc. Let's see the main concepts of FHIR and OpenEHR and its correlation:

What do we need to implement openEHR in IRIS for Health?

RAW Composition Storage

  • Store incoming Compositions in RAW JSON or XML exactly as received.
  • No transformation should modify semantic content.
  • For our example we are going to work with JSON format, but there are multiple options.

REST API Services

Our implementation has to expose the following API REST:

EHR Services

To create and locate a patient's "history."

  • POST /ehr: Creates a new EHR.
  • GET /ehr/{ehr_id}: Retrieve EHR metadata.
  • GET /ehr?subject_id=?: Locate an EHR based on external identifiers.

Composition Services

To store patient's clinical information.

  • POST /ehr/{id}/composition: Commit a new composition in RAW format. Validate against OPT when possible
  • GET /composition/{version_uid}: Retrieve a specific version.
  • GET /ehr/{id}/compositions: List compositions for an EHR.
  • DELETE /composition/{uid}: Mark composition as deleted (logical delete).

AQL Query Endpoint

  • POST /query/aql: Accept an AQL query, translate to IRIS SQL or JSON-path-based lookup and return results in openEHR canonical JSON.

RAW Composition Validation

We have to force validation of RAW compositions based on OPT2 files, we can't save in our repository any JSON that we will receive.

Implementing openEHR in IRIS for Health

Well, to implement all the functionalities available in a openEHR server will take some time, so I'm going to focus in the core functionalities:

Using web application to deploy REST API Service

To publish a REST API is straight forward, we only need two components, a class extending %CSP.REST and a new record in the list of web applications. Let's see the header of our extended %CSP.REST class:

As you can see we have defined all the minimum required routes for our repository. We have all the managament of compositions, OPT2 files for RAW validations and finally, execution of AQL queries.

For our example we are not going to define any security configuration, but JWT Authentication is recommended.

Ok, we have our class and our %CSP.REST class, what else?

RAW validations

openEHR is anything but new, so you can guess that there are multiple libraries to support some functionalities like raws validations. For this example we've used and customized Arche library, an open source library developed in Java to validate rawcompositions against OPT2 files. The validator is a jar file configured from the External Language Server (by default on docker image deployment) and invoked before to save the raw using the JavaGateway functionality:

set javaGate = $system.external.getJavaGateway()
set result = javaGate.invoke("org.validator.openehr.Cli", "validate", filePath, optPath)

If the raw is validated the JSON document will be saved into the database.

JSON raw storage

We could use DocDB, but we want to leverage the performance of SQL databases. One of the biggest problems related with openEHR is the poor performance querying documents, so we are going to pre-process the compositions to get common information to all composition types to boost queries.

Our Composition class define the following properties:

Class OPENEHR.Object.Composition Extends (%Persistent, %XML.Adaptor) [ DdlAllowed ]
{
/// Description
Property ehrId As %Integer;
Property compositionUid As %String(MAXLEN = 50);
Property compositionType As %String;
Property startTime As %DateTime;
Property endTime As %Date;
Property archetypes As list Of %String(MAXLEN = 50000);
Property doc As %String(MAXLEN = 50000);
Property deleted As %Boolean [ InitialExpression = 0 ];
Index compositionUidIndex On compositionUid;
Index ehrIdIndex On ehrId;
Index ExampleIndex On archetypes(ELEMENTS);
}
  • ehrId: with the electronic health record of the patient.
  • compositionUid: composition identifier.
  • compositionType: type of composition saved.
  • startTime: time when the composition was created.
  • archetypes: list of archetypes contained on the composition.
  • doc: JSON format document.
  • deleted: boolean value for soft deletes.

The indexes will be used to improve the queries.

AQL support

As we said before AQL is a path-based query language. How could we emulate the same behaviour in IRIS for Health? Welcome to JSON_TABLE!

What is JSON_TABLE?

The JSON_TABLE function returns a table that can be used in a SQL query by mapping JSON values into columns. Mappings from a JSON value to a column are written as SQL/JSON path language expressions.

As a table-valued function, JSON_TABLE returns a table that can be used in the FROM clause of a SELECT statement to access data stored in a JSON value; this table does not persist across queries. Multiple calls to JSON_TABLE can be made within a single FROM clause and can appear alongside other table-valued functions.

We have implemented a ClassMethod in Python to translate AQL into SQL, but there is a problem, AQL is based on relative paths of the archetypes, not in absolute paths, so we need identify the absolute path for each archetype and join it with the relative path of the AQL.

How can we know the absolute path? Very easy! We can find it when the user save the OPT2 file for the composition into IRIS! As soon as we get the absolute path we save it into a CSV file specific for the composition (it would be saved into a global or any other way) so, we only have to get the absolute path from the specific composition file or, if the AQL doesn't define the composition, search into the available CSV files the absolute path for the archetypes of the AQL.

Let's see how it works. Here is an example of AQL to get all the diagnosis with a specific ICD-10 code:

SELECT
  c/uid/value AS comp_uid,
  c/context/start_time/value AS comp_start_time,
  dx/data[at0001]/items[at0002]/value/value AS diagnosis_text,
  dx/data[at0001]/items[at0003]/value/defining_code/code_string AS diagnosis_code
FROM EHR e
CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.diagnostic_summary.v1]
CONTAINS SECTION s[openEHR-EHR-SECTION.diagnoses_and_treatments.v1]
CONTAINS EVALUATION dx[openEHR-EHR-EVALUATION.problem_diagnosis.v1]
WHERE dx/data[at0001]/items[at0003]/value/defining_code/code_string
      MATCHES {'E11', 'I48.0'}
ORDER BY c/context/start_time/value DESC

The funcion Transform from OPENEHR.Utils.AuxiliaryFunctions class translates it into:

SELECT comp_uid, comp_start_time, diagnosis_text, diagnosis_code 
FROM ( 
    SELECT c.compositionUid AS comp_uid, 
        jt_root.comp_start_time AS comp_start_time, 
        jt_n1.diagnosis_text AS diagnosis_text, 
        jt_n1.diagnosis_code AS diagnosis_code 
    FROM OPENEHR_Object.Composition AS c, 
        JSON_TABLE( c.doc, '$' COLUMNS ( comp_start_time VARCHAR(4000) PATH
            '$.context.start_time.value' ) ) AS jt_root, 
        JSON_TABLE( c.doc, '$.content[*]?(@._type=="SECTION" && @.archetype_node_id==
            "openEHR-EHR-SECTION.diagnoses_and_treatments.v1").items[*]?
            (@._type=="EVALUATION" && @.archetype_node_id=="openEHR-EHR-EVALUATION.problem_diagnosis.v1")'
            COLUMNS ( 
                diagnosis_text VARCHAR(4000) PATH '$.data[*]?(@.archetype_node_id=="at0001").items[*]?
                    (@.archetype_node_id=="at0002").value.value', 
                diagnosis_code VARCHAR(255) PATH '$.data[*]?(@.archetype_node_id=="at0001").items[*]?
                    (@.archetype_node_id=="at0003").value.defining_code.code_string' ) ) AS jt_n1 
    WHERE ('openEHR-EHR-COMPOSITION.diagnostic_summary.v1' %INLIST (c.archetypes) 
        AND 'openEHR-EHR-EVALUATION.problem_diagnosis.v1' %INLIST (c.archetypes)) 
        AND (jt_n1.diagnosis_code LIKE '%E11%' OR jt_n1.diagnosis_code LIKE '%I48.0%') ) U 
ORDER BY comp_start_time DESC

Let's try our API REST with an AQL:

Success!

And now with a numeric comparation:

SELECT
  c/uid/value AS comp_uid,
  c/context/start_time/value AS comp_start_time,
  a/items[at0024]/value/magnitude AS creatinine_value,
  a/items[at0024]/value/units AS creatinine_units
FROM EHR e
CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.lab_results_and_medications.v1]
CONTAINS OBSERVATION o[openEHR-EHR-OBSERVATION.laboratory_test_result.v1]
CONTAINS CLUSTER a[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1]
WHERE a/items[at0001]/value/value = 'Creatinina (mg/dL)'
  AND a/items[at0024]/value/magnitude BETWEEN 1.2 AND 1.8
ORDER BY c/context/start_time/value DESC

Transformed into:

SELECT comp_uid, comp_start_time, ldl_value, ldl_units 
FROM ( 
    SELECT c.compositionUid AS comp_uid, jt_root.comp_start_time AS comp_start_time,
        jt_n1.ldl_value AS ldl_value, jt_n1.ldl_units AS ldl_units 
    FROM OPENEHR_Object.Composition AS c, 
        JSON_TABLE( c.doc, '$' COLUMNS ( comp_start_time VARCHAR(4000) 
            PATH '$.context.start_time.value' ) ) AS jt_root, 
        JSON_TABLE( c.doc, '$.content[*]?(@._type=="OBSERVATION" && 
            @.archetype_node_id=="openEHR-EHR-OBSERVATION.laboratory_test_result.v1")
                .data.events[*]?(@._type=="POINT_EVENT").data.items[*]?(@._type=="CLUSTER" &&
                @.archetype_node_id=="openEHR-EHR-CLUSTER.laboratory_test_analyte.v1")'
                COLUMNS ( 
                    ldl_value NUMERIC PATH '$.items[*]?
                        (@.archetype_node_id=="at0024").value.magnitude', 
                    ldl_units VARCHAR(64) PATH '$.items[*]?
                        (@.archetype_node_id=="at0024").value.units', 
                    _w1 VARCHAR(4000) PATH '$.items[*]?
                        (@.archetype_node_id=="at0001").value.value' ) ) AS jt_n1 
    WHERE ('openEHR-EHR-COMPOSITION.lab_results_and_medications.v1' %INLIST (c.archetypes) 
        AND 'openEHR-EHR-OBSERVATION.laboratory_test_result.v1' %INLIST (c.archetypes) 
        AND 'openEHR-EHR-CLUSTER.laboratory_test_analyte.v1' %INLIST (c.archetypes)) 
        AND jt_n1._w1 = 'LDL (mg/dL)' AND jt_n1.ldl_value <= 130 ) 
    U ORDER BY comp_start_time DESC

Another resounding success!

Conclusions

Well, as you can see in this example, InterSystems IRIS for Health provide to you of all the tools required to implement and deploy an openEHR repository. If you have any question don't hesitate to write a comment!

Disclaimer

The associated code is just a proof of concept, It does not aim to implement a repository with all the functionalities but to demonstrate that it is perfectly possible with InterSystems IRIS for Health. Enjoy!

讨论 (0)1
登录或注册以继续