I found an acceptable workaround.

  • installed telnetd into the container and started it
  • mapped some external port to port 23
  • set this external port  in my cube
  • started the IRIS Terminal
  • BINGO !

You may raise all concerns on Security and Container Isolation.  Accepted! And ignored!
Since THIS solves my issues on optical verification of the user interface.

If you are not afraid of using basic COS functionality:
your reload method raises a LOCK ^myRELOAD  
and drops it with completion LOCK -^myRELOAD

Your check utility does the same but with a timeout LOCK ^myRELOAD:0
if it fails - signaled by $TEST=0  you loop and hang around and retry
for success $TEST=1 you go on but release your successful LOCK immediately
not to block anyone else.
 

According to your JSON model, I would assume this to start:
(sory had no chance to test myself)

Class Test.GEOMETRIEPOINT Extends (%SerialObject, %JSON.Adaptor, %XML.Adaptor) 
{

Property "GEO_TAB_COORDONNES" As list Of %Float;
}

Class Test.GEOMETRIELINE Extends (%SerialObject, %JSON.Adaptor, %XML.Adaptor)
{

Property "GEOMETRIE_LINE" As list Of GEOMETRIEPOINT;
}

Class Test.POLYGON Extends (%Persistent,%JSON.Adaptor, %XML.Adaptor)
{

Property "GEOMETRIE_POLYGON" As list Of GEOMETRIELINE;
{

it's an interesting line:

patient0 = Patient.parse_obj(patients_resources.search(family='familyname',given='givenname1').first().serialize())

I miss some checks if the search was successful.
Because NONE indicates a missing content.
If search(family='familyname',given='givenname1')
fails you receive NONE and this can't be serialized.  
COS would just return NullString """