Advertisement
Guest User

Untitled

a guest
Jan 13th, 2023
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. /**
  2. * This Source Code Form is subject to the terms of the Mozilla Public License,
  3. * v. 2.0. If a copy of the MPL was not distributed with this file, You can
  4. * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
  5. * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
  6. *
  7. * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
  8. * graphic logo is a trademark of OpenMRS Inc.
  9. */
  10. package org.openmrs.module.receivedrugs.api;
  11.  
  12. import java.util.List;
  13.  
  14. import org.openmrs.annotation.Authorized;
  15. import org.openmrs.api.APIException;
  16. import org.openmrs.api.OpenmrsService;
  17. import org.openmrs.module.receivedrugs.ReceivedrugsConfig;
  18. import org.openmrs.module.receivedrugs.api.pojo.ReceiveDrugDetails;
  19. import org.openmrs.module.receivedrugs.api.pojo.ReceiveDrugs;
  20. import org.openmrs.module.receivedrugs.Item;
  21. import org.springframework.transaction.annotation.Transactional;
  22.  
  23. /**
  24. * The main service of this module, which is exposed for other modules. See
  25. * moduleApplicationContext.xml on how it is wired up.
  26. */
  27. public interface ReceivedrugsService extends OpenmrsService {
  28.  
  29. /**
  30. * Returns an item by uuid. It can be called by any authenticated user. It is fetched in read
  31. * only transaction.
  32. *
  33. * @param uuid
  34. * @return
  35. * @throws APIException
  36. */
  37. @Authorized()
  38. @Transactional(readOnly = true)
  39. Item getItemByUuid(String uuid) throws APIException;
  40.  
  41. /**
  42. * Saves an item. Sets the owner to superuser, if it is not set. It can be called by users with
  43. * this module's privilege. It is executed in a transaction.
  44. *
  45. * @param item
  46. * @return
  47. * @throws APIException
  48. */
  49. @Authorized(ReceivedrugsConfig.MODULE_PRIVILEGE)
  50. @Transactional
  51. Item saveItem(Item item) throws APIException;
  52.  
  53. @Transactional
  54. ReceiveDrugs SaveReceiveDrugs(ReceiveDrugs t);
  55.  
  56. @Transactional
  57. ReceiveDrugDetails SaveReceiveDrugDetails(ReceiveDrugDetails t);
  58.  
  59. List<ReceiveDrugs> GetGrnList(String uuid);
  60.  
  61. List<ReceiveDrugDetails> GetReceiveDrugDetails(String id);
  62.  
  63. }
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement