SQL export available for Postgresql

There is a new file ‘schema.sql‘ in all the directories of the data models. It is a SQL script for PostgreSQL.

The script creates the structure of a relational table containing the attributes defined in the data model. It also creates the data types for those attributes with an enumeration of values.

For those attributes being arrays or objects, it creates a JSON attribute (allowed in PostgreSQL).

If you need additional features in this export please report them to info@smartdatamodels.org.

See an example.

Postgresql elephant

Sargon ontology available for mapping with Smart Data Models

There is a service for mapping any smart data models with one (or several) external ontologies. Now the SARGON ontology 1.0 for energy is available for this mapping.

The Sargon mapping file is located in the ontologies_files folder ad the umbrella repository data-models.

The description of SARGON is below.

SARGON ( SmArt eneRGy dOmain oNtology ) is an open-source effort to define semantic descriptions of the smart assets in building automation and smart grid and the relationships between them. SARGON consists of an extensible dictionary of terms and concepts in and around buildings and smart grids, a set of relationships for linking and composing concepts together, and a flexible data model permitting seamless integration of SARGON with existing tools and databases. Through the use of powerful Semantic Web technology, SARGON can describe the broad set of Devices and custom features, assets and subsystems found across the building stock in a consistent matter.

Draft of a python package available

Now we have a draft version of a python package to integrate the smart data models with your developments. It is a beta version so you can expect some issues when using it. We will be glad if you report it at info@smartdatamodels.org or suggest new features. Thanks to Anthony Uphof for his contributions (only a few of them are in this draft, next version will include them)

To install

pip install -i test.pypi.org/simple/ pysmartdatamodels

The functions included are:

1- List all data models. Function list_all_datamodels()

2- List all subjects. Function list_all_subjects()

3- List the data models of a subject. Function datamodels_subject(subject)

4- List description of an attribute. Function description_attribute(subject, datamodel, attribute)

5- List data-type of an attribute. Function datatype_attribute(subject, datamodel, attribute)

6- Give reference model for an attribute. Function model_attribute(subject, datamodel, attribute)

7- Give reference units for an attribute. Function attributes_datamodel(subject, datamodel)

8- List the attributes of a data model. Function attributes_datamodel(subject, datamodel)

9- List the NGSI type (Property, Relationship or Geoproperty) of the attribute. Function ngsi_datatype_attribute(subject, datamodel, attribute)

11- Print a list of data models attributes separated by a separator. Function print_datamodel(subject, datamodel, separator, meta_attributes)

12- Update the official data model list or the database of attributes from the source. Function update_data()

New data models Citation and Immunization at Hl7 subject (Health)

In the subject, Hl7 is being progressively mapped

The following data models Citation and Immunization are mapped. In order to make it compatible with NGSI-LD some minor adjustments were necessary: 1) A limit in the recursive definition of data models has been applied (only 4 levels). 2) Modify the coding attribute to meet the examples.  3) Added the attribute type to be compatible with NGSI.

There are another 135 data models in the queue, and we hope they will be available soon. And other minor adjustments have been also included in the specification.

See it in subject Hl7 in the Smart Health domain.

  • Citation. The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.
  • Immunization. Describes the event of a patient being administered a vaccine or a record of immunization as reported by a patient, a clinician, or another party.

logo fhir

New data model WaterQualityPredicted at WaterQuality subject

A new data model for water quality prediction is being released based on the actual use cases. Located at the water quality subject.

Thanks to the project https://www.digital-water.city/ for its contribution

  • WaterQualityPredicted. Water Quality Predicted data model is intended to represent predictions of water quality at a certain water mass (river, lake, sea, etc.) section

Thanks to the contributors.

 

New data model Practitioner at HL7 subject (Health)

In the new subject, Hl7 is being progressively mapped

The following data model is the Practitioner data model. In order to make it compatible with NGSI-LD some minor adjustments were necessary: 1) A limit in the recursive definition of data models has been applied (only 4 levels). 2) Modify the coding attribute to meet the examples.  3) Added the attribute type to be compatible with NGSI.

There are another 137 data models in the queue, and we hope they will be available soon. And other minor adjustments have been also included in the specification.

See it in subject Hl7 in the Smart Health domain.

  • Practitioner. A person who is directly or indirectly involved in the provisioning of healthcare.

logo fhir

New Observation data model at the new subject SDMX

SDMX is a standard for the codification of statistical information. Retrieving these types of data and inserting them in systems based on JSON/JSON-LD is a tough task performed by the project Interstat.

Thanks to its collaboration we have a new subject, dataModel.SDMX where these data models for mapping this standard will be located. this subject belongs to the Cross-Sector domain.

The first one is the Observation data model.

  • Observation. A single observation in the SDMX Cube, may have one or more associated measured values

Sdmx logo

New database of data models’ versions

In the main menu, it has been extended the submenu of list data models with a complete database of all versions of the data models.

It includes not only the data model, subject, and version but also the data directly linked to the raw version of the data model.

You can find it at Home -> List of data models -> List of data models versions.

Semantic-versioning

New data model Medication at subject HL7 (Health)

In the new subject, Hl7 is being progressively mapped

The following data model is the Medication data model. In order to make it compatible with NGSI-LD some minor adjustments were necessary: 1) A limit in the recursive definition of data models has been applied (only 4 levels). 2) Change the ‘const’ clause in json schema by an enum of one value to make it compatible with YAML (open API 3.0). 3) the type attribute has been renamed to hl7type because otherwise conflicts with NGSI. Regarding the recursive definition of attributes, we expect that it would be more than enough for most of the practical applications. There are another 138 data models in the queue, and we hope they will be available soon. And other minor adjustments have been also included in the specification.

See it in subject Hl7 in the Smart Health domain.

  • Medication. This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering medication as well as for making statements about medication use.

logo fhir

Release source code for some of the services. For python developers.

In the tools option of the main menu, there are a few services to help you to use, create and debug your data models.

Although working, some of these services are limited. We are releasing the code for some of the services to allow you to contribute with improvments.

It appears by the end of the page with texts like this:

“source code of this service if you want to improve it.”

Source code has an hyperlink pointing to the specific script in the utils directory.

They are created in python and connected to the WP forms in each option

Specifically