profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/sravanthi17/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sravanthi Naraharisetti sravanthi17 Amazon Boston Full stack developer

Bahmni/bahmni-vagrant 9

Management of Vagrant box using Packer. Out-Of-The-Box bahmni on CentOS 6.7

Bahmni/bahmni-offline 5

Repo to hold bahmni offline code. This will support Chromium app and Android app as of now.

Bahmni/bahmni-docker 3

Configuration required to build and run bahmni docker images

Bahmni/emr-functional-tests 3

emr functional tests

Bahmni/bahmni-connect 2

Front end for the Bahmni Connect, written in AngularJS

Bahmni/bahmni-docker-old 2

DEPRECATED - This repository contains the relevant docker configuration for setting up Bahmni

Bahmni/bahmni-gauge 2

Bahmni Automation Test Suite using Gauge Framework

Bahmni/bahmni-java-utils 2

This repository has various functional utilities needed by bahmni.

Bahmni/bahmni-tw-playbooks 2

Contains the files related to local environments

Bahmni/form-controls 2

Repository for form controls

push eventopenmrs/openmrs-module-cohort

Ian

commit sha 8519da569990de60a2795e4e3746c4523c3f12ba

Fix loading of module in new environment

view details

push time in an hour

Pull request review commentopenmrs/openmrs-contrib-qaframework

MF-532: Implement an E2E test for the login flow of refapp-3.x

+webapp.url=https://openmrs-spa.org/openmrs/spa

Is this the baseurl that are we going to use?

Will it be suitable for the test that has "create" operations? (ex: patient registration)

jayasanka-sack

comment created time in 4 hours

PR opened openmrs/openmrs-contrib-qaframework

MF-532: Implement an E2E test for the login flow of refapp-3.x

Purpose

The purpose of this pr is to fix MF-532

Approach

  • Create a new property file to store properties
  • Remove step definition files of the ocl client (Because it has been already moved to a separate project)
  • Implement an E2E test for the login flow of refapp-3.x

Demo

Kapture 2021-06-17 at 19 51 12

+37 -28

0 comment

7 changed files

pr created time in 4 hours

PR opened openmrs/openmrs-esm-htmlforms

Bump postcss from 7.0.21 to 7.0.36

Bumps postcss from 7.0.21 to 7.0.36. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/releases">postcss's releases</a>.</em></p> <blockquote> <h2>7.0.36</h2> <ul> <li>Backport ReDoS vulnerabilities from PostCSS 8.</li> </ul> <h2>7.0.35</h2> <ul> <li>Add <a href="https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users">migration guide link</a> to PostCSS 8 error text.</li> </ul> <h2>7.0.34</h2> <ul> <li>Fix compatibility with <code>postcss-scss</code> 2.</li> </ul> <h2>7.0.33</h2> <ul> <li>Add error message for PostCSS 8 plugins.</li> </ul> <h2>7.0.32</h2> <ul> <li>Fix error message (by <a href="https://github.com/admosity"><code>@​admosity</code></a>).</li> </ul> <h2>7.0.31</h2> <ul> <li>Use only the latest source map annotation (by <a href="https://github.com/emzoumpo"><code>@​emzoumpo</code></a>).</li> </ul> <h2>7.0.30</h2> <ul> <li>Fix TypeScript definition (by <a href="https://github.com/nex3"><code>@​nex3</code></a>)</li> </ul> <h2>7.0.29</h2> <ul> <li>Update <code>Processor#version</code>.</li> </ul> <h2>7.0.28</h2> <ul> <li>Fix TypeScript definition (by <a href="https://github.com/nex3"><code>@​nex3</code></a>).</li> </ul> <h2>7.0.27</h2> <ul> <li>Fix TypeScript definition (by <a href="https://github.com/nex3"><code>@​nex3</code></a>).</li> </ul> <h2>7.0.26</h2> <ul> <li>Fix TypeScript definition (by <a href="https://github.com/nex3"><code>@​nex3</code></a>)</li> </ul> <h2>7.0.25</h2> <ul> <li>Fix absolute path support for Windows (by <a href="https://github.com/tomrav"><code>@​tomrav</code></a>)</li> </ul> <h2>7.0.24</h2> <ul> <li>Fix TypeScript definition (by <a href="https://github.com/keithamus"><code>@​keithamus</code></a>).</li> </ul> <h2>7.0.23</h2> <ul> <li>Update <code>Processor#version</code>.</li> </ul> <h2>7.0.22</h2> <ul> <li>Add funding link for <code>npm fund</code>.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's changelog</a>.</em></p> <blockquote> <h2>7.0.36</h2> <ul> <li>Backport ReDoS vulnerabilities from PostCSS 8.</li> </ul> <h2>7.0.35</h2> <ul> <li>Add migration guide link to PostCSS 8 error text.</li> </ul> <h2>7.0.34</h2> <ul> <li>Fix compatibility with <code>postcss-scss</code> 2.</li> </ul> <h2>7.0.33</h2> <ul> <li>Add error message for PostCSS 8 plugins.</li> </ul> <h2>7.0.36</h2> <ul> <li>Backport ReDoS vulnerabilities from PostCSS 8.</li> </ul> <h2>7.0.35</h2> <ul> <li>Add migration guide link to PostCSS 8 error text.</li> </ul> <h2>7.0.34</h2> <ul> <li>Fix compatibility with <code>postcss-scss</code> 2.</li> </ul> <h2>7.0.33</h2> <ul> <li>Add error message for PostCSS 8 plugins.</li> </ul> <h2>7.0.32</h2> <ul> <li>Fix error message (by <a href="https://github.com/admosity"><code>@​admosity</code></a>).</li> </ul> <h2>7.0.31</h2> <ul> <li>Use only the latest source map annotation (by Emmanouil Zoumpoulakis).</li> </ul> <h2>7.0.30</h2> <ul> <li>Fix TypeScript definition (by Natalie Weizenbaum).</li> </ul> <h2>7.0.29</h2> <ul> <li>Update <code>Processor#version</code>.</li> </ul> <h2>7.0.28</h2> <ul> <li>Fix TypeScript definition (by Natalie Weizenbaum).</li> </ul> <h2>7.0.27</h2> <ul> <li>Fix TypeScript definition (by Natalie Weizenbaum).</li> </ul> <h2>7.0.26</h2> <ul> <li>Fix TypeScript definition (by Natalie Weizenbaum).</li> </ul> <h2>7.0.25</h2> <ul> <li>Fix absolute path support for Windows (by Tom Raviv).</li> </ul> <h2>7.0.24</h2> <ul> <li>Fix TypeScript definition (by Keith Cirkel).</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/postcss/postcss/commit/67e3d7b3402c5d3d036ab7c1e781f86910d6ca72"><code>67e3d7b</code></a> Release 7.0.36 version</li> <li><a href="https://github.com/postcss/postcss/commit/54cbf3c4847eb0fb1501b9d2337465439e849734"><code>54cbf3c</code></a> Backport ReDoS vulnerabilities from PostCSS 8</li> <li><a href="https://github.com/postcss/postcss/commit/12832f3d203474bd273bd06bd3b2407567bfe09e"><code>12832f3</code></a> Release 7.0.35 version</li> <li><a href="https://github.com/postcss/postcss/commit/4455ef6baf84ceea87cb662131f95d798063896c"><code>4455ef6</code></a> Use OpenCollective in funding</li> <li><a href="https://github.com/postcss/postcss/commit/e867c794b5d646839350dd4b76f3cc81423413e6"><code>e867c79</code></a> Add migration guide to PostCSS 8 error</li> <li><a href="https://github.com/postcss/postcss/commit/32a22a98bc4de9c7a2489041ceae24eedc62144f"><code>32a22a9</code></a> Release 7.0.34 version</li> <li><a href="https://github.com/postcss/postcss/commit/22939829688574b9acdbd29106ca2ec9470b2b17"><code>2293982</code></a> Lock build targets</li> <li><a href="https://github.com/postcss/postcss/commit/2c3a111a940b373a60fae196e63931b3b6e9d8ca"><code>2c3a111</code></a> Release 7.0.33 version</li> <li><a href="https://github.com/postcss/postcss/commit/4105f21b48d75847e822e89746633792c478922b"><code>4105f21</code></a> Use yaspeller instead of yaspeller-ci</li> <li><a href="https://github.com/postcss/postcss/commit/c8d02a0da503f9fa5d96a854a2c9244710c18c72"><code>c8d02a0</code></a> Revert yaspeller-ci removal</li> <li>Additional commits viewable in <a href="https://github.com/postcss/postcss/compare/7.0.21...7.0.36">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

pr created time in a day

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+Feature: Vitals Management++  Background:+    Given a user clicks on Capture Vitals link from Patient dashboard+    Then the system loads Vitals page++  @selenium+  @vitals+  Scenario: Capture Patient vitals

Christine will be editing the description to provide more context on this, you can reach-out to her for more feedback

kdaud

comment created time in 2 days

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+package org.openmrs.contrib.qaframework.automation;++import static org.junit.Assert.assertTrue;++import org.openmrs.contrib.qaframework.RunTest;+import org.openmrs.reference.page.FindPatientPage;+import org.openmrs.reference.page.PatientCaptureVitalsPage;+import org.openmrs.uitestframework.test.TestData;++import io.cucumber.java.After;+import io.cucumber.java.Before;+import io.cucumber.java.en.And;+import io.cucumber.java.en.Given;+import io.cucumber.java.en.Then;++public class VitalsAndTriagingSteps extends Steps {++	private PatientCaptureVitalsPage patientCaptureVitalsPage;+	private TestData.PatientInfo testPatient;++	@Before(RunTest.HOOK.SELENIUM_VITALS)+	public void visitPatientDashboard() {+	  testPatient = createTestPatient();+	  initiateWithLogin();	  +	  findPatientPage = (FindPatientPage) homePage.goToFindPatientRecord().waitForPage();+	  findPatientPage.enterPatient(testPatient.identifier);+	  findPatientPage.waitForPageToLoad();+	  dashboardPage = findPatientPage.clickOnFirstPatient();+	  dashboardPage.startVisit().waitForPage();+	}++	@After(RunTest.HOOK.SELENIUM_VITALS)+	public void destroy() {+	  deletePatient(testPatient);+	  quit();+	}++	@Given("a user clicks on Capture Vitals link from Patient dashboard")+	public void launchVitalsPage() {+	  patientCaptureVitalsPage = (PatientCaptureVitalsPage) dashboardPage.goToPatientCaptureVitalsPage().waitForPage();+	}++	@Then("the system loads Vitals page")+	public void systemloadsVitalsPage() {+	  assertTrue(textExists("Vitals"));+	}++	@And("a user enters patient vitals")+	public void enterPatientVitals() {+	  patientCaptureVitalsPage.setHeightField("180");+	  patientCaptureVitalsPage.setWeightField("77");+	  patientCaptureVitalsPage.setTemperatureField("35.8");+	  patientCaptureVitalsPage.setPulseField("124");+	  patientCaptureVitalsPage.setRespiratoryField("115");+	  patientCaptureVitalsPage.setBloodPressureFields("122", "75");+	  patientCaptureVitalsPage.setBloodOxygenSaturationField("54");+	}++	@And("a user clicks on save button")+	public void savePatientVitals() {+	  patientCaptureVitalsPage.confirm();+	  patientCaptureVitalsPage.save();+	}++	@Then("the system adds patient vitals into the vitals table")+	public void systemAddsPatientVitals() {	  +	  assertTrue(patientCaptureVitalsPage.containsText("Vitals"));	

i guess this is no where else on the page until Vitals exist!

After carrying out investigation on the page, I stand to agree with your guess.

This suggests to me that idea behind the commented Code Block might be left out. However, from the technical-end, I think the first function should be implemented to properly mimic the end user experience on the feature. {

patientCaptureVitalsPage.showPatientVitals(); then assertTrue(patientCaptureVitalsPage.containsText("Vitals"));

}

kdaud

comment created time in 2 days

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+Feature: Vitals Management++  Background:+    Given a user clicks on Capture Vitals link from Patient dashboard+    Then the system loads Vitals page++  @selenium+  @vitals+  Scenario: Capture Patient vitals

add extra scenarios to handle success/failure and validation cases

a little more light on this and then I act accordingly

kdaud

comment created time in 2 days

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+Feature: Vitals Management++  Background:+    Given a user clicks on Capture Vitals link from Patient dashboard+    Then the system loads Vitals page++  @selenium+  @vitals+  Scenario: Capture Patient vitals

Please add extra scenarios to handle success/failure and validation cases

kdaud

comment created time in 2 days

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+package org.openmrs.contrib.qaframework.automation;++import static org.junit.Assert.assertTrue;++import org.openmrs.contrib.qaframework.RunTest;+import org.openmrs.reference.page.FindPatientPage;+import org.openmrs.reference.page.PatientCaptureVitalsPage;+import org.openmrs.uitestframework.test.TestData;++import io.cucumber.java.After;+import io.cucumber.java.Before;+import io.cucumber.java.en.And;+import io.cucumber.java.en.Given;+import io.cucumber.java.en.Then;++public class VitalsAndTriagingSteps extends Steps {++	private PatientCaptureVitalsPage patientCaptureVitalsPage;+	private TestData.PatientInfo testPatient;++	@Before(RunTest.HOOK.SELENIUM_VITALS)+	public void visitPatientDashboard() {+	  testPatient = createTestPatient();+	  initiateWithLogin();	  +	  findPatientPage = (FindPatientPage) homePage.goToFindPatientRecord().waitForPage();+	  findPatientPage.enterPatient(testPatient.identifier);+	  findPatientPage.waitForPageToLoad();+	  dashboardPage = findPatientPage.clickOnFirstPatient();+	  dashboardPage.startVisit().waitForPage();+	}++	@After(RunTest.HOOK.SELENIUM_VITALS)+	public void destroy() {+	  deletePatient(testPatient);+	  quit();+	}++	@Given("a user clicks on Capture Vitals link from Patient dashboard")+	public void launchVitalsPage() {+	  patientCaptureVitalsPage = (PatientCaptureVitalsPage) dashboardPage.goToPatientCaptureVitalsPage().waitForPage();+	}++	@Then("the system loads Vitals page")+	public void systemloadsVitalsPage() {+	  assertTrue(textExists("Vitals"));+	}++	@And("a user enters patient vitals")+	public void enterPatientVitals() {+	  patientCaptureVitalsPage.setHeightField("180");+	  patientCaptureVitalsPage.setWeightField("77");+	  patientCaptureVitalsPage.setTemperatureField("35.8");+	  patientCaptureVitalsPage.setPulseField("124");+	  patientCaptureVitalsPage.setRespiratoryField("115");+	  patientCaptureVitalsPage.setBloodPressureFields("122", "75");+	  patientCaptureVitalsPage.setBloodOxygenSaturationField("54");+	}++	@And("a user clicks on save button")+	public void savePatientVitals() {+	  patientCaptureVitalsPage.confirm();+	  patientCaptureVitalsPage.save();+	}++	@Then("the system adds patient vitals into the vitals table")+	public void systemAddsPatientVitals() {	  +	  assertTrue(patientCaptureVitalsPage.containsText("Vitals"));	

i guess this is no where else on the page until Vitals exist!

kdaud

comment created time in 2 days

Pull request review commentopenmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

+package org.openmrs.contrib.qaframework.automation;++import static org.junit.Assert.assertTrue;++import org.openmrs.contrib.qaframework.RunTest;+import org.openmrs.reference.page.FindPatientPage;+import org.openmrs.reference.page.PatientCaptureVitalsPage;+import org.openmrs.uitestframework.test.TestData;++import io.cucumber.java.After;+import io.cucumber.java.Before;+import io.cucumber.java.en.And;+import io.cucumber.java.en.Given;+import io.cucumber.java.en.Then;++public class VitalsAndTriagingSteps extends Steps {++	private PatientCaptureVitalsPage patientCaptureVitalsPage;+	private TestData.PatientInfo testPatient;++	@Before(RunTest.HOOK.SELENIUM_VITALS)+	public void visitPatientDashboard() {+	  testPatient = createTestPatient();+	  initiateWithLogin();	  +	  findPatientPage = (FindPatientPage) homePage.goToFindPatientRecord().waitForPage();+	  findPatientPage.enterPatient(testPatient.identifier);+	  findPatientPage.waitForPageToLoad();+	  dashboardPage = findPatientPage.clickOnFirstPatient();+	  dashboardPage.startVisit().waitForPage();+	}++	@After(RunTest.HOOK.SELENIUM_VITALS)+	public void destroy() {+	  deletePatient(testPatient);+	  quit();+	}++	@Given("a user clicks on Capture Vitals link from Patient dashboard")+	public void launchVitalsPage() {+	  patientCaptureVitalsPage = (PatientCaptureVitalsPage) dashboardPage.goToPatientCaptureVitalsPage().waitForPage();+	}++	@Then("the system loads Vitals page")+	public void systemloadsVitalsPage() {+	  assertTrue(textExists("Vitals"));+	}++	@And("a user enters patient vitals")+	public void enterPatientVitals() {+	  patientCaptureVitalsPage.setHeightField("180");+	  patientCaptureVitalsPage.setWeightField("77");+	  patientCaptureVitalsPage.setTemperatureField("35.8");+	  patientCaptureVitalsPage.setPulseField("124");+	  patientCaptureVitalsPage.setRespiratoryField("115");+	  patientCaptureVitalsPage.setBloodPressureFields("122", "75");+	  patientCaptureVitalsPage.setBloodOxygenSaturationField("54");+	}++	@And("a user clicks on save button")+	public void savePatientVitals() {+	  patientCaptureVitalsPage.confirm();

please confirm the existing indention and correspond to it throughout this file

kdaud

comment created time in 2 days

pull request commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

@ibacher I have merged the new servlet into an already existing servlet and renamed it to SmartLaunchOptionServlet. Also made all required changes. PTAL

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

+/*+ * This Source Code Form is subject to the terms of the Mozilla Public License,+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.+ *+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS+ * graphic logo is a trademark of OpenMRS Inc.+ */+package org.openmrs.module.smartonfhir.web.servlet;++import static org.openmrs.module.smartonfhir.web.servlet.SmartAccessConfirmation.PATIENT_NAME;+import static org.openmrs.module.smartonfhir.web.servlet.SmartAccessConfirmation.VISIT_NAME;++import javax.crypto.spec.SecretKeySpec;+import javax.servlet.http.HttpServlet;+import javax.servlet.http.HttpServletRequest;+import javax.servlet.http.HttpServletResponse;++import java.io.IOException;+import java.net.URLDecoder;+import java.net.URLEncoder;+import java.nio.charset.StandardCharsets;++import org.keycloak.crypto.*;+import org.keycloak.jose.jws.JWSBuilder;+import org.keycloak.representations.JsonWebToken;+import org.openmrs.module.smartonfhir.util.SmartSecretKeyHolder;++public class SmartVisitSelected extends HttpServlet {

Yes, you are right we can merge this servlet with the already existing SmartPatientSelected servlet. I will do this too.

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

 public class FindPatientPageController { 	 	public void get(PageModel model, @RequestParam("app") AppDescriptor app, @RequestParam("token") String token,-	        UiSessionContext sessionContext, UiUtils ui) throws UnsupportedEncodingException {+	        @RequestParam("launchType") String launchType, UiSessionContext sessionContext, UiUtils ui)+	        throws UnsupportedEncodingException { 		model.addAttribute("afterSelectedUrl", app.getConfig().get("afterSelectedUrl").getTextValue() + "&token="-		        + URLEncoder.encode(token, StandardCharsets.UTF_8.name()));+		        + URLEncoder.encode(token, StandardCharsets.UTF_8.name()) + "&launchType=" + launchType);

Thanks, I will encode this too.

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

 			<groupId>org.openmrs.module</groupId> 			<artifactId>fhir2-omod</artifactId> 		</dependency>+		<dependency>+			<groupId>org.openmrs.module</groupId>+			<artifactId>emrapi-api</artifactId>

I will add this.

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

 			<groupId>org.openmrs.module</groupId> 			<artifactId>fhir2-omod</artifactId> 		</dependency>+		<dependency>+			<groupId>org.openmrs.module</groupId>+			<artifactId>emrapi-api</artifactId>

This needs to be added to the required_modules in config.xml.

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

+[+  {+    "id": "smartonfhir.search.visit",+    "description": "List of all visits for a particular patient",+    "order": 2,+    "config": {+      "afterSelectedUrl": "ms/smartVisitSelected?visitId={{visitId}}&patientId={{patient.uuid}}&token={{token}}",+      "heading": "Select Visit"+    }+  }+]
]

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

+/*+ * This Source Code Form is subject to the terms of the Mozilla Public License,+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.+ *+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS+ * graphic logo is a trademark of OpenMRS Inc.+ */+package org.openmrs.module.smartonfhir.web.servlet;++import static org.openmrs.module.smartonfhir.web.servlet.SmartAccessConfirmation.PATIENT_NAME;+import static org.openmrs.module.smartonfhir.web.servlet.SmartAccessConfirmation.VISIT_NAME;++import javax.crypto.spec.SecretKeySpec;+import javax.servlet.http.HttpServlet;+import javax.servlet.http.HttpServletRequest;+import javax.servlet.http.HttpServletResponse;++import java.io.IOException;+import java.net.URLDecoder;+import java.net.URLEncoder;+import java.nio.charset.StandardCharsets;++import org.keycloak.crypto.*;+import org.keycloak.jose.jws.JWSBuilder;+import org.keycloak.representations.JsonWebToken;+import org.openmrs.module.smartonfhir.util.SmartSecretKeyHolder;++public class SmartVisitSelected extends HttpServlet {

I'd really love it if we could collapse this functionality into a single servlet with some branching logic. Multiple servlets make the server lifecycle harder to manage (i.e., when this gets used in practice). E.g., replacing both this and SmartVisitSelected with:

public class SmartLaunchOptionsSelected extends HttpServlet {
	
	public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {
		String token = getParameter(req, "token");
		String patientId = getParameter(req, "patientId");
		String visitId = getParameter(req,"visitId");
		
		if (token == null || (patientId == null && visitId == null)) {
			res.sendError(HttpServletResponse.SC_BAD_REQUEST);
			return;
		}
		JsonWebToken tokenSentBack = new JsonWebToken();
		if (patientId != null) {
			tokenSentBack.setOtherClaims("patient", patientId);
		}
		
		if (visitId != null) {
			tokenSentBack.setOtherClaims("visit", visitId);
		}
		
		SecretKeySpec hmacSecretKeySpec = new SecretKeySpec(SmartSecretKeyHolder.getSecretKey(), JavaAlgorithm.HS256);
		KeyWrapper keyWrapper = new KeyWrapper();
		keyWrapper.setAlgorithm(Algorithm.HS256);
		keyWrapper.setSecretKey(hmacSecretKeySpec);
		SignatureSignerContext signer = new MacSignatureSignerContext(keyWrapper);
		
		String appToken = new JWSBuilder().jsonContent(tokenSentBack).sign(signer);
		String encodedToken = URLEncoder.encode(appToken, StandardCharsets.UTF_8.name());
		
		String decodedUrl = URLDecoder.decode(token, StandardCharsets.UTF_8.name());
		res.sendRedirect(decodedUrl.replace("{APP_TOKEN}", encodedToken));
	}
	
	private String getParameter(HttpServletRequest request, String parameter) {
		String result = request.getParameter(parameter);
		if (result == null || result.isEmpty()) {
			return null;
		}
		
		return  result;
	}
}
theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

 public class FindPatientPageController { 	 	public void get(PageModel model, @RequestParam("app") AppDescriptor app, @RequestParam("token") String token,-	        UiSessionContext sessionContext, UiUtils ui) throws UnsupportedEncodingException {+	        @RequestParam("launchType") String launchType, UiSessionContext sessionContext, UiUtils ui)+	        throws UnsupportedEncodingException { 		model.addAttribute("afterSelectedUrl", app.getConfig().get("afterSelectedUrl").getTextValue() + "&token="-		        + URLEncoder.encode(token, StandardCharsets.UTF_8.name()));+		        + URLEncoder.encode(token, StandardCharsets.UTF_8.name()) + "&launchType=" + launchType);

Please URL encode the launchType as we do with the token

theanandankit

comment created time in 3 days

Pull request review commentopenmrs/openmrs-module-smartonfhir

FM2-395: Support standalone launch for Encounter context

+<%+    ui.decorateWith("appui", "standardEmrPage")+    ui.includeJavascript("coreapps", "visit/jquery.dataTables.js")+    ui.includeJavascript("coreapps", "visit/filterTable.js")+    ui.includeCss("coreapps", "visit/visits.css")++    def timeFormate = new java.text.SimpleDateFormat("hh:mm:ss")+%>+<script>+    var breadcrumbs = [+        { icon: "icon-home", link: '/' + OPENMRS_CONTEXT_PATH + '/index.htm' },+        { label: "${ ui.message("Find Visit")}"}+    ];+</script>++<p id="filter-tags" class="filters">+${ui.message("Filters")}+<% visitTypesWithAttr.each { type, attr -> %>+<span class="filter disabled" value="${type}"/>+<script type="text/javascript">+    jq(document).ready(function () {+        if ('${attr.color}' != null) {+            jq("#visittype-tag-${type}.tag").css("background",'${attr.color}');+        }+    })+</script>+<span id="visittype-tag-${type}" class="tag ${attr.shortName}" style="cursor:pointer;" >+    ${ui.format(attr.name)}+</span>+</span>+<% } %>+</p>++<table class="table table-sm table-responsive-sm table-responsive-md table-responsive-lg table-responsive-xl" id="active-visits" width="100%" border="1" cellspacing="0" cellpadding="2">+    <thead>+    <tr>+        <th>${ ui.message("coreapps.person.name") }</th>+        <th>${ ui.message("Date Created") }</th>+        <th>${ ui.message("Time Created") }</th>+        <th>${ ui.message("Status") }</th>+        <th>${ ui.message("coreapps.retrospectiveCheckin.visitType.label") }</th>+        <th>SMART Launch</th>+    </tr>+    </thead>+    <tbody>+    <% if (visitSummaries == null || (visitSummaries !=null && visitSummaries.size() == 0) ) { %>+    <tr>+        <td colspan="4">${ ui.message("coreapps.none") }</td>+    </tr>+    <% } %>+    <% visitSummaries.each { v ->+        def url = "/${ contextPath }/${afterSelectedUrl}".replace("{{visitId}}", v.uuid)+    %>+    <tr id="visit-${ v.id }">+        <td>${ ui.encodeHtmlContent(ui.format(v.patient)) }</td>+        <td>${ ui.encodeHtmlContent(ui.formatDatePretty(v.startDatetime)) }</td>+        <td>${ ui.encodeHtmlContent(ui.format(timeFormate.format(v.startDatetime))) }</td>+        <td>+            <% if (v.stopDatetime == null || new Date().before(v.stopDatetime)) { %> Active <% } else { %> Inactive <% } %>+        </td>+        <td>+            <% if (v.visitType) { %>+            <span style="display:none">${v.visitType.id}</span>+            <span id="visittype-tag-${ visitTypesWithAttr[v.visitType.id].shortName }" style="background: ${ visitTypesWithAttr[v.visitType.id].color }" class="tag" >+                ${ui.format(v.visitType)}+            </span>+            <br/>+            <% } %>+        </td>+        <td>+            <a href= ${url}>Click Here</a>+        </td>+    </tr>+    <% } %>+    </tbody>+</table>++<% if (visitSummaries !=null && visitSummaries.size() > 0) { %>+${ ui.includeFragment("uicommons", "widget/dataTable", [ object: "#active-visits",+                                                         options: [+                                                                 bFilter: true,+                                                                 bJQueryUI: true,+                                                                 bLengthChange: false,+                                                                 iDisplayLength: 10,+                                                                 sPaginationType: '\"full_numbers\"',+                                                                 bSort: false,+                                                                 sDom: '\'ft<\"fg-toolbar ui-toolbar ui-corner-bl ui-corner-br ui-helper-clearfix datatables-info-and-pg \"ip>\''+                                                         ]+]) }+<% } %>
<% } %>

theanandankit

comment created time in 3 days

push eventopenmrs/openmrs-module-cohort

Ian

commit sha 3a06ef99a8cfe7a82800ba25d449720cfb5d27d9

Change cohort.location_id to int and add an index

view details

push time in 3 days

PR opened openmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

Ticket ID: https://issues.openmrs.org/browse/RATEST-151

Description: E2E Vitals and triaging workflow

+143 -2

0 comment

6 changed files

pr created time in 3 days

PR closed openmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

Ticket ID: https://issues.openmrs.org/browse/RATEST-151

Description: E2E Vitals and triaging workflow

+146 -3

0 comment

7 changed files

kdaud

pr closed time in 3 days

PR opened openmrs/openmrs-contrib-qaframework

RATEST-151: E2E Vitals and triaging workflow

Ticket ID: https://issues.openmrs.org/browse/RATEST-151

Description: E2E Vitals and triaging workflow

+143 -2

0 comment

6 changed files

pr created time in 3 days

push eventopenmrs/openmrs-module-cohort

corneliouzbett

commit sha cc90905391e439239a381ff18ee69d2d7e70deba

Add cohortMemberAttribute & cohortMemberAttributeType data model,APIs, & rest support

view details

push time in 3 days

push eventopenmrs/openmrs-module-cohort

corneliouzbett

commit sha ba08ba1d78f1c1b193b23e40556f3ad0cf4249b0

Feat: Add cohortMemberAttribute & cohortMemberAttributeType (#1) * Feat: Add cohortMemberAttribute & cohortMemberAttributeType data model & APIs * Feat: Add rest endpoints for cohortMember attribute & attributeType * Document cohortMember & cohortMemberAttributeType resources To be improve subsequently

view details

push time in 3 days

delete branch openmrs/openmrs-module-cohort

delete branch : feat

delete time in 3 days

PR merged openmrs/openmrs-module-cohort

Feat: Add cohortMemberAttribute & cohortMemberAttributeType

Adds cohortMemberAttribute and cohortMemberAttributeType tables, and APIs

+1276 -44

0 comment

30 changed files

corneliouzbett

pr closed time in 3 days

push eventopenmrs/openmrs-module-cohort

jecihjoy

commit sha b8b71da05c0dac2ca0cc7174fbab95b0f32238f4

COH-29: Fixed an issue with custom representation in cohort resource (#2)

view details

push time in 4 days