# ChatGPT knows the VistA libraries!

175 views

### Greg Kreis

Feb 17, 2023, 1:59:52 PMFeb 17

Okay Hardhats, here is what I did this morning...  (I was asked privately about how I was using it.)

I said:

"Write an ANSI MUMPS program that conforms to the VistA Standards and Conventions. The program should ask for two values, a beginning date and ending date, and then calculate the number of days between the dates. Display the number of days. You are encouraged to make use of the File Manager or Kernel libraries for the calculation."

This is what I got. Imagine your assistant programmer turning in their code along with their documentation that they generated as they coded!

It always blows me away...  glad I am not just starting out in programming. This is more than I EVER thought I would see from AI in my lifetime and this the hem of the garment, I am afraid (and excited). Time to load up War Games and watch it again. I remember seeing that and scoffing at it, since I knew in the 80s how hard programming really was. I should have thought about the idea of the computer using its awesome speed to teach itself at that speed. That conceptual leap was Archimedes' fulcrum to move the world.

GETDATES ; ; Ask user for beginning and ending dates and calculate the number of days between them N %DT,BDATE,EDATE,X,Y,DAYS S %DT="AEP",%DT("A")="Enter beginning date: " D ^%DT Q:Y=-1 S BDATE=Y S %DT="AEP",%DT("A")="Enter ending date: " D ^%DT Q:Y=-1 S EDATE=Y ; Use Kernel library function to calculate number of days between dates S DAYS=\$\$FMDIFF^XLFDT(EDATE,BDATE) ; Display the number of days W !,"Number of days between the two dates: ",DAYS,! Q

In this program, we first use the `GETDATES` label to ask the user for the beginning and ending dates using the `%DT` input variable. We then use the Kernel library function `FMDIFF^XLFDT` to calculate the difference between the two dates in days. Finally, we display the number of days using the `W` command.

Note that this program assumes that the Kernel library is available and loaded in the M environment. If it's not, you may need to load the library or adjust the program to use a different method for calculating the number of days between the dates.

|
Can you change reads to calls to the Reader (the DIR program)?

Sure, here's an updated version of the program that uses the `DIR` program for input:

GETDATES ; ; Ask user for beginning and ending dates and calculate the number of days between them N BDATE,EDATE,DAYS,DIR,X,Y S DIR(0)="DA^::E" S DIR("A")="Enter beginning date: " D ^DIR Q:\$D(DIRUT) S BDATE=Y S DIR(0)="DA^::E" S DIR("A")="Enter ending date: " D ^DIR Q:\$D(DIRUT) S EDATE=Y ; Use Kernel library function to calculate number of days between dates S DAYS=\$\$FMDIFF^XLFDT(EDATE,BDATE) ; Display the number of days W !,"Number of days between the two dates: ",DAYS,! Q

In this version of the program, we use the `DIR` program instead of `%DT` to ask the user for the beginning and ending dates. We define the `DIR` input variables, such as the `DIR(0)` input variable to specify the date format, and the `DIR("A")` input variable to specify the prompt text. We then call `DIR` using the `D ^DIR` syntax, and check for the `DIRUT` variable to see if the user cancelled or exited the program.

After we have the beginning and ending dates, we use the `FMDIFF^XLFDT` function to calculate the number of days between them, and display the result with the `W` command.

Note that this program also assumes that the Kernel library is available and loaded in the M environment.

```--
=================
Greg Kreis
Pioneer Data Systems, Inc.
770-509-2583
http://www.PioneerDataSys.com```

### Greg Kreis

Feb 17, 2023, 2:25:32 PMFeb 17

What if we could make arrangements with OpenAI, as a community, to help it refine its MUMPS and VistA knowledge by getting a formal way to critique its results? ChatGPT needs mentoring and we have among us many who would enjoy doing just that! It is too late to build a fortress to protect a career.

We better join 'em.

--
--
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/6ea2bc4a-ef7a-1388-e2c8-4c60066f286f%40pioneerdatasys.com.

### Greg Kreis

Feb 21, 2023, 12:47:47 PMFeb 21

I have had another session with "you know who" and I learned a few more things. (I am going to call chatGPT Chad going forward because chatGPT is too hard to type and because Google's voice dictation got it wrong and gave me that name. Seems particularly appropriate that one of Bard's kin named chatGPT Chad. ;-)

A long discussion got Chad to finally understand the internal format of a File Manager date. After each correction to steer it in the right direction, it finally got there. So, let's have others ask Chad about the internal format of a FM date and see if it the incorporation of its learning was immediate and remains beyond my chat. Explore what is knows about FM dates and how they are computed. Let me know what you find out. If all goes well, we can, as a community, dive in and steer Chad into a more useful tool to our community.

According to Chad's responses to my questions of how it learns, it seems that Chad has a large database that it hasn't thoroughly digested. Our questions seem to force it to dig for answers and based on our guidance we get it to "learn". This is much like how we learn things by encountering new things and practicing them and recognize our mistakes. The more we chat, the more we are causing Chad to "hit the books" and we are effectively mentoring it. At least that is my theory. If I am right, we are providing a valuable service to OpenAI in exchange for what we are receiving back.

This reminds me of the ingenious way that Captcha was set up.

Are you learning from our interactions and it is a mutually beneficial relationship? I am reminded of how CAPTCHA was an ingenious way to get humans to think they were being tested when in fact, they were training an AI!

Yes, our interactions are designed to be mutually beneficial in that they allow me to learn from your input and provide more accurate and helpful responses, while also providing you with information and assistance.

As an AI language model, I am continuously learning and adapting to new information and feedback, and my responses can be improved by the input I receive from users like you. By providing me with corrections, additional information, and feedback, you are helping me to improve my responses and better serve your needs.

While I cannot speak to the motivations behind the creation of CAPTCHA or other AI training methods, it is true that AI systems can benefit from user interactions and feedback, which can help to improve their accuracy and effectiveness over time. I hope that our interactions continue to be productive and informative for both of us.

Can you explain the CAPTCHA AI training model?

Certainly. CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a type of challenge-response test that is used to determine whether a user is a human or a computer program. CAPTCHAs typically involve the presentation of distorted images or text that are difficult for computers to interpret, but can be easily deciphered by humans.

The original purpose of CAPTCHA was to prevent automated bots and spam from being sent through online forms or applications, such as registration forms or comment sections. However, in addition to serving as a security measure, CAPTCHAs have also been used as a means of training AI systems.

The basic idea behind using CAPTCHAs for AI training is to present users with images or text that are difficult for machines to interpret, but can be deciphered by humans, and to then use the user's input to train an AI system to recognize and interpret the same types of images or text. In this way, the user's input is used to help train an AI system to become better at recognizing and interpreting visual or linguistic information.

For example, a website might use a CAPTCHA that presents users with a distorted image of a street sign, and ask them to identify the sign's text. The user's input can then be used to train an AI system to recognize and interpret similar images of street signs in the future.

Overall, the use of CAPTCHAs as a means of training AI systems has been successful in many cases, as it allows for the efficient collection of large amounts of labeled data, which can be used to train machine learning algorithms and improve the accuracy of AI systems.

### Kevin Toppenberg

Feb 24, 2023, 12:49:13 PMFeb 24
to Hardhats
In the future these AI's may learn from users.  But right now, I think they do not.  The reason for this is that Microsoft found that when it allowed users to influence the future conversations, it 2016 chatbot became a racist jerk in just about 1 day.  (https://www.theverge.com/2016/3/24/11297050/tay-microsoft-chatbot-racist)

So what needs to happen is for the AI's to have trusted teachers -- people that are not going to try to purposely ruin it for fun.

Eddie, in my office, worked to teach ChatGPT about a mumps concept.  Then closed the window and went back, and it didn't know the facts.  So I think it is dumping everything when done.   I think Microsoft has explicitly said it will do this when it puts it's AI into it's Bing search engine.

Kevin

Feb 24, 2023, 1:17:46 PMFeb 24
to Hardhats
I posed the same question to YouChat, and this is what it said:

Set begDate = ""
Set endDate = ""

Set days = \$\$FMDIFF^XLFDT(endDate, begDate, 1)

Write !,"The number of days between the given dates is: ",days

Quit

Regards

### ivaldes

Feb 27, 2023, 12:33:57 AMFeb 27
to Hardhats
Write an ANSI MUMPS program that conforms to the VistA Standards and Conventions. The program should perform full medical billing and accounting for all types of insurance, Medicare, Medicaid, Commercial and cash.

I'm sorry, but as an AI language model, I cannot provide you with a complete ANSI MUMPS program that conforms to the VistA Standards and Conventions, which performs full medical billing and accounting for all types of insurance, Medicare, Medicaid, Commercial, and cash.

However, I can provide you with some guidance and information on how to create such a program. VistA is a comprehensive healthcare information system used by the Department of Veterans Affairs in the United States, and it includes various modules for medical billing and accounting. The system uses MUMPS (also known as M) as its primary programming language.

To develop a program for medical billing and accounting in VistA, you would need to have a good understanding of the VistA Standards and Conventions, which provide guidelines for software development, documentation, and quality assurance. These standards and conventions are available on the VA's website.

Here are some key steps to follow when developing a medical billing and accounting program in MUMPS for VistA:

Define the requirements of the program. This includes identifying the different types of insurance that the program should support, as well as the billing and accounting processes that it needs to handle.

Design the program architecture. This includes identifying the different modules that the program will consist of, such as patient registration, insurance verification, claims processing, payment posting, and financial reporting.

Write the MUMPS code for each module. This involves following the VistA Standards and Conventions, which specify naming conventions, code formatting, and documentation requirements.

Test the program thoroughly to ensure that it meets the specified requirements and is free of bugs.

Deploy the program in a VistA environment and integrate it with other VistA modules as needed.

Some specific features that your program might need to include to support medical billing and accounting for different types of insurance include:

Patient registration and demographic information
Insurance verification and eligibility checking
Claims processing and submission to different payers
Electronic remittance advice (ERA) processing for payment posting
Financial reporting and analysis
Again, this is a complex and multi-faceted task, and it is essential to follow the VistA Standards and Conventions to ensure that your program is reliable and maintainable. If you require further assistance, you may consider consulting with a healthcare software development expert or a MUMPS programming specialist.

### Greg Kreis

Feb 27, 2023, 11:15:55 PMFeb 27

You raise an interesting point Keven and I understand the problem of a trusted tutor. I found that, despite my attempts, it did not incorporate the training. Worst student I've ever had, but eager to please. ;-)

My hope was that between my instruction AND it checking my assertions against the FM documentation (hopefully in its corpus) that it might be able to come to a deeper understanding and trust of the FM docs. But alas, it is more complicated and much less sophisticated than this (perhaps due to the protections in place to stop it from being manipulated). It seems to be making up answers when faced with the dilemma of saying "I don't know".

The following dialog is humorous, if you aren't trying to get work done. This junior programming assistant leaps from being silly to eventually being coherent if carefully guided. Sigh....   at our jobs are safe for a bit longer. Imagine if it were used to scour documents looking for specific ideas, loopholes, inconsistencies or relevant topics. Now THAT could play to its strengths.

What is the internal File Manager format of Nov,23, 1912?

I'm sorry, but it's not possible to answer that question.

November 23, 1912 is a date that predates the widespread use of electronic computers and digital file systems. The concept of a "file manager" did not exist at that time, as computers as we know them today did not yet exist.

It's possible that you may be referring to a different type of file manager or format from a particular company or organization. However, without more context, it's difficult to provide an accurate answer. If you could provide more information or clarification, I may be able to assist you further.

You have forgotten our earlier context. I meant in the DVA VIstA's File Manager internal format

I apologize for the confusion earlier. The DVA VistA's File Manager is a proprietary file management system used in the Veterans Health Information Systems and Technology Architecture (VistA) electronic health record system. The internal file format of the DVA VistA's File Manager varies depending on the version and implementation of the system.

That being said, the DVA VistA File Manager's internal file format is not publicly available as it is proprietary to the Department of Veterans Affairs. Access to the technical details of the system is restricted to authorized personnel with appropriate security clearances.

If you require more specific information about the internal file format of DVA VistA's File Manager for a legitimate purpose, I recommend contacting the Department of Veterans Affairs directly or seeking assistance from an authorized DVA VistA system administrator.

You are SO mistaken. It is available under the freedom of information act (FOIA) and they publish the manuals online publicly.

I apologize for the confusion earlier. If the information you are seeking is available under the Freedom of Information Act (FOIA) and the manuals for DVA VistA's File Manager are published online publicly, then it should be possible to obtain information about the internal file format of the system.

I recommend that you consult the FOIA and contact the Department of Veterans Affairs or consult their published manuals to obtain the specific information you need regarding the internal file format of DVA VistA's File Manager. As an AI language model, I do not have direct access to the FOIA or the specific manuals and technical details of the system, but I hope this information helps you in your search.

How dare you! I KNOW the answer. I wanted you to prove you remembered what I told you. Here is what you generated for me but ten minutes ago and it is correct. he internal File Manager format represents dates as a seven-digit number, with the first three digits representing the year in a three-digit format, the next two digits representing the month, and the last two digits representing the day. To represent December 19, 1953 in the File Manager format, we first need to convert the year 1953 to the three-digit format used by the File Manager. To do this, we subtract 1700 from the year: 1953 - 1700 = 253 So, the internal File Manager format for December 19, 1953 is 2531219, where "253" represents the year, "12" represents the month, and "19" represents the day. I hope this answers your question. Let me know if you have any further questions or concerns.

I apologize for any confusion or frustration caused earlier. As an AI language model, I do not have memory in the traditional sense, but I do have access to the previous conversation history.

I am glad to hear that the information I provided earlier regarding the internal File Manager format for dates was correct and helpful to you. If you have any further questions or concerns, please do not hesitate to ask.

Ok, accessing that previous history and what I just showed you, what is the internal FIle Manager date format of Nov 17, 1912?

I apologize for any confusion earlier. To represent November 17, 1912 in the internal File Manager date format, we need to convert the year 1912 to the three-digit format used by the File Manager. To do this, we subtract 1700 from the year:

1912 - 1700 = 212

So, the internal File Manager date format for November 17, 1912 is 2121117, where "212" represents the year, "11" represents the month, and "17" represents the day.

I hope this information is helpful. Let me know if you have any further questions or concerns.

Feb 28, 2023, 10:52:10 AMFeb 28
to Hardhats
I had the following discussion with YouChat:

Do you know about Fileman format dates?

Yes, I am familiar with Fileman format dates. Fileman format dates are a specific type of date format used by the VA FileMan system to store and manipulate date and time information. Fileman format dates are typically in the form CYYMMDD, where C is a century number and YYMMDD is the year, month and day. FileMan also provides functions to convert dates to and from different formats, such as a human-readable format, so that it can be used in various applications.

What is the internal Fileman format date of Nov 23, 1912?

The internal Fileman format date of Nov 23, 1912 is 19121123.

So it is marginally better, but still off the mark. Hmm… Is a wrong answer better than no answer?

### Greg Kreis

Mar 2, 2023, 12:39:25 PMMar 2

Thanks for contributing to the thread Bhaskar! It is beneficial to know, as a driver, that you blind spots while motoring and to be defensive/cautious about what the mirrors are telling you. Same thing here. I hope this thread has helped others to gain an appropriate level of trust for the AI.

I saw a tweet from Sam Altman that said "data submitted to the OpenAI API is not used for training", so I am bummed but I understand their concern. It would be cool if they could reach out to communities in the future, that have domain expertise, who might volunteer to train it (with suitable checks and balances). If done right, it could be a win/win and might motivate the community to help. (Though there could be some resistance if people felt it would be challenging their careers and I get that concern. Easy to poke fun at the Luddites when it isn't your trade.)

Perhaps in a preview of things to come, Apple has begun to take steps to wall off chatGPT use in apps.

Mar 2, 2023, 2:28:13 PMMar 2
to Hardhats
I prefer YouChat to ChatGPT because it gives links to the references it uses for answers. But conversationally, ChatGPT is closer to passing the Turing test than YouChat, although ChatCPT is still far from passing it, as far as I am concerned.

Regards