Skip to content

Instantly share code, notes, and snippets.

View mherman22's full-sized avatar
:octocat:
Try again and again and again

Herman Muhereza mherman22

:octocat:
Try again and again and again
View GitHub Profile
@mherman22
mherman22 / patient
Created September 28, 2023 05:49
$everything in fhir
java.lang.AssertionError:
Expected: response with HTTP status indicating request was handled successfully
but: response with status code <500> with message "Failed to call access method: org.hibernate.QueryException: not an association: patient"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at org.openmrs.module.fhir2.providers.r3.PatientFhirResourceProviderIntegrationTest.shouldReturnForPatientTypeEverythingWhenCountIsSpecifiedAsXml(PatientFhirResourceProviderIntegrationTest.java:764)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
@mherman22
mherman22 / initializer.txt
Created August 20, 2023 17:07
Run "mvn clean install" on openmrs module initializer
mherman22@kuntakinte:~/Pictures/gsoc2023/openmrs-module-initializer$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Initializer [pom]
[INFO] Initializer API [jar]
[INFO] Initializer API with Bahmni [jar]
[INFO] Initializer API 2.2 [jar]
[INFO] Initializer API 2.3 [jar]
@Test
public void generateUUIDsForTests() {
int count = 10;
for (int i = 0; i < count; i++) {
UUID uuid = UUID.randomUUID();
String uuidString = uuid.toString();
System.out.println("Generated UUID: " + uuidString);
}
}
@mherman22
mherman22 / procedure.txt
Created March 17, 2023 12:21
procedure
Mar 17, 2023 2:57:42 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring DispatcherServlet 'openmrs'
WARN - OpenmrsJspServlet.rescanTldsIfNeeded(56) |2023-03-17T14:57:47,693| Rescanning TLDs
Mar 17, 2023 2:57:50 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mar 17, 2023 3:08:29 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring StaticDispatcherServlet 'openmrs_static_content'
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:55,763| Reading from demo.liquibasechangelog
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:56,036| Successfully acquired change log lock
INFO - Slf4JLogger.log(43) |2023-03-17T15:13:57,041| Table procedure_tbl created
import 'package:flutter/material.dart';
class CreateProfilePage extends StatefulWidget {
const CreateProfilePage({super.key});
@override
State<CreateProfilePage> createState() => _CreateProfilePageState();
}
class _CreateProfilePageState extends State<CreateProfilePage> {
@mherman22
mherman22 / dbdeserialising.java
Created March 10, 2022 12:32
just for keeps
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
public class JsonToDatabase {
@mherman22
mherman22 / WatchFolder.java
Created March 9, 2022 13:29
this class monitors a folder and in particular it monitors the info file. In the infoReading() Method, the data inside the info file is read into a json object whenever the there is a change to the file
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
@Entity
@Table(name = "project")
public class InfoFile {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long infoFile_id;
private String batchErrorstate;
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
import static java.nio.file.LinkOption.*;
import java.nio.file.attribute.*;
import java.io.*;
import java.util.*;
/**
* watching a directory for changes to files.
*/
@mherman22
mherman22 / Merging PR for 2 branches
Created October 18, 2021 14:14 — forked from alopresto/Merging PR for 2 branches
Instructions to merge pull requests for multiple branches (master, support, etc.)
#Steps to merge/close pull requests with two main branches
As NiFi now has a 1.0 (master) and 0.x (support) branch, pull requests (PR) must be applied to both. Here is a step-by-step guide for committers to ensure this occurs for all PRs.
1. Check out the latest master
``` $ git checkout master
$ git pull upstream master
```
2. Check out the PR (example #327). This will be in `detached-HEAD` state. (Note: You may need to edit the `.git/config` file to add the `fetch` lines [below](#fetch))