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
| #!/bin/sh | |
| # Copyright (C) 2009-2017 Three Nine Consulting | |
| # Always good practice to update packages. However ask user if they would like to do so | |
| # For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/ | |
| read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r | |
| echo #adding new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| sudo apt update | |
| sudo apt upgrade -y |
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
| public class DataDownloader { | |
| public void donwloadStaticCohort() throws Exception { | |
| Context context = ContextFactory.createContext(); | |
| context.openSession(); | |
| if (!context.isAuthenticated()) | |
| context.authenticate("admin", "test", "http://localhost:8081/openmrs-standalone"); | |
| int patientCounter = 0; | |
| int cohortMemberCounter = 0; |
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
| INSERT INTO `amrsreports_queued_report` VALUES (60,'MOH 361A',2,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (61,'MOH 361A',3,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (62,'MOH 361A',4,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (63,'MOH 361A',5,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (64,'MOH 361A',6,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (65,'MOH 361A',7,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (66,'MOH 361A',8,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (67,'MOH 361A',9,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (68,'MOH 361A',10,NOW(),NOW(),'NEW',UUID()); | |
| INSERT INTO `amrsreports_queued_report` VALUES (69,'MOH 361A',11,NOW(),NOW(),'NEW',UUID()); |
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
| List<Location> locationList = (List<Location>) context.getParameterValue("locationList"); | |
| for (Location location : locationList) { | |
| String personAttributeQuery = | |
| "union " + | |
| "select person_id" + | |
| " from person_attribute" + | |
| " where (voided = 0 and person_attribute_type_id = 7 and value = " + location.getLocationId() + ")" + | |
| " or (voided = 1 and person_attribute_type_id = 7 and void_reason = 'New value: " + location.getLocationId() + "')"; | |
| sql = sql + personAttributeQuery; | |
| } |
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
| var values = | |
| { | |
| "value": { | |
| "patient": { | |
| "givenName": "Testarius", | |
| "middleName": "Paul", | |
| "familyName": "Kungu", | |
| "birth": "1992-Oct-15", | |
| "birthEstimated": true, | |
| "gender": "Male" |
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
| var display = | |
| { | |
| "form": [ | |
| { | |
| "type": "fieldset", | |
| "title": "Patient Demographic", | |
| "items": [ | |
| "patient.givenName", | |
| "patient.familyName", "patient.birth", "patient.birthEstimated", | |
| "patient.age", |
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
| var schema = | |
| { | |
| "schema": { | |
| "patient": { | |
| "type": "object", | |
| "title": "Patient Demographic", | |
| "properties": { | |
| "birth": { | |
| "type": "string", | |
| "title": "Birth", |
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
| <!DOCTYPE html> | |
| <!-- | |
| Copyright 2012 Muzima Team | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
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
| /** | |
| * The contents of this file are subject to the OpenMRS Public License | |
| * Version 1.0 (the "License"); you may not use this file except in | |
| * compliance with the License. You may obtain a copy of the License at | |
| * http://license.openmrs.org | |
| * | |
| * Software distributed under the License is distributed on an "AS IS" | |
| * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| * License for the specific language governing rights and limitations | |
| * under the License. |
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
| CompositionCohortDefinition compositionCohortDefinition = new CompositionCohortDefinition(); | |
| compositionCohortDefinition.addSearch("firstCohortDefinition", firstCohortDefinition, null); | |
| compositionCohortDefinition.addSearch("secondCohortDefinition", secondCohortDefinition, null); | |
| compositionCohortDefinition.setCompositionString("firstCohortDefinition AND secondCohortDefinition"); |
NewerOlder