Skip to content

Instantly share code, notes, and snippets.

View djazayeri's full-sized avatar

Darius Jazayeri djazayeri

View GitHub Profile
@djazayeri
djazayeri / Bahmni-CLA
Created September 21, 2018 00:12
Bahmni Contributor License Agreement
BAHMNI CONTRIBUTOR LICENSE AGREEMENT
OpenMRS, the non-profit home of the Bahmni Coalition, requests that You agree to this Contributor License Agreement for
Contributions You submit to the Bahmni Project. This Agreement protects You as a contributor as well as OpenMRS and the Bahmni
Project, it does not change Your rights to use Your Contributions for any other purpose.
By submitting your Contributions to the Bahmni Project and/or OpenMRS, You hereby agree to the terms and conditions of this
Contributor License Agreement.
0. Definitions
@djazayeri
djazayeri / gist:6e8cc1395dd9ef04decd9af9e2dbdaef
Created August 7, 2018 07:25
Error message when installing OpenMRS on Google Cloud SQL with binary logging enabled
SEVERE 8/7/18 12:34 AM:liquibase: Change Set liquibase-update-to-latest.xml::20090122-0853::bwolfe failed. Error: Error executing SQL CREATE TABLE `tmp_concept_name_tag_duplicates` AS SELECT DISTINCT concept_name_tag_id AS concept_name_tag_id FROM `concept_name_tag` WHERE concept_name_tag_id IS NOT NULL: Statement violates GTID consistency: CREATE TABLE ... SELECT.
See “Global Transaction Identifiers” at https://cloud.google.com/sql/docs/mysql/diagnose-issues.
@Configuration
public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
// Fix handling of /api/v1/addon/org.openmrs.module.appui (otherwise appui is treated as a file extension)
configurer.setUseRegisteredSuffixPatternMatch(true);
}
@Override
@djazayeri
djazayeri / encounter.json
Created March 5, 2018 21:57
visit note encounter example
{
"uuid": "22a7d95a-1198-41d8-a7fa-ab313c75b43d",
"display": "Visit Note 05\/03\/2018",
"encounterDatetime": "2018-03-05T21:53:47.000+0000",
"patient": {
"uuid": "2e6417da-f242-4ef6-adbf-1864bd9f9cf7",
"display": "100J43 - Azza Ahmed Mohamed",
"links": [
{
"rel": "self",
2017-08-16 02:40:20.114 INFO 1 --- [pool-2-thread-1] o.o.a.scheduled.FetchDetailsToIndex : Fetching OMOD for org.openmrs.module.omodreloader 1.0
2017-08-16 02:40:20.114 INFO 1 --- [pool-2-thread-1] o.o.a.scheduled.FetchDetailsToIndex : fetching config.xml from https://bintray.com/openmrs/omod/download_file?file_path=omodreloader-1.0.omod
2017-08-16 02:40:21.136 ERROR 1 --- [pool-2-thread-1] o.o.a.scheduled.FetchDetailsToIndex : Error indexing org.openmrs.module.openhmis-backboneforms
org.springframework.web.client.HttpClientErrorException: 404 Not Found
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
at org.springframework
@djazayeri
djazayeri / gist:6404c739ff16b2a4cd28ec3037e760fd
Last active April 12, 2017 23:29
pre-2.1 cohort REST API
--- Create a cohort
POST https://demo.openmrs.org/openmrs/ws/rest/v1/cohort
{"name":"Darius testing", "description": "REST", "memberIds": [515]}
=>
{
"uuid": "ca254345-429b-491c-b833-1933cdd7d828",
"display": "Darius testing",
@djazayeri
djazayeri / result.json
Created March 28, 2017 09:02
Reporting module data set export for encounters and all obs
{
"uuid": null,
"metadata": {
"columns": [
{
"datatype": "java.lang.Integer",
"name": "ENCOUNTER_ID",
"label": "ENCOUNTER_ID"
},
{
@djazayeri
djazayeri / gist:2f71e383451d94e146570a9acd8d5037
Created March 26, 2017 06:22
browser location for ocl search bug report
https://staging.openconceptlab.org/search/?collection-owner=djazayeri&collection-name=TEST&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2FTEST%2F&collection-owner=djazayeri&collection-name=OMRS&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2FOMRS%2F&collection-owner=djazayeri&collection-name=NO&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2FNO%2F&collection-owner=djazayeri&collection-name=DxStart&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2FDxStart%2F&collection-owner=djazayeri&collection-name=OMRS16&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2FOMRS16%2F&collection-owner=djazayeri&collection-name=302&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2F302%2F&collection-owner=djazayeri&collection-name=testauto&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2Ftestauto%2F&collection-owner=djazayeri&collection-name=502&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2F502%2F&collection-owner=djazayeri&collection-name=427&collection-url=%2Fusers%2Fdjazayeri%2Fcollections%2F427%2F&c
public class EvaluatedCohortResourceTest extends BaseEvaluatedResourceTest<EvaluatedCohortResource, EvaluatedCohort> {
// original file content was here
// I added this to the end
@Test
public void andelaExample() throws Exception {
GenderCohortDefinition query1 = new GenderCohortDefinition();
query1.setMaleIncluded(true);
@djazayeri
djazayeri / gist:738b5a9e54e54a2e38ff6b244a3547a1
Created March 3, 2017 23:04
failure of mvn release:prepare
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project openmrs-api: MavenReportException: Error while generating Javadoc:
[INFO] [ERROR] Exit code: 1 - /Users/djazayer/code/openmrs/openmrs-core/api/src/main/java/org/openmrs/Address.java:78: warning: no description for @param
[INFO] [ERROR] * @param address7
[INFO] [ERROR] ^
[INFO] [ERROR] /Users/djazayer/code/openmrs/openmrs-core/api/src/main/java/org/openmrs/Address.java:90: warning: no description for @param
[INFO] [ERROR] * @param address8
[INFO] [ERROR] ^
[INFO] [ERROR] /Users/djazayer/code/openmrs/openmrs-core/api/src/main/java/org/openmrs/Address.java:102: warning: no description for @param
[INFO] [ERROR] * @param address9
[INFO] [ERROR] ^