Open joeflack4 opened 1 year ago
It's possible as well that there's something we are misunderstanding. I need to double check if this is really blocking us from uploading to our FHIR server, but OAK is not letting me load/convert these Obographs after I wrote a patch to manually add them back into the JSON:
key = 'https://loinc.org/lc0000001'
cooked_entry = Node(id="JsonObj(id='https://loinc.org/lc0000001')", lbl=None, type=None, meta=None)
def order_up(key: Any, cooked_entry: YAMLRoot) -> None:
""" A cooked entry is ready to be added to the return slot """
if cooked_entry[key_name] != key:
> raise ValueError(
f"Slot: {loc(slot_name)} - attribute {loc(key_name)} " \
f"value ({loc(cooked_entry[key_name])}) does not match key ({loc(key)})")
E ValueError: Slot: nodes - attribute id value (JsonObj(id='https://loinc.org/lc0000001')) does not match key (https://loinc.org/lc0000001)
ROBOT just uses the obographs parser, all obographs related issues should be reported / mirrored there as well.
I find this issue worrying though - the way you describe it there is definitely something wrong with obographs serialisation. The way to phrase it is: "class declarations without further assertions are not included by obographs serialisation". If you can add a minimum example and make an issue on the obographs tracker, as well as tagging Jules and me, that would be great.
Overview
My team is doing some conversions from OWL -> Obographs JSON -> FHIR JSON, and we noticed that some concepts were missing from the output.
I took a look, and these are all root nodes; they are all
rdfs:subClassOf
owl:Thing
.Edges that reference these nodes exist, but the declaration of the nodes themselves do not. It's not just a FHIR JSON issue. I looked in my Obographs JSON (downloadable here), and the declarations are missing there as well.
I imagine this is an issue for the other ontologies I'm working with, but for this particular ontology,
comploinc.owl
, these are the declarations of the root nodes that are missing from the Obographs JSON:Expected vs Actual
Expected I would expect to see something like this in my Obographs JSON:
Or maybe something like this, with one or more nulls for missing properties:
Actual No declarations appear.
Reproducibility
robot
1.9.1 if not already presentWhat I tried
I examined the CLI to see if there was an option dealing with root nodes, but I didn't see anything in
java -jar bin/robot.jar convert -h
that seems like it could help with this.Additional information
In this example, only root nodes (subClassOf owl:Thing) were missing, but in some other ontologies I looked at, there may have been other cases missing. Will update if I have more time to get concrete examples.
Blocked by