I trying to add a custom MEL symbol to the banner but for some reason the data is not populating into the banner. Here is what I have done:
1. Create two functions in the meldefs2.txt file as seen below:
//
// HCC Score
//
Object: _HCC Table: CUS_RiskScore, PatientProfile Refresh: RBook
Property: Snapshot
Field: RiskScoreValue Type: String Length: 10 Hidden
Filter: PatientFilter, PatientProfileId = Patient.PatientProfileId Hidden
Join: 'PatientProfile.PatientProfileId = Cus_RiskScore.PatientId'
//
// HCC Score Date
//
Object: _RiskDate Table: CUS_RiskScore, PatientProfile Refresh: RBook
Property: Snapshot
Field: LastRiskScoreDate Type: DateTime Hidden
Filter: PatientFilter, PatientProfileId = Patient.PatientProfileId Hidden
Join: 'PatientProfile.PatientProfileId = Cus_RiskScore.PatientId'
2. I have added the following to my banner:
HCC: {! fn HCCScore() {local a = getrow("_MELHCC",0,"RiskScoreValue") return a}} {HCCScore()}
HCC Date: {! fn LastRiskScoreDate() {local a = getrow("_MELRiskDate",0,"LastRiskScoreDate") return a}} {LastRiskScoreDate()}
To troubleshoot, I have ran a MEL, SQL and DB trace. The SQL trace does not show anything. MEL trace shows that it is trying to execute but returns no results. The DB trace, however, I see a message "ERROR: 32786 COULDN'T FIND THE SYMBOL: _MELHCC" and the same message for the other MEL Symbol.
Does anyone know where I have failed and maybe guide me.
Thanks in advance.
Did you make sure to add your custom MEL variables to the melib.txt file? if you skip this step, you cannot use any of the custom MEL code you created in meldef2.txt
- open the melib.txt file (same location as the mldef files)
- find a section with other global variables:
global _MELApptType = _ApptType
global _MELLocation = _DoctorFacilityLocs
global _MELLoc = AllLocation
global _MELExtIDSpace = ExternalIDSpace
global _MELCurExtID = _PatientExternalID
global _MELCurPatientAppt = _PatientAppointments //SPR 18057
global _MELCurPatient = Patient
global _MELCurUser = User
global _MELCurObs = _MasterObs
global _MELCurProbs = _MasterProb
global _MELCurMeds = _MasterMed - Add your custom MEL variables below these like so:
global _MELHCC = _HCC
global _MELRiskDate = _RiskDate - Save the files and attempt to use them in centricity again.
I have found that testing these custom mel codes with quicktext is good to help verify that they are working.
good luck!
that was the exact step that I forget...