ChatGPT and MUMPS

191 views
Skip to first unread message

Eddie Hagood

unread,
Feb 10, 2023, 9:44:42 PM2/10/23
to Hardhats
Hey guys,
      Interesting discovery I made the other day, that I thought someone might think was cool. After listening to a podcast about ChatGPT, and finding out that it could write code... I thought I would put it to the test: Can it write MUMPS code? 

I started it off with a simple Hello World
CaptureGPT.JPG
I was impressed that it gave an explanation with the code. I upped the demand a bit to see if it would be able to pull from a Fileman file. I had to expressly tell it to not use an external function, or it would reference a nonexistent function:
(SET DFN=$$GETDFN^XYZ(DFN) ; get patient DFN from parameter SET NAME=$$GETNAME^XYZ(DFN,2) ; get patient name from file 2
WRITE "Patient Name: ",NAME,! QUIT

Note: The GETDFN^XYZ and GETNAME^XYZ functions are assumed to exist and retrieve the respective data from the relevant file(s) based on the patient DFN.)

CaptureGPT1.JPG


For my final test, I wanted it to dump a patient's TIU notes. It didn't pull the authors name, and was dumping the FM datetime out, so I directed it a bit... but I thought it did a pretty decent job!

CaptureGPT2.JPG

CaptureGPT3.JPG

So it didn't nest the for loop statements with a period, and it used an END... but I thought this was all kinda neat. I later asked it to simulate the output with fictitious data:

CaptureGPT4.JPG



Wolfgang Giere

unread,
Feb 11, 2023, 4:32:45 AM2/11/23
to hard...@googlegroups.com

Thank you for the interesting discovery. Has Mumps become part of the mainstream IT?

 

Wolfgang Giere

 

 

 

-----Original-Nachricht-----

Betreff: [Hardhats] ChatGPT and MUMPS

Datum: 2023-02-11T03:44:48+0100

Von: "Eddie Hagood" <ehago...@gmail.com>

An: "Hardhats" <hard...@googlegroups.com>

 

 

 

--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/dcb03b45-be12-413f-8cae-f59a4c03c113n%40googlegroups.com.


Nancy Anthracite

unread,
Feb 11, 2023, 5:42:27 AM2/11/23
to Hardhats, Eddie Hagood

We will have to tell https://henryelliott.com/ about ChatGPT!


--

Nancy Anthracite


On Friday, February 10, 2023 9:44:42 PM EST Eddie Hagood wrote:

> Hey guys,

>       Interesting discovery I made the other day, that I thought someone

> might think was cool. After listening to a podcast about ChatGPT, and

> finding out that it could write code... I thought I would put it to the

> test: Can it write MUMPS code?

>

> I started it off with a simple Hello World

> [image: CaptureGPT.JPG]

> I was impressed that it gave an explanation with the code. I upped the

> demand a bit to see if it would be able to pull from a Fileman file. I had

> to expressly tell it to not use an external function, or it would reference

> a nonexistent function:

>

> *(SET DFN=$$GETDFN^XYZ(DFN) ; get patient DFN from parameter SET

> NAME=$$GETNAME^XYZ(DFN,2) ; get patient name from file 2*

> *WRITE "Patient Name: ",NAME,! QUIT *

>

> *Note: The GETDFN^XYZ and GETNAME^XYZ functions are assumed to exist and

> retrieve the respective data from the relevant file(s) based on the patient

> DFN.)*

Matt King

unread,
Feb 11, 2023, 8:44:42 AM2/11/23
to Hardhats
Wow! That's great Eddie. Thanks for posting.

Joel

unread,
Feb 11, 2023, 1:09:13 PM2/11/23
to Hardhats
Very impressive.  Thanks for trying and sharing.


Greg Kreis

unread,
Feb 11, 2023, 4:35:04 PM2/11/23
to hard...@googlegroups.com

I've been playing with it as well. It is super impressive, though it is wrong more than is acceptable. Think of it as an intern/junior programmer that can give you ideas and code samples, but DO NOT trust it. It suffers from the Dunning Kruger effect. ;-)

ChatGPT 4 is supposed to have been trained on much more data. The ChatGPT page says it is trained as of Jan 30. There is some confusion in my mind if it is the ChatGPT 3 product on a more current database or if this is version 4 and a more current database.

I just signed up for Plus and will be monitoring its progress.

I will say this. If it improves quickly in the next year or two, it could make VistA support and development a LOT easier for a very experienced VistA person. Imagine it troubleshooting the error trap in a way that lays out all the details so you can quickly grasp what is going on. This could help a great deal with one of the complaints that VistA is difficult to support. 

When this stuff gets to the point (maybe 15 years from now?) that it can reliably handle the coding and support of entire apps/systems you can imagine a world where legacy systems can be rewritten and tested rapidly with 1/10 the workforce.
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/dcb03b45-be12-413f-8cae-f59a4c03c113n%40googlegroups.com.
-- 
=================
Greg Kreis
Pioneer Data Systems, Inc.
770-509-2583
http://www.PioneerDataSys.com

Raman Sailopal

unread,
Feb 12, 2023, 5:46:11 AM2/12/23
to Hardhats,
Also note that the source data used to seed/train ChatGPT is always out of date. For example, this current version of ChatGPT uses data up till the end of 2021.

As a result, a lot of the code used from open source libraries which are typically updated with a high level of regularity, are dated and more importantly, often insecure or full of bugs. 

Maybe not so much of an issue with VistA but an important consideration none the less.

ivaldes

unread,
Feb 12, 2023, 12:24:46 PM2/12/23
to Hardhats
I am fired. 

K.S. Bhaskar

unread,
Feb 12, 2023, 1:39:24 PM2/12/23
to Hardhats

George Timson

unread,
Feb 12, 2023, 2:45:22 PM2/12/23
to Hardhats
Greg, thanks for mentioning the Dunning Kruger effect.  I've always been familiar with that, but under a simpler name that I wouldn't want to put out on the Internet.  Ahem.

--George

George Timson

unread,
Feb 12, 2023, 3:04:23 PM2/12/23
to Hardhats
One more comment about AI: Given how much natural stupidity outbalances natural intelligence in the real world ("IRL"), I will not be surprised that artificial stupidity will similarly outbalance artificial intelligence.  I read this morning about a bot that was asked about the Super Bowl game (which is, as I write, still four hours in the future.)  The bot proceeded to describe the whole game, yardages, etc, and reported that the Eagles won!  This is referred to as AI "hallucination"!  Oy vey!  Remember this?--  https://groups.google.com/g/vista/c/lYoP17Z1jHo  Trump is gonna love this thing!

ivaldes

unread,
Feb 12, 2023, 5:17:34 PM2/12/23
to Hardhats

George Timson, a name to know, A visionary, in the world of EHRs and flow. He created Fileman, a system so wise, Bringing order to the chaos, of medical records and files.

With features that are innovative, and user-friendly too, Fileman is a solution, that the healthcare world knew. From appointment scheduling, to patient management, it's all there, Ensuring that healthcare providers, can focus on what they care.

And with its MUMPS-based nature, it's a pioneer, Offering an option, for healthcare providers, who want to steer. For their patients and their needs, are always in their sight, And with Fileman, they can deliver quality care, day and night.

So here's to George Timson, a man of great renown, Whose creation, Fileman, has brought healthcare to new ground. For his contribution to the world of medical technology, Is a testament, to his ability, to deliver efficiency.

Eddie Hagood

unread,
Feb 12, 2023, 6:15:43 PM2/12/23
to Hardhats
I tried another one, and it now adds the period for the nested loops and doesn't put the "END". It is learning, I guess.

No matter how good it's skills evolve... it can never replace a true programmer until it stays up until 3 AM: sweating bullets, drinking coffee, listening to heavy metal, and pounding on the keyboard because it knows the code is good but the damn thing still doesn't work!!

CaptureGPTMEDS.JPG

Wolfgang Giere

unread,
Feb 13, 2023, 5:16:55 AM2/13/23
to hard...@googlegroups.com

You are absolutely right! I always admired George as a visionary pioneer -- together with Tom Munnecke. Thank you both!

 

Wolfgang Giere

 

 

 

-----Original-Nachricht-----

Betreff: Re: [Hardhats] ChatGPT and MUMPS

Datum: 2023-02-12T23:17:42+0100

Von: "ivaldes" <ival...@gmail.com>

An: "Hardhats" <hard...@googlegroups.com>

 

 

 

--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.

David Whitten

unread,
Feb 13, 2023, 7:20:11 AM2/13/23
to hard...@googlegroups.com
The second version is better because the code doesn’t create variables with illegal concatenated names like PATIENT_NAMES like this..

So real MUMPSters still practically have a job. (GRIN)

Dave Whitten


On Monday, February 13, 2023, Wolfgang Giere <W.G...@t-online.de> wrote:

You are absolutely right! I always admired George as a visionary pioneer -- together with Tom Munnecke. Thank you both!

 

Wolfgang Giere

 

 

 

-----Original-Nachricht-----

Betreff: Re: [Hardhats] ChatGPT and MUMPS

Datum: 2023-02-12T23:17:42+0100

Von: "ivaldes" <ival...@gmail.com>

An: "Hardhats" <hard...@googlegroups.com>

 

 

 

George Timson, a name to know, A visionary, in the world of EHRs and flow. He created Fileman, a system so wise, Bringing order to the chaos, of medical records and files.

With features that are innovative, and user-friendly too, Fileman is a solution, that the healthcare world knew. From appointment scheduling, to patient management, it's all there, Ensuring that healthcare providers, can focus on what they care.

And with its MUMPS-based nature, it's a pioneer, Offering an option, for healthcare providers, who want to steer. For their patients and their needs, are always in their sight, And with Fileman, they can deliver quality care, day and night.

So here's to George Timson, a man of great renown, Whose creation, Fileman, has brought healthcare to new ground. For his contribution to the world of medical technology, Is a testament, to his ability, to deliver efficiency.

On Sunday, February 12, 2023 at 2:04:23 PM UTC-6 George Timson wrote:
One more comment about AI: Given how much natural stupidity outbalances natural intelligence in the real world ("IRL"), I will not be surprised that artificial stupidity will similarly outbalance artificial intelligence.  I read this morning about a bot that was asked about the Super Bowl game (which is, as I write, still four hours in the future.)  The bot proceeded to describe the whole game, yardages, etc, and reported that the Eagles won!  This is referred to as AI "hallucination"!  Oy vey!  Remember this?--  https://groups.google.com/g/vista/c/lYoP17Z1jHo  Trump is gonna love this thing!

 

--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+unsubscribe@googlegroups.com


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+unsubscribe@googlegroups.com.


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/1676283400957.308210.5a0a7920d38e3bc787be90b7ee13456802bf675e%40spica.telekom.de.

Greg Kreis

unread,
Feb 13, 2023, 10:51:18 AM2/13/23
to hard...@googlegroups.com

I learned this the hard way. Always tell it "ANSI MUMPS" when you form the prompt. Without it creates a hybrid of different languages.

To unsubscribe, send email to Hardhats+u...@googlegroups.com


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/CAH8N84yTP19tk6VcsT%2BcAvHP8LD9Y%3DHuBYkmzyvw3y9%2BQS6tSg%40mail.gmail.com.

Greg Kreis

unread,
Feb 13, 2023, 3:47:13 PM2/13/23
to hard...@googlegroups.com

I am having fun probing ChatGPT's understanding of our beloved MUMPS. As you can see in the dialog, you have to push back and see if you can guide it to see something it missed, though you don't have to be polite. (Reminds me of those Boston Scientific videos where they harass the robots.)

Can you think of any data structure in other programming languages that has similar features of the ANSI MUMPS Global variable?

Yes, there are several data structures in other programming languages that have similar features to ANSI MUMPS Global variables.

One such data structure is an associative array in Perl or a dictionary in Python. Both of these data structures allow for storage of key-value pairs, similar to a MUMPS Global variable, where the key is the name of the variable and the value is the data stored in the variable.

Another data structure is a hash table in C or Java. A hash table is a data structure that uses a hash function to map keys to values, allowing for efficient storage and retrieval of data. This is similar to a MUMPS Global variable, as it provides a way to store and retrieve data based on a unique identifier.

In addition, the concept of a global variable in many other programming languages, such as C or Java, is similar to a MUMPS Global variable in that it allows for data to be shared and accessed across different parts of the program. However, the scope and behavior of global variables can vary greatly between different programming languages.

Aren't you missing the idea of persistent storage that seems to set the ANSI MUMPS global variable apart from most other languages? Are the examples you cited able to persistently store data?


Yes, you are correct. I apologize for overlooking the important aspect of persistent storage, which sets the ANSI MUMPS Global variable apart from most other data structures in other programming languages.

Most data structures in other programming languages, such as dictionaries in Python or associative arrays in Perl, are not designed for persistent storage and their data is lost when the program terminates. On the other hand, ANSI MUMPS Global variables are designed for persistent storage and their data is saved to disk, allowing it to be retrieved even after the program has been terminated and restarted.

A few examples of data structures that provide persistent storage in other programming languages are databases, such as SQL databases, or key-value stores, such as Redis. These data structures can store data in a way that is persistent and can be retrieved even after the program has been terminated and restarted. However, they are typically more complex to use and require a different programming paradigm than ANSI MUMPS Global variables.

Kevin Toppenberg

unread,
Feb 14, 2023, 6:43:43 AM2/14/23
to Hardhats
The video in the link below showed up in my feed yesterday. It is interesting because it is a discussion of how to have chatGPT help one code. Although it is funny to find the errors in chatGPT’s attempts, the presenters point is that you can push back and get it to correct its mistakes, and it overall can be helpful.  By the end of the presentation, he guides the code into a multithreaded prime sieve, using cuda and multi core GPU’s.  And he guides it as to whether to use CPU RAM versus GPU RAM, or shared memory.  He mentions that he has another video, which I have not yet watched, where one can feed your own code to it to help find bugs, and to analyze logic of flow.  It seems like this is going to be the future of programming.  Exciting times.

https://youtu.be/pspsSn_nGzo

Kevin

To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.

To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/1676283400957.308210.5a0a7920d38e3bc787be90b7ee13456802bf675e%40spica.telekom.de.
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/CAH8N84yTP19tk6VcsT%2BcAvHP8LD9Y%3DHuBYkmzyvw3y9%2BQS6tSg%40mail.gmail.com.
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.

Greg Kreis

unread,
Feb 14, 2023, 11:49:27 AM2/14/23
to hard...@googlegroups.com

Think of it as a junior coder that brings their assignment, you critique it and give them suggestions and new requirements. I had a round and round with it to expand commands and function abbreviations but it would forget the earlier requirements on case (upper or lower) that I specified! Very tedious, and you MUST says ANSI MUMPS repeatedly, but it will get better and soon that junior programmer will be having you hand in your assignments....   😮

ivaldes

unread,
Feb 14, 2023, 12:29:45 PM2/14/23
to Hardhats
You mean to tell me that ChatGPT is better than my ex-wife?!
Reply all
Reply to author
Forward
0 new messages