This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go to http://demo.openmrs.org, log in as admin/Admin123, open the JavaScript console, and do the following: | |
var URL_BASE = "http://demo.openmrs.org/openmrs/ws/rest/v1/"; | |
var resources = {}; | |
function andLog(data) { console.log(data); } | |
function andSaveAs(variable) { return function(data) { resources[variable] = data; console.log(variable + " => " + JSON.stringify(data)); } } | |
function andSaveFirstResultAs(variable) { return function(data) { data = data.results[0]; resources[variable] = data; console.log(variable + " => " + JSON.stringify(data)); } } | |
function random() { return Math.floor(Math.random() * 10000); } | |
function post(resource, data, success) { | |
$.ajax({ type: "POST", url: URL_BASE + resource, contentType: "application/json", data: JSON.stringify(data), success: success }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assertThat(updated.getNames(), containsInAnyOrder( | |
allOf( | |
hasProperty("name", is("History of present illness")), | |
hasProperty("locale", is(Locale.ENGLISH)), | |
hasProperty("localePreferred", is(true)), | |
hasProperty("conceptNameType", is(ConceptNameType.FULLY_SPECIFIED))), | |
allOf( | |
hasProperty("name", is("HPI")), | |
hasProperty("locale", is(Locale.ENGLISH)), | |
hasProperty("localePreferred", is(false)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARN - WebModuleUtil.startModule(286) |2014-11-24 13:29:31,888| Unable to refresh the WebApplicationContext for module: referenceapplication | |
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in URL [jar:file:/tmp/tomcat7-tomcat7-tmp/1416850176698.openmrs-lib-cache/allergyui/allergyui.jar!/webModuleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HL7MessageController1_8': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceController org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs1_8.HL7MessageController1_8.mainResourceController; nested exception is org.springframework.beans.factory.NoSuchBeanD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('uicommons.widget.coded-or-free-text-answer', [ 'conceptService', 'ui.bootstrap' ]) | |
.directive('codedOrFreeTextAnswer', ['ConceptService', function(ConceptService) { | |
function isExactMatch(candidate, query) { | |
query = emr.stripAccents(query.toLowerCase()); | |
return candidate.conceptName && emr.stripAccents(candidate.conceptName.name.toLowerCase()) === query; | |
} | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAdjazayer:openmrs-standalone djazayer$ mvn clean package -Dopenmrs.version=1.10.0 | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building standalone 1.1.1 | |
[INFO] ------------------------------------------------------------------------ | |
Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-enforcer-plugin/1.0/maven-enforcer-plugin-1.0.pom | |
Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/plugins/maven-enforcer-plugin/1.0/maven-enforcer-plugin-1.0.pom (7 KB at 5.8 KB/sec) | |
Downloading: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/enforcer/enforcer/1.0/enforcer-1.0.pom | |
Downloaded: http://mavenrepo.openmrs.org/nexus/content/repositories/public/org/apache/maven/enforcer/enforcer/1.0/enforcer-1.0.pom (12 KB at 34.6 KB/sec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unable to update the database. See server error logs for the full stacktrace. | |
??? Reason: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO `concept_reference_term` (`code`, `concept_source_id`, `creator`, `date_created`, `description`, `name`, `retired`, `uuid`) VALUES ('S', (SELECT concept_source_id FROM concept_reference_source WHERE uuid = 'cb523690-9012-4e72-b8bf-4253e1b1a687'), 1, '2014-08-20 00:00:00.0', 'Duration in Second(s)', 'Second(s)', 0, 'd0d36e69-402e-453e-8a7a-aec44c2915af'): Duplicate entry 'd0d36e69-402e-453e-8a7a-aec44c2915af' for key 'uuid':??? | |
???There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::20140804-1712::Deepak,Rohan:??? | |
??? Caused By: Error executing SQL INSERT INTO `concept_reference_term` (`code`, `concept_source_id`, `creator`, `date_created`, `description`, `name`, `retired`, `uuid`) VALUES ('S', (SELECT concept_source_id FROM concept_ref |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET .../module/addresshierarchy/ajax/getChildAddressHierarchyEntries.form? | |
[{ "name": "Haiti" }] | |
GET .../module/addresshierarchy/ajax/getChildAddressHierarchyEntries.form?searchString=Haiti | |
[{ "name": "Artibonite" },{ "name": "Centre" },{ "name": "Grande-Anse" },{ "name": "Nippes" },{ "name": "Nord" },{ "name": "Nord-Est" },{ "name": "Nord-Ouest" },{ "name": "Ouest" },{ "name": "Sud" },{ "name": "Sud-Est" }] | |
GET .../module/addresshierarchy/ajax/getChildAddressHierarchyEntries.form?searchString=Haiti|Artibonite | |
[{ "name": "Anse Rouge" },{ "name": "Desdunes" },{ "name": "Dessalines" },{ "name": "Ennery" },{ "name": "Gonaïves" },{ "name": "Grande Saline" },{ "name": "Gros Morne" },{ "name": "L'Estère" },{ "name": "La Chapelle" },{ "name": "Marmelade" },{ "name": "Petite Rivière de L'Artibonite" },{ "name": "Saint-Marc" },{ "name": "Saint-Michel de L'Attalaye" },{ "name": "Terre Neuve" },{ "name": "Verrettes" }] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition", | |
"name": "Example data export", | |
"customRowFilterCombination": "1 OR 2 OR 3", | |
"parameters": [ | |
{ | |
"name": "startDate", | |
"type": "java.util.Date", | |
"value": "2008-08-01" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add these properties: | |
<appframeworkVersion>2.0</appframeworkVersion> | |
<uiframeworkVersion>3.0</uiframeworkVersion> | |
Add these dependencies: | |
<dependency> | |
<groupId>org.openmrs.module</groupId> | |
<artifactId>appframework-api</artifactId> | |
<version>${appframeworkVersion}</version> | |
<type>jar</type> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RepHandler(value = NamedRepresentation.class, name = "fullchildren") | |
public SimpleObject asFullChildren(Concept delegate) throws ConversionException { | |
DelegatingResourceDescription description = fullRepresentationDescription(delegate); | |
description.removeProperty("setMembers"); | |
description.addProperty("setMembers", Representation.FULL); | |
// same for any other Collection<Concept> properties | |
// return | |
} |