User bio
 
EN
Specialized engineer in database management systems, I have participated in the development of applications for several software editors in the medical field or healthcare end-users, notably at the head office of the APHP.

To complete my expertise in data storage, I joined the editor Oracle, before joining InterSystems in 2001.

My skills in data processing have therefore been extended, from multi-model storage, interoperability (and more particularly on health exchange standards), to real-time analysis and artificial intelligence (AI / ML), so as to cover a broad spectrum of the data lifecycle in all industries.

 
FR
Ingénieur spécialisé en systèmes de gestion de bases de données, j'ai participé aux développements d'applications de plusieurs éditeurs du domaine médical ou d'établissements de santé, notamment au siège de l'APHP.

Pour compléter mon expertise en stockage de données, j'ai ensuite intégré l'éditeur Oracle, avant de rejoindre InterSystems France dès 2001.

Mes compétences en traitement de la donnée se sont dès lors étendues, depuis le stockage multi-modèles, l'interopérabilité (et plus particulièrement sur les standards d'échanges en santé), jusqu'à l'analyse en temps-réel et à l'intelligence artificielle (IA/ML), de manière à couvrir un large spectre du cycle de vie de la donnée.

 

Show all
Member since Dec 2, 2015
Replies:

Many thanks @Alex Woodhead for your article.

For those who want to start with Alex's example, you can use the code below or online (process + production)

/// 
Class python.process.demo Extends Ens.BusinessProcessBPL
{

/// BPL Definition
XData BPL [ XMLNamespace = "http://www.intersystems.com/bpl" ]
{
<process language='python' request='Ens.StringRequest' response='Ens.StringResponse' height='2000' width='2000' >
<pyFromImport>
import requests
</pyFromImport>
<sequence xend='200' yend='1050' >
<switch name='What Drink' xpos='200' ypos='250' xend='200' yend='500' >
<annotation><![CDATA[looking for Drink keyword in request]]></annotation>
<case condition='request.StringValue.lower().find("coffee")&gt;0' name='is coffee' languageOverride='python' >
<assign name="Coffe" property="response.StringValue" value="&quot;Coffee&quot;" action="set" languageOverride="objectscript" xpos='200' ypos='400' />
</case>
<case condition='request.StringValue.lower().find("tea")&gt;0' name='is tea' languageOverride='python' >
<assign name="Tea" property="response.StringValue" value="&quot;Tea&quot;" action="set" languageOverride="objectscript" xpos='470' ypos='400' />
</case>
<default>
<assign name="Chocolate" property="response.StringValue" value="&quot;Chocolate&quot;" action="set" languageOverride="objectscript" xpos='740' ypos='400' />
</default>
</switch>
<if name='Is White' condition='request.StringValue.lower().find("black")==-1' languageOverride="python" xpos='200' ypos='600' xend='200' yend='850' >
<annotation><![CDATA[looking for absence of keyword "black" in request]]></annotation>
<true>
<assign name="Add Milk" property="response.StringValue" value="response.StringValue + &quot; MILK&quot;" action="set" languageOverride="python" xpos='335' ypos='750' />
</true>
</if>
<assign name="Add Hot Water" property="response.StringValue" value="response.StringValue + &quot; HOT WATER&quot;" action="set" languageOverride="python" xpos='200' ypos='950' />
</sequence>
</process>
}

Storage Default
{
<Type>%Storage.Persistent</Type>
}

}

I got an interesting answer from chat.fhir.org

Lloyd McKenzie says : 

R5 has a bunch of fixes and enhancements and is 'closer' to what the normative/locked down versions of each of the resources is likely to be. So, all things being equal, R5 is a better bet. However, the amount of implementation support for R5 is considerably less than for R4 and some jurisdictions may opt to not support R5 at all. (E.g. the U.S.) Therefore consider who you're going to need to share with.

The migration effort really depends on what you're implementing. Some resources (e.g. Patient, Observation, etc.) have changed very little - and the changes that did occur may not impact your application because you don't use those elements. Other resources have changed more radically. The amount of effort involved also depends on how your software is architected. You can see lists of changes and maps between R4 and R5 in the R5 spec on each resource page.

Finally, 'repository' is not the same as 'interface'. It's perfectly possible to expose both an R4 and an R5 API on the same internal data store. Typically you'll have to map between your internal storage representation and your FHIR API regardless of what version you support, so two interfaces just means two sets of maps.

Hi Zhang,

you'll find a JDBC example below : 

import java.sql.Blob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class RetrieveBlob {

  public static void main(String[] args) throws Exception {
    // Replace with your connection details
    String url = "jdbc:mysql://localhost:3306/your_database";
    String username = "your_username";
    String password = "your_password";

    Connection conn = DriverManager.getConnection(url, username, password);

    String sql = "SELECT image FROM your_table WHERE id = ?";
    PreparedStatement stmt = conn.prepareStatement(sql);
    stmt.setInt(1, 1); // Replace with the ID you want to query

    ResultSet rs = stmt.executeQuery();

    if (rs.next()) {
      Blob blob = rs.getBlob("image"); // Replace "image" with your column name

      // Option 1: Get Bytes
      byte[] imageBytes = blob.getBytes(1, (int) blob.length()); // Get all bytes
      // Process the imageBytes byte array

      // Option 2: Stream Processing
      // InputStream in = blob.getBinaryStream();
      // ... process the stream
    }

    rs.close();
    stmt.close();
    conn.close();
  }
}
Open Exchange applications:
Certifications & Credly badges:
Global Masters badges:
Followers:
Following: