Thanks Robert. But if I do the lookup tables manually in major sites go-lives, I'd simply use Excel and Notepad++. It's not just quicker and simpler; also most real sites under RFC control would not allow you do such dozens of DSNs in Live environments, even for a hot fix in go-live deadlines. BTW, I love to work with engineers too, and LLMs and AIs. I never saw any engineer in deliberate competition with GPTs yet, so far. 

And please see the Disclaimer section at its end. It's not the purpose of this post. 

You are absolute right, Tete. It's just a boilerplate structure. And apparently it does JavaScript and Python better than COS for now. Due to the nature of current ChatGPT, every time it would compose slightly different answers & samples for you, so unfortunately I can't replicate the answer - otherwise I'd love to feed your exact comments back into it, to see whether its Reinforcement Learning style part is able to follow up and really "learn", and how much it could revise its sample step by step to an accurately working & testable sample. I assume there seems no reason it can't  pick it up over the time.

For example, if I ask the same question again, it would answer slightly differently

ChatGPT:

Sure, here's an example of how to transform an HL7 V2 message to a FHIR STU3 Patient resource using the Data Transformation Language (DTL) in InterSystems Caché:

  1. First, create a new DTL class in InterSystems Caché.
  2. In the DTL class, define two message classes: one for the input HL7 V2 message and one for the output FHIR STU3 resource. Here's an example of what the message classes might look like:
Class HL7v2Message Extends %SerialObject
{
Property MSH As %String(MAXLEN = 100, TRUNCATE = 1, XMLPROJECTION = "attribute") [ Required ];
Property PID As %String(MAXLEN = 500, TRUNCATE = 1, XMLPROJECTION = "element") [ Required ];
}

Class FHIRPatient Extends %SerialObject
{
Property resourceType As %String(MAXLEN = 100, TRUNCATE = 1, XMLPROJECTION = "attribute") [ InitialExpression = "Patient" ];
Property id As %String(MAXLEN = 100, TRUNCATE = 1, XMLPROJECTION = "attribute");
Property active As %Boolean(XMLPROJECTION = "element");
Property name As list Of FHIRHumanName(XMLPROJECTION = "element");
Property telecom As list Of FHIRContactPoint(XMLPROJECTION = "element");
Property gender As %String(MAXLEN = 10, TRUNCATE = 1, XMLPROJECTION = "element");
Property birthDate As %String(XMLPROJECTION = "element");
}
  1. Define a new DTL transformation method in the class that takes an input HL7v2Message object and returns a FHIRPatient object. Here's an example of what the DTL method might look like:
Method HL7v2ToFHIRPatient(input As HL7v2Message) As FHIRPatient [ CodeMode = objectgenerator, Internal ]
{
    Set output = ##class(FHIRPatient).%New()
    
    // Parse MSH segment
    Set output.id = input.MSH.%split("^",1)
    
    // Parse PID segment
    Set output.active = 1 // patient is always active in HL7 v2
    Set output.name = ..ParseName(input.PID.%split("^",5))
    Set output.telecom = ..ParseTelecom(input.PID.%split("^",13))
    Set output.gender = input.PID.%split("^",8)
    Set output.birthDate = ..ParseDate(input.PID.%split("^",7))
    
    Quit output
}

Method ParseName(name As %String) As list Of FHIRHumanName
{
    Set names = ##class(%List).%New()
    
    Set nameObj = ##class(FHIRHumanName).%New()
    Set nameObj.family = name.%split("^",1)
    Set nameObj.given = name.%split("^",2)
    
    Do names.Insert(nameObj)
    
    Quit names
}

Method ParseTelecom(telecom As %String) As list Of FHIRContactPoint
{
    Set contacts = ##class(%List).%New()
    
    Set contactObj = ##class(FHIRContactPoint).%New()
    Set contactObj.system = "phone"
    Set contactObj.value = telecom.%split("^",1)
    
    Do contacts.Insert(contactObj)
    
    Quit contacts
}

Method ParseDate(date As %String) As %String
{
    Set year = $extract(date, 1, 4)
    Set month = $extract(date, 5, 6)
    Set day = $extract(date, 7, 8 ... ...
    ... ...

Here we seem to see, it doesn't learn much about the internal class library yet - it seems trying to construct FHIR etc classes from the ground up without knowing the existing FHIR plumbing yet. Not sure how it passed the Google L3 Engineer test, but it would fail the HealthConnect certification for now - it has a long way to learn, indeed, possibly also depending on whether we really want it to learn too quick? :)

Interesting test. I tested your question: can you encrypt "the cat sat on the mat" by Caesar cipher with a shift of 7? It gives detailed steps and got almost every letter correct in the step, but give the final string wrong. Almost the same symptom as my senior mind for now.

Then I up-geared the question: Can you generate a function in Python to encrypt "the cat sat on the mat" in Caesar cipher by shift 7? It did generate the Python function looking OK, and then it also generated a COS function looking largely a right boilerplate in about 35 seconds.

My personal take on this might be:  If it can do the job, and explains how it's done step by step, I would think it's a very helpful tool. But if it can manufacture a tool of my choice to do the job,  I would kind of believe it's more like a human engineer - it gives me the tool for my review, revising and approval; then I can also choose to use the tool to do the jobs with engineering certainty, repeatability, accuracy and transparency, which saved me about 90% of previous engineering efforts. I think this level of progress to intelligence might be slightly more profound?    

And thanks - indeed I am also interested in knowing how to test its limits of capability and incapability at either end. :) 

Great work. Happened to have noticed it's needed to un-handle the response at least in the new IRIS versions: 

/// Un-handle a 'Response'
Method OnResponse(request As %Library.Persistent, ByRef response As %Library.Persistent, callrequest As %Library.Persistent, callresponse As %Library.Persistent, pCompletionKey As %String) As %Status
{
// Subclass responsibility
Quit $$$OK //$$$EnsError($$$NotImplemented)
}

I saw this news today. Impressed with Epic's speed to real-world use cases:

https://www.healthcareitnews.com/news/university-minnesota-epic-build-ne...

U of M and Fairview teams will now make the AI tool available for free in the Epic App Orchard.

Drew McCombs, an Epic developer who worked closely with the U of M and Fairview, says customers can install the algorithm via Epic's Cognitive Computing platform and begin end-user training in as few as 10 days.

"Our Cognitive Computing platform quickly pulls the X-ray, runs the algorithm, and shows the resulting prediction directly in Epic software that doctors, nurses, and support staff use every day – speeding up treatment and helping protect staff. The algorithm is available to healthcare organizations around the world that use Epic."

Complementary note for later ref - add in a bit Model Explanatory sample by i.e. SHAP for traditional ML for Random Forrest Classifier at the end of section "Run Training Comparisons of Various Models:"

import shap
# Extract shap values
explainer   = shap.TreeExplainer(models[6][1])  # model[6] is RF, model[7] is XGB
shap_values = explainer.shap_values(X_train_res) 

# Average feature contribution
plt.title('Average Feature Contribution for each Class')
shap.summary_plot(shap_values, X_train_res, plot_type="bar")

# Granular feature contribution plot
plt.title('Feature Contribution According to Value')
shap.summary_plot(shap_values[1], X_train_res, plot_size = (20,10))

Missing Note: Age_Percentile should be included and encoded as well. Experiment function to be included.

Hi Sue,

I believe our ISC UK Sales Engineer has managed to help you solve the issue, so here I just follow up to post the corresponding answer in the hope to close this query.   

1. Settings for the EmailAlert Business Operation

SMTP Server send.nhs.net

SMTP Port 587

CredentialsValid NHS Mail Username/Password Credentials

SSL Configuration Name of Configuration suffixed with *

Note: A "*" needs to be appended to the SSL Configuration name (an example as below). The documentation states: “this supports the special case when you want the server interaction to begin on a normal TCP socket and then switch to SSL/TLS on the same port as the normal socket.” 

2. SSL Configuration sample for NHSMail (SMTPS on mail server port 587)

Please let us know if there are further issues with any other scenario of NHS Mail configurations.

Kind Regards.