private void storePatient ( final Patient patient ) { try { patients . put ( patient . getIdentifierFirstRep ( ) . getValue ( ) , patient ) ; // if storing is successful the notify the listeners that listens on // any patient => patient/* final String bundleToString = currentPatientsAsJsonString ( ) ; broadcaster . broadcast ( new OutboundEvent . Builder ( ) . name ( "patients" ) . data ( String . class , bundleToString ) . build ( ) ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; } }
Conceptual wrapper for storing in a db