Child pages
  • Using local extension
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This page describes how local extensions are implemented.

Local extensions were created to have base code that will be used for real extensions when they will be registered by OpenMRS community and ready to use.

In ExtensionsUtil class we keep URLs of extensions that we are using. Because some extensions are not registered yet we decided to use simple name of extensions as replacement for URL.

public final class ExtensionsUtil {

    /** */
    private static final String DATE_CREATED_URL = "";

    /** */
    private static final String CREATOR_URL = "";

    // Local extensions
    private static final String CHANGED_BY_URL = "changedBy";
    private static final String DATE_CHANGED_URL = "dateChanged";
    private static final String VOIDED_URL = "voided";

Above code snippet shows few local extensions that we created.

Replacing local extensions

When some extension will be registered we should use it in FHIR code. Let's suppose that "changedBy" extension is registered under URL - "". All you have to do is replacing value of CHANGED_BY_URL with this URL. 

  • No labels