New post

Find

Announcement
· May 22, 2023

InterSystems Testing Manager - a new VS Code extension for the %UnitTest framework

If you have already built unit tests using the %UnitTest framework, or are thinking about doing so, please take a look at InterSystems Testing Manager.

Without leaving VS Code you can now browse your unit tests, run or debug them, and view previous run results.

InterSystems Testing Manager works with both of the source code location paradigms supported by the ObjectScript extension. Your unit test classes can either be mastered in VS Code's local filesystem (the 'client-side editing' paradigm) or in a server namespace ('server-side editing'). In both cases the actual test runs occur in a server namespace.

Feedback welcome.

26 Comments
Discussion (26)7
Log in or sign up to continue
Discussion (0)1
Log in or sign up to continue
Question
· May 17, 2023

Looping through repetitive HL7 segment groups in business rule

Hi,

we get HL7 ORU messages from a laboratory system. Messages that do not contain an observation date should not be forwarded to the business operation. My problem is that the observation date can be in any repetition of the ORCgrp. How can I loop through the ORCgrps in a business rule?

Regards

Robert

7 Comments
Discussion (7)4
Log in or sign up to continue
Article
· May 13, 2023 2m read

a virgin Jupyter-Notebook

Following one package from the last contest I met a strange problem.
There was the requirement to install jupyter-notebook
I work on Windows and there was some old Python installed
No big surprise: Installation of jupyter-notebook failed
Therefore, the latest version of Python was installed fast.

Big disappointment: the installation of jupyter-notebook failed again!
Because the new installation of Python didn't upgrade the old one.
And also the environment variable PATH was not cleaned
This was not obvious immediately and took endless time and effort.

Several cycles of installation and de-installations followed.
After a lot of manual intervention in Windows settings finally 
allowed Jupyter-Notebook to start.
Though it was not willing to operate in the virtual environment (venv).

This was the point when I had just enough.
I said to myself: "What you do here is just nonsense!"
After cleaning my workspace and the traces of all the failing
installations (several GB) I took a different approach.

  • The idea was to use my well-working Docker installation: 
  • Find a simple container with installed Jupyter-Notebook
  • Fill it with all the required Python modules
  • Forget about venv. More virtual than a Docker container is not possible.
  • Link your local directory into the container. So copying into the container is not necessary.
  • Not to forget the mapping for default port 8888 

The Docker container was built and running in no time 
compared to all my previous attempts. 
It was composed of these 2 files:

Dockerfile

ARG IMAGE=jupyter/base-notebook
FROM $IMAGE
USER root
COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt

If you don't have requirements just un-comment the last 2 lines.

docker-compose.yaml

version: '3.9'
services:
  notebook:
    build:
      context: .
      dockerfile: Dockerfile
    entrypoint: jupyter notebook
                --allow-root
                --no-browser
                --ip 0.0.0.0
                --port 8888
                --NotebookApp.token=''
                --NotebookApp.password=''
                --notebook-dir=/ext
    ports:
    - 8888:8888
    volumes:
    - ./:/ext
    

And now after starting the container your Jupyter-Notebook is ready for access.

http://localhost:8888/

This was definitely easier than my previous attempts.
I felt it as a personal success, as this was a totally new territory for me.
 

Discussion (0)1
Log in or sign up to continue
Article
· May 12, 2023 2m read

um Jupyter-Notebook vergine

Seguindo um pacote do último concurso, encontrei um problema estranho.
Havia o requisito para instalar o jupyter-notebook.
Eu trabalho no Windows e havia algum Python antigo instalado.
Nenhuma grande surpresa: a instalação do jupyter-notebook falhou
Portanto, a versão mais recente do Python foi instalada rapidamente.

Grande decepção: a instalação do jupyter-notebook falhou novamente!
Porque a nova instalação do Python não atualizou a antiga.
E também a variável de ambiente PATH não foi limpa
Isso não ficou óbvio imediatamente e exigiu muito tempo e esforço.

Seguiram-se vários ciclos de instalação e desinstalação.
Depois de muita intervenção manual nas configurações do Windows,
Finalmente permitiu que o Jupyter-Notebook fosse iniciado.
Embora não estivesse disposto a operar no ambiente virtual (venv).

Este foi o ponto em que eu tinha apenas o suficiente.
Eu disse a mim mesmo: "O que você faz aqui é um absurdo!"
Depois de limpar meu espaço de trabalho e os rastros de todas as
instalações com falha (vários GB), adotei uma abordagem diferente.

  • Minha ideia era usar minha instalação do Docker que funciona bem.
  • Encontre um contêiner simples com o Jupyter-Notebook instalado
  • Preencha-o com todos os módulos Python necessários
  • Vincule seu diretório local ao contêiner. Portanto, uma cópia no contêiner não é necessária.
  • Para não esquecer o mapeamento para a porta padrão 8888

O contêiner do Docker foi construído e executado em tempo zero
em comparação com todas as minhas tentativas anteriores.
Foi composto por estes 2 arquivos:

Dockerfile

ARG IMAGE=jupyter/base-notebook
FROM $IMAGE
USER root
COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt

Se você não tiver requisitos, apenas descomente as 2 últimas linhas.

docker-compose.yaml

version: '3.9'
services:
  notebook:
    build:
      context: .
      dockerfile: Dockerfile
    entrypoint: jupyter notebook
                --allow-root
                --no-browser
                --ip 0.0.0.0
                --port 8888
                --NotebookApp.token=''
                --NotebookApp.password=''
                --notebook-dir=/ext
    ports:
    - 8888:8888
    volumes:
    - ./:/ext
    

E agora, depois de iniciar o contêiner, seu Jupyter-Notebook está pronto para acesso.

http://localhost:8888/

Isso foi definitivamente mais fácil do que minhas tentativas anteriores.
Eu senti isso como um sucesso pessoal,
pois este era um território totalmente novo para mim.

Discussion (0)2
Log in or sign up to continue