human readable in MySQL
human readable in MySQL
When I run a query within OD, appointment status, and insplan.PlanNum show as words not numbers. Toggling between human readable and raw changes this. I’m building queries in MySQL workbench… is there a way to know where these are coming from and/or display them as words in the MySQL code?
Re: human readable in MySQL
To show that in MySQL Workbench, you would either need to join onto the table that has the name of item or you would have to hand code a case statement to translate enum values into English names. For example with appointment status, https://www.opendental.com/OpenDentalDo ... ppointment contains a description of AptStatus and what each number corresponds to.
Re: human readable in MySQL
And if you like to peruse source code you could check out FormQuery.MakeReadable() which contains our monster switch statement that takes raw query results and translates them to the Human Readable version that is displayed to the user via C#.
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
Re: human readable in MySQL
Thanks guys, to clarify for appointment status and insplan.PlanNum there are no tables to join. For appointment status I'd just have to hand code the statuses from the appointment table, and for insplan.planNum I would have to maybe look it up within the software?
Re: human readable in MySQL
Status is an enum so no JOIN needed. However, PlanNum is the primary key of a table so odds are you need to JOIN to it from other tables. Basic rule of thumb will be any column that starts with "FK to [table].[Column]" means you have a JOIN in your future in order to get more information about said entity.cmandile wrote:Thanks guys, to clarify for appointment status and insplan.PlanNum there are no tables to join.
The best thing about a boolean is even if you are wrong, you are only off by a bit.
Jason Salmon
Open Dental Software
http://www.opendental.com
Jason Salmon
Open Dental Software
http://www.opendental.com
Re: human readable in MySQL
I believe that in the program we display the carrier name in the insplan.PlanNum column. So you would use the insplan.CarrierNum to join to the carrier table to get the CarrierName.