authoring-cli 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authoring-cli",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "CLI for SNOMED CT authoring against authoring-services",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -703,6 +703,82 @@ already tell you as a side effect of being safe to call unconditionally. Don't t
703
703
  are primitive" from this command as "conforms" — it isn't; run `transform-axiom` to find out for
704
704
  sure.
705
705
 
706
+ ### Property axioms (property chains, transitive/reflexive properties) — not reachable via add-axiom
707
+
708
+ `add-axiom`/`update-axiom`/`get-concept --axioms` all operate on `classAxioms` — OWL axioms whose
709
+ subject is a *class* (a defined concept) and whose content Snowstorm can render as relationships.
710
+ A **property axiom** — an OWL axiom whose subject is instead a *property/attribute concept* — is a
711
+ structurally different thing and is invisible through that whole pathway. The clearest real example
712
+ is attribute `127489000` |Has active ingredient|, which on the International Edition carries two OWL
713
+ Axiom reference set members: a plain `SubObjectPropertyOf(:127489000 :762951001)` and a
714
+ property-chain composition `SubObjectPropertyOf(ObjectPropertyChain(:127489000 :738774007)
715
+ :127489000)` (read: "has active ingredient, of something that is a modification of X, implies has
716
+ active ingredient of X" — the chain that lets a modified substance still classify under its parent
717
+ active ingredient). `get-concept --axioms` on that concept surfaces only the first member, reinterpreted
718
+ as a stated `Is a` relationship — the property-chain member doesn't appear there at all, confirmed
719
+ live. This isn't a bug to work around with `update-axiom`; Snowstorm's browser-concept view genuinely
720
+ has no rendering for a property-chain axiom, so there is no `classAxioms`/`gciAxioms` entry to add or
721
+ edit in the first place.
722
+
723
+ **Seeing what's actually there: `get-property-axioms`.** Before assuming a property/attribute
724
+ concept has no property axioms (or trying to guess one's exact current wording before editing),
725
+ check directly — this reads the OWL Axiom reference set member list verbatim, nothing hidden:
726
+
727
+ ```
728
+ authoring-cli get-property-axioms --id 127489000
729
+ ```
730
+
731
+ ```json
732
+ {
733
+ "conceptId": "127489000",
734
+ "refsetId": "733073007",
735
+ "total": 2,
736
+ "axioms": [
737
+ { "memberId": "a24c3458-...", "active": true, "released": true, "effectiveTime": "20190731",
738
+ "moduleId": "900000000000012004", "owlExpression": "SubObjectPropertyOf(:127489000 :762951001)" },
739
+ { "memberId": "70c580eb-...", "active": true, "released": true, "effectiveTime": "20180731",
740
+ "moduleId": "900000000000012004",
741
+ "owlExpression": "SubObjectPropertyOf(ObjectPropertyChain(:127489000 :738774007) :127489000)" }
742
+ ]
743
+ }
744
+ ```
745
+
746
+ This is the one place the property-chain member shows up at all — confirmed live side-by-side with
747
+ `get-concept --axioms --id 127489000` on the same concept, which returns exactly one `classAxioms`
748
+ entry (the first member above, reinterpreted as a relationship) and nothing about the chain. It also
749
+ works on an ordinary class concept, returning the same raw `owlExpression` text `classAxioms`
750
+ otherwise reformats — useful when you want the literal OWL text rather than the resolved-relationship
751
+ view. Pass `--active-only` to drop inactive members; by default every member shows, active or not.
752
+
753
+ **Adding one: `add-property-axiom`.** Writes the raw OWL expression directly as an OWL Axiom
754
+ reference set member (`733073007`) addressed at the *property* concept, bypassing the concept view
755
+ entirely:
756
+
757
+ ```
758
+ authoring-cli add-property-axiom --property-id 127489000 \
759
+ --expression "SubObjectPropertyOf(ObjectPropertyChain(:127489000 :738774007) :127489000)" \
760
+ --project <projectKey> --task <taskKey>
761
+ ```
762
+
763
+ Two things this command does *not* do, unlike every other axiom-mutating command in this skill:
764
+
765
+ - **No structured validation output.** `POST /{branch}/members` (the endpoint this goes through)
766
+ has no `?validate=true` equivalent, so there's no `validationResults` to check. That doesn't mean
767
+ anything goes, though — confirmed live, Snowstorm still parses the OWL expression on this write and
768
+ rejects syntactically invalid input immediately, just as an unstructured HTTP 500 carrying the raw
769
+ OWL-parser error text (`Encountered "..." ... Was expecting one of: ... SubObjectPropertyOf ...`)
770
+ rather than every other command's clean 400 + validationResults. What it will *not* catch is a
771
+ syntactically valid but semantically wrong expression (wrong property id, a class-axiom shape
772
+ pointed at a property concept, etc.) — that's accepted and stored, and would only surface later,
773
+ e.g. as a classification failure. Run `get-property-axioms` afterwards to confirm the new member
774
+ looks right, since there's no save-time validation summary to read instead.
775
+ - **No `axiomId` to use afterwards.** The response's `memberId` (a server-assigned UUID, also the
776
+ `memberId` `get-property-axioms` reports) is the closest equivalent, but there is currently no
777
+ `update-property-axiom`/`delete-property-axiom` command — this skill covers creation and retrieval
778
+ only. Changing or removing a property axiom once added needs a direct reference-set-member call
779
+ outside the CLI (`PUT`/`DELETE /{branch}/members/{uuid}`) or the Authoring Workbench's own OWL
780
+ axiom editor.
781
+
706
782
  ## Redundant stated Is-a relationships
707
783
 
708
784
  Adding a new stated `Is a` (`116680003`) parent to a concept that already has a broader stated