...
To create and expose a resource you would have to write two classes:
- https://source.openmrs.org/browse/~br=trunk/Modules/webservices.rest/trunk/omod/src/main/java/org/openmrs/module/webservices/rest/web/resource/PatientResource.java?hb=truePatientResource (contains one-line implementations of getByUniqueId, save, etc, and descriptions of the available representations)
- PatientController (contains short methods to connect Spring MVC's request handling to PatientResource)
...