Application for generating HL7 messaging tests.
We recently uploaded to OpenExchange a small application that I developed a while ago (and that @Jose-Tomas.Salvador improved and refined) that I often use when I need to generate large volumes of HL7 messaging.
The application is developed in NodeJS and works by generating patient and doctor data from seed files that you can modify to your liking to personalize the generated patients. The application will use the generated patients to prepare different types of HL7 messages. At the moment the application can generate the following types of messages. If the number of requested messages exceeds the number of patients, the messages will be generated on them, creating several messages for the same patient with different times.
ADT^A08
Update patient data with associated observations
MSH|^~\&|HIS|HULP|EMPI||20240305120344||ADT^A08|176690|P|2.5.1
EVN|A08|20240305120344
PID|||1556655212^^^SERMAS^SN~230546^^^HULP^PI||GARCÍA PÉREZ^JUAN^^^||20150403|M|||PASEO PEDRO ÁLVAREZ 1951 CENTRO^^LEGANÉS^MADRID^28379^SPAIN||555283055^PRN^^JUAN.GARCIA@YAHOO.COM|||||||||||||||||N|
PV1||N
OBX|1|NM|162986007^Pulso^SNM||79|^bpm|||||F|||20240305120344
OBX|2|NM|105723007^Temperatura^SNM||37|^Celsius|||||F|||20240305120344
OBX|3|NM|163030003^Presión sanguínea sistólica^SNM||139|^mmHg|||||F|||20240305120344
OBX|4|NM|163031004^Presión sanguínea diastólica^SNM||91|^mmHg|||||F|||20240305120344ADT^A28
Add patient information.
MSH|^~\&|HIS|HULP|EMPI||20240305120319||ADT^A28|377160|P|2.5.1
EVN|A28|20240305120319|20240305120319|1
PID|||1556655212^^^SERMAS^SN~922210^^^HULP^PI||GARCÍA PÉREZ^JUAN^^^||20150403|M|||PASEO PEDRO ÁLVAREZ^1951 CENTRO^LEGANÉS^MADRID^28379^SPAIN||555283055^PRN^^JUAN.GARCIA@YAHOO.COM|||||||||||||||||N|
PV1||N
AL1|1|MA|^Polen de gramineas^|SV^^||20440605172902SIU^S12
New patient appointment.
MSH|^~\&|HIS|HULP|EMPI||20240305120758||SIU^S12|298114|P|2.5.1
SCH|607860^607860|92610^92610|||607860|TRA02^Visita de revisión de traumatología|Visita sucesiva trauma|TRA02|15|m|^^15^20240305161758^20240305163258|||||^GARCÍA ROJO^ÁLVARO^||||^GARCÍA GARCÍA^DIANA^|||||Scheduled
PID|||1556655212^^^SERMAS^SN~922210^^^HULP^PI||GARCÍA PÉREZ^JUAN ALBERTO^^^||20150403|M|||CALLE MARÍA JUAREZ 232A^^MÓSTOLES^MADRID^28045^SPAIN||555283055^PRN^^JUAN.GARCIA@YAHOO.COM|||||||||||||||||N|
PV1|1|O|||||^ ^^^MD^^^^|^ ^^^MD^^^^||||||||||||||||||||||||||||||||||||||||||||
RGS|1|A
AIS|1|A|^|20240305161758|||15|m^Minutes||Scheduled
AIL|1|A|TRA02^^^|^||20240305161758|||15|m^Minutes||Scheduled
AIP|1|A|1^ ^^A^MD^^^^|D^, ||20240305161758|||15|m^Minutes||ScheduledORU^R01
Unsolicited transmission of requested Observation
MSH|^~\&|HIS|CHGM|EMPI||20240305121511||ORU^R01|16955|P|2.5.1
PID|||1556655212^^^SEGSOC^SSN~230546^^^CHGM^PI||GARCÍA PÉREZ^JUAN^^^||20150403|M|||PASEO PEDRO ÁLVAREZ 1951 CENTRO^^LEGANÉS^MADRID^28379^SPAIN||555283055^PRN^^JUAN.GARCIA@YAHOO.COM|||||||||||||||||N|
PV1||O|||||079492022O^GARCÍA FERNÁNDEZ^PETRONILA^^MD^^^^|||||||1|||||450908|||||||||||||||||||||||||20240305121511|20240305121511
ORC|1|193683|8680||||^^^20240305121511||20240305121511|||0631438066E^MARGALL GARCÍA^MARCOS^^MD^^^^|CHGM||||||||CHGM||||||||LAB
OBR|1|193683|8680|LAB^LABORATORY^L||||||||||||0631438066E^MARGALL GARCÍA^MARCOS^^MD^^^^|||||||||F
OBX|1|NM|WBC^Conteo de glóbulos blancos^SNM||2.0|10(9)/L|4.0-10.6||||F|||20240305121511
OBX|2|NM|RBC^Conteo de glóbulos rojos^SNM||3.0|10x12/L|4.5-5.9||||F|||20240305121511
OBX|3|NM|HGB^Hemoglobina^SNM||13.0|g/dL|12.0-16.0||||F|||20240305121511
OBX|4|NM|HCT^Hematocrito^SNM||48.0|%|36.0-46.0||||F|||20240305121511
OBX|5|NM|MCV^Volumen celular medio^SNM||75|fL|80-100||||F|||20240305121511
OBX|6|NM|MCH^Hemoglobina celular media^SNM||22.0|pg|26-34||||F|||20240305121511
OBX|7|NM|MCHC^Concentración de hemoglobina celular media^SNM||24.0|g/dL|31-37||||F|||20240305121511
OBX|8|NM|RDW^Ancho de distribución eritrocitaria^SNM||15.0|%|11.5-14.5||||F|||20240305121511
OBX|9|NM|PLT^Conteo de plaquetas - Automatizado^SNM||284|10(9)L|140-440||||F|||20240305121511
OBX|10|NM|MPV^Volumen de plaquetas medio^SNM||10.0|UMx1000|8-11||||F|||20240305121511
OBX|11|NM|NE^# Neutrófilos^SNM||6.00|#|1.8-8.5||||F|||20240305121511
OBX|12|NM|LY^# Linfa^SNM||2.00|#|0.8-3.5||||F|||20240305121511
OBX|13|NM|MO^# Monocitos^SNM||0.00|#|0.2-0.9||||F|||20240305121511
OBX|14|NM|EO^# Eosinófilos^SNM||0.00|#|0.0-0.6||||F|||20240305121511
OBX|15|NM|BA^# Basófilos^SNM||0.00|#|0.0-0.2||||F|||20240305121511
OBX|16|NM|PERCENTNE^% Neutrófilos^SNM||57.0|%|40-80||||F|||20240305121511
OBX|17|NM|PERCENTLY^% Linfa^SNM||19.0|%|15-45||||F|||20240305121511
OBX|18|NM|SEG^Neutrófilos segmentados^SNM||55.0|%|50-75||||F|||20240305121511
OBX|19|NM|LYMPHS^Linfocitos^SNM||37.0|%|20-44||||F|||20240305121511
OBX|20|NM|MONO^Monocitos^SNM||2.0|%|2-9||||F|||20240305121511
OBX|21|NM|ATYP^Linfocitos atípicos^SNM||33|%|0-100||||F|||20240305121511How it works
You can read in the README.md associated with the project how to deploy the application. To access it you will only have to enter the url in your internet browser: http://localhost:5000 and the main window will automatically open.
.png)
Below you can indicate the number of patient you want and the number of doctors. With both files generated you can generate as many messages as you want of the types described above.
You have the possibility of generating messages for different assigning authorities (the organization that assigns the history number) as well as different patient identifiers (social security number, NIF, etc...).
As you can see, it is a basic application, feel free to modify what you want about it and adapt it to your needs and if you have any questions about it, write them in the comments.
Pd.: Seed files are in spanish, sorry!
Comments
Very useful! Appreciate the ability to set the AA/Facility We've been looking for utilities like this for testing.