medispring / icure-backend

OSS version of the iCure Medical File Management software
GNU General Public License v2.0
0 stars 1 forks source link

[MS-3248] Empty hcp parent id check improvement #194

Closed phil1618 closed 4 years ago

phil1618 commented 4 years ago

When a Sumehr is generated, the HCP hierarchy is resolved.

This hierarchy is built by running through the full HCP parent genealogy.

It happens that HCP have no parent. If so, the case where hcp.getParentId() == null is handle. But it also happens that hcp.getParentId() == "".

The purpose of this PR is to handle the later case and therefore to handle missing HCP Id queries throwing :

protected void assertDocIdHasValue(String docId) { Assert.hasText(docId, "document id cannot be empty"); }

Screen Shot 2020-03-20 at 11 03 25