evoluteur / evolutility-server-node

Model-driven REST APIs for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
GNU Affero General Public License v3.0
112 stars 33 forks source link

using panel-list #2

Closed shanequint closed 6 years ago

shanequint commented 8 years ago

I have created a tedius version of the evolutility-server that is working great for a single table. I was wondering how I could use the panel-list to display a master-detail. I have patient data in the main table and would like to display visits, medications, symptoms, diagnoses. How would I model this in the UI-model? Any help would be greatly appreciated.

evoluteur commented 8 years ago

Can you do it the same way than the "wine cellar" example?

shanequint commented 8 years ago

Sorry I didn't get back earlier. I changed approaches and am now trying to use the field type of list for symptoms a patient might have as a test. I created a Symptoms column in my patient table and populated it with a comma separated list of Symptom ids like ['1', '3', '28', '44'] that correspond to various symptoms such as list: [ {id: '1', text: 'Anxiety'}, {id: '2', text: 'Headaches'}, {id:'3', text: 'Sleeplessness'} ...] The result in the UI is a blank set of Symptoms just multiple commas like , , , , I don't know if it is SQL Server and the tedius driver I am using or something else.

Any thoughts?

Thanks,

evoluteur commented 8 years ago

Using a column of type Text[] seems to work.

evoluteur commented 8 years ago

I still have a little work to do. It will be ready in the next few days.

shanequint commented 8 years ago

Thanks, I appreciate it. I really enjoy how it works thus far.

evoluteur commented 8 years ago

"list" fields are working. "panel-list" is not implemented yet.

shanequint commented 8 years ago

I have the "list" fields displaying, but it seems to be not showing all of the items in the list. It is not displaying the first or last item in the database field. (i.e. [1, 3, 10] would display item 3 only with empty divs for the first and last items. Also, The filter doesn't seem to work for list fields.

Any Ideas on these items?

Thanks!

evoluteur commented 8 years ago

I may have change the column type since the previous version. Make sure the column is of type "text array" and the list has ids as strings. Also, I made a new version of the client, use that one.