ArchetypeSchemaProvider

public class ArchetypeSchemaProvider

Utility class that provides a convenient way for getting the json schemas needed for loading an archetype on the EhrLibViewer.

Constructors

ArchetypeSchemaProvider

public ArchetypeSchemaProvider(Context context, String archetypesPropertyFile, String schemasRootDir)

Provides default datatypes, layouts and ontology schema for specific archetypes. All available archetype schema must be specified in a property file provided as input argument

Parameters:
  • context – the application context
  • archetypesPropertyFile – the path of the Archetype Property file, containing a list of key-values like =
  • schemasRootDir – the root dir (under assets folder) containing all archetypes schemaa (note that each subfolder is a folder for a specific archetype. e.g blood_pressure)

Methods

getAdlStructureSchema

public String getAdlStructureSchema(String archetypeClass)

Get the adl schema for the specified archetype class, or null if not available

Parameters:
  • archetypeClass – the archetype class, (e.g openEHR-EHR-OBSERVATION.blood_pressure.v1)
Returns:

the json schema representing the internal structure of this specific archetype, or null if not available

getDatatypesSchema

public String getDatatypesSchema(String archetypeClass)

Get the datatypes schema for the specified archetype class, or null if not available

Parameters:
  • archetypeClass – the archetype class, (e.g openEHR-EHR-OBSERVATION.blood_pressure.v1)
Returns:

the json schema containing the internal structure of datatypes used for visually representing this specific archetype, or null if not available

getLayoutSchema

public String getLayoutSchema(String archetypeClass)

Get the Layout schema for the specified archetype class, or null if not available

Parameters:
  • archetypeClass – the archetype class, (e.g openEHR-EHR-OBSERVATION.blood_pressure.v1)
Returns:

the json schema of the default layout, or null if not available

getOntologySchema

public String getOntologySchema(String archetypeClass)

Get the ontology schema for the specified archetype class, or null if not available

Parameters:
  • archetypeClass – the archetype class, (e.g openEHR-EHR-OBSERVATION.blood_pressure.v1)
Returns:

the json schema of the default ontology, or null if not available