Class: Openphar::Models::Monograph
- Inherits:
-
BaseEntity
- Object
- Lutaml::Model::Serializable
- BaseEntity
- Openphar::Models::Monograph
- Defined in:
- lib/openphar/models/monograph.rb
Overview
Represents a pharmacopoeia monograph
This is the base class for all monograph types. Each monograph knows how to serialize itself to Neo4j and JSON-LD formats.
Direct Known Subclasses
BiologicalSubstanceMonograph, ChemicalDrugMonograph, Chp::Biologic, Chp::Monograph, CrudeDrugMonograph, FormulationMonograph, PhInt::DosageFormMonograph
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BaseEntity
jsonld_context, neo4j_label, neo4j_labels_string, #to_cypher, #to_cypher_match, #to_jsonld, #to_neo4j_node, #to_neo4j_properties
Class Method Details
.jsonld_type ⇒ Object
44 45 46 |
# File 'lib/openphar/models/monograph.rb', line 44 def jsonld_type 'Monograph' end |
.neo4j_labels ⇒ Object
40 41 42 |
# File 'lib/openphar/models/monograph.rb', line 40 def neo4j_labels ['Monograph'] end |
Instance Method Details
#iri ⇒ Object
49 50 51 |
# File 'lib/openphar/models/monograph.rb', line 49 def iri "#{Openphar.base_iri}/data/monograph/#{id}" end |
#label(lang = 'en') ⇒ Object
53 54 55 |
# File 'lib/openphar/models/monograph.rb', line 53 def label(lang = 'en') pref_label[lang] || pref_label.values.first end |