Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Story/1650/la weight conversion #1708

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package gov.hhs.cdc.trustedintermediary.etor.ruleengine.transformation.custom;

import gov.hhs.cdc.trustedintermediary.etor.ruleengine.transformation.CustomFhirTransformation;
import gov.hhs.cdc.trustedintermediary.wrappers.HealthData;
import java.util.Map;
import org.hl7.fhir.r4.model.Bundle;

public class MultiplyObservationValue implements CustomFhirTransformation {

@Override
public void transform(HealthData<?> resource, Map<String, Object> args) {
var bundle = (Bundle) resource.getUnderlyingData();

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'Bundle bundle' is never read.
}
}
17 changes: 17 additions & 0 deletions etor/src/main/resources/transformation_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,23 @@
}
}
]
},
{
"name": "laphlOmlConvertKilogramsToGrams",
"description": "Convert kilograms to grams on Observations with an OBX-3.1 value of '8339-4' or '58229-6'",
"message": "",
"conditions": [
"MSH-33 is 13^1.2.840.114350.1.13.286.2.7.2.695071^ISO //@todo this is just the description, replace with actual code"
],
"rules": [
{
"name": "MultiplyObservationValue",
"args": {
"multiplier": "1000",
"unitText": "g^gram^UCUM //@todo this is going to OBX-6 think how to send these values"
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package gov.hhs.cdc.trustedintermediary.etor.ruleengine.transformation.custom

import gov.hhs.cdc.trustedintermediary.context.TestApplicationContext
import gov.hhs.cdc.trustedintermediary.external.hapi.HapiFhirHelper
import gov.hhs.cdc.trustedintermediary.external.hapi.HapiFhirResource
import gov.hhs.cdc.trustedintermediary.external.hapi.HapiHelper
import org.hl7.fhir.r4.model.Bundle
import org.hl7.fhir.r4.model.Observation
import spock.lang.Specification

class MultiplyObservationValueTest extends Specification {
def transformClass

def setup() {
TestApplicationContext.reset()
TestApplicationContext.init()
TestApplicationContext.injectRegisteredImplementations()

transformClass = new MultiplyObservationValue()
}

def "When an observation has the expected codes, it should multiply its value"() {
}
}
14 changes: 14 additions & 0 deletions examples/Ochsner/001_Ochsner_OML_O21_0_initial_message.hl7
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MSH|^~\&|13^1.2.840.114350.1.13.286.2.7.2.695071^ISO|4169|Natus.LA.STAG^2.16.840.1.114222.4.3.26.3.2|Louisiana Office of Public Health Laboratory^2.16.840.1.114222.4.3.22.17.1.1|20241113131917|739|OML^O21^OML_O21|29|D|2.5.1|||AL|NE
PID|1|10453873^^^MRN^MRN|10453873^^^MRN^MRN||PKUSS^GIRL BEAKER||20241108103900|F||2054-5^Black or African-American^CDCREC|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^P^^LAFAYETTE|LAFAYETTE|(557)559-5559^P^PH||ENGLISH|Single|||000-00-0000||PKUSS^BEAKER^MOM^|HISPANIC||Y|1|||||N
PD1||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
NK1|1|PKUSS^BEAKER^MOM^|Mother|1202 Coolidge St.^^LAFAYETTE^LA^70503^US|(557)559-5559^^PH
PV1|1||^8288^24826^^^^^^^^||||||||||||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI
IN1|1|114420|308114401|BLUE CROSS BLUE SHIELD|P. O. BOX 98029^^BATON ROUGE^LA^70898-9029^||(800)495-2583|||||||||PKUSS^GIRL^BEAKER^|Self|20241108|1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|||1||||||||||||||||||||None|F
GT1|1|100251815|PKUSS^BEAKER^MOM^||1202 COOLIDGE ST.^^LAFAYETTE^LA^70503^US^^^LAFAYETTE|(557)559-5559^P^PH||19891224|F|P/F|MOT|999-99-9999||||||||Full
ORC|NW|243217771^EPC||71414746|||^^^20241113131800^^Routine^^||20241113131721|739^BEAKER^PHLEBOTOMIST^^||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|^^^^^^^^OLGH LABOR AND DELIVERY|(504)391-8896||||OCH155315^OCH155315|||OCHSNER LAFAYETTE GENERAL MEDICAL HOSPITAL^D^^^^OCHSNER HEALTH SYSTEM^XX^^^30100|1214 COOLIDGE BLVD^^LAFAYETTE^LA^70503-2621^US^B^^LAFAYETTE|(337)289-7991^^PH|120 OCHSNER BLVD^SUITE 360^GRETNA^LA^70056^^C|||||I|VERBAL WITH
OBR|1|243217771^EPC|1000319697^Beaker|54089-8^Newborn screening panel American Health Information Community (AHIC)^LN^^^^2.72||20241113131800|20241113131859|||739^BEAKER^PHLEBOTOMIST^^|Lab Collect|||||1184608010^DREWITZ^TROY^U.^^^^^NPI^^^^NPI|(504)391-8896|||193989||||Lab|||^^^20241113131800^^Routine^^|||||||||20241113131800
OBX|1|ST|57714-8^Gestational Age (Weeks + Days)||384||||||F|||20241113131719|||||||||||||||QST
OBX|2|ST|82312-0^Infant Blood Transfusion?||No||||||F|||20241113131719|||||||||||||||QST
OBX|3|ST|67704-7^All Feeding Since Birth||Human Milk \T\ Formula||||||F|||20241113131719|||||||||||||||QST
OBX|4|ST|PLT3280^Name of Formula(s)||Enfomil, Similac, Katrina||||||F|||20241113131719|||||||||||||||QST
SPM|1|^24LADH-318X0008&Beaker||BLOOD^Blood||||BLOOD^Blood|||||||||20241113131859|20241113131900||Y|||||||||||||||S
Loading
Loading