Errors relating to BaseList in Patient Medical Record [Healthcare domain]

Hello Community members,

I am having a bug on the Patient Medical Record page of Healthcare Module.

I am getting the error: TypeError: frappe.ui.BaseList is not a constructor

I’m not sure if the code below is proper:

    	frappe.model.with_doctype("Patient Medical Record", function() {
    		me.page.list = new frappe.ui.BaseList({
    			hide_refresh: true,
    			page: me.page,
    			method: 'erpnext.healthcare.page.medical_record.medical_record.get_feed',
    			args: {name: patient},
    			parent: $("<div></div>").appendTo(me.page.main),
    			render_view: function(values) {
    				var me = this;
    				var wrapper = me.page.main.find(".result-list").get(0);
    				values.map(function (value) {
    					var row = $('<div class="list-row">').data("data", value).appendTo($(wrapper)).get(0);
    					new frappe.medical_record.Feed(row, value);
    				});
    			},
    			show_filters: true,
    			doctype: "Patient Medical Record",
    		});
    		show_patient_info(patient, me);
    		me.page.list.run();
    	});
    };

Please Advise.

Thanks

Hi, Cannot replicate this on the master branch, can you share the branch and version you are getting this error?
thanks

i am on:

ERPNext: v9.x.x-develop (abc0632) (develop) and
Frappe Framework: v9.x.x-develop (2bb2544) (develop)

Are you running VM by any chance?

running on ubuntu 17.10

Hello,

I have temporarily fixed this error by adding the lines to js/list.min.js under frappe/public/build.json.

"js/list.min.js": [ ...
		"public/js/frappe/ui/filters/filters.js",
		"public/js/frappe/ui/base_list.js",
]

Don’t forget to bench build.

3 Likes

this doesn’t solved the issue on mine…

Installed Apps

ERPNext: v11.1.48 (master)

Frappe Framework: v11.1.43 (master)

This issue is fixed in the just released v12, please upgrade.

Thanks!