Skip to content

Instantly share code, notes, and snippets.

View djazayeri's full-sized avatar

Darius Jazayeri djazayeri

View GitHub Profile
old:
{
"id": "emr.archivesRoom",
"extensionPointId": "org.openmrs.mirebalais.homepageLink",
"type": "link",
"label": "emr.app.archivesRoom.label",
"url": "emr/paperrecord/archivesRoom.page",
"icon": "icon-folder-open",
"order": 1,
"requiredPrivilege": "App: emr.archivesRoom"
h3. User Story
As a XXX I should be able to YYY so that ZZZ.
h3. Story Background
h3. Dependencies
h3. Assumptions
<htmlform>
...
<obsgroup groupingConceptId="...">
<obs conceptId="..."/>
<obs conceptId="..."/>
<obs conceptId="..."/>
</obsgroup>
</htmlform>
@djazayeri
djazayeri / gist:6810739
Created October 3, 2013 14:26
Example of a NamedRepresentation for "fullchildren" for ConceptResource
@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
}
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>
{
"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"
},
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" }]
@djazayeri
djazayeri / gist:f38e466747bc5f260504
Created September 16, 2014 14:23
devtest02 broken by order entry units update
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
@djazayeri
djazayeri / gist:4cb4d21a1fbc732f7edc
Created September 25, 2014 18:50
Failed to build standalone
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)
@djazayeri
djazayeri / gist:7081ce9e56862ef953f7
Created October 10, 2014 15:36
coded-or-free-text-answer.js
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 {