CSC/ECE 517 Spring 2013/OSS M604: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 21: Line 21:


The 'change patient relationships' module utilizes 5 basic files.
The 'change patient relationships' module utilizes 5 basic files.
<ol>
<li>The main page is a .jsp [http://en.wikipedia.org/wiki/JavaServer_Pages] page, the code can be found at [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/webapp/manage.jsp].</li>


The main page is a .jsp [http://en.wikipedia.org/wiki/JavaServer_Pages] page, the code can be found at [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/webapp/manage.jsp].
<li>This .jsp page is linked to a spring annotated controller [http://javapapers.com/spring/spring-annotation-based-controllers/], the code can be found at [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/web/controller/ChangeRelationshipsManageController.java].  The annotated controller maps the manage.jsp form actions using the '@RequestMapping' annotations.  This pattern can be observed by viewing the manage.jsp code and comparing the <form> tags to the @RequestMapping annotations in teh java code.</li>


This .jsp page is linked to a spring annotated controller [http://javapapers.com/spring/spring-annotation-based-controllers/], the code can be found at [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/web/controller/ChangeRelationshipsManageController.java].  The annotated controller maps the manage.jsp form actions using the '@RequestMapping' annotations.  This pattern can be observed by viewing the manage.jsp code and comparing the <form> tags to the @RequestMapping annotations in teh java code.
<li/><li>The controller along with the spring framework link the form actions from the 'manage.jsp' page to java objects defined in the following .java files.  [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/PatientSearch.java] and [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/UpdateRecord.java]</li>


The controller along with the spring framework link the form actions from the 'manage.jsp' page to java objects defined in the following .java files.  [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/PatientSearch.java] and [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/omod/src/main/java/org/openmrs/module/changerelationships/UpdateRecord.java]
<li>The module utilizes OpenMRS's services infrastructure to create services with the following code [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/api/src/main/java/org/openmrs/module/changerelationships/api/impl/ChangeRelationshipsServiceImpl.java]</li>
 
</ol>
The module utilizes OpenMRS's services infrastructure to create services with the following code [https://github.com/ashrayn/openmrs-module-m604/blob/master/changerelationships/api/src/main/java/org/openmrs/module/changerelationships/api/impl/ChangeRelationshipsServiceImpl.java]

Revision as of 01:55, 21 March 2013

OpenMRS Change Patient Relationships

README

The design document for the project can be found at [1]

The project is currently hosted at a long term VCL image found at [2]

The code for our module is hosted on github at [3]

To Use:

  1. Login with user:Admin password:Admin123.
  2. Click the 'Administration' button in the top-right corner.
  3. In the bottom-right corner, under 'patients' there should be a link for "change patient relationships".
  4. Click on the 'change patient relationships' link
  5. The content of the change patient relationships module should be displayed.

To see a list of possible patients, it may be useful to open a separate tab with the 'Find/Create Patient" menu from the main menu bar.

Writing Exercise 2

OpenMRS modules utilize the Spring MVC framework [4]

The 'change patient relationships' module utilizes 5 basic files.

  1. The main page is a .jsp [5] page, the code can be found at [6].
  2. This .jsp page is linked to a spring annotated controller [7], the code can be found at [8]. The annotated controller maps the manage.jsp form actions using the '@RequestMapping' annotations. This pattern can be observed by viewing the manage.jsp code and comparing the <form> tags to the @RequestMapping annotations in teh java code.
  3. The controller along with the spring framework link the form actions from the 'manage.jsp' page to java objects defined in the following .java files. [9] and [10]
  4. The module utilizes OpenMRS's services infrastructure to create services with the following code [11]