Wanted to Integrate my personal project with OpenMRS

That’s a general Un*x question (and so out of topic here), but assuming that tee is installed:

mvn clean install | tee log.txt

Or of course you can simply do:

mvn clean install > log.txt

But with the latter you would loose the thread until completion, hence the tee suggestion.

@mksd my bad for asking such a basic question thank you for your help , here is my log DEBUG OUTPUT mvn clean install -X log_output and the mvn clean output log

As far as I understand, this error seems to relate to Hibernate missing a JAR: apache-solr-analyzer.jar. Skimming through this thread, I can see that others have suggested that somehow you may have gotten Hibernate artifacts that don’t make it with some OpenMRS builds. So perhaps it would be worthwhile to clear .m2 and try again.

If clearing .m2 doesn’t solve anything… then you may attempt to install this missing JAR in the hope that then Hibernate finds and uses it.

I checked the dependency tree and my versions:

+- org.hibernate:hibernate-search:jar:3.4.2.Final:provided
|  +- org.hibernate:hibernate-search-analyzers:jar:3.4.2.Final:provided
|  |  +- org.apache.lucene:lucene-analyzers:jar:3.1.0:provided
|  |  \- org.apache.solr:solr-analysis-extras:jar:3.1.0:provided
...

So:

  1. Artifact: hibernate-search Version: 3.4.2.Final Location: .m2/repository/org/hibernate/hibernate-search/3.4.2.Final

  2. Artifact: solr-analysis-extras Version: 3.1.0 Location: .m2/repository/org/apache/solr/solr-analysis-extras/3.1.0

What does your .m2 look like regarding those two dependencies?

@mksd in my system 1st one is fine but 2nd one regarding solr/solr-analysis there’s no directory called solr under apache I am trying to clear .m2 and redo hte build

I believe that letting your .m2 be filled again from scratch should solve this issue.

But if it does not, you can just add the missing artifact on its own with this:

mvn org.apache.maven.plugins:maven-dependency-plugin:RELEASE:get -Dartifact=org.apache.solr:solr-analysis-extras:3.1.0:jar

Look carefully at the state of .m2/repository/org/apache/solr before and after running the above to have a sense that artifacts are indeed being brought. I also noted that some error happened because some test dependency isn’t found, but in fact it does populate the above folder.

@mksd I will try it and get back to you

@rajpratim21, as Darius said, you will have to send your data as Obs inside an Encounter object.

This answer is short and sweet and should help you get started!

Do look at the REST docs and then ask for more help if required.

@mksd I tried to rebuild first via clearing .m2 bt it still did n’t downloaded the solr , therefore I used mvn org.apache.maven.plugins:maven-dependency-plugin:RELEASE:get -Dartifact=org.apache.solr:solr-analysis-extras:3.1.0:jar as proposed by you but I get this in output

/

here are my logs after mvn clean install logs and mvn org.apache.maven.plugins:maven-dependency-plugin:RELEASE:get -Dartifact=org.apache.solr:solr-analysis-extras:3.1.0:jar log2 i do see solr under org/apache this timr

@rajpratim21, why are you trying to build the REST Web Services module in the first place. You should use an already-released version of this module. You can get it from modules.openmrs.org.

@darius my bad I guess I misinterpreted the documentation as it was written for non dev download the release😅 it caused me a lot of trouble and lot more frustration, bdw can I deploy rest module like other modules via OpenMRS web ui admin page and deploying new modules?

@rajpratim21, sorry about that!

Which documentation were you looking at, by the way? Maybe there’s a way to make it more clear?

@darius The readme file that I got with OpenMRS-module-restweb-api from GitHub I will make the required changes and add it bdw can I deploy this module like regular modue going to admin page and selection new modules?

@darius can I deploy the rest module just like other modules via admin page and selecting … The regular approach?

I think you should be able to, we don’t recommend to start/stop modules like this in production though.

@avijitghosh82 @darius @dkayiwa I have some doubts please help me get cleared , I want to create field for ECG Readings in OpenMRS core. I went to OpenMRS admin ,manage concepts ,make new concepts and give required info specifying data types etc , got an UUID and id .Now is that enough to make a new concept and can I send the data from my android client by making an Encounter with obs to this UUID is this is how we make forms please correct me if I am wrong and i will be grateful if @avijitghosh82 you explain one example of sending the forms data from android client to openmrs-core for some existing concepts,

@rajpratim21, check out the REST API documentation for the encounter resource by going to this equivalent URL on your server: http://demo.openmrs.org/openmrs/module/webservices/rest/apiDocs.htm