Visibility Conditions Dictionary

I am not hitting on the keyword(s) to try and find the different options available to cause visibility regions to display. I know there are several but can only think of a few currently. Those are separated on individual lines below so as not to cause unnecessary confusion with enclosing them in single or double […]

MEL Language Reference?

I am looking for a MEL Language Reference.   I have found the “Creating Clinical Content” PDF. This is useful but is more than a decade old and not a language reference. The engage.gehealthcare.com is a dead link. Is MEL still supported?

Greetings, The issue: We want to be able to print the active Care Management Goal List for parents/children who visit. But we don’t want to have to sign clinical list changes or sign the note for the goals to show. Currently, the updated goals will not show in the histories until signed. We want to […]

I’ve been struggling all afternoon, I’m trying to get a watcher expression to trigger a function but not sure It will work from another form. Scenario: form A {fn functionA()} form B observation applicable to functionA()   I’m trying to load a watcher function into form A that will trigger functionA() every time the observation […]

MEL error with document variable

I have a simple function where, if a parameter is met, set the document variable equal to a subarray if document.dateofros==”” then for count=1,count<=size(Array),count=count+1 do SUB=getfield(Array[count],"^","") if Sub[1]=="ROS" then document.dateofros=SUB[2] followed by the conditions of the function. I have this running in 2 forms within an update so it can be called from either form. […]

MEL_ADD_ORDER returning an error

Hello – I am trying to do a MEL_ADD_ORDER: from a QuickText:   {MEL_ADD_ORDER(“T”,”Quest Labs”,”COVID-19 PCR”,,”ICD10-Z11.59,”Screening for Viral Illness”,,,,”agonzalez”,)}   What is coming back to me in the note is: {MEL_ADD_ORDER(“T”,”Quest Labs”,”COVID-19 PCR”,,”ICD10-Z11.59,”Screening for Viral Illness”,,,,”agonzalez”,) <-EXPECTED RIGHT CURLY BRACE   I am confused as the second curly brace is there in the QuickText – […]

So currently I have a piece that populates a list box of the patient active diagnosis and order selections that uses MEL_ADD_ORDERS to add orders. I’m thinking there has got to be a way to use that same list box to remove orders by populating the first piece of MEL_REMOVE_PROBLEM syntax (ex. {MEL_REMOVE_PROBLEM(fnGetDxInfo3(), “”, false, […]

Show flags in chart with MEL?

Has anybody build MEL to display the flags currently associated with the patient chart? Looking to add it to the patient summary for easy reference. Thinking mldef is the only way and was not sure even possible. Thank you! Mary Kay

MEL to SQL Code

I have heard tell of a way to use a MEL form to send data to a SQL database. I can’t find any evidence of this, outside of some really old code buried in some folders at our agency. Here’s what I’m looking to do: I want to take a form in Centricity, use it […]

MEL_DELETE_ERX error

Has anyone encountered this error before? This has happened a couple of times for different users the last couple of weeks. It usually happens with a narcotic script that we try to print. It doesn’t print and then when the MA tries to print it again or delete it and add another it gives this […]

COND CASE & Function

Hi Everyone, It’s been a few year since I thought about any MEL related things and now I’m stuck and looking for help! I have a form to record result values and enter when the test is next due (dropdown with intervals). I tried making a function with a case condition but I’m missing a […]

Greetings, We are hiring for a Software Engineer position at our organization. Primary duties: Centricity content development and integration work. Chicago, IL-based candidates and full-time remote candidates are being considered for this position. Job posting: http://alliancechicago.org/dev/wp-content/uploads/2019/06/Software-Eng-JD_06112019.pdf If you are interested in being part of an innovative, collaborative team working together to improve the health of vulnerable […]

I’m asking a question I think I know the answer to, because I hope that I’m wrong. Here’s the situation: We have a protocol form that automatically assigns between 6 – 12 medications to a patient’s chart. This happens using MEL_ADD_MEDICATION(). The new ask is to add an attending physician to each medication automatically. And here’s where […]

Trying to utilize this symbol to pull some info into a handout, but as it is it only works when an update is active. I must be missing with something.   Thanks in advance   Here is what did the trick (thanks to Lee for the clue): {!fn PullUroAssessment() { local temp = getfield(LIST_OBS(“ASSESSMENT”,”Signed”,”Delimited”,”Value”),”|”,””) local […]

MEL Trace question

Hello. I have this line of code that is giving me weird results in the MEL trace file, and thus, a problem in the form. I have a line of code that attaches four 0000s to the end of the patient’s PID #. Since the patient can have more than one Participant ID #, I […]

Hello, I am just delving into the world of MEL and am trying to digest the “Creating Clinical Content” pdf. I am trying to put together an if-then statement that will compare: if the last OBSDATE for colonfit test is > 1 year ago, then order the FIT test. I can get the MEL statements […]

MEL code in a text component

I am looking for some help deciphering this text component. It currently works in a 12.0.13 database, but in our test upgrade to 12.3.2 it fails. When I tried to fix it now I get this MLI_TEXT:1693404923056560. Thanks for taking a look!! {‘{IF searchprobs(“ICD-427.31,ICD-427.32″) and (durationdays(lastobsdate(“CHADS2TOT”),str(._todaysdate))>365 or obsany(“CHADS2TOT”)==””) and match(get_form_list(),”Cardio Quality”)=0 then add_form_comp(“Enterprise\HVCA”,”Cardio Quality”,”11″) else […]

Frustrating MEL Problem

Hi, again! I am having a really frustrating time doing something that I’ve done before and haven’t had any problems. This time, I have spent an embarrassing number of hours troubleshooting a simple function, and am now going insane. I have a test patient with a previous cholesterol value, dated 10/12/2007 – obsterm ‘CHOLESTEROL’. This […]

I’m trying to get an orders button to show in a visibility region only if the answer to a question is yes. I’ve gotten to understand visibility regions tied to document variables well enough (not great, but well enough for the time being). I’ve searched and can’t find anything about tying it to an OBS […]

Unit Testing for Speed

Hello All, We have had unit testing discussions before, but they have been mainly about how to speed up the development/debugging process: https://forum.centricityusers.com/forum/unit-testing-of-vef-code-functions-forms-etc/ I am working on trying to improve the speed of form load and form responsiveness when the visit is open.  Some of our custom forms are several years old and we have […]

Sorry if this is a re-post but I was unable to find anything pertaining to actually getting embedded HTML working in CPS 12.2. Currently I am working with Version 12.3. After doing some research, for embedding HTML, all I am able to find is purchasing a seat from Clinical Forge at https://clinicalforge.com/. Blackbird Solutions at http://blackbirdsolutions.com/ and mdObject at https://github.com/mdObject/GECentricity […]

History View Looping

Can anyone tell me why this code in a history view produces duplicates?  (bonus: 5 fake internet points to the winner!!!) //main impression array placeholder local arrImp = array() //individual line with values local result = array() //array to return local Imps = array() //var to track where to insert into new array local insertme […]

Grab All Obs Terms

Does anybody know of a way in MEL to either grab all obs term names in the database, or grab all obs terms names only used by a specific patient (to mimic the Flowsheet on a patient’s chart)? I’m trying to implement a search on obs term names and would much rather have a list […]

Other than the Help Documentation of the symbols/functions that you can reference on Centricity EMR Help. Does anyone know where can I find some documents explaining specifics of keywords of MEL (I think its an interpreted language similar to JavaScript) but I want to know details about the logic the engine that executes the MEL […]

Issue with DURATIONDAYS

  I have a weird issue on  some code that does not fire right for the first time.  I have a form where if there was a previous value was less than 2 days, it will then put that value in an OBSNOW and if it is over 2 days, then it does nothing.  There […]

Where to place sort in my function

I have a function that is creating a comma separated list of service providers. It’s calling organization name and phone number, and I don’t know where to place my sort code to alphabetize the list. I’ve tried many places and the below is the only one that seems to not break the drop down list […]

I am using a function called ServProvs() in the function view of VFE which is calling parts of the Service Provider table. When I create a Dropdown list (and check-mark Dynamic choice list), and enter ServProvs() at the bottom in the MEL Expression box I cannot get the drop down to work after import. What […]

Has any one found a MEL function, global variable,  or Document.variable for use in a handout to determine whether the encounter is open, on Hold, or signed.  When the handout is printed from the the CHART left side Handout icon, if the visit is not open, using DOCUMENT.CLINICALDATE  for example will will give an error. […]

1. Is it possible to use an edit field for the “administered by” or “expiration date” fields when pushing a form to CVX? For example, this current code is working: if (DOCUMENT.HPV__1_ “”) then IMMUN_ADD(“HPV, quadrivalent^” + DOCUMENT.HPV__1_ + “^^1^Y^^N^^V01^^^^^^62^^”^”+ DOCUMENT.HPV__1_RTE_ + “^^” + DOCUMENT.HPV__1_SITE_ + “^^” + DOCUMENT.HPV__1_MFR_ + “^^” + DOCUMENT.HPV__1_LOT_ + “^^” […]

Sorting Obsterm function by date

I am trying to pull the latest Patient Instructions observation term by location of care. Below is the function I am using. For some reason this pulls the oldest observation term. I am needing it to pull the newest. I tried to use a sort but It is sorting the contents of the observation term […]

Popup Alert from Mel

I can’t get this thing to work, I don’t get any errors and my MEL trace is clean but it just won’t show up!   thoughts?   {IF OBSNOW(“PTDISCH”) == “yes” THEN MEL_SEND_FLAG(“Popup Alert”,,”Important”,str(._todaysdate),”Patient DC”,”THIS PATIENT HAS BEEN DISCHARGED FROM THE PRACTICE no more appointments to be scheduled 30 days after this popup”,”Summary”,””) ELSE “” […]

I created a dynamic list box that will display incomplete Test Orders, and the list box is blank unless I also have a data display in the form.  I’m confused.  The data display I added contains {ORDERS_AFTER(“delimited”)}.  That’s it.  No translation or anything extra.  And, the list box is populated by the below function, but doesn’t […]

The Indiana Hemophilia and Thrombosis Center is seeking a Systems Analyst to join the Information Services team. The Systems Analyst is responsible for supporting application software, including but not limited to: software administration; development of forms and enhancements within system applications; building project management tools; providing operational support; and producing end-user friendly reports. Apply online […]

add clinic location to a form

Need form build help…I need to add a users current clinic location and address to a form.  We only have the symbol option of adding clinic name.  (the symbol for address is “for printing use only”).  If I try to use this symbol, it breaks the form.  thanks!

I have created a form with data displays and radio buttons. My goal is to get the radio button to auto populate the correct choice depending on the value in the data display. Example: Patients BMI- OBSNOW BMI is 28. I have a radio button (DOCUMENT.BMI) field with the choices of under 18.5, 18.5-24.99, 25 […]

Hoping someone has run into this before. So here’s the situation, I’m designing in an Encounter form in VFE with a button/action that needs to open a specific Entry Template. Previously we were using CQIC forms but we are now moving away from them so the “custom” MEL functions don’t work anymore. Using Entry-CCC and […]

Form Not Updating

Hello All, This is a strange problem.  I’m hoping someone else has come across it.  I can’t seem to update a variable name in MEL. Some background:  I ran into an issue where a function was returning a value that was unexpected and that value depended on whether the form was in a visit with […]

Hello all, I’m editing a handout that currently prints out only OBS terms. I was curious what the syntax would be for document variables. Current: Pre-Operative Orders:”, “B,u,1″)} {CFMT(OBSNOW(“PREOPLABSORD”),””,””,”B”,” “)}{CFMT(OBSNOW(“12LEADEKG”), “”, “”, “B”, ” “)}{CFMT(OBSNOW(“COAG COMMENT”), “”, “”, “B”, ” “)}{CFMT(OBSNOW(“PRGPTFMHX”), “”, “”, “B”, ” “)} vs (what I tried) {CFMT(OBSNOW(“PREOPLABSORD”),””,””,”B”,” “)}{CFMT(OBSNOW(“12LEADEKG”), “”, “”, “B”, […]

Identifying Medicare Patients

Hello All, I am curious how people identify Medicare patients in MEL code.  There are two ways that I do this right now, neither of which I think is completely satisfactory. Option1: Use INS_NAME() and check for ‘Medicare’ as their insurance.  I also need to check against a list of Medicare advantage plans.  The downside […]

I built a ‘check-out’ form entry, to guide through the check-out process. Trying to find the date of the most recent office visit (could be signed, but most likely not). Do not see any MEL to list documents. Is there any function to do this? Otherwise, thinking to: (1) LIST_OBS(“BP SYSTOLIC”,”signed”,”delimited”,”value”) (2) LIST_OBS(“BP SYSTOLIC”,”unsigned”,”delimited”,”value”) (3) […]

I’m trying to see if a certain obs term is blank or the last time it was recorded is over 365 days ago OR if another obs term is blank or if it was last recorded over 365 days ago. Here is what I have for Missing: (LASTOBSVALUE(“MALCR”) == “” OR durationdays(last_signed_obs_date(“MALCR”), str(._TODAYSDATE)) >=365) OR […]

I’m working on a basic form to help our community health workers keep track of their patients’ specialists appointments in hopes to better aid them in helping others. Essentially I have 9 different sections with obsterms to store a specialist appt name, phone #, date, address, time, and what mode of transport the pt will […]

OK, we have a VFE form that we received from a third party and have been given permission to modify it as we need to and I have discovered a bug in their original design, but yet I cannot figure out why this bug is happening. Error: <-BAD VALUE OR BAD INDEX I have narrowed […]

Button to add next blank Obs

I’m not sure if what I’m thinking is possible but I’d love to hear some ideas if anyone has any. Right now I have a form with a bunch of action buttons for different kinds of DME products. When the button is pushed it adds a line of text into an multi line edit field […]

End goal here is to pull the medications that are controlled substances and display those. Using MEDS_AFTER there doesn’t seem to be a field that identifies whether a drug is a controlled substance or not. I use the following piece frequently to pull meds {!fn xGrabMeds() { local temp = getfield(MEDS_AFTER(“delimited”), “|”, “”) local hold […]

USEROK issues

I want to get something like the following USEROK script to work in a text component. It’s important that a pop-up doesn’t occur if the patient has a GFR <15 and a Dx of N18.5 OR a GFR <15 and a Dx of N18.6. The problem I am having is my condition fires even when […]

Text Component Error

I am trying to pull the patient’s last DOS into a text component using the following code… {IF(APPT_PRIOR() “”) THEN sub(str(APPT_PRIOR()), 1, 10) ELSE “” ENDIF} When the patient has a prior appointment it works just fine, however if they haven’t been in yet, instead of getting a blank, I am getting this error… {IF(APPT_PRIOR() […]

Are you having difficulty getting all your custom forms developed and deployed?   Why not hire a VFE Forms Developer to assist with getting your forms done. I have over 26 years of software development experience with 17 years of Healthcare IT including HL7 interface development and various clinical systems support. The most recent 4+ […]

Nested USERYESNO

I am wanting to write a code that would have a set of nested useryesno prompts. Basically, if the answer to the first useryesno is “yes” then I want it to trigger another useryesno. Does anyone if this is possible. Thanks!

I’m working on a medication reconciliation form for the MAs do to at the start of an encounter. I want it set up like a chart so it lists all of the medications on their med lists and they can note whether the person is compliant or not and add comments. Ideally the names of […]

Logged In User

Does anyone know of a data symbol or MEL code that will populate the name of the person currently logged in. I am wanting to pull that information into a data display. Thanks!

Another question for everyone: I’m trying to use a custom function in a text component. Basically, I want to make a text component that pulls in specific information from any order added during this update. Here’s what I have now: {fmt(“Orders”, “B,2″)} {‘{getOrders()}’} { fn getOrders() { local tests = getfield(ORDERS_NEW(“delimited”,””),”|”,””) local temp local testrslt […]

I am looking for the Calculations to get the WHO Percentiles for infants based on their Gestational Age at Birth. I have the WHO tables saved out in the same location as the old height_age, weigh_age, etc. files.   If I use the WHO calculation for percentiles that you can find on the CHUG forums it works great […]

On CPS12. I have been trying to figure out a way to pull in the appointment information that was linked to the document (in the Update Chart Dialog box). We have a number of users that can’t seem to get right the LOC of the appointment and sometimes even the date. I was really hoping […]

MEL Math: Limiting Value to Decimal Places

Howdy Fellow CHUGgers!   Looking to find the syntax or verbiage for limiting a numerical result to x number of decimal places. Let’s say, two for this example (x.xx).   Bonus Points:  Linking to an online information source for this kind knowledge (0 points awarded for linking to CHUG forums).   Thanks!

I searched the forums for this but couldn’t find what I was looking for so I apologize if this is a repeated question. I am needing to pull the Primary insurance, primary insurance ID#, secondary insurance, secondary insurance id # into a custom built form into a data display.   I have thought about using […]

Is there a way to code a visibility based on a patient having an appointment with a certain appointment book? (past appt or future appt) For example, if a patient has ever seen or will ever see Dr. Smith, I would code “Dr. Smith pt” on the HPI, to make it apparent to nurses. I’ve […]

Hello, Has anyone had success with adding MEL code to a history or letter view? I have a function that works perfectly in a form, however when you add it to the history view it doesn’t work, or gives unhelpful error messages. Some functions such as ADDDATES don’t work at all. Thanks    

Additional Potential Diagnoses appearing

Hello, I have a form that adds in an order, along with a diagnosis code using the “MEL_ADD_ORDER” function. The problem I am seeing is that in the orders window, under the potential diagnosis section, there are additional options coming up that I do not want. The additional potential diagnosis that I do not want, […]

I would like to populate a dropdown with all the provider type ’1′ users with their listname from the doctorfacility table. I only get the current user who is in the update. I need all the active providers(type 1) from the doctorfacilty table. Any help is appreciated.

‘find’ in data display help

I can get the AppointmentsId to show up when using the following mel expression in a data display… find(“Document”,“AppointmentsID”) but am not having any success getting the FacilityId to show up with the following… find(“_PatientAppointments”,“FacilityId”,“AppointmentsId”, find(“Document“,“AppointmentsId”)) What am I missing? I do have the update linked to an appointment or the first expression would have […]

MEL Watcher Expression with Multiple Outcomes/Actions

I feel like I’ve done this in a past form, but cannot locate it, so I’m turning to my fellow Chuggers.  I want to create a MEL watcher expression that will look for an order being entered, then take a few actions:  print a handout, write data to the MUActivityLog, write a value to a […]

DOCUMENT.SUMMARY

Is it possible to update the DOCUMENT.SUMMARY with MEL code? Maybe a RUNPROCESS action button within a form? I haven’t had any success. Seems like you can only edit when you start or end an update. Thanks, Rob

does anybody have a COWS form?

Hi gang, A provider in our clinic would like an Clinical Opiod Withdrawal Screener (COWS) form. I was wondering of any of you wonderful CHUG members had something on hand before I went to reinvent the wheel.   Many thanks in advance! you can google COWS form for a good idea of what it is.

Last Observation by Specific Users

Does anyone know of a way to pull the last obs value if it was signed by any one of a specified list of users. I know that LASTOBSVALUEBYUSER() will show me the value for whomever is signed in but in this instance the observations will most likely be signed by the provider’s medical assistant […]